Create call

Create an outbound call to a given endpoint.

Please log in to see full path URL. Learn why.
post
/calls/1/calls
Request rate limit:
6 requests / second (per account)
Request Body schema:
application/json
collapse all -
endpoint
required
object

Call endpoint. Represents a caller for the inbound calls and a callee for the outbound calls.

type
string
phoneNumber
required
string

Phone number in the E.164 format.

from
string

Caller identifier. Must be a number in the E.164 format for calls to PHONE, a string for calls to WEBRTC or SIP, and a Viber Voice number for calls to VIBER. Field is mandatory for VIBER endpoint and calls to emergency numbers.

fromDisplayName
string

Display name to show when placing calls towards WEBRTC endpoints. Can be any alphanumeric string.

connectTimeout
integer <int32> <= 60

Time to wait, in seconds, before the called party answers the call.

recording
object
recordingType
required
string
Enum: "AUDIO" "AUDIO_AND_VIDEO"

Recording type.

customData
object

Custom data.

property name*
string

Custom data.

filePrefix
string

Custom name for the recording's zip file. Applicable only when SFTP server is enabled on Voice settings page. Using the same filePrefix will override the files on the SFTP server.

machineDetection
object
enabled
required
boolean

Indicates whether to enable answering machine detection. If set to true, answering machine detection will generate an event indicating if the call was answered by a human or a machine.

messageDetectionTimeout
integer <int32> <= 60

Indicates maximum duration for detecting the end of the message when a answering machine is detected. If set to 0, no end of message detection will be done. Expressed in seconds.

maxDuration
integer <int32>
Default: 28800

Max duration in seconds.

customData
object

Custom data.

property name*
string

Custom data.

callsConfigurationId
required
string

Calls Configuration ID.

platform
object

Platform options. For more details, see documentation.

entityId
string [ 0 .. 255 ] characters

Required to use entity in a send request for outbound traffic. Returned in notification events. For more details, see documentation.

applicationId
string [ 0 .. 255 ] characters

Required for application use in a send request for outbound traffic. Returned in notification events. For more details, see documentation.

parentCallId
string <= 128 characters

ID of an existing call that initiated this leg. Required for creating a dialog with an existing call.

Responses

201

Call created.

400

Bad request

401

Unauthorized

403

Forbidden

404

Application not found

429

Too Many Requests

500

Internal Server Error

Request samples

Content type
application/json
Example
Copy
Collapse all
{
  • "endpoint":
    {
    • "type": "PHONE",
    • "phoneNumber": "41792036727"
    },
  • "from": "41793026834",
  • "callsConfigurationId": "dc5942707c704551a00cd2ea",
  • "platform":
    {
    • "applicationId": "61c060db2675060027d8c7a6"
    }
}

Response samples

Content type
application/json
Example
Copy
Collapse all
{
  • "id": "d8d84155-3831-43fb-91c9-bb897149a79d",
  • "endpoint":
    {
    • "type": "PHONE",
    • "phoneNumber": "44790123456"
    },
  • "from": "44790123456",
  • "to": "44790123456",
  • "direction": "OUTBOUND",
  • "state": "CALLING",
  • "media":
    {
    • "audio":
      {
      • "muted": false,
      • "deaf": false
      },
    • "video":
      {
      • "camera": false,
      • "screenShare": false
      }
    },
  • "startTime": "2022-01-01T00:00:00.100+0000",
  • "answerTime": "2022-01-01T00:00:02.100+0000",
  • "ringDuration": 2,
  • "callsConfigurationId": "dc5942707c704551a00cd2ea",
  • "platform":
    {
    • "applicationId": "61c060db2675060027d8c7a6"
    },
  • "conferenceId": "034e622a-cc7e-456d-8a10-0ba43b11aa5e",
  • "customData":
    {
    • "key1": "value1",
    • "key2": "value2"
    }
}

Encountering issues

Contact our support

What's new? Check out

Release Notes

Unsure about a term? See

Glossary

Research panel

Help shape the future of our products
Learn more
Service status

Copyright @ 2006-2025 Infobip ltd.