Skip to content

Text the cardholder a verification code

POST
/v1/cardholders/phone/verification/send
curl --request POST \
--url https://api.zwipe.co/v1/cardholders/phone/verification/send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "phone": "+13105551234" }'

Requires cardholders:verify. The issuer texts a code to a US mobile number. A proven phone shows the customer holds that number; it does not replace email verification before issuance. The issuer refuses a second code to the same phone for about three minutes (429 rate_limited, with Retry-After). sent: true is not proof of delivery.

Media typeapplication/json
object
phone
required

US mobile number in E.164 form. The issuer texts US numbers only.

string
/^\+1[2-9][0-9]{9}$/

Example

{
"phone": "+13105551234"
}

The issuer accepted the request to send

Media typeapplication/json
object
phone
required
string
sent
required
boolean

Example

{
"phone": "+13105551234",
"sent": true
}

Request does not match this contract (missing field, wrong type, bad format)

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable code.

string
Allowed values: validation_error invalid_client unauthorized insufficient_scope not_found method_not_allowed unsupported_media_type external_ref_conflict card_exists card_not_active cardholder_email_conflict no_existing_card chain_only chain_account venue_claimed venue_not_registered venue_required provider_error provider_unavailable provider_timeout issuance_in_doubt restart_unavailable rate_limited internal_error
message
required
string
details

Present on validation_error. One entry per violated field.

Array<object>
object
pointer
required

JSON pointer into the request body, or the parameter name.

string
message
required
string

Example

{
"error": {
"code": "validation_error",
"message": "Request body invalid: value at `/email` does not match format: email",
"details": [
{
"pointer": "/email",
"message": "value at `/email` does not match format: email"
}
]
}
}

Missing, expired or unknown credentials

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable code.

string
Allowed values: validation_error invalid_client unauthorized insufficient_scope not_found method_not_allowed unsupported_media_type external_ref_conflict card_exists card_not_active cardholder_email_conflict no_existing_card chain_only chain_account venue_claimed venue_not_registered venue_required provider_error provider_unavailable provider_timeout issuance_in_doubt restart_unavailable rate_limited internal_error
message
required
string
details

Present on validation_error. One entry per violated field.

Array<object>
object
pointer
required

JSON pointer into the request body, or the parameter name.

string
message
required
string

Example

{
"error": {
"code": "unauthorized",
"message": "A valid Bearer token is required."
}
}

Token lacks the scope this endpoint needs

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable code.

string
Allowed values: validation_error invalid_client unauthorized insufficient_scope not_found method_not_allowed unsupported_media_type external_ref_conflict card_exists card_not_active cardholder_email_conflict no_existing_card chain_only chain_account venue_claimed venue_not_registered venue_required provider_error provider_unavailable provider_timeout issuance_in_doubt restart_unavailable rate_limited internal_error
message
required
string
details

Present on validation_error. One entry per violated field.

Array<object>
object
pointer
required

JSON pointer into the request body, or the parameter name.

string
message
required
string

Example

{
"error": {
"code": "insufficient_scope",
"message": "This endpoint requires scope cards:issue."
}
}

Over the request limit (see Rate limit above). Wait Retry-After seconds.

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable code.

string
Allowed values: validation_error invalid_client unauthorized insufficient_scope not_found method_not_allowed unsupported_media_type external_ref_conflict card_exists card_not_active cardholder_email_conflict no_existing_card chain_only chain_account venue_claimed venue_not_registered venue_required provider_error provider_unavailable provider_timeout issuance_in_doubt restart_unavailable rate_limited internal_error
message
required
string
details

Present on validation_error. One entry per violated field.

Array<object>
object
pointer
required

JSON pointer into the request body, or the parameter name.

string
message
required
string

Example

{
"error": {
"code": "rate_limited",
"message": "Too many requests. Retry after 1 second."
}
}
Retry-After
integer
>= 1

Seconds to wait before the next request.

The issuer failed or did not answer in time. Retry reads with bounded backoff. For uncertain writes, preserve the original reference and inspect the saved order before any deliberate retry; never create a new reference to bypass uncertainty.

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable code.

string
Allowed values: validation_error invalid_client unauthorized insufficient_scope not_found method_not_allowed unsupported_media_type external_ref_conflict card_exists card_not_active cardholder_email_conflict no_existing_card chain_only chain_account venue_claimed venue_not_registered venue_required provider_error provider_unavailable provider_timeout issuance_in_doubt restart_unavailable rate_limited internal_error
message
required
string
details

Present on validation_error. One entry per violated field.

Array<object>
object
pointer
required

JSON pointer into the request body, or the parameter name.

string
message
required
string

Examples

Issuer unreachable or timed out

{
"error": {
"code": "provider_unavailable",
"message": "The card issuer did not respond."
}
}