Grant
Type: object
Required means required within its containing object, when that object is present. Union/conditional constraints remain defined by the JSON Schema below.
| Field | Type | Presence | Description / constraints |
|---|---|---|---|
agent | string | Optional | Public agent_… reference (not a UUID). pattern: ^agent_[0-7][0-9A-HJKMNP-TV-Z]{25}$ |
capabilities | Array of voice.outbound, voice.inbound, sms.send, sms.receive, numbers.provision, numbers.release, calls.transfer, calls.hangup, calls.record, calls.dtmf, purchases, policy.check, usage.read, events.read | Optional | minItems: 1 |
expires_at | anyOf: string (date-time); null | Optional | — |
id | string | Optional | Public grant_… reference (not a UUID). pattern: ^grant_[0-7][0-9A-HJKMNP-TV-Z]{25}$ |
lines | Array of string | Optional | The Lines bound to the grant now: the only ones its agent may call, text or answer from |
org | string | Optional | Public org_… reference (not a UUID). pattern: ^org_[0-7][0-9A-HJKMNP-TV-Z]{25}$ |
policy_version | string | Optional | Public polv_… reference (not a UUID). pattern: ^polv_[0-7][0-9A-HJKMNP-TV-Z]{25}$ |
revoked_at | anyOf: string (date-time); null | Optional | — |
spend_limit_cents | integer | Optional | minimum: 0 |
JSON Schema
json
{
"additionalProperties": true,
"properties": {
"agent": {
"description": "Public agent_… reference (not a UUID)",
"pattern": "^agent_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
"type": "string"
},
"capabilities": {
"items": {
"enum": [
"voice.outbound",
"voice.inbound",
"sms.send",
"sms.receive",
"numbers.provision",
"numbers.release",
"calls.transfer",
"calls.hangup",
"calls.record",
"calls.dtmf",
"purchases",
"policy.check",
"usage.read",
"events.read"
],
"type": "string"
},
"minItems": 1,
"type": "array"
},
"expires_at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
]
},
"id": {
"description": "Public grant_… reference (not a UUID)",
"pattern": "^grant_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
"type": "string"
},
"lines": {
"description": "The Lines bound to the grant now: the only ones its agent may call, text or answer from",
"items": {
"description": "Public line_… reference (not a UUID)",
"pattern": "^line_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
"type": "string"
},
"type": "array"
},
"org": {
"description": "Public org_… reference (not a UUID)",
"pattern": "^org_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
"type": "string"
},
"policy_version": {
"description": "Public polv_… reference (not a UUID)",
"pattern": "^polv_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
"type": "string"
},
"revoked_at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
]
},
"spend_limit_cents": {
"minimum": 0,
"type": "integer"
}
},
"type": "object"
}