Validate SIM cards registration codes
POST/sim_cards/actions/validate_registration_codes
It validates whether SIM card registration codes are valid or not.
Request
- application/json
Body
required
registration_codes string[]
Responses
200: Successful
- application/json
401: Unauthorized
default: Unexpected error
- application/json
Request samples
curl -L 'https://api.telnyx.com/v2/sim_cards/actions/validate_registration_codes' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"registration_codes": [
"123456780",
"1231231230"
]
}'
Response samples
{
"data": [
{
"record_type": "sim_card_registration_code_validation",
"registration_code": "0123456789",
"valid": false,
"invalid_detail": "This code has already been used."
}
]
}
{
"errors": [
{
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}