# List a destination's deliveries

GET

/v1/destinations/{destinationId}/deliveries

```sh
curl --request GET \
  --url 'https://example.com/v1/destinations/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/deliveries?status=pending&limit=25' \
  --header 'Authorization: Bearer <token>'
```

Newest first.

## Authorizations

- **[bearerAuth](https://docs.kindgi.com/reference/api.md#bearerauth)**

## Parameters

### Path Parameters

**destinationId**

required

string format: uuid

The destination id.

### Query Parameters

**status**

`pending`: waiting for its next attempt, or held while its destination is `failing`. `delivered`: the destination took it. `failed`: it can’t be sent (see `reason`). `skipped`: it was never sent (see `reason`).

string

Allowed values: pending delivered failed skipped

Only deliveries with this status.

**limit**

integer

default: 25 >= 1 <= 100

1..100. Default 25.

**cursor**

string

Where the previous page ended: its `nextCursor`, as it came. A runtime that seals cursors takes one only for the same list, filters and caller, within a day; otherwise `400 bad-input`, and the list starts again without it. Absent → first page.

## Responses

### 200

Page of deliveries.

application/json

object

**data**

required

Array\<object>

object

**deliveryId**

required

string

**to**

required

The destination’s id, or `me`: the schedule owner’s own email.

string

**event**

required

What a delivery tells: a run that ended, an approval that waits on a person, a test, or, at the end of an hour whose cap (`rate-cap`) left messages out, how many.

string

Allowed values: run.finished approval.requested destination.test rate-cap.summary

**scheduleId**

required

The schedule that sent it; `null` for a test.

string | null

**runId**

required

The run it is about; `null` for a test or a `rate-cap.summary`.

string | null

**approvalId**

required

`approval.requested`: the approval that waits; `null` otherwise.

string | null

**status**

required

`pending`: waiting for its next attempt, or held while its destination is `failing`. `delivered`: the destination took it. `failed`: it can’t be sent (see `reason`). `skipped`: it was never sent (see `reason`).

string

Allowed values: pending delivered failed skipped

**reason**

required

Why it was `skipped` (`rate-cap`, `no-access`, `destination-removed`, `not-for-this-project`, `project-deleted`) or `failed` (`destination-failing`, `window-ended`, `refused`, or a send error such as `timeout`); `null` otherwise.

string | null

**attempts**

required

integer

**nextAttemptAt**

required

When the next attempt is due; `null` unless `pending` and not held.

string | null format: date-time

**lastAttemptAt**

required

string | null format: date-time

**lastResponseStatus**

required

The HTTP status (or SMTP reply code) of the last attempt; `null` when it got none.

integer | null

**lastError**

required

Why the last attempt failed, as a fixed reason that never holds the URL.

string | null

**createdAt**

required

string format: date-time

**deliveredAt**

required

string | null format: date-time

**nextCursor**

string

**hasMore**

required

boolean

##### Example

```json
{
  "data": [
    {
      "event": "run.finished",
      "status": "pending"
    }
  ]
}
```

### 400

`destinationId` is not a destination id (a UUID), or an unknown `status` (`bad-input`).

application/json

object

**error**

required

object

**code**

required

Stable machine-readable discriminant. Values match domain error codes (see `docs/API-ROUTE-CONVENTIONS.md` §4.3).

string

**message**

required

string

**details**

Optional, kind-specific.

object

**_key_**

additional properties

any

**requestId**

required

Server-assigned request id; also echoed via `X-Request-Id` header.

string

##### Examplegenerated

```json
{
  "error": {
    "code": "example",
    "message": "example",
    "details": {},
    "requestId": "example"
  }
}
```

### 401

Missing / malformed / expired / revoked bearer token.

application/json

object

**error**

required

object

**code**

required

Stable machine-readable discriminant. Values match domain error codes (see `docs/API-ROUTE-CONVENTIONS.md` §4.3).

string

**message**

required

string

**details**

Optional, kind-specific.

object

**_key_**

additional properties

any

**requestId**

required

Server-assigned request id; also echoed via `X-Request-Id` header.

string

##### Examplegenerated

```json
{
  "error": {
    "code": "example",
    "message": "example",
    "details": {},
    "requestId": "example"
  }
}
```

### 403

Not a tenant admin (`permission-denied`). Without an authorization store, a tenant admin is the deployment’s API token, an admin key, or a console signed in with either.

application/json

object

**error**

required

object

**code**

required

Stable machine-readable discriminant. Values match domain error codes (see `docs/API-ROUTE-CONVENTIONS.md` §4.3).

string

**message**

required

string

**details**

Optional, kind-specific.

object

**_key_**

additional properties

any

**requestId**

required

Server-assigned request id; also echoed via `X-Request-Id` header.

string

##### Examplegenerated

```json
{
  "error": {
    "code": "example",
    "message": "example",
    "details": {},
    "requestId": "example"
  }
}
```

### 404

No destination with that id (`destination-not-found`).

application/json

object

**error**

required

object

**code**

required

Stable machine-readable discriminant. Values match domain error codes (see `docs/API-ROUTE-CONVENTIONS.md` §4.3).

string

**message**

required

string

**details**

Optional, kind-specific.

object

**_key_**

additional properties

any

**requestId**

required

Server-assigned request id; also echoed via `X-Request-Id` header.

string

##### Examplegenerated

```json
{
  "error": {
    "code": "example",
    "message": "example",
    "details": {},
    "requestId": "example"
  }
}
```

### 429

`rate-limit-exceeded` with `details.limit: "api-requests"`, on a runtime that sets workspace limits (Kindgi Cloud): this workspace’s limit on API requests a minute is reached, so the request wasn’t run; `Retry-After` says when to send it again.

application/json

object

**error**

required

object

**code**

required

Stable machine-readable discriminant. Values match domain error codes (see `docs/API-ROUTE-CONVENTIONS.md` §4.3).

string

**message**

required

string

**details**

Optional, kind-specific.

object

**_key_**

additional properties

any

**requestId**

required

Server-assigned request id; also echoed via `X-Request-Id` header.

string

##### Examplegenerated

```json
{
  "error": {
    "code": "example",
    "message": "example",
    "details": {},
    "requestId": "example"
  }
}
```

#### Headers

**Retry-After**

integer

\>= 1

Whole seconds to wait before sending the request again, at least 1. Sent with the codes the answer names as sending it, so it may be absent.

### 503

The database was too busy to answer in time (`database-busy`), or the authorization store couldn’t be reached (`authz-backend-unavailable`); `Retry-After` (whole seconds) says when to try again.

application/json

object

**error**

required

object

**code**

required

Stable machine-readable discriminant. Values match domain error codes (see `docs/API-ROUTE-CONVENTIONS.md` §4.3).

string

**message**

required

string

**details**

Optional, kind-specific.

object

**_key_**

additional properties

any

**requestId**

required

Server-assigned request id; also echoed via `X-Request-Id` header.

string

##### Examplegenerated

```json
{
  "error": {
    "code": "example",
    "message": "example",
    "details": {},
    "requestId": "example"
  }
}
```

#### Headers

**Retry-After**

integer

\>= 1

Whole seconds to wait before sending the request again, at least 1. Sent with the codes the answer names as sending it, so it may be absent.

## See also

- [`GET /v1/destinations/{destinationId}`: Fetch a destination](https://docs.kindgi.com/reference/api/operations/destinationsget.md)
- [`PATCH /v1/destinations/{destinationId}`: Update a destination](https://docs.kindgi.com/reference/api/operations/destinationsupdate.md)
- [`DELETE /v1/destinations/{destinationId}`: Remove a destination (soft delete)](https://docs.kindgi.com/reference/api/operations/destinationsremove.md)
- [`POST /v1/destinations/{destinationId}/deliveries/{deliveryId}/redeliver`: Redeliver a message](https://docs.kindgi.com/reference/api/operations/destinationsredeliver.md)
- [Send results to a destination](https://docs.kindgi.com/guides/runs/send-results-to-a-destination.md)
- [Error code `authz-backend-unavailable`](https://docs.kindgi.com/reference/errors.md#authz-backend-unavailable)
- [Error code `bad-input`](https://docs.kindgi.com/reference/errors.md#bad-input)
- [Error code `database-busy`](https://docs.kindgi.com/reference/errors.md#database-busy)
- [Error code `destination-not-found`](https://docs.kindgi.com/reference/errors.md#destination-not-found)
- [Error code `permission-denied`](https://docs.kindgi.com/reference/errors.md#permission-denied)
- [Error code `rate-limit-exceeded`](https://docs.kindgi.com/reference/errors.md#rate-limit-exceeded)
- [Every error code](https://docs.kindgi.com/reference/errors.md)
