Skip to content

Latest commit

 

History

History
73 lines (57 loc) · 1.74 KB

convert-team-to-channel.md

File metadata and controls

73 lines (57 loc) · 1.74 KB
description
Converts team to channel

Convert team to channel

URL Requires Auth HTTP Method
api/v1/teams.convertToChannel YES POST

Headers

Argument Example Required Description
X-User-Id myuser-name Required Your username hash (returned after you log in through the API)
X-Auth-Token myauth-token Required Your token (returned after you log in through the API)

Example Call

curl --location --request POST 'http://localhost:3000/api/v1/teams.convertToChannel\
--header 'X-Auth-Token: myauth-token' \
--header 'X-User-Id: myuser-name' \
-d "teamId=612b8ae982d286c3d1f5db31"

Result

Success

{

    "success": true
}

Errors

The following error can occur upon the endpoint.

  • Authorization: Requires an authentication token for the request to be made.
  • Missing Team ID or Name: Requires a valid Team ID or Name for the request to be made.
  • Invalid Team ID: Requires a valid Team ID for the request to be made.

{% tabs %} {% tab title=" Authorization" %}

{
    "status": "error",
    "message": "You must be logged in to do this."
}

{% endtab %}

{% tab title="Missing Team ID or Name" %}

{
    "success": false,
    "error": "missing-teamId-or-teamName"
}

{% endtab %}

{% tab title="Invalid Team ID" %}

{
    "success": false,
    "error": "team-does-not-exist"
}

{% endtab %} {% endtabs %}