Skip to content

Delete Custom Disposition

DELETE
/dialer/dispositions/{disposition_id}

CONTACTS NOBODY. Deletes one of the organisation’s CUSTOM dispositions.

The gap voice_router named as deliberately absent - “voice’s own dispositions router never exposed a delete endpoint” - which is no longer true: it does, and this publishes it.

REFUSED WITH 409 IF ANY CALL IS ALREADY DISPOSITIONED WITH IT. So this only ever removes an unused value - history cannot be rewritten by it, and a 409 means “this one is in use”, not “try again”.

The organisation is carried in a HEADER, not the path, and voice resolves the row with it (_load_disposition_for_org). It is the key’s own org, so one tenant cannot delete another’s vocabulary by guessing an id.

ADMIN ONLY, and that gate is declared HERE. Voice declares require_org_admin() on its own route, and for a server-to-server call that dependency finds no bearer token and - with ENFORCE_VOICE_PERMISSIONS off, which is everywhere today - ALLOWS the request. require_org_admin from developer_api.dependencies.admin is the one actually protecting this, and it refuses machine keys outright: deleting shared org vocabulary needs a personal key held by an Admin or Owner.

Authorizations

Parameters

Path Parameters

disposition_id
required

Custom disposition id.

integer

Custom disposition id.

Header Parameters

X-Target-Org-Id
Any of:
string

Responses

200

Successful Response

object
data
required

An open envelope for one dialer result.

Open because voice owns the shape of a session, a call stub and a queue stat, and it grows them without a contract bump here. A dropped field would otherwise turn an added upstream field into a removed public one.

object
key
additional properties
any
pagination
Any of:
object
has_next
required

Whether there are more pages

boolean
limit
required

Items per page

integer
next_cursor
Any of:
string
page
required

Current page number (1-indexed)

integer
total
required

Total number of items

integer

422

Validation Error

object
detail
Array<object>
object
loc
required
Array
msg
required
string
type
required
string