Skip to main content

Authentication

Request

action
string
required
Must be "get_channels".
No other fields are required. The API uses your API key to determine your company and returns all channels where your company is the creator, partner, referring company, or receiving company.

Response

Returns a channels array. Each channel includes its metadata, property definitions, and lead statuses.
channels
array

Example

Request

curl -X POST https://amwezouylooonljdehou.supabase.co/functions/v1/openapi-operations \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -d '{"action": "get_channels"}'

Response

{
  "channels": [
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "title": "Acme Corp Partnership",
      "created_at": "2025-03-15T10:30:00.000Z",
      "referring_id": "f1e2d3c4-b5a6-7890-abcd-ef1234567890",
      "receiving_id": "d4c3b2a1-6f5e-0987-dcba-0987654321fe",
      "creator": "d4c3b2a1-6f5e-0987-dcba-0987654321fe",
      "currency": "USD",
      "no_auth_api": false,
      "property_definitions": [
        {
          "id": "11111111-2222-3333-4444-555555555555",
          "name": "Deal size",
          "type": "number",
          "order": 1,
          "visible": true
        }
      ],
      "lead_status": [
        {
          "id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
          "status": "New lead",
          "order": 1,
          "visible": true,
          "color": "#3B82F6"
        },
        {
          "id": "bbbbbbbb-cccc-dddd-eeee-ffffffffffff",
          "status": "Qualified",
          "order": 2,
          "visible": true,
          "color": "#F59E0B"
        }
      ]
    }
  ]
}

Errors

StatusErrorCause
401"Invalid API key"Missing or invalid X-Api-Key header.