Organizations

List organizations

Returns the organizations, sorted by name.

Request

  • first

    int

    The number of organizations to skip before starting to return results. The default value is 0.

  • limit

    int

    The maximum number of organizations to return. If not provided, the default value is 100.

    It must be between 1 and 1000.

Response

  • organizations

    array of object

    The list of organizations.

    • id

      string

      The organization's unique identifier.

    • name

      string

      The organization's name.

    • enabled

      boolean

      Indicates if the organization is enabled. Use the Set status endpoint to change the organization's status.

GET /v1/organizations
curl -G https://example.com/v1/organizations \
-H "Authorization: Bearer org_xxxxxxx" \
-d "limit=100"
Response
{
  "organizations": [
    {
      "id": "3nV8kQ5wA6pT",
      "name": "Acme Corp",
      "enabled": true
    }
  ]
}
Errors
401
Authorization header is missing or invalid

Get organization

Returns a single organization by its identifier.

Request

  • :id

    string Required

    The organization's identifier.

Response

  • id

    string

    The organization's unique identifier.

  • name

    string

    The organization's name.

  • enabled

    boolean

    Indicates if the organization is enabled. Use the Set status endpoint to change the organization's status.

GET /v1/organizations/:id
curl https://example.com/v1/organizations/3nV8kQ5wA6pT \
-H "Authorization: Bearer org_xxxxxxx"
Response
{
  "id": "3nV8kQ5wA6pT",
  "name": "Acme Corp",
  "enabled": true
}
Errors
401
Authorization header is missing or invalid
404
organization does not exist

Create organization

Creates a new organization.

Request

  • name

    string Required

    The organization's name.

    Must be a non-empty string with a maximum of 45 characters.
  • enabled

    boolean

    Indicates if the organization is enabled once created. Logins to workspaces of a disabled organization, as well as calls made with API and MCP keys to its workspaces, return an OrganizationDisabled error. The only exception is event ingestion authenticated with an event write key, which fails with a ServiceUnavailable error instead. Calls with Organizations API keys are unaffected. Use the Set status endpoint to change the organization's status.

Response

  • id

    string

    The identifier of the created organization.

POST /v1/organizations
curl https://example.com/v1/organizations \
-H "Authorization: Bearer org_xxxxxxx" \
--json '{
"name": "Acme Corp",
"enabled": true
}'
Response
{
  "id": "3nV8kQ5wA6pT"
}
Errors
401
Authorization header is missing or invalid

Update organization

Updates the name of an organization.

Request

  • :id

    string Required

    The organization's identifier.

  • name

    string Required

    The organization's name.

    Must be a non-empty string with a maximum of 45 characters.

Response

No response.
PUT /v1/organizations/:id
curl -X PUT https://example.com/v1/organizations/3nV8kQ5wA6pT \
-H "Authorization: Bearer org_xxxxxxx" \
--json '{
"name": "Acme Corp"
}'
Errors
401
Authorization header is missing or invalid
404
organization does not exist

Set status

Sets the status of an organization, which can be enabled or disabled.

Logins to workspaces of a disabled organization, as well as calls made with API and MCP keys to its workspaces, return an OrganizationDisabled error. The only exception is event ingestion authenticated with an event write key, which fails with a ServiceUnavailable error instead. Calls with Organizations API keys are unaffected.

The organization's data and configuration are preserved and can be restored by enabling the organization again.

Request

  • :id

    string Required

    The organization's identifier.

  • enabled

    boolean Required

    Indicates if the organization is enabled.

Response

No response.
PUT /v1/organizations/:id/status
curl -X PUT https://example.com/v1/organizations/3nV8kQ5wA6pT/status \
-H "Authorization: Bearer org_xxxxxxx" \
--json '{
"enabled": true
}'
Errors
404
organization does not exist

Delete organization

Deletes an organization and all its data.

Request

  • :id

    string Required

    The organization's identifier.

Response

No response.
DELETE /v1/organizations/:id
curl -X DELETE https://example.com/v1/organizations/3nV8kQ5wA6pT \
-H "Authorization: Bearer org_xxxxxxx"
Errors
401
Authorization header is missing or invalid
404
organization does not exist