# Destination management API

Control which countries can receive SMS at the workspace level by allowing or blocking destinations. Destinations are ISO 3166-1 alpha-2 country codes.

### Endpoints

## GET /workspaces/{workspaceId}/destination-management/capability/{capabilityName}

> Get a destination management configuration for a given workspace/capability.

```json
{"openapi":"3.0.3","info":{"title":"Numbers","version":"v1"},"tags":[],"servers":[{"url":"https://api.bird.com","description":"Production API"}],"security":[{"accessKey":[]}],"components":{"securitySchemes":{"accessKey":{"description":"Uses the Authorization header: 'AccessKey ' followed by your access key token (e.g., 'Authorization: AccessKey AbCdEfGhIjKlMnOpQrStUvWxYzAbCdEfGhIj')","scheme":"AccessKey","type":"http"}},"schemas":{"DestinationManagement":{"type":"object","required":["organizationId","workspaceId","destinations","capabilityName","createdAt","updatedAt"],"properties":{"destinations":{"type":"object","additionalProperties":{"type":"string"}},"organizationId":{"type":"string","format":"uuid"},"workspaceId":{"type":"string","format":"uuid"},"capabilityName":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"Error":{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"type":"string","description":"A unique code that identifies the error. This code can be used to programmatically identify the error.\n","minLength":5},"message":{"type":"string","minLength":5,"description":"A human-readable message that describes the error. An example is 'The request body is missing the required field `service`.'\n"},"details":{"type":"object","additionalProperties":true,"description":"Additional details about the error. This object can contain any additional information that may be useful for debugging.\n"}}}}},"paths":{"/workspaces/{workspaceId}/destination-management/capability/{capabilityName}":{"get":{"operationId":"getDestinationManagementConfig","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestinationManagement"}}},"description":"Could get the destination management config successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error processing the request"}},"summary":"Get a destination management configuration for a given workspace/capability.","tags":["destination_management"]}}}}
```

```
GET /workspaces/{workspaceId}/destination-management/capability/sms
```

Response:

```json
{
  "organizationId": "5a3d8cf1-3aaf-4b56-a2e0-260b28c0a0d0",
  "workspaceId": "e9d00796-afb3-458e-ad85-64a1bdefe3aa",
  "capabilityName": "sms",
  "destinations": {
    "US": "allowed",
    "BR": "blocked"
  },
  "createdAt": "2025-01-02T15:04:05Z",
  "updatedAt": "2025-01-09T10:11:12Z"
}
```

#### Allow destinations

## POST /workspaces/{workspaceId}/destination-management/capability/{capabilityName}/allow

> Adds a list of allowed countries to a destination management configuration for a given workspace/capability.

```json
{"openapi":"3.0.3","info":{"title":"Numbers","version":"v1"},"tags":[],"servers":[{"url":"https://api.bird.com","description":"Production API"}],"security":[{"accessKey":[]}],"components":{"securitySchemes":{"accessKey":{"description":"Uses the Authorization header: 'AccessKey ' followed by your access key token (e.g., 'Authorization: AccessKey AbCdEfGhIjKlMnOpQrStUvWxYzAbCdEfGhIj')","scheme":"AccessKey","type":"http"}},"schemas":{"DestinationManagementOperationRequest":{"type":"object","required":["destinations"],"properties":{"destinations":{"type":"array","items":{"type":"string","format":"iso3166-1"}}}},"DestinationManagement":{"type":"object","required":["organizationId","workspaceId","destinations","capabilityName","createdAt","updatedAt"],"properties":{"destinations":{"type":"object","additionalProperties":{"type":"string"}},"organizationId":{"type":"string","format":"uuid"},"workspaceId":{"type":"string","format":"uuid"},"capabilityName":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"Error":{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"type":"string","description":"A unique code that identifies the error. This code can be used to programmatically identify the error.\n","minLength":5},"message":{"type":"string","minLength":5,"description":"A human-readable message that describes the error. An example is 'The request body is missing the required field `service`.'\n"},"details":{"type":"object","additionalProperties":true,"description":"Additional details about the error. This object can contain any additional information that may be useful for debugging.\n"}}},"ValidationError":{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"type":"string","description":"A unique code that identifies the error. This code can be used to programmatically identify the error.\n","minLength":5},"message":{"type":"string","minLength":5,"description":"A human-readable message that describes the error. An example is 'The request body is missing the required field `service`.'\n"},"details":{"type":"object","additionalProperties":true,"description":"Additional details about the error. This object can contain any additional information that may be useful for debugging.\n"}}}}},"paths":{"/workspaces/{workspaceId}/destination-management/capability/{capabilityName}/allow":{"post":{"operationId":"applyAllowOverDestinationManagementConfig","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestinationManagementOperationRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestinationManagement"}}},"description":"Updated"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error processing the request"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}},"description":"Validation error"}},"summary":"Adds a list of allowed countries to a destination management configuration for a given workspace/capability.","tags":["destination_management"]}}}}
```

```
POST /workspaces/{workspaceId}/destination-management/capability/sms/allow
```

**Notes:**

* `destinations` is an array of country codes&#x20;
* This will add specific destinations
* Destinations are ISO 3166-1 alpha-2 country codes.

**Request body:**

```json
{
  "destinations": ["US", "CA"]
}
```

**Response (full config):**

```json
{
  "organizationId": "5a3d8cf1-3aaf-4b56-a2e0-260b28c0a0d0",
  "workspaceId": "e9d00796-afb3-458e-ad85-64a1bdefe3aa",
  "capabilityName": "sms",
  "destinations": {
    "US": "allowed",
    "CA": "allowed",
    "BR": "blocked"
  },
  "createdAt": "2025-01-02T15:04:05Z",
  "updatedAt": "2025-01-09T10:11:12Z"
}
```

#### Block destinations

## POST /workspaces/{workspaceId}/destination-management/capability/{capabilityName}/block

> Adds a list of blocked countries to a destination management configuration for a given workspace/capability.

```json
{"openapi":"3.0.3","info":{"title":"Numbers","version":"v1"},"tags":[],"servers":[{"url":"https://api.bird.com","description":"Production API"}],"security":[{"accessKey":[]}],"components":{"securitySchemes":{"accessKey":{"description":"Uses the Authorization header: 'AccessKey ' followed by your access key token (e.g., 'Authorization: AccessKey AbCdEfGhIjKlMnOpQrStUvWxYzAbCdEfGhIj')","scheme":"AccessKey","type":"http"}},"schemas":{"DestinationManagementOperationRequest":{"type":"object","required":["destinations"],"properties":{"destinations":{"type":"array","items":{"type":"string","format":"iso3166-1"}}}},"DestinationManagementBlockResponse":{"type":"object","required":["configuration","message"],"properties":{"configuration":{"$ref":"#/components/schemas/DestinationManagement"},"message":{"type":"string"}}},"DestinationManagement":{"type":"object","required":["organizationId","workspaceId","destinations","capabilityName","createdAt","updatedAt"],"properties":{"destinations":{"type":"object","additionalProperties":{"type":"string"}},"organizationId":{"type":"string","format":"uuid"},"workspaceId":{"type":"string","format":"uuid"},"capabilityName":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"Error":{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"type":"string","description":"A unique code that identifies the error. This code can be used to programmatically identify the error.\n","minLength":5},"message":{"type":"string","minLength":5,"description":"A human-readable message that describes the error. An example is 'The request body is missing the required field `service`.'\n"},"details":{"type":"object","additionalProperties":true,"description":"Additional details about the error. This object can contain any additional information that may be useful for debugging.\n"}}},"ValidationError":{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"type":"string","description":"A unique code that identifies the error. This code can be used to programmatically identify the error.\n","minLength":5},"message":{"type":"string","minLength":5,"description":"A human-readable message that describes the error. An example is 'The request body is missing the required field `service`.'\n"},"details":{"type":"object","additionalProperties":true,"description":"Additional details about the error. This object can contain any additional information that may be useful for debugging.\n"}}}}},"paths":{"/workspaces/{workspaceId}/destination-management/capability/{capabilityName}/block":{"post":{"operationId":"applyBlockOverDestinationManagementConfig","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestinationManagementOperationRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestinationManagementBlockResponse"}}},"description":"Updated"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error processing the request"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}},"description":"Validation error"}},"summary":"Adds a list of blocked countries to a destination management configuration for a given workspace/capability.","tags":["destination_management"]}}}}
```

```
POST /workspaces/{workspaceId}/destination-management/capability/sms/block
```

**Notes:**

* `destinations` is an array of country codes&#x20;
* This will remove specific destinations
* Destinations are ISO 3166-1 alpha-2 country codes.

**Request body:**

```json
{
  "destinations": ["BR", "IN"]
}
```

**Response:**

```json
{
  "message": "Destinations have been blocked. If the block is not temporary, please cancel any associated subscriptions to prevent unexpected charges.",
  "configuration": {
    "organizationId": "5a3d8cf1-3aaf-4b56-a2e0-260b28c0a0d0",
    "workspaceId": "e9d00796-afb3-458e-ad85-64a1bdefe3aa",
    "capabilityName": "sms",
    "destinations": {
      "US": "allowed",
      "BR": "blocked",
      "IN": "blocked"
    },
    "createdAt": "2025-01-02T15:04:05Z",
    "updatedAt": "2025-01-09T10:11:12Z"
  }
}
```

#### Upsert config

## PUT /workspaces/{workspaceId}/destination-management/capability/{capabilityName}

> Upsert a destination management configuration for a given workspace/capability.

```json
{"openapi":"3.0.3","info":{"title":"Numbers","version":"v1"},"tags":[],"servers":[{"url":"https://api.bird.com","description":"Production API"}],"security":[{"accessKey":[]}],"components":{"securitySchemes":{"accessKey":{"description":"Uses the Authorization header: 'AccessKey ' followed by your access key token (e.g., 'Authorization: AccessKey AbCdEfGhIjKlMnOpQrStUvWxYzAbCdEfGhIj')","scheme":"AccessKey","type":"http"}},"schemas":{"DestinationManagementUpsertRequest":{"type":"object","required":["destinations"],"properties":{"destinations":{"type":"object","additionalProperties":{"type":"string"}}}},"DestinationManagement":{"type":"object","required":["organizationId","workspaceId","destinations","capabilityName","createdAt","updatedAt"],"properties":{"destinations":{"type":"object","additionalProperties":{"type":"string"}},"organizationId":{"type":"string","format":"uuid"},"workspaceId":{"type":"string","format":"uuid"},"capabilityName":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"Error":{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"type":"string","description":"A unique code that identifies the error. This code can be used to programmatically identify the error.\n","minLength":5},"message":{"type":"string","minLength":5,"description":"A human-readable message that describes the error. An example is 'The request body is missing the required field `service`.'\n"},"details":{"type":"object","additionalProperties":true,"description":"Additional details about the error. This object can contain any additional information that may be useful for debugging.\n"}}},"ValidationError":{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"type":"string","description":"A unique code that identifies the error. This code can be used to programmatically identify the error.\n","minLength":5},"message":{"type":"string","minLength":5,"description":"A human-readable message that describes the error. An example is 'The request body is missing the required field `service`.'\n"},"details":{"type":"object","additionalProperties":true,"description":"Additional details about the error. This object can contain any additional information that may be useful for debugging.\n"}}}}},"paths":{"/workspaces/{workspaceId}/destination-management/capability/{capabilityName}":{"put":{"operationId":"upsertDestinationManagementConfig","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestinationManagementUpsertRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestinationManagement"}}},"description":"Created or updated"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error processing the request"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}},"description":"Validation error"}},"summary":"Upsert a destination management configuration for a given workspace/capability.","tags":["destination_management"]}}}}
```

```
PUT /workspaces/{workspaceId}/destination-management/capability/sms
```

**Notes:**

* `destinations` is a map of country code → status (`allowed` or `blocked`).
* This will fully overwrite your existing config
* Any destination not present in the map is treated as blocked.
* Destinations are ISO 3166-1 alpha-2 country codes.

**Request body:**

```json
{
  "destinations": {
    "US": "allowed",
    "BR": "blocked"
  }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bird.com/api/numbers-api/api-reference/destination-management-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
