Skip to content

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 Authorization header as Bearer {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/teams

Headers ​

KeyValue
Content-Typeapplication/json
Acceptapplication/json
AuthorizationBearer

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 ​

FieldTypeDescription
namestringTeam name
slugstringTeam 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 slug field can be used in other API endpoints that require a team identifier (e.g., /api/v1/teams/{TEAM_SLUG}/folders)