Teams

Get a list of teams

get

/teams

Authorizations
Responses
curl -L \
  --url 'https://api.usepylon.com/teams' \
  --header 'Authorization: Bearer JWT'
{
  "pagination": {
    "cursor": "text",
    "has_next_page": true
  },
  "request_id": "text",
  "data": [
    {
      "id": "text",
      "name": "text",
      "users": [
        {
          "id": "text"
        }
      ]
    }
  ]
}

Get a team by its ID

get

/teams/{id}

Authorizations
Path parameters
idstringrequired

The ID of the team to fetch.

Responses
curl -L \
  --url 'https://api.usepylon.com/teams/{id}' \
  --header 'Authorization: Bearer JWT'
{
  "data": {
    "id": "text",
    "name": "text",
    "users": [
      {
        "id": "text"
      }
    ]
  },
  "request_id": "text"
}

Update an existing team

patch

/teams/{id}

Authorizations
Path parameters
idstringrequired

The ID of the team to update.

Body
namestring

The name of the team.

user_idsstring[]

The list of user IDs to add to the team. If provided, the team members will be updated to be exactly the given users.

Responses
curl -L \
  --request PATCH \
  --url 'https://api.usepylon.com/teams/{id}' \
  --header 'Authorization: Bearer JWT' \
  --header 'Content-Type: application/json' \
  --data '{"user_ids":[null]}'
{
  "data": {
    "id": "text",
    "name": "text",
    "users": [
      {
        "id": "text"
      }
    ]
  },
  "request_id": "text"
}

Create a new team

post

/teams

Authorizations
Body
namestring

The name of the team.

user_idsstring[]

The list of user IDs to add to the team.

Responses
curl -L \
  --request POST \
  --url 'https://api.usepylon.com/teams' \
  --header 'Authorization: Bearer JWT' \
  --header 'Content-Type: application/json' \
  --data '{"user_ids":[null]}'
{
  "data": {
    "id": "text",
    "name": "text",
    "users": [
      {
        "id": "text"
      }
    ]
  },
  "request_id": "text"
}

Last updated

Was this helpful?