Skip to main content
POST
Record destination consent

Authorizations

Authorization
string
header
required

Use Authorization: Bearer pyai_live_... (or pyai_test_...).

Headers

Idempotency-Key
string

Use a stable key for one consent grant. Repeating the same normalized evidence returns the original consent, including after a lost response or key rotation. Reuse with different evidence returns 409. Identity is retained with the consent record, independently of request-cache expiration. A replay does not renew, reactivate, or extend consent.

Required string length: 1 - 255

Body

application/json
destination
string
required
Example:

"+14155550123"

level
enum<string>
required
Available options:
express,
express_written
purposes
enum<string>[]
required
Available options:
transactional,
support,
sales,
collections,
survey
timezone
string
required
Example:

"America/Los_Angeles"

evidence_ref
string
required
captured_at
integer<int64>
required
status
enum<string>
default:active
Available options:
active,
revoked
call_idempotency_key
string

Optional exact Idempotency-Key of the one permitted durable call. Omit for ordinary broad consent. The permitted call has one carrier attempt; ServiceAgent integration calls already enforce this without changing tenant calling policy. Changing this field on a consent replay returns 409.

Required string length: 1 - 255
inbound_forward
object

Support-only consent restricted to incoming forwarding from this owned project and number. Cannot be combined with call_idempotency_key.

expires_at
integer<int64> | null

Response

Consent recorded or the original matching grant replayed

object
string
required
Allowed value: "telephony.consent"
id
string
required
destination
string
required

Masked destination.

level
enum<string>
required
Available options:
express,
express_written
purposes
enum<string>[]
required
Available options:
transactional,
support,
sales,
collections,
survey
status
enum<string>
required
Available options:
active,
revoked
timezone
string
required
captured_at
integer<int64>
required
expires_at
integer<int64> | null
required
call_idempotency_key
string | null
required

Original exact call key, or null for broad evidence.

inbound_forward
object | null