List teams
GET
/api/v1/teams
const url = 'https://example.com/%7B%7Bapp_url%7D/api/v1/teams?per=10&page=1';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/%7B%7Bapp_url%7D/api/v1/teams?per=10&page=1' \ --header 'Authorization: Bearer <token>'Retrieves the teams
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”workspace_id
integer
Workspace ID
accessible
boolean
When true, only return teams the current user can access (teams they are a member of, or all teams if they have the access_all_teams permission).
per
integer
Number of records per page
page
integer
Page number
Responses
Section titled “Responses”Successful
Media typeapplication/json
object
results
required
Array<object>
object
id
required
integer
name
required
string
badge_color
required
string
workspace_id
required
integer
created_at
required
string format: date-time
pagination
required
object
per
required
integer
page
required
integer
total
required
integer
Example
{ "results": [ { "id": 12345, "name": "Liverpool FC", "badge_color": "white", "workspace_id": 12345, "created_at": "2023-08-23T10:30:00.000Z" } ], "pagination": { "per": 10, "page": 1, "total": 100 }}Unauthorized
Media typeapplication/json
object
message
required
string
Example
{ "message": "Record not found"}Forbidden
Media typeapplication/json
object
message
required
string
Example
{ "message": "Record not found"}