Skip to main content

POST Flash Call

This endpoint is used to initiate a flash call. The Flash Call triggers a verification call to a phone number. The system generates a unique caller ID and initiates a call that will end automatically before the recipient answers, leaving the caller ID visible for verification purposes.

Configure the API Endpoint

https://api.betatel.com/api/v1/connect-hub/call/flash
  • Method: POST

Set Up the Headers

ParamValueDescription
Content-typeapplication/jsonSpecifies the payload format.
x-api-key{{x-api-key}}API key for authorization.
x-user-id{{x-user-id}}User identifier for added security and tracking.

Craft the Request Body

Design the JSON payload to include the call type, recipient number, and optional parameters.

Example of body
{
"callType": "flash",
"callee": "38761444555",
"maxRingTime": 5
}
FieldTypeRequiredDescription
callTypestringYesType of call to be initiated ("flash").
calleestringYesThe number to which the call will be made.
callerstringNoThe caller ID (the number that makes the call) is used as a verification token.
maxRingTimeintegerNoMaximum ring time for the call (default: 5).

Code Snippets

Example - cURL
curl --location 'https://api.betatel.com/api/v1/connect-hub/call/flash' \
--header 'Content-Type: application/json' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'x-user-id: YOUR_USER_ID' \
--data '{
"callType":"flash",
"callee":"38761444555",
"maxRingTime": 5
}'

Understanding the Response

Once the API processes your request, it returns a response containing the unique identifier for the flash call and call details.

JSON Schema:

{
"uuid": "01JV5V54KPYK9GB29265EQRZ2P",
"caller": "96530165239",
"callee": "38761444555"
}
  • uuid: The unique identifier for the flash call.
  • caller: The caller ID displayed to the recipient.
  • callee: The recipient's phone number.

Error Handling

  • 400 - Bad Request: Invalid parameters or malformed request
  • 401 - Unauthorized: Authentication failed
  • 500 - Internal Server Error: An unexpected error occurred on the server