Skip to content

Register a destination and deliver its one-time code

POST
/v1/verified-numbers
curl --request POST \
--url https://api.vocapable.com/v1/verified-numbers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "phone_e164": "example", "label": "example" }'
Idempotency-Key
Any of:
string

Unique key for this request, so a retry replays the original result instead of repeating the work. Stored for 24 hours; a replayed response carries Idempotent-Replay: true. A UUID is the documented shape.

Media typeapplication/json
VerifiedNumberCreateRequest

Register a destination for OTP verification (docs/03-domain-model.md §VerifiedNumber).

object
phone_e164
required
Phone E164
string
/^\+[1-9]\d{7,14}$/
label
Any of:
string
<= 200 characters
Examplegenerated
{
"phone_e164": "example",
"label": "example"
}

Successful Response

Media typeapplication/json
VerifiedNumberCreated

The registration response. verification_code is populated only in non-prod environments, where no SMS/voice delivery channel exists yet; production refuses the registration outright until the messaging adapter lands, rather than minting a code nobody can receive (no fake success).

object
id
required
Id
string
phone_e164
required
Phone E164
string
label
Any of:
string
status
required
Status
string
Allowed values: pending verified expired revoked
code_expires_at
Any of:
string format: date-time
verification_attempts
required
Verification Attempts
integer
verified_at
Any of:
string format: date-time
created_at
required
Created At
string format: date-time
verification_code
Any of:
string
Example
{
"status": "pending"
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Examplegenerated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}