# List the Organization's publish requests, newest first

`GET https://api.koil.co/v1/publish-requests`

List the Organization's publish requests, newest first. `profileId` and `status` narrow the list.

## Authorization

An API key from the Koil admin console, sent as `Authorization: Bearer <key>`. A live key starts `koil_live_` and a sandbox key `koil_sandbox_`; the key alone selects the Organization and mode. See https://docs.koil.co/concepts/authentication.

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `Koil-Version` | header | yes | `"2026-12-08"` | The dated API version the request is written against; it fixes the request and response shapes. Every response echoes the version it is rendered in. |
| `limit` | query | no | integer |  |
| `cursor` | query | no | string | Opaque cursor for fetching the next result page. |
| `status` | query | no | one of `"created"`, `"scheduled"`, `"cancelled"`, `"started"`, `"succeeded"`, `"failed"`, `"outcome_unknown"` | `outcome_unknown`: The call that creates the content failed ambiguously (a timeout, a dropped connection, a platform 5xx), so the platform may have published it. Koil does not retry it. Check the platform before submitting again, or the content may be published twice. |
| `profileId` | query | no | string |  |

## Example

```bash
curl -X GET "https://api.koil.co/v1/publish-requests" \
  -H "Authorization: Bearer $KOIL_API_KEY" \
  -H "Koil-Version: 2026-12-08"
```

## Response 200

A page of the Organization's publish requests.

- `data` (array of object, required)
  - `kind` (`"publish_request"`, required): The kind of resource this is.
  - `mode` (one of `"live"`, `"sandbox"`, required): Which mode the resource belongs to. Live and sandbox resources are separate: a key reads and writes only its own mode's.
  - `id` (string, required) (min length 1)
  - `status` (one of `"created"`, `"scheduled"`, `"cancelled"`, `"started"`, `"succeeded"`, `"failed"`, `"outcome_unknown"`, required): `outcome_unknown`: The call that creates the content failed ambiguously (a timeout, a dropped connection, a platform 5xx), so the platform may have published it. Koil does not retry it. Check the platform before submitting again, or the content may be published twice.
  - `collection` (string, required) (min length 1)
  - `variant` (string) (min length 1)
  - `profileId` (string, required) (min length 1)
  - `scheduledAt` (string, date-time): When Koil runs the publish, as an RFC 3339 date-time. On a submission it must be in the future and at most 365 days ahead; omit it to publish now.
  - `externalId` (string) (min length 1)
  - `error` (object)
    - `code` (one of `"validation_error"`, `"not_supported"`, `"unauthorized"`, `"quota_exceeded"`, `"permission_denied"`, `"scope_insufficient"`, `"connection_invalid"`, `"not_found"`, `"conflict"`, `"rate_limit_exceeded"`, `"platform_rate_limit"`, `"internal"`, `"service_unavailable"`, required): Stable error code. `validation_error` (400), `not_supported` (400), `unauthorized` (401), `quota_exceeded` (402), `permission_denied` (403), `scope_insufficient` (403), `connection_invalid` (403), `not_found` (404), `conflict` (409), `rate_limit_exceeded` (429), `platform_rate_limit` (429), `internal` (500, 502, 504), `service_unavailable` (503).
    - `message` (string, required): Human-readable summary.
    - `meta` (object, required): Structured detail; the keys depend on `code`.
      - `violations` (array of object): Every problem with the request. Always present on a `validation_error`.
        - `code` (string, required): Stable violation code, such as `missing_field`, `unknown_field`, `schema_error`, `invalid_value` or `invalid_combination`.
        - `path` (string, required): JSON pointer into the request: path, query and body fields share one pointer space (`/cursor`, `/publishRequests/0/args/text`), a header is `/headers/<lowercase name>`, and `""` is the request as a whole.
        - `message` (string, required): Human-readable explanation.
      - `budgets` (array of string): On a `rate_limit_exceeded`: every budget that refused the request: `organization` (every authenticated request), `profile` (a request that acts on a Profile, one budget per Profile) or `client_address` (requests with no key or a rejected one). Koil may add budgets; treat an unknown one as covering the whole Organization.
      - `profileIds` (array of string): On a `rate_limit_exceeded` whose `budgets` include `profile`: the Profiles whose budget is spent. Requests that act on other Profiles are unaffected.
      - `required` (array of string): On a `permission_denied`: the API key permissions the operation requires that the key lacks.
      - `limit` (integer): On a `quota_exceeded`: the cap that was reached.
      - `resourceType` (string): On a `not_found` or a `conflict` over an existing resource: the kind of resource, such as `profile` or `connection`.
      - `resourceId` (string): With `resourceType`: the id of the resource not found or already there.
      - `reason` (string): On a failed publish or backfill request, or a failed Connect Session, that Koil failed itself, not the platform: why, such as `media_incompatible`, `media_transform_not_entitled` or `subject_mismatch` (a reconnect authorized a different platform account than the Connection's).
      - `refusalReason` (one of `"messaging_window_closed"`, `"recipient_rate_limited"`, `"recipient_unavailable"`, `"publishing_limit_reached"`): Why the platform refused, where the code alone does not say what to do. `messaging_window_closed`: The platform takes a message to this person only inside a window that has closed: WhatsApp's 24-hour customer service window, the Messenger and Instagram messaging window, or TikTok's allowance since the person last wrote. It reopens when the person writes again. `recipient_rate_limited`: Too many messages to this one person in a short time; messages to others are unaffected. Retry after `Retry-After`. `recipient_unavailable`: The person cannot receive messages from this Profile: they blocked it or deactivated their account, or, on WhatsApp, the number has no account or an outdated app. Retrying does not help. `publishing_limit_reached`: The account's own publishing cap on the platform is spent: Instagram's 24-hour content publishing limit, YouTube's daily upload limit, or TikTok's limit on posts. Publish again once it resets.
  - `metadata` (object, required): Your own key-value pairs, up to 50 keys of at most 40 characters with string values of at most 500. An update merges into what is stored, and a key set to `""` is removed.
  - `createdAt` (string, date-time, required)
  - `updatedAt` (string, date-time, required)
  - `startedAt` (string, date-time)
  - `succeededAt` (string, date-time)
  - `failedAt` (string, date-time)
  - `cancelledAt` (string, date-time)
- `nextCursor` (string) (min length 1): Opaque cursor for fetching the next result page.
- `hasMore` (boolean, required)

## Errors

Every error has the same shape: `{ "error": { "code", "message", "meta", "requestId" } }`. [Errors →](https://docs.koil.co/concepts/errors)

| Status | Meaning |
| --- | --- |
| 400 | `validation_error`: The request does not match the operation's input schema, fails an admission check, or the platform refused its content. `meta.violations` names every problem. `not_supported`: The platform, collection or resource does not offer this operation, such as exporting a `key` Connection's credential, which Koil never returns. |
| 401 | `unauthorized`: No API key, or a key Koil does not accept (unknown, revoked, or with a prefix that does not match its mode). |
| 429 | `rate_limit_exceeded`: Koil's own rate limit for the key, Organization, Profile, or client address is spent (`meta.budgets` names which); retry after `Retry-After` seconds. `platform_rate_limit`: The platform throttled the call or the platform quota is spent; retry after `Retry-After` seconds. |
| 500 | `internal`: Koil or the platform failed, and the status says which: 500 when Koil failed, including a platform refusing how Koil made the call; 502 when the platform failed or answered something Koil cannot use; 504 when Koil's call to the platform timed out. The message is generic; retry with backoff. |
| 503 | `service_unavailable`: A service Koil needs to accept the request (API key validation or rate limiting) is unavailable. Nothing was attempted; retry after `Retry-After` seconds. The hosting edge can deliver this as a `504` with neither this body nor `Retry-After`, so treat a `502`, `503` or `504` alike as retryable, with backoff. |
| default | Any other failure. `error.code` names it; the HTTP status follows from it. |
