---
title: "Update destination"
method: PATCH
path: "/api/v1/purchases/{purchase_id}/destinations/{id}"
tags: ["Inbound Destinations"]
---

# Update destination

`PATCH /api/v1/purchases/{purchase_id}/destinations/{id}`

## Request

- Base URL: `https://app.didlogic.com`
- URL: `https://app.didlogic.com/api/v1/purchases/{purchase_id}/destinations/{id}`
- Auth: HTTP bearer

Update an existing inbound destination for a DID number.

**Updatable Fields:**
- `dialing_type` - Dialing mode: `sequence`, `ring_all` or `random`
- `callhunt` - Legacy two-state mirror of `dialing_type`; ignored when `dialing_type` is sent
- `active` - Enable/disable this destination

**Note:** The destination address and transport protocol cannot be changed. To change these, delete and create a new destination.

## Path parameters

- `purchase_id` string, required
- `id` integer, required

## Request body

- object
  - `destination` object
    - `callhunt` boolean: Enable callhunt (ring all). Ignored when `destination[dialing_type]` is sent.
    - `dialing_type` 'sequence' | 'ring_all' | 'random': Dialing mode of the group this destination belongs to: `sequence` tries it alone, `ring_all` dials the whole group at once, `random` picks group members in a random order. Mirrors `callhunt` (`ring_all` maps to true). Takes precedence over `callhunt`.
    - `active` boolean: Activate/deactivate this destination

## Response `200`

Successfully updates destination settings and returns updated destination

- object
  - `did_destination` object, required: Updated destination details
    - `id` integer, required: Destination ID
    - `transport` 1 | 4 | 5 | 10 | 12 | 13, required: Transport type: 1 = SIP URI, 4 = Phone number, 5 = SIP device, 10 = Webphone, 12 = WebSocket, 13 = SDK (rings the account of one of your SDK tokens; set up through the SDK, not through this API)
    - `destination` string, required: Forwarding target
    - `priority` integer, required: Destination priority
    - `callhunt` boolean, required: Whether callhunt is enabled
    - `dialing_type` 'sequence' | 'ring_all' | 'random', required: Dialing mode of the group this destination belongs to: `sequence` tries it alone, `ring_all` dials the whole group at once, `random` picks group members in a random order. Mirrors `callhunt` (`ring_all` maps to true).
    - `active` boolean, required: Whether destination is active
    - `ai_agent_id` integer, nullable, required: Linked AI agent ID (null when the destination is not an AI agent)
    - `ai_agent_name` string, nullable, required: Linked AI agent name (null when the destination is not an AI agent)

## Other responses

- `403`: Returns 403 error when API token is incorrect
- `404`: Returns the 404 error envelope {"errors":{"base":["data not found"]}} when neither the DID phone number nor its inventory id matches a DID you own.

---

[API](https://skmtc.dev/didlogic/apis/get-started.md) · [All operations](https://skmtc.dev/didlogic/apis/get-started/llms.txt) · [OpenAPI document](https://skmtc.dev/didlogic/apis/get-started/revisions/dc972d592b34?raw)
