Sender IDs

The API for validating sender IDs allows you to automatically validate caller IDs for the Voice API. After calling this API, you will receive a code back if it is successful. At the same time, the specified phone number will receive a call from us. The returned code must then be entered via the telephone keypad using DTMF.


Validate sender for voice

To be able to use a phone number for voice, you must first validate it. To do this, you will receive a call in which a code must be entered. If the call is successful and the number has not yet been validated for your account, you will receive a JSON object with the code.

Parameter

  • Name
    number
    Type
    string
    Description

    The phone number to be validated. The format is almost arbitrary - our gateway automatically formats the number correctly.

Optional parameters

  • Name
    callback
    Type
    string
    Description

    Callback URL to be called as soon as the validation has been successfully completed.

request

POST
/api/validate_for_voice
curl -G https://gateway.seven.io/api/validate_for_voice \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Accept: application/json"
  -d "number=49176123456789"

Response if successful

{
    "code": "699350",
    "error": null,
    "success": true
}

Response if phone number invalid

{
"id": null,
"sender": "49176123456789",
"formatted_output": null,
"success": false,
"error": "Reception number invalid",
"voice": false
}

Response if phone number already validated

{
  "id": 12345,
  "sender": "49176123456789",
  "formatted_output": "+49 176 123456789",
  "success": true,
  "error": "The sender ID is already saved.",
  "voice": true
}
Last updated: 9 months ago