Flash Calling API
This API enables users to leverage flash calls for quick and efficient number validation or authentication processes.
This API initiates a call to the destination number. If the call is answered, it will be immediately terminated.
POST
/workspaces/{workspaceId}/channels/{channelId}/flashcalls
Create a new channel flash call
请求载荷
from
string
to
string
必填
ringTimeout
integer
响应载荷
id
string
必填
channelId
string
必填
from
string
必填
to
string
必填
status
string
必填
Possible values: accepted, starting, ringing, ongoing, completed, busy, no-answer, failed, cancelled, scheduled
ringTimeout
integer
attemptPrice
object
显示子属性
attemptPrice.amount
integer
attemptPrice.exponent
integer
attemptPrice.currency
string
connectionPrice
object
显示子属性
connectionPrice.amount
integer
connectionPrice.exponent
integer
connectionPrice.currency
string
reason
string
duration
integer
createdAt
string
必填
updatedAt
string
必填
ringingAt
string
answeredAt
string
endedAt
string
代码示例
curl -X POST 'https://api.bird.com/workspaces/{workspaceId}/channels/{channelId}/flashcalls' \
-H 'Authorization: AccessKey YOUR_ACCESS_KEY'To terminate a flash call resource, or update the result of the verification, user can do a POST to a flash call resource, using this endpoint.
POST
/workspaces/{workspaceId}/channels/{channelId}/flashcalls/{callId}
Completes the channel flash call
请求载荷
receivedCli
string
result
string
必填
Possible values: unknown, verified, canceled, timeout, wrong_cli
响应载荷
receivedCli
string
result
string
必填
Possible values: unknown, verified, canceled, timeout, wrong_cli
代码示例
curl -X POST 'https://api.bird.com/workspaces/{workspaceId}/channels/{channelId}/flashcalls/{callId}' \
-H 'Authorization: AccessKey YOUR_ACCESS_KEY'User can also chose to hangup calls, using a combination of From and To numbers:
POST
/workspaces/{workspaceId}/channels/{channelId}/flashcalls/hangup
Completes the channel flash call
请求载荷
receivedCli
string
result
string
必填
Possible values: unknown, verified, canceled, timeout, wrong_cli
from
string
必填
The phone number that initiated the call.
to
string
必填
The phone number that received the call.
响应载荷
receivedCli
string
result
string
必填
Possible values: unknown, verified, canceled, timeout, wrong_cli
from
string
必填
The phone number that initiated the call.
to
string
必填
The phone number that received the call.
代码示例
curl -X POST 'https://api.bird.com/workspaces/{workspaceId}/channels/{channelId}/flashcalls/hangup' \
-H 'Authorization: AccessKey YOUR_ACCESS_KEY'