# Fetch a destination

GET

/v1/destinations/{destinationId}

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

## Authorizations

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

## Parameters

### Path Parameters

**destinationId**

required

string format: uuid

The destination id.

## Responses

### 200

The destination.

application/json

Where a schedule sends its results. Its URL is never returned: `host` and `urlRef` say where it goes. `GET /v1/destinations?projectId=` answers a caller who is not a workspace admin without `people`, `host`, `urlRef`, `secretRef` and `projects`.

object

**destinationId**

required

string

**name**

required

string

**kind**

required

Where a destination sends. `email` goes to workspace members, each checked when a message is sent; the others post to a URL.

string

Allowed values: email slack teams google-chat discord webhook

**people**

`email`: the workspace members it goes to. Absent on the other kinds.

Array\<string>

**host**

The URL’s host, on every kind but `email`. The URL itself is never returned.

string

**urlRef**

Where its URL is kept, on every kind but `email`.

object

**envName**

required

string

/^\[a-z]\[a-z0-9-]{0,62}$/

**name**

required

string

\>= 1 characters <= 256 characters

**secretRef**

`webhook`: its signing secret, by reference, as a webhook endpoint’s.

object

**envName**

required

string

/^\[a-z]\[a-z0-9-]{0,62}$/

**name**

required

string

\>= 1 characters <= 256 characters

**projects**

The projects whose schedules may use it. Absent: every project’s may.

Array\<string>

**content**

required

What a message carries. `link`: the run’s status and its console link. `answer`: also the run’s answer, up to its first 1,000 characters; only on a destination that names `projects`, and never on the `webhook` kind, whose receiver reads the run with its own key.

string

Allowed values: link answer

**status**

required

`active`: it takes messages. `failing`: its last delivery got an answer that won’t change on a retry (such as a removed webhook’s 404 or 410); later messages for it are kept but held until a `sendTest` reaches it.

string

Allowed values: active failing

**lastError**

required

Why it is `failing`, as a fixed reason that never holds the URL; `null` when it is `active`.

string | null

**createdAt**

required

string format: date-time

**updatedAt**

required

string format: date-time

##### Example

```json
{
  "kind": "email",
  "content": "link",
  "status": "active"
}
```

### 400

`destinationId` is not a destination id (a UUID).

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, or it was removed (`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

- [`PATCH /v1/destinations/{destinationId}`: Update a destination](https://docs.kindgi.com/v0.8.1/reference/api/operations/destinationsupdate.md)
- [`DELETE /v1/destinations/{destinationId}`: Remove a destination (soft delete)](https://docs.kindgi.com/v0.8.1/reference/api/operations/destinationsremove.md)
- [`GET /v1/destinations/{destinationId}/deliveries`: List a destination's deliveries](https://docs.kindgi.com/v0.8.1/reference/api/operations/destinationslistdeliveries.md)
- [`POST /v1/destinations/{destinationId}/deliveries/{deliveryId}/redeliver`: Redeliver a message](https://docs.kindgi.com/v0.8.1/reference/api/operations/destinationsredeliver.md)
- [Error code `authz-backend-unavailable`](https://docs.kindgi.com/v0.8.1/reference/errors.md#authz-backend-unavailable)
- [Error code `database-busy`](https://docs.kindgi.com/v0.8.1/reference/errors.md#database-busy)
- [Error code `destination-not-found`](https://docs.kindgi.com/v0.8.1/reference/errors.md#destination-not-found)
- [Error code `permission-denied`](https://docs.kindgi.com/v0.8.1/reference/errors.md#permission-denied)
- [Error code `rate-limit-exceeded`](https://docs.kindgi.com/v0.8.1/reference/errors.md#rate-limit-exceeded)
- [Every error code](https://docs.kindgi.com/v0.8.1/reference/errors.md)
