Skip to main content
Browse documentation

OpenAPI 0.2.0

Moira Connect API reference

Generated from the checked-in OpenAPI contract at build time. Paths, methods, authentication, parameters, request shapes, and responses stay tied to the same source as the SDK.

bash
curl https://api.moiraconnect.com/v1/accounts \
  -H "Authorization: Bearer $MOIRA_API_KEY"

/accounts

get

GET /accounts

apiKey or clientAccessToken

Parameters
[
  {
    "in": "query",
    "name": "q",
    "schema": {
      "maxLength": 100,
      "type": "string"
    }
  },
  {
    "in": "query",
    "name": "after",
    "schema": {
      "description": "Opaque account cursor",
      "type": "string"
    }
  },
  {
    "in": "query",
    "name": "limit",
    "schema": {
      "default": 50,
      "maximum": 100,
      "minimum": 1,
      "type": "integer"
    }
  }
]

Responses

200
Account-scoped cursor page with next_cursor
post

POST /accounts

apiKey

Parameters
[
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]
Request body
{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "auth_mode": {
            "default": "qr",
            "enum": [
              "qr",
              "phone"
            ]
          },
          "external_reference": {
            "maxLength": 255,
            "type": "string"
          },
          "provider": {
            "enum": [
              "whatsapp",
              "telegram"
            ]
          }
        },
        "required": [
          "provider"
        ],
        "type": "object"
      }
    }
  },
  "required": true
}

Responses

201
Account assigned and authentication requested
409
Idempotency conflict

/accounts/{accountId}

get

GET /accounts/{accountId}

apiKey or clientAccessToken

Parameters
[
  {
    "in": "path",
    "name": "accountId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  }
]

Responses

200
Account and current authentication challenge
404
Account not found
delete

Permanently erase a provider connection and its retained data

apiKey

Parameters
[
  {
    "in": "path",
    "name": "accountId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  },
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]

Responses

202
Provider logout

/accounts/{accountId}/activity

get

Per-connection activity log (lifecycle, sync runs, failures, warnings)

apiKey

Parameters
[
  {
    "in": "path",
    "name": "accountId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  },
  {
    "in": "query",
    "name": "severity",
    "schema": {
      "enum": [
        "info",
        "success",
        "warning",
        "error"
      ]
    }
  },
  {
    "in": "query",
    "name": "category",
    "schema": {
      "enum": [
        "connection",
        "sync",
        "command",
        "webhook",
        "provider",
        "security"
      ]
    }
  },
  {
    "in": "query",
    "name": "type",
    "schema": {
      "maxLength": 128,
      "type": "string"
    }
  },
  {
    "in": "query",
    "name": "since",
    "schema": {
      "format": "date-time",
      "type": "string"
    }
  },
  {
    "in": "query",
    "name": "before_id",
    "schema": {
      "type": "string"
    }
  },
  {
    "in": "query",
    "name": "limit",
    "schema": {
      "default": 50,
      "maximum": 100,
      "minimum": 1,
      "type": "integer"
    }
  }
]

Responses

200
Activity rows newest-first with next_cursor id pagination

/accounts/{accountId}/api-calls

get

Bounded outbound provider API call log (errors always; successes sampled; 30-day retention)

apiKey

Parameters
[
  {
    "in": "path",
    "name": "accountId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  },
  {
    "in": "query",
    "name": "outcome",
    "schema": {
      "enum": [
        "success",
        "http_error",
        "network_error",
        "timeout"
      ]
    }
  },
  {
    "in": "query",
    "name": "before_id",
    "schema": {
      "type": "string"
    }
  },
  {
    "in": "query",
    "name": "limit",
    "schema": {
      "default": 50,
      "maximum": 100,
      "minimum": 1,
      "type": "integer"
    }
  }
]

Responses

200
Provider HTTP call rows with latency

/accounts/{accountId}/authentication

post

POST /accounts/{accountId}/authentication

apiKey

Parameters
[
  {
    "in": "path",
    "name": "accountId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  },
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]
Request body
{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "type": {
            "enum": [
              "phone",
              "code",
              "password"
            ]
          },
          "value": {
            "type": "string"
          }
        },
        "required": [
          "type",
          "value"
        ],
        "type": "object"
      }
    }
  },
  "required": true
}

Responses

202
Encrypted authentication challenge queued
422
Unsupported challenge or provider

/accounts/{accountId}/capabilities

get

GET /accounts/{accountId}/capabilities

apiKey or clientAccessToken

Parameters
[
  {
    "in": "path",
    "name": "accountId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  }
]

Responses

200
Effective provider and account capabilities; productivity accounts report four-layer states (granted | pending_consent | not_selected | not_granted | unsupported)

/accounts/{accountId}/commands/replay

post

Re-queue this connection's dead-letter commands for another delivery attempt

apiKey

Parameters
[
  {
    "in": "path",
    "name": "accountId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  },
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]

Responses

200
Count of dead_letter commands re-queued ({ replayed }); safe no-op when none remain
404
Account not found

/accounts/{accountId}/connect

post

POST /accounts/{accountId}/connect

apiKey

Parameters
[
  {
    "in": "path",
    "name": "accountId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  },
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]

Responses

202
Durable connect or reauthentication command queued

/accounts/{accountId}/disconnect

post

POST /accounts/{accountId}/disconnect

apiKey

Parameters
[
  {
    "in": "path",
    "name": "accountId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  },
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]

Responses

202
Durable disconnect command queued

/accounts/{accountId}/health

get

GET /accounts/{accountId}/health

apiKey or clientAccessToken

Parameters
[
  {
    "in": "path",
    "name": "accountId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  }
]

Responses

200
Connection

/accounts/{accountId}/logout

post

POST /accounts/{accountId}/logout

apiKey

Parameters
[
  {
    "in": "path",
    "name": "accountId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  },
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]

Responses

202
Durable provider logout command queued

/accounts/{accountId}/reconsent

post

Create a hosted reconnect session requesting scopes for the current selections (incremental consent)

apiKey

Parameters
[
  {
    "in": "path",
    "name": "accountId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  },
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]

Responses

201
Hosted portal URL for the re-authorization journey

/accounts/{accountId}/sync

post

POST /accounts/{accountId}/sync

apiKey

Parameters
[
  {
    "in": "path",
    "name": "accountId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  },
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]

Responses

202
Durable synchronization command queued

/accounts/{accountId}/sync-status

get

Per-connection sync depth and freshness (status, last inbound event, latest run per kind, per-resource cursors)

apiKey

Parameters
[
  {
    "in": "path",
    "name": "accountId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  }
]

Responses

200
status, status_detail, last_inbound_event_at, latest sync_run per kind (initial/incremental/backfill/reconcile), and sanitized per-resource sync cursors (opaque tokens redacted)
404
Account not found

/accounts/{accountId}/test-actions

post

Emit a synthetic test event through the delivery pipeline without contacting the provider

apiKey

Parameters
[
  {
    "in": "path",
    "name": "accountId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  },
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]
Request body
{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "action": {
            "default": "ping",
            "enum": [
              "ping"
            ]
          }
        },
        "type": "object"
      }
    }
  }
}

Responses

202
Test event emitted (visible on realtime

/activity

get

Project-wide connection/sync/webhook/provider activity log (90-day retention)

apiKey

Parameters
[
  {
    "in": "query",
    "name": "severity",
    "schema": {
      "enum": [
        "info",
        "success",
        "warning",
        "error"
      ]
    }
  },
  {
    "in": "query",
    "name": "category",
    "schema": {
      "enum": [
        "connection",
        "sync",
        "command",
        "webhook",
        "provider",
        "security"
      ]
    }
  },
  {
    "in": "query",
    "name": "type",
    "schema": {
      "maxLength": 128,
      "type": "string"
    }
  },
  {
    "in": "query",
    "name": "since",
    "schema": {
      "format": "date-time",
      "type": "string"
    }
  },
  {
    "description": "Return rows with id below this cursor",
    "in": "query",
    "name": "before_id",
    "schema": {
      "type": "string"
    }
  },
  {
    "in": "query",
    "name": "limit",
    "schema": {
      "default": 50,
      "maximum": 100,
      "minimum": 1,
      "type": "integer"
    }
  }
]

Responses

200
Activity rows newest-first with next_cursor id pagination

/admin/accounts

get

GET /admin/accounts

adminToken

Responses

200
Cross-project account health and ownership inventory

/admin/api-keys

get

GET /admin/api-keys

adminToken

Responses

200
API key metadata without secrets
post

POST /admin/api-keys

adminToken

Parameters
[
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]
Request body
{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "project_id": {
            "format": "uuid",
            "type": "string"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "project_id"
        ],
        "type": "object"
      }
    }
  },
  "required": true
}

Responses

201
API key metadata and one-time plaintext token

/admin/api-keys/{apiKeyId}

delete

DELETE /admin/api-keys/{apiKeyId}

adminToken

Parameters
[
  {
    "in": "path",
    "name": "apiKeyId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  },
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]

Responses

200
API key revoked
404
API key not found

/admin/audit-logs

get

GET /admin/audit-logs

adminToken

Responses

200
Recent privileged audit records

/admin/bootstrap

post

Create the first tenant, project, and API key

adminToken

Parameters
[
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]
Request body
{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "environment": {
            "enum": [
              "test",
              "production"
            ]
          },
          "project_name": {
            "type": "string"
          },
          "tenant_name": {
            "type": "string"
          }
        },
        "required": [
          "tenant_name",
          "project_name",
          "environment"
        ],
        "type": "object"
      }
    }
  },
  "required": true
}

Responses

201
Bootstrap resources and one-time plaintext API key

/admin/commands

get

GET /admin/commands

adminToken

Parameters
[
  {
    "in": "query",
    "name": "status",
    "schema": {
      "type": "string"
    }
  }
]

Responses

200
Cross-tenant command inventory

/admin/commands/{commandId}/redrive

post

POST /admin/commands/{commandId}/redrive

adminToken

Parameters
[
  {
    "in": "path",
    "name": "commandId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  },
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]

Responses

202
Failed non-send command safely returned to its durable queue
409
Command is unsafe or ineligible for redrive

/admin/entitlements

get

List partner-programme capability grants

adminToken

Parameters
[
  {
    "in": "query",
    "name": "project_id",
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  }
]

Responses

200
Entitlement grants
post

Record or update a partner capability grant for a project

adminToken

Parameters
[
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]
Request body
{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "capability": {
            "description": "A registry capability such as connections.list or message.send",
            "maxLength": 100,
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "granted_scopes": {
            "description": "OAuth scopes LinkedIn assigned; defaults to the registry scopes",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "programme": {
            "description": "The partner programme that granted the capability",
            "maxLength": 100,
            "type": "string"
          },
          "project_id": {
            "format": "uuid",
            "type": "string"
          },
          "provider": {
            "enum": [
              "linkedin"
            ]
          },
          "rate_limit": {
            "description": "Provider-imposed limits recorded for operations",
            "type": "object"
          },
          "retention_days": {
            "maximum": 3650,
            "minimum": 1,
            "type": "integer"
          },
          "review_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "project_id",
          "provider",
          "capability",
          "enabled"
        ],
        "type": "object"
      }
    }
  },
  "required": true
}

Responses

200
Audited entitlement; connected accounts receive account.capabilities_updated events

/admin/maintenance-jobs

get

GET /admin/maintenance-jobs

adminToken

Responses

200
Recent maintenance jobs and outcomes
post

POST /admin/maintenance-jobs

adminToken

Parameters
[
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]
Request body
{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "account_id": {
            "format": "uuid",
            "type": "string"
          },
          "kind": {
            "enum": [
              "reencrypt_credentials",
              "retention",
              "reconcile",
              "webhook_replay",
              "account_erasure"
            ]
          },
          "payload": {
            "additionalProperties": true,
            "type": "object"
          },
          "project_id": {
            "format": "uuid",
            "type": "string"
          },
          "tenant_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "kind"
        ],
        "type": "object"
      }
    }
  },
  "required": true
}

Responses

202
Audited maintenance job queued

/admin/maintenance-schedules

get

GET /admin/maintenance-schedules

adminToken

Responses

200
Durable recurring retention and account reconciliation schedules

/admin/projects

get

GET /admin/projects

adminToken

Responses

200
Project list
post

POST /admin/projects

adminToken

Parameters
[
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]
Request body
{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "environment": {
            "enum": [
              "test",
              "production"
            ]
          },
          "name": {
            "maxLength": 200,
            "type": "string"
          },
          "tenant_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "tenant_id",
          "name",
          "environment"
        ],
        "type": "object"
      }
    }
  },
  "required": true
}

Responses

201
Project created
404
Tenant not found

/admin/provider-controls

get

List provider kill switches

adminToken

Responses

200
Provider controls ordered by latest change
post

Enable or disable a provider scope

adminToken

Parameters
[
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]
Request body
{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "disabled": {
            "type": "boolean"
          },
          "provider": {
            "enum": [
              "whatsapp",
              "telegram",
              "gmail",
              "outlook",
              "imap",
              "linkedin"
            ]
          },
          "reason": {
            "maxLength": 500,
            "type": "string"
          },
          "scope_id": {
            "description": "Use * for global scope, whatsapp/telegram/gmail/outlook/imap/linkedin for provider scope, or a tenant/account UUID.",
            "type": "string"
          },
          "scope_type": {
            "enum": [
              "global",
              "provider",
              "tenant",
              "account"
            ]
          }
        },
        "required": [
          "scope_type",
          "scope_id",
          "provider",
          "disabled"
        ],
        "type": "object"
      }
    }
  },
  "required": true
}

Responses

200
Audited provider control

/admin/schema

get

GET /admin/schema

adminToken

Responses

200
Applied schema migrations in version order

/admin/telegram-migrations

get

GET /admin/telegram-migrations

adminToken

Responses

200
Telegram shard migration inventory and checkpoints
post

POST /admin/telegram-migrations

adminToken

Parameters
[
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]
Request body
{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "account_id": {
            "format": "uuid",
            "type": "string"
          },
          "target_shard_id": {
            "type": "string"
          }
        },
        "required": [
          "account_id",
          "target_shard_id"
        ],
        "type": "object"
      }
    }
  },
  "required": true
}

Responses

202
Source account placed into migration drain

/admin/telegram-migrations/{migrationId}/{action}

post

POST /admin/telegram-migrations/{migrationId}/{action}

adminToken

Parameters
[
  {
    "in": "path",
    "name": "migrationId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  },
  {
    "in": "path",
    "name": "action",
    "required": true,
    "schema": {
      "enum": [
        "source-drained",
        "copy-verified",
        "cutover",
        "resume",
        "complete",
        "abort"
      ]
    }
  },
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]

Responses

200
Verified migration checkpoint applied
409
Preconditions or state transition not satisfied

/admin/tenants

get

GET /admin/tenants

adminToken

Responses

200
Tenant list
post

POST /admin/tenants

adminToken

Parameters
[
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]
Request body
{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "name": {
            "maxLength": 200,
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      }
    }
  },
  "required": true
}

Responses

201
Tenant created
409
Idempotency conflict

/admin/workers

get

GET /admin/workers

adminToken

Responses

200
Worker health

/admin/workers/{workerId}/drain

post

POST /admin/workers/{workerId}/drain

adminToken

Parameters
[
  {
    "in": "path",
    "name": "workerId",
    "required": true,
    "schema": {
      "type": "string"
    }
  },
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]

Responses

200
Worker marked draining
404
Worker not found

/audit-logs

get

List project-scoped audit records using an API key with the admin scope

apiKey

Parameters
[
  {
    "in": "query",
    "name": "before",
    "schema": {
      "format": "date-time",
      "type": "string"
    }
  },
  {
    "in": "query",
    "name": "limit",
    "schema": {
      "default": 50,
      "maximum": 100,
      "minimum": 1,
      "type": "integer"
    }
  }
]

Responses

200
Cursor-paginated project audit records
403
Missing admin scope

/capabilities

get

Customer-facing capability catalog with required scopes per capability

apiKey

Parameters
[
  {
    "in": "query",
    "name": "provider",
    "required": true,
    "schema": {
      "enum": [
        "google",
        "microsoft"
      ]
    }
  }
]

Responses

200
Catalog entries with scope requirements

/capability-scope-preview

post

Preview the deduplicated OAuth scope set a capability selection requires

apiKey

Request body
{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "account_id": {
            "also reports missing scopes vs the recorded grant (reconsent preview)": null,
            "description": "When present",
            "format": "uuid",
            "type": "string"
          },
          "capabilities": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "provider": {
            "enum": [
              "google",
              "microsoft"
            ]
          }
        },
        "required": [
          "provider",
          "capabilities"
        ],
        "type": "object"
      }
    }
  },
  "required": true
}

Responses

200
Scopes with per-scope capability reasons; reconsent_required and missing_scopes when account_id given

/capability-selections

get

Project-default and per-account capability selections

apiKey

Parameters
[
  {
    "in": "query",
    "name": "provider",
    "required": true,
    "schema": {
      "enum": [
        "google",
        "microsoft"
      ]
    }
  },
  {
    "in": "query",
    "name": "account_id",
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  }
]

Responses

200
Selection rows
put

Replace capability selections (project default or one account)

apiKey

Parameters
[
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]
Request body
{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "account_id": {
            "format": "uuid",
            "type": "string"
          },
          "provider": {
            "enum": [
              "google",
              "microsoft"
            ]
          },
          "selections": {
            "items": {
              "properties": {
                "capability": {
                  "type": "string"
                },
                "enabled": {
                  "type": "boolean"
                }
              },
              "required": [
                "capability",
                "enabled"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "provider",
          "selections"
        ],
        "type": "object"
      }
    }
  },
  "required": true
}

Responses

200
Updated selections

/chats

get

GET /chats

apiKey or clientAccessToken

Parameters
[
  {
    "in": "query",
    "name": "account_id",
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  },
  {
    "in": "query",
    "name": "q",
    "schema": {
      "maxLength": 100,
      "type": "string"
    }
  },
  {
    "in": "query",
    "name": "after",
    "schema": {
      "description": "Opaque null-aware chat cursor",
      "type": "string"
    }
  },
  {
    "in": "query",
    "name": "limit",
    "schema": {
      "default": 50,
      "maximum": 100,
      "minimum": 1,
      "type": "integer"
    }
  }
]

Responses

200
Chat cursor page with normalized last_message summaries
post

Resolve and start a provider chat

apiKey or clientAccessToken

Parameters
[
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]
Request body
{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "account_id": {
            "format": "uuid",
            "type": "string"
          },
          "target": {
            "properties": {
              "type": {
                "enum": [
                  "phone",
                  "username",
                  "provider_id"
                ]
              },
              "value": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "value"
            ],
            "type": "object"
          }
        },
        "required": [
          "account_id",
          "target"
        ],
        "type": "object"
      }
    }
  },
  "required": true
}

Responses

202
Provider recipient resolution queued
422
Target type is unsupported for the provider

/chats/{chatId}

get

GET /chats/{chatId}

apiKey or clientAccessToken

Parameters
[
  {
    "in": "path",
    "name": "chatId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  }
]

Responses

200
Chat metadata and native state
patch

PATCH /chats/{chatId}

apiKey or clientAccessToken

Parameters
[
  {
    "in": "path",
    "name": "chatId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  },
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]
Request body
{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "archived": {
            "type": "boolean"
          },
          "mute_until": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "pinned": {
            "type": "boolean"
          }
        },
        "type": "object"
      }
    }
  }
}

Responses

202
Durable provider chat-setting command queued

/chats/{chatId}/action

post

POST /chats/{chatId}/action

apiKey or clientAccessToken

Parameters
[
  {
    "in": "path",
    "name": "chatId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  },
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]
Request body
{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "action": {
            "enum": [
              "typing",
              "recording_voice",
              "uploading",
              "paused",
              "cancelled"
            ]
          }
        },
        "required": [
          "action"
        ],
        "type": "object"
      }
    }
  },
  "required": true
}

Responses

202
Durable chat action command queued

/chats/{chatId}/actions

post

Compatibility alias for the singular chat action route

apiKey or clientAccessToken

Parameters
[
  {
    "in": "path",
    "name": "chatId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  },
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]
Request body
{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "action": {
            "enum": [
              "typing",
              "recording_voice",
              "uploading",
              "paused",
              "cancelled"
            ]
          }
        },
        "required": [
          "action"
        ],
        "type": "object"
      }
    }
  },
  "required": true
}

Responses

202
Durable chat action command queued

/chats/{chatId}/messages

get

GET /chats/{chatId}/messages

apiKey or clientAccessToken

Parameters
[
  {
    "in": "path",
    "name": "chatId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  },
  {
    "in": "query",
    "name": "before",
    "schema": {
      "format": "date-time",
      "type": "string"
    }
  },
  {
    "in": "query",
    "name": "limit",
    "schema": {
      "maximum": 100,
      "minimum": 1,
      "type": "integer"
    }
  }
]

Responses

200
Cursor-paginated messages with reply state

/chats/{chatId}/participants

get

GET /chats/{chatId}/participants

apiKey or clientAccessToken

Parameters
[
  {
    "in": "path",
    "name": "chatId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  }
]

Responses

200
Provider-normalized group participants scoped to the chat

/chats/{chatId}/read

post

POST /chats/{chatId}/read

apiKey or clientAccessToken

Parameters
[
  {
    "in": "path",
    "name": "chatId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  },
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]

Responses

202
Durable mark-read command queued

/client-sessions

post

Mint a rotating, account-scoped application session

apiKey

Parameters
[
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]
Request body
{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "access_ttl_seconds": {
            "default": 300,
            "maximum": 900,
            "minimum": 30,
            "type": "integer"
          },
          "account_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "maxItems": 100,
            "minItems": 1,
            "type": "array"
          },
          "allowed_origins": {
            "items": {
              "format": "uri",
              "type": "string"
            },
            "maxItems": 20,
            "minItems": 1,
            "type": "array"
          },
          "client_id": {
            "maxLength": 128,
            "type": "string"
          },
          "external_session_id": {
            "maxLength": 255,
            "type": "string"
          },
          "metadata": {
            "additionalProperties": true,
            "type": "object"
          },
          "refresh_ttl_seconds": {
            "default": 2592000,
            "maximum": 2592000,
            "minimum": 300,
            "type": "integer"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "session_ttl_seconds": {
            "default": 7776000,
            "maximum": 7776000,
            "minimum": 300,
            "type": "integer"
          },
          "subject_id": {
            "maxLength": 255,
            "type": "string"
          }
        },
        "required": [
          "client_id",
          "subject_id",
          "external_session_id",
          "account_ids",
          "allowed_origins"
        ],
        "type": "object"
      }
    }
  },
  "required": true
}

Responses

201
One-time access and rotating refresh token pair
409
External application session already exists

/client-sessions/{sessionId}

delete

DELETE /client-sessions/{sessionId}

apiKey or clientAccessToken

Parameters
[
  {
    "in": "path",
    "name": "sessionId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  }
]

Responses

200
Application session and token family revoked
404
Session not found or not owned

/client-sessions/current

get

GET /client-sessions/current

clientAccessToken

Responses

200
Current application session identity

/client-sessions/refresh

post

Atomically rotate an application refresh token

No authentication declared

Request body
{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "refresh_token": {
            "type": "string",
            "writeOnly": true
          }
        },
        "required": [
          "refresh_token"
        ],
        "type": "object"
      }
    }
  },
  "required": true
}

Responses

200
Replacement access and refresh token pair
401
Invalid

/commands/{commandId}

get

GET /commands/{commandId}

apiKey or clientAccessToken

Parameters
[
  {
    "in": "path",
    "name": "commandId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  }
]

Responses

200
Scoped command state
404
Command not found in project

/commands/{commandId}/cancel

post

POST /commands/{commandId}/cancel

apiKey

Parameters
[
  {
    "in": "path",
    "name": "commandId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  },
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]

Responses

200
Queued command cancelled
409
Command was already claimed or executed

/contacts

get

GET /contacts

apiKey or clientAccessToken

Parameters
[
  {
    "in": "query",
    "name": "account_id",
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  },
  {
    "in": "query",
    "name": "q",
    "schema": {
      "maxLength": 100,
      "type": "string"
    }
  },
  {
    "in": "query",
    "name": "after",
    "schema": {
      "description": "Opaque contact cursor",
      "type": "string"
    }
  },
  {
    "in": "query",
    "name": "limit",
    "schema": {
      "default": 50,
      "maximum": 100,
      "minimum": 1,
      "type": "integer"
    }
  }
]

Responses

200
Account-authorized normalized contact cursor page

/email/accounts

post

Connect a Gmail, Outlook, or IMAP account

apiKey

Parameters
[
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]
Request body
{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "auth_mode": {
            "enum": [
              "oauth",
              "app_password"
            ]
          },
          "external_reference": {
            "description": "The account's email address",
            "maxLength": 255,
            "type": "string"
          },
          "provider": {
            "enum": [
              "gmail",
              "outlook",
              "imap"
            ]
          }
        },
        "required": [
          "provider"
        ],
        "type": "object"
      }
    }
  },
  "required": true
}

Responses

201
Email account created and awaiting authentication

/email/accounts/{accountId}/authorization-url

post

Build the OAuth consent URL for an email account

apiKey

Parameters
[
  {
    "in": "path",
    "name": "accountId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  },
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]

Responses

200
Authorization URL for the end user to visit

/email/attachments/{attachmentId}

get

Get a signed download URL for an email attachment

apiKey or clientAccessToken

Parameters
[
  {
    "in": "path",
    "name": "attachmentId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  }
]

Responses

200
Signed download URL
202
Attachment not yet downloaded
404
Attachment not found

/email/drafts

post

Create a draft email

apiKey

Parameters
[
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]
Request body
{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "account_id": {
            "format": "uuid",
            "type": "string"
          },
          "attachments": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "body": {
            "type": "object"
          },
          "in_reply_to_message_id": {
            "format": "uuid",
            "type": "string"
          },
          "recipients": {
            "type": "object"
          },
          "subject": {
            "maxLength": 500,
            "type": "string"
          },
          "thread_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "account_id"
        ],
        "type": "object"
      }
    }
  },
  "required": true
}

Responses

201
Draft created

/email/drafts/{draftId}

patch

PATCH /email/drafts/{draftId}

apiKey

Parameters
[
  {
    "in": "path",
    "name": "draftId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  },
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]

Responses

200
Draft updated
404
Draft not found
delete

DELETE /email/drafts/{draftId}

apiKey

Parameters
[
  {
    "in": "path",
    "name": "draftId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  },
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]

Responses

200
Draft deleted
404
Draft not found

/email/folders

get

List an email account's folders

apiKey or clientAccessToken

Parameters
[
  {
    "in": "query",
    "name": "account_id",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  }
]

Responses

200
Folders for the account

/email/messages

get

List email messages by thread or folder

apiKey or clientAccessToken

Parameters
[
  {
    "in": "query",
    "name": "account_id",
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  },
  {
    "in": "query",
    "name": "thread_id",
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  },
  {
    "in": "query",
    "name": "folder_id",
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  }
]

Responses

200
Messages matching the filter
post

Send an email

apiKey

Parameters
[
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]
Request body
{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "account_id": {
            "format": "uuid",
            "type": "string"
          },
          "attachment_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "type": "array"
          },
          "bcc": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "body": {
            "properties": {
              "html": {
                "type": "string"
              },
              "text": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "cc": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "reply_to_message_id": {
            "format": "uuid",
            "type": "string"
          },
          "subject": {
            "maxLength": 500,
            "type": "string"
          },
          "to": {
            "items": {
              "properties": {
                "address": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              },
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "account_id",
          "to"
        ],
        "type": "object"
      }
    }
  },
  "required": true
}

Responses

202
Send command queued

/email/messages/{messageId}

get

GET /email/messages/{messageId}

apiKey or clientAccessToken

Parameters
[
  {
    "in": "path",
    "name": "messageId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  }
]

Responses

200
Message detail with recipients
404
Message not found

/email/messages/{messageId}/flags

post

POST /email/messages/{messageId}/flags

apiKey

Parameters
[
  {
    "in": "path",
    "name": "messageId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  },
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]
Request body
{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "read": {
            "type": "boolean"
          },
          "starred": {
            "type": "boolean"
          }
        },
        "type": "object"
      }
    }
  },
  "required": true
}

Responses

202
Flag command queued

/email/messages/{messageId}/forward

post

POST /email/messages/{messageId}/forward

apiKey

Parameters
[
  {
    "in": "path",
    "name": "messageId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  },
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]
Request body
{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "comment": {
            "type": "string"
          },
          "to": {
            "items": {
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "to"
        ],
        "type": "object"
      }
    }
  },
  "required": true
}

Responses

202
Forward command queued

/email/messages/{messageId}/move

post

POST /email/messages/{messageId}/move

apiKey

Parameters
[
  {
    "in": "path",
    "name": "messageId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  },
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]
Request body
{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "folder_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "folder_id"
        ],
        "type": "object"
      }
    }
  },
  "required": true
}

Responses

202
Move command queued
404
Target folder not found

/email/threads

get

List email threads

apiKey or clientAccessToken

Parameters
[
  {
    "in": "query",
    "name": "account_id",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  },
  {
    "in": "query",
    "name": "folder_id",
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  }
]

Responses

200
Threads for the account

/email/threads/{threadId}

get

GET /email/threads/{threadId}

apiKey or clientAccessToken

Parameters
[
  {
    "in": "path",
    "name": "threadId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  }
]

Responses

200
Thread detail
404
Thread not found

/events

get

GET /events

apiKey or clientAccessToken

Parameters
[
  {
    "in": "query",
    "name": "after",
    "schema": {
      "minimum": 0,
      "type": "integer"
    }
  },
  {
    "in": "query",
    "name": "limit",
    "schema": {
      "maximum": 100,
      "minimum": 1,
      "type": "integer"
    }
  }
]

Responses

200
Ordered durable event replay page

/events/replay

post

Request an ordered durable replay page using the events:replay scope

apiKey or clientAccessToken

Request body
{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "after": {
            "oneOf": [
              {
                "minimum": 0,
                "type": "integer"
              },
              {
                "pattern": "^[0-9]+$",
                "type": "string"
              }
            ]
          },
          "limit": {
            "default": 50,
            "maximum": 100,
            "minimum": 1,
            "type": "integer"
          }
        },
        "type": "object"
      }
    }
  },
  "required": true
}

Responses

200
Ordered durable event replay page
403
Missing events:replay scope

/health/live

get

live

No authentication declared

Responses

200
Service is alive

/health/ready

get

ready

No authentication declared

Responses

200
Service is ready
503
Dependency unavailable

/hosted-connect-sessions

post

Create or recover a team-scoped hosted WhatsApp or Telegram connection

apiKey

Parameters
[
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]
Request body
{
  "content": {
    "application/json": {
      "schema": {
        "allOf": [
          {
            "anyOf": [
              {
                "required": [
                  "provider",
                  "external_reference"
                ]
              },
              {
                "required": [
                  "account_id"
                ]
              }
            ]
          },
          {
            "anyOf": [
              {
                "required": [
                  "success_redirect_url"
                ]
              },
              {
                "required": [
                  "webhook_id"
                ]
              },
              {
                "required": [
                  "opener_origin"
                ]
              }
            ]
          }
        ],
        "properties": {
          "account_id": {
            "description": "Reconnect an existing account in place (mode=reconnect); provider and external_reference are resolved from the account",
            "format": "uuid",
            "type": "string"
          },
          "allowed_success_redirect_origin": {
            "format": "uri",
            "type": "string"
          },
          "auth_mode": {
            "credentials for unofficial instagram)": null,
            "description": "Defaults per provider (qr for socket messaging",
            "enum": [
              "qr",
              "phone",
              "oauth",
              "meta_signup",
              "credentials"
            ],
            "meta_signup for whatsapp_business": null,
            "oauth for linkedin/instagram_business/google/microsoft": null
          },
          "capabilities": {
            "description": "Productivity providers only - the capability set to request OAuth scopes for; defaults to project capability_selections",
            "items": {
              "maxLength": 100,
              "type": "string"
            },
            "maxItems": 100,
            "type": "array"
          },
          "client_state": {
            "maxLength": 2048,
            "type": "string"
          },
          "expires_in_seconds": {
            "default": 900,
            "maximum": 3600,
            "minimum": 60,
            "type": "integer"
          },
          "external_reference": {
            "description": "Stable caller/team connection identity used for recovery instead of duplication; required unless account_id is provided",
            "maxLength": 255,
            "type": "string"
          },
          "opener_origin": {
            "format": "uri",
            "type": "string"
          },
          "provider": {
            "description": "Required unless account_id is provided",
            "enum": [
              "whatsapp",
              "telegram",
              "linkedin",
              "whatsapp_business",
              "instagram_business",
              "instagram",
              "google",
              "microsoft"
            ]
          },
          "success_redirect_url": {
            "format": "uri",
            "type": "string"
          },
          "webhook_id": {
            "description": "Existing signed Kairos webhook; arbitrary callback URLs are rejected",
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      }
    }
  },
  "required": true
}

Responses

201
Hosted URL and recovered or newly-created account identity

/hosted-connect-sessions/public/{publicToken}

get

GET /hosted-connect-sessions/public/{publicToken}

No authentication declared

Parameters
[
  {
    "in": "path",
    "name": "publicToken",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]

Responses

200
Secret-free hosted connection state and challenge metadata
410
Hosted link expired

/hosted-connect-sessions/public/{publicToken}/authentication

post

POST /hosted-connect-sessions/public/{publicToken}/authentication

No authentication declared

Parameters
[
  {
    "in": "path",
    "name": "publicToken",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]
Request body
{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "submission_id": {
            "format": "uuid",
            "type": "string"
          },
          "type": {
            "enum": [
              "phone",
              "code",
              "password"
            ]
          },
          "value": {
            "type": "string",
            "writeOnly": true
          }
        },
        "required": [
          "type",
          "value",
          "submission_id"
        ],
        "type": "object"
      }
    }
  },
  "required": true
}

Responses

202
Encrypted Telegram challenge queued

/hosted-connect-sessions/public/{publicToken}/meta-signup

get

Embedded Signup client configuration for a whatsapp_business session

No authentication declared

Parameters
[
  {
    "in": "path",
    "name": "publicToken",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]

Responses

200
app_id, config_id, and graph_version for the FB JS SDK popup
410
Session no longer active
post

Complete WhatsApp Business Embedded Signup (server-side code exchange)

No authentication declared

Parameters
[
  {
    "in": "path",
    "name": "publicToken",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]
Request body
{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "code": {
            "type": "string",
            "writeOnly": true
          },
          "phone_number_id": {
            "maxLength": 64,
            "type": "string"
          },
          "pin": {
            "description": "Optional two-step verification PIN for number registration",
            "pattern": "^\\d{6}$",
            "type": "string",
            "writeOnly": true
          },
          "waba_id": {
            "maxLength": 64,
            "type": "string"
          }
        },
        "required": [
          "code",
          "waba_id",
          "phone_number_id"
        ],
        "type": "object"
      }
    }
  },
  "required": true
}

Responses

200
WABA token stored

/linkedin/accounts

post

Connect a LinkedIn account through official OAuth

apiKey

Parameters
[
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]
Request body
{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "auth_mode": {
            "default": "oauth",
            "enum": [
              "oauth"
            ]
          },
          "external_reference": {
            "description": "Stable caller/team connection identity used for recovery instead of duplication",
            "maxLength": 255,
            "type": "string"
          },
          "provider": {
            "default": "linkedin",
            "enum": [
              "linkedin"
            ]
          }
        },
        "type": "object"
      }
    }
  },
  "required": true
}

Responses

201
LinkedIn account created and awaiting authorization

/linkedin/accounts/{accountId}/authorization-url

post

Build the LinkedIn OAuth consent URL for an account

apiKey

Parameters
[
  {
    "in": "path",
    "name": "accountId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  }
]

Responses

200
Top-level LinkedIn authorization URL; scopes follow the project's granted entitlements
409
No active authentication session
503
LinkedIn OAuth not configured

/linkedin/entitlements

get

Show which LinkedIn capabilities are granted for this project

apiKey or clientAccessToken

Responses

200
Capability grant states with their partner programmes

/linkedin/invitations

get

List synchronized invitations

apiKey or clientAccessToken

Parameters
[
  {
    "in": "query",
    "name": "account_id",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  },
  {
    "in": "query",
    "name": "direction",
    "schema": {
      "enum": [
        "sent",
        "received"
      ]
    }
  }
]

Responses

200
Invitations
403
capability_not_granted
post

Send one explicit, human-confirmed invitation

apiKey

Parameters
[
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]
Request body
{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "account_id": {
            "format": "uuid",
            "type": "string"
          },
          "invitee_urn": {
            "description": "Immutable LinkedIn member URN",
            "maxLength": 255,
            "type": "string"
          },
          "message": {
            "maxLength": 1900,
            "type": "string"
          }
        },
        "required": [
          "account_id",
          "invitee_urn"
        ],
        "type": "object"
      }
    }
  },
  "required": true
}

Responses

202
Invitation command queued
403
capability_not_granted

/linkedin/invitations/{invitationId}

delete

Withdraw a pending invitation

apiKey

Parameters
[
  {
    "in": "path",
    "name": "invitationId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  },
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]

Responses

202
Withdrawal command queued
403
capability_not_granted
409
Invitation is not pending

/linkedin/organizations

get

List Company Pages the member administers

apiKey or clientAccessToken

Parameters
[
  {
    "in": "query",
    "name": "account_id",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  }
]

Responses

200
Organization roles
403
capability_not_granted

/linkedin/profile

get

Get the synchronized LinkedIn profile for an account

apiKey or clientAccessToken

Parameters
[
  {
    "in": "query",
    "name": "account_id",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  }
]

Responses

200
Member profile with immutable URN
403
capability_not_granted
404
Profile not synchronized yet

/mcp/context

get

Resolve the single project bound to an MCP-purpose API key

apiKey

Responses

200
Project identity
403
The credential was not created for MCP

/media/{mediaId}

get

GET /media/{mediaId}

apiKey or clientAccessToken

Parameters
[
  {
    "in": "path",
    "name": "mediaId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  }
]

Responses

200
Media metadata

/media/{mediaId}/complete

post

POST /media/{mediaId}/complete

apiKey or clientAccessToken

Parameters
[
  {
    "in": "path",
    "name": "mediaId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  },
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]

Responses

202
Uploaded object verified
409
Size mismatch or missing reservation
422
Signature mismatch

/media/{mediaId}/download-url

get

GET /media/{mediaId}/download-url

apiKey or clientAccessToken

Parameters
[
  {
    "in": "path",
    "name": "mediaId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  }
]

Responses

200
Short-lived signed download URL
202
Lazy provider download queued

/media/upload-url

post

POST /media/upload-url

apiKey or clientAccessToken

Parameters
[
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]

Responses

201
Reserved media and signed PUT URL

/messages

post

POST /messages

apiKey or clientAccessToken

Parameters
[
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]

Responses

202
Durable send command queued

/messages/{messageId}

get

GET /messages/{messageId}

apiKey or clientAccessToken

Parameters
[
  {
    "in": "path",
    "name": "messageId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  }
]

Responses

200
Message detail with reactions
404
Message not found

/messages/{messageId}/delete

post

POST /messages/{messageId}/delete

apiKey or clientAccessToken

Parameters
[
  {
    "in": "path",
    "name": "messageId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  },
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]

Responses

202
Durable delete command queued

/messages/{messageId}/edit

post

POST /messages/{messageId}/edit

apiKey or clientAccessToken

Parameters
[
  {
    "in": "path",
    "name": "messageId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  },
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]

Responses

202
Durable edit command queued

/messages/{messageId}/forward

post

POST /messages/{messageId}/forward

apiKey or clientAccessToken

Parameters
[
  {
    "in": "path",
    "name": "messageId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  },
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]

Responses

202
Telegram forward command queued
422
Unsupported provider capability

/messages/{messageId}/react

post

POST /messages/{messageId}/react

apiKey or clientAccessToken

Parameters
[
  {
    "in": "path",
    "name": "messageId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  },
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]

Responses

202
Durable reaction command queued
delete

DELETE /messages/{messageId}/react

apiKey or clientAccessToken

Parameters
[
  {
    "in": "path",
    "name": "messageId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  },
  {
    "in": "query",
    "name": "emoji",
    "required": true,
    "schema": {
      "type": "string"
    }
  },
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]

Responses

202
Durable reaction-removal command queued

/rate-limit-policy

get

GET /rate-limit-policy

apiKey

Responses

200
Effective project rate limit; production minimum is 10

/realtime-tokens

post

POST /realtime-tokens

apiKey or clientAccessToken

Parameters
[
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]
Request body
{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "account_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "maxItems": 100,
            "type": "array"
          },
          "expires_in_seconds": {
            "default": 300,
            "maximum": 900,
            "minimum": 30,
            "type": "integer"
          },
          "origin": {
            "description": "Exact browser origin bound to the WebSocket upgrade",
            "format": "uri",
            "type": "string"
          }
        },
        "type": "object"
      }
    }
  },
  "required": true
}

Responses

201
Short-lived scoped WebSocket token
409
Idempotency conflict

/usage

get

GET /usage

apiKey

Parameters
[
  {
    "in": "query",
    "name": "from",
    "schema": {
      "format": "date-time",
      "type": "string"
    }
  },
  {
    "in": "query",
    "name": "to",
    "schema": {
      "format": "date-time",
      "type": "string"
    }
  }
]

Responses

200
Project usage totals by durable metric

/webhook-deliveries

get

GET /webhook-deliveries

apiKey

Responses

200
Recent delivery attempts

/webhook-deliveries/{deliveryId}

get

GET /webhook-deliveries/{deliveryId}

apiKey

Parameters
[
  {
    "in": "path",
    "name": "deliveryId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  }
]

Responses

200
Delivery status
404
Delivery not found

/webhook-deliveries/{deliveryId}/replay

post

POST /webhook-deliveries/{deliveryId}/replay

apiKey

Parameters
[
  {
    "in": "path",
    "name": "deliveryId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  },
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]

Responses

202
Delivery queued for replay

/webhooks

get

GET /webhooks

apiKey

Responses

200
Webhook endpoint list without signing secrets
post

POST /webhooks

apiKey

Parameters
[
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]
Request body
{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "event_filters": {
            "default": [
              "*"
            ],
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "url": {
            "format": "uri",
            "type": "string"
          }
        },
        "required": [
          "url"
        ],
        "type": "object"
      }
    }
  },
  "required": true
}

Responses

201
Endpoint and one-time signing secret

/webhooks/{webhookId}

get

GET /webhooks/{webhookId}

apiKey

Responses

200
Webhook endpoint
404
Not found
patch

PATCH /webhooks/{webhookId}

apiKey

Parameters
[
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]

Responses

200
Updated endpoint
delete

DELETE /webhooks/{webhookId}

apiKey

Parameters
[
  {
    "in": "header",
    "name": "Idempotency-Key",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]

Responses

200
Endpoint disabled and removed from listings

/webhooks/{webhookId}/deliveries

get

Delivery history for a webhook endpoint with response inspection

apiKey

Parameters
[
  {
    "in": "path",
    "name": "webhookId",
    "required": true,
    "schema": {
      "format": "uuid",
      "type": "string"
    }
  },
  {
    "in": "query",
    "name": "status",
    "schema": {
      "enum": [
        "pending",
        "retrying",
        "delivering",
        "succeeded",
        "dead_letter"
      ]
    }
  },
  {
    "in": "query",
    "name": "before",
    "schema": {
      "format": "date-time",
      "type": "string"
    }
  },
  {
    "in": "query",
    "name": "limit",
    "schema": {
      "default": 50,
      "maximum": 100,
      "minimum": 1,
      "type": "integer"
    }
  }
]

Responses

200
Deliveries newest-first including attempt count