> For the complete documentation index, see [llms.txt](https://docs.360dialog.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.360dialog.com/docs/messaging-api/api-reference/calling.md).

# Calling

Endpoints for WhatsApp calling features

## Perform Call Action

> Execute call actions: pre\_accept, accept, reject, or connect for incoming calls.

```json
{"openapi":"3.1.0","info":{"title":"Messaging API","version":"1.56.2"},"tags":[{"name":"Calling","description":"Endpoints for WhatsApp calling features"}],"servers":[{"description":"Production server","url":"https://waba-v2.360dialog.io"}],"security":[{"D360-API-KEY":[]}],"components":{"securitySchemes":{"D360-API-KEY":{"description":"API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.","in":"header","name":"D360-API-KEY","type":"apiKey"}},"schemas":{"calling.CallActionRequest":{"description":"Request payload to initiate or manage a WhatsApp call","properties":{"action":{"description":"The action being taken: connect, pre_accept, accept, reject, or terminate","type":"string"},"biz_opaque_callback_data":{"description":"Arbitrary string for tracking purposes, max 512 characters","type":"string"},"call_id":{"description":"The WhatsApp call ID (required for terminate action)","type":"string"},"messaging_product":{"description":"Messaging product, must be 'whatsapp'","type":"string"},"session":{"$ref":"#/components/schemas/calling.CallSession"},"to":{"description":"The number being called (callee)","type":"string"}},"type":"object"},"calling.CallSession":{"description":"Session description protocol (SDP) details","properties":{"sdp":{"description":"SDP info compliant with RFC 8866","type":"string"},"sdp_type":{"description":"SDP type: offer for connect action, answer for accept action","type":"string"}},"type":"object"},"calling.CallActionResponse":{"description":"Response payload for a call action execution","properties":{"calls":{"description":"Array of call information","items":{"$ref":"#/components/schemas/calling.CallInfo"},"type":"array","uniqueItems":false},"messaging_product":{"description":"Messaging product","type":"string"},"success":{"description":"Whether the action was successful (for terminate action)","type":"boolean"}},"type":"object"},"calling.CallInfo":{"properties":{"id":{"description":"Call ID","type":"string"}},"type":"object"},"utils.ErrorResp":{"properties":{"error":{"type":"string"}},"type":"object"}}},"paths":{"/calling/calls":{"post":{"description":"Execute call actions: pre_accept, accept, reject, or connect for incoming calls.","operationId":"perform-call-action","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/calling.CallActionRequest","summary":"requestBody","description":"Call action payload"}}},"description":"Call action payload","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/calling.CallActionResponse"}}},"description":"Call action executed successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Internal server error"}},"summary":"Perform Call Action","tags":["Calling"]}}}}
```

## Get Call Permissions

> Retrieve calling permissions for a specific consumer WhatsApp ID.

```json
{"openapi":"3.1.0","info":{"title":"Messaging API","version":"1.56.2"},"tags":[{"name":"Calling","description":"Endpoints for WhatsApp calling features"}],"servers":[{"description":"Production server","url":"https://waba-v2.360dialog.io"}],"security":[{"D360-API-KEY":[]}],"components":{"securitySchemes":{"D360-API-KEY":{"description":"API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.","in":"header","name":"D360-API-KEY","type":"apiKey"}},"schemas":{"calling.GetCallPermissionsResponse":{"description":"Response payload containing call permission status and available actions","properties":{"actions":{"description":"Available actions and their restrictions","items":{"$ref":"#/components/schemas/calling.CallPermissionAction"},"type":"array","uniqueItems":false},"messaging_product":{"description":"Messaging product","type":"string"},"permission":{"$ref":"#/components/schemas/calling.CallPermission"}},"type":"object"},"calling.CallPermissionAction":{"properties":{"action_name":{"description":"Name of the action: start_call or send_call_permission_request","type":"string"},"can_perform_action":{"description":"Whether the business can perform this action","type":"boolean"},"limits":{"description":"Rate limits for this action","items":{"$ref":"#/components/schemas/calling.CallPermissionLimit"},"type":"array","uniqueItems":false}},"type":"object"},"calling.CallPermissionLimit":{"properties":{"current_usage":{"description":"Current usage count","type":"integer"},"limit_expiration_time":{"description":"Unix timestamp when the limit resets","type":"integer"},"max_allowed":{"description":"Maximum allowed usage","type":"integer"},"time_period":{"description":"Time period for the limit","type":"string"}},"type":"object"},"calling.CallPermission":{"description":"Call permission details","properties":{"expiration_time":{"description":"Unix timestamp when the permission expires","type":"integer"},"status":{"description":"Current permission status: granted, pending, denied, or expired","type":"string"}},"type":"object"},"utils.ErrorResp":{"properties":{"error":{"type":"string"}},"type":"object"}}},"paths":{"/calling/permissions/{consumer_whatsapp_id}":{"get":{"description":"Retrieve calling permissions for a specific consumer WhatsApp ID.","operationId":"get-call-permissions","parameters":[{"description":"Consumer WhatsApp ID","in":"path","name":"consumer_whatsapp_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/calling.GetCallPermissionsResponse"}}},"description":"Call permissions retrieved successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Internal server error"}},"summary":"Get Call Permissions","tags":["Calling"]}}}}
```

## Get Calling Settings

> Retrieve calling settings including SIP credentials for WhatsApp calling functionality.

```json
{"openapi":"3.1.0","info":{"title":"Messaging API","version":"1.56.2"},"tags":[{"name":"Calling","description":"Endpoints for WhatsApp calling features"}],"servers":[{"description":"Production server","url":"https://waba-v2.360dialog.io"}],"security":[{"D360-API-KEY":[]}],"components":{"securitySchemes":{"D360-API-KEY":{"description":"API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.","in":"header","name":"D360-API-KEY","type":"apiKey"}},"schemas":{"calling.GetCallingSettingsResponse":{"description":"Response payload containing phone number settings including calling, encryption, and storage configuration","properties":{"calling":{"$ref":"#/components/schemas/calling.CallingSettingsResponse"},"payload_encryption":{"$ref":"#/components/schemas/calling.PayloadEncryptionSettingsResponse"},"storage_configuration":{"$ref":"#/components/schemas/calling.StorageConfigurationSettingsResponse"}},"type":"object"},"calling.CallingSettingsResponse":{"description":"Calling feature settings","properties":{"audio":{"$ref":"#/components/schemas/calling.AudioSettingsResponse"},"call_hours":{"$ref":"#/components/schemas/calling.CallHoursSettings"},"call_icon_visibility":{"description":"Current call icon visibility: visible or hidden","type":"string"},"call_icons":{"$ref":"#/components/schemas/calling.CallIconsSettings"},"callback_permission_status":{"description":"Callback permission status: enabled or disabled","type":"string"},"ip_addresses":{"$ref":"#/components/schemas/calling.IPAddresses"},"restrictions":{"$ref":"#/components/schemas/calling.CallingRestrictionsResponse"},"sip":{"$ref":"#/components/schemas/calling.SIPSettingsResponse"},"srtp_key_exchange_protocol":{"description":"SRTP key exchange protocol: DTLS-SRTP or SDES-SRTP","type":"string"},"status":{"description":"Current calling feature status: enabled or disabled","type":"string"},"video":{"$ref":"#/components/schemas/calling.VideoSettingsResponse"}},"type":"object"},"calling.AudioSettingsResponse":{"description":"Audio calling settings","properties":{"status":{"description":"Audio calling status: enabled or disabled","type":"string"}},"type":"object"},"calling.CallHoursSettings":{"description":"Call hours settings","properties":{"day_of_week_start":{"description":"Start day of the week","type":"string"},"status":{"description":"Call hours feature status: enabled or disabled","type":"string"},"timezone":{"description":"Timezone for call hours","type":"string"}},"type":"object"},"calling.CallIconsSettings":{"description":"Call icons settings","properties":{"restrict_to_user_countries":{"description":"List of countries where call icons are restricted","items":{"type":"string"},"type":"array","uniqueItems":false}},"type":"object"},"calling.IPAddresses":{"description":"IP addresses for calling","properties":{"default":{"description":"Default IP addresses for calling","items":{"type":"string"},"type":"array","uniqueItems":false}},"type":"object"},"calling.CallingRestrictionsResponse":{"description":"Calling restrictions","properties":{"restrictions":{"description":"List of active restrictions","items":{"$ref":"#/components/schemas/calling.Restriction"},"type":"array","uniqueItems":false}},"type":"object"},"calling.Restriction":{"properties":{"expiration":{"description":"Expiration timestamp for the restriction","type":"integer"},"type":{"description":"Type of restriction","type":"string"}},"type":"object"},"calling.SIPSettingsResponse":{"description":"SIP calling settings","properties":{"servers":{"description":"SIP server configuration","items":{"$ref":"#/components/schemas/calling.SIPServerInfo"},"type":"array","uniqueItems":false},"status":{"description":"SIP calling status: enabled or disabled","type":"string"}},"type":"object"},"calling.SIPServerInfo":{"properties":{"app_id":{"description":"Application ID for SIP server","type":"string"},"hostname":{"description":"SIP server hostname","type":"string"},"password":{"description":"SIP password (only included when include_sip_credentials=true)","type":"string"},"port":{"description":"SIP server port","type":"integer"}},"type":"object"},"calling.VideoSettingsResponse":{"description":"Video calling settings","properties":{"status":{"description":"Video calling status: enabled or disabled","type":"string"}},"type":"object"},"calling.PayloadEncryptionSettingsResponse":{"description":"Payload encryption settings","properties":{"client_encryption_key_fingerprint":{"description":"Client encryption key fingerprint (when encryption is enabled)","type":"string"},"cloud_encryption_key":{"description":"Cloud encryption key (when encryption is enabled)","type":"string"},"status":{"description":"Payload encryption status: enabled or disabled","type":"string"}},"type":"object"},"calling.StorageConfigurationSettingsResponse":{"description":"Data storage configuration settings","properties":{"data_localization_region":{"description":"Data localization region (when in-country storage is enabled)","type":"string"},"status":{"description":"Data storage configuration status: default or in_country_storage_enabled","type":"string"}},"type":"object"},"utils.ErrorResp":{"properties":{"error":{"type":"string"}},"type":"object"}}},"paths":{"/calling/settings":{"get":{"description":"Retrieve calling settings including SIP credentials for WhatsApp calling functionality.","operationId":"get-calling-settings","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/calling.GetCallingSettingsResponse"}}},"description":"Calling settings retrieved successfully"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Internal server error"}},"summary":"Get Calling Settings","tags":["Calling"]}}}}
```

## Update Calling Settings

> Update calling settings for WhatsApp calling functionality.

```json
{"openapi":"3.1.0","info":{"title":"Messaging API","version":"1.56.2"},"tags":[{"name":"Calling","description":"Endpoints for WhatsApp calling features"}],"servers":[{"description":"Production server","url":"https://waba-v2.360dialog.io"}],"security":[{"D360-API-KEY":[]}],"components":{"securitySchemes":{"D360-API-KEY":{"description":"API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.","in":"header","name":"D360-API-KEY","type":"apiKey"}},"schemas":{"calling.UpdateCallingSettingsRequest":{"description":"Request payload to update calling settings. Only one feature setting can be specified per request.","properties":{"calling":{"$ref":"#/components/schemas/calling.CallingSettings"}},"type":"object"},"calling.CallingSettings":{"description":"Calling feature settings to update","properties":{"call_icon_visibility":{"description":"Control visibility of the call icon: visible or hidden","type":"string"},"sip":{"$ref":"#/components/schemas/calling.SIPSettings"},"srtp_key_exchange_protocol":{"description":"SRTP key exchange protocol: DTLS-SRTP or SDES-SRTP","type":"string"},"status":{"description":"Enable or disable calling: enabled or disabled","type":"string"},"video":{"$ref":"#/components/schemas/calling.VideoSettings"}},"type":"object"},"calling.SIPSettings":{"description":"SIP calling settings","properties":{"status":{"description":"Enable or disable SIP calling: enabled or disabled","type":"string"}},"type":"object"},"calling.VideoSettings":{"description":"Video calling settings","properties":{"status":{"description":"Enable or disable video calling: enabled or disabled","type":"string"}},"type":"object"},"calling.UpdateCallingSettingsResponse":{"description":"Response payload for successful settings update","properties":{"success":{"description":"Whether the update was successful","type":"boolean"}},"type":"object"},"utils.ErrorResp":{"properties":{"error":{"type":"string"}},"type":"object"}}},"paths":{"/calling/settings":{"post":{"description":"Update calling settings for WhatsApp calling functionality.","operationId":"update-calling-settings","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/calling.UpdateCallingSettingsRequest","summary":"requestBody","description":"Calling settings payload"}}},"description":"Calling settings payload","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/calling.UpdateCallingSettingsResponse"}}},"description":"Calling settings updated successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Internal server error"}},"summary":"Update Calling Settings","tags":["Calling"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.360dialog.com/docs/messaging-api/api-reference/calling.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
