Distribution

Queue a distribution run

POST/distribution/queue

Queues a distribution run for the linked user. Provide exactly one of collectionRef or resourceRefs:

  • collectionRef — distribute an existing collection (project). The collection must be visible to the linked user.
  • resourceRefs — distribute an ad-hoc set of resources. A collection is created to hold them (the queue distributes collections), then queued. Resources the linked user cannot see are dropped; if none remain, the call returns 404.

Not-found and no-access both collapse to 404 so the surface can't be used to probe refs in other usergroups. Requires the write scope and the linked user's dm (distribution management) permission.

Idempotency

Pass an Idempotency-Key header (a unique random string per logical queue, e.g. a UUID) to make retries safe. The first successful response with a given key is cached for 24 hours; replays return the same body byte-for-byte with Idempotent-Replayed: true. Reusing the key with a different request body returns 422 IDEMPOTENCY_KEY_CONFLICT.

X-Api-Key<token>

Issued to you when your integration is provisioned. Determines which catalogue resources are visible and which AI tools are available.

In: header

Header Parameters

Idempotency-Key?string

Optional client-supplied retry key. 1–255 printable-ASCII characters. Use a UUID or other high-entropy random string.

Match^[\x21-\x7E]+$
Lengthlength <= 255

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/distribution/queue" \  -H "Content-Type: application/json" \  -d '{    "destinationRef": 7,    "collectionRef": 300  }'
{  "success": true,  "status": "success",  "message": "Distribution run queued",  "data": {    "queueRef": 555,    "status": 0,    "statusLabel": "pending",    "destinationRef": 7  }}
{  "success": false,  "status": "fail",  "message": "string",  "error": {    "message": "API key is required",    "code": "NO_API_KEY"  }}

{  "success": false,  "status": "fail",  "message": "API key is required",  "error": {    "code": "NO_API_KEY",    "message": "API key is required"  }}

{  "success": false,  "status": "fail",  "message": "This API key does not have the 'write' scope",  "error": {    "code": "INSUFFICIENT_SCOPE",    "message": "This API key does not have the 'write' scope"  }}

{  "success": false,  "status": "fail",  "message": "string",  "error": {    "message": "API key is required",    "code": "NO_API_KEY"  }}
{  "success": false,  "status": "fail",  "message": "string",  "error": {    "message": "API key is required",    "code": "NO_API_KEY"  }}