Catalog AI
Sign In

Organizations API

List the organizations that belong to the authenticated API key's user.

Endpoints Overview

Method Endpoint Description
GET /organizations/get List all organizations available to the API key

List Organizations

Retrieve all organizations the API key's user is a member of, including the user's role in each organization.

Endpoint: GET /api/organizations/get

Headers

Header Required Description
x-api-key Yes* Your API key
Authorization Yes* Alternative format: Bearer YOUR_API_KEY

* Send either x-api-key or Authorization.

Example Request

curl -X GET https://catalog-ai.tdcapps.com/api/organizations/get \
  -H "x-api-key: YOUR_API_KEY"

Example Request Using Authorization Header

curl -X GET https://catalog-ai.tdcapps.com/api/organizations/get \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "success": true,
  "data": {
    "organizations": [
      {
        "id": "organization_abc123",
        "slug": "acme-inc",
        "name": "Acme Inc",
        "role": "owner"
      },
      {
        "id": "organization_def456",
        "slug": "northwind",
        "name": "Northwind",
        "role": "member"
      }
    ]
  }
}

Response Fields

Field Type Description
organizations[].id string Organization ID
organizations[].slug string Organization slug
organizations[].name string Organization display name
organizations[].role string Your membership role: owner, admin, member

Error: Missing API Key

{
  "success": false,
  "message": "Missing API Key"
}

Error: Invalid API Key

{
  "success": false,
  "message": "Invalid API Key"
}

Usage Notes

  • Use this endpoint first if your integration needs to discover which organization slug or ID to call for organization-scoped APIs.
  • Most other API endpoints still use the base format /api/{organization}/....

Next Steps