Appearance
API - Teams Management ​
Get all teams that the authenticated user belongs to.
Base URL: https://api.headlessforms.cloud/api/v1/teams
Note: All endpoints require authentication. Include your API token in the
Authorizationheader asBearer {API_TOKEN}or as a query parameter?api_token={API_TOKEN}.
Get All Teams ​
Retrieve all teams that the authenticated user is a member of.
Endpoint ​
GET /api/v1/teamsHeaders ​
| Key | Value |
|---|---|
| Content-Type | application/json |
| Accept | application/json |
| Authorization | Bearer |
Example Request ​
bash
curl --location --request GET 'https://api.headlessforms.cloud/api/v1/teams' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {API_TOKEN}'Response (200 OK) ​
json
{
"data": [
{
"name": "My Team",
"slug": "my-team-slug"
},
{
"name": "Another Team",
"slug": "another-team-slug"
}
]
}Response Fields ​
| Field | Type | Description |
|---|---|---|
| name | string | Team name |
| slug | string | Team slug (unique identifier) |
Error Responses ​
401 Unauthorized ​
json
{
"message": "Unauthenticated."
}Occurs when API token is missing or invalid.
500 Internal Server Error ​
json
{
"error": "Internal server error"
}Occurs when an unexpected server error happens.
Notes ​
- Only teams that the authenticated user is a member of are returned
- Teams are ordered alphabetically by name
- The
slugfield can be used in other API endpoints that require a team identifier (e.g.,/api/v1/teams/{TEAM_SLUG}/folders)
HeadlessForms Docs