> 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.51.5"},"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":{"type":"string"},"biz_opaque_callback_data":{"type":"string"},"call_id":{"type":"string"},"messaging_product":{"type":"string"},"session":{"$ref":"#/components/schemas/calling.CallSession"},"to":{"type":"string"}},"type":"object"},"calling.CallSession":{"properties":{"sdp":{"type":"string"},"sdp_type":{"type":"string"}},"type":"object"},"calling.CallActionResponse":{"description":"Response payload for a call action execution","properties":{"calls":{"items":{"$ref":"#/components/schemas/calling.CallInfo"},"type":"array","uniqueItems":false},"messaging_product":{"type":"string"},"success":{"type":"boolean"}},"type":"object"},"calling.CallInfo":{"properties":{"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.51.5"},"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":{"items":{"$ref":"#/components/schemas/calling.CallPermissionAction"},"type":"array","uniqueItems":false},"messaging_product":{"type":"string"},"permission":{"$ref":"#/components/schemas/calling.CallPermission"}},"type":"object"},"calling.CallPermissionAction":{"properties":{"action_name":{"type":"string"},"can_perform_action":{"type":"boolean"},"limits":{"items":{"$ref":"#/components/schemas/calling.CallPermissionLimit"},"type":"array","uniqueItems":false}},"type":"object"},"calling.CallPermissionLimit":{"properties":{"current_usage":{"type":"integer"},"limit_expiration_time":{"type":"integer"},"max_allowed":{"type":"integer"},"time_period":{"type":"string"}},"type":"object"},"calling.CallPermission":{"properties":{"expiration_time":{"type":"integer"},"status":{"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.51.5"},"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":{"properties":{"audio":{"$ref":"#/components/schemas/calling.AudioSettingsResponse"},"call_hours":{"$ref":"#/components/schemas/calling.CallHoursSettings"},"call_icon_visibility":{"type":"string"},"call_icons":{"$ref":"#/components/schemas/calling.CallIconsSettings"},"callback_permission_status":{"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":{"type":"string"},"status":{"type":"string"},"video":{"$ref":"#/components/schemas/calling.VideoSettingsResponse"}},"type":"object"},"calling.AudioSettingsResponse":{"properties":{"status":{"type":"string"}},"type":"object"},"calling.CallHoursSettings":{"properties":{"day_of_week_start":{"type":"string"},"status":{"type":"string"},"timezone":{"type":"string"}},"type":"object"},"calling.CallIconsSettings":{"properties":{"restrict_to_user_countries":{"items":{"type":"string"},"type":"array","uniqueItems":false}},"type":"object"},"calling.IPAddresses":{"properties":{"default":{"items":{"type":"string"},"type":"array","uniqueItems":false}},"type":"object"},"calling.CallingRestrictionsResponse":{"properties":{"restrictions":{"items":{"$ref":"#/components/schemas/calling.Restriction"},"type":"array","uniqueItems":false}},"type":"object"},"calling.Restriction":{"properties":{"expiration":{"type":"integer"},"type":{"type":"string"}},"type":"object"},"calling.SIPSettingsResponse":{"properties":{"servers":{"items":{"$ref":"#/components/schemas/calling.SIPServerInfo"},"type":"array","uniqueItems":false},"status":{"type":"string"}},"type":"object"},"calling.SIPServerInfo":{"properties":{"app_id":{"type":"string"},"hostname":{"type":"string"},"password":{"type":"string"},"port":{"type":"integer"}},"type":"object"},"calling.VideoSettingsResponse":{"properties":{"status":{"type":"string"}},"type":"object"},"calling.PayloadEncryptionSettingsResponse":{"properties":{"client_encryption_key_fingerprint":{"type":"string"},"cloud_encryption_key":{"type":"string"},"status":{"type":"string"}},"type":"object"},"calling.StorageConfigurationSettingsResponse":{"properties":{"data_localization_region":{"type":"string"},"status":{"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.51.5"},"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":{"properties":{"call_icon_visibility":{"type":"string"},"sip":{"$ref":"#/components/schemas/calling.SIPSettings"},"srtp_key_exchange_protocol":{"type":"string"},"status":{"type":"string"},"video":{"$ref":"#/components/schemas/calling.VideoSettings"}},"type":"object"},"calling.SIPSettings":{"properties":{"status":{"type":"string"}},"type":"object"},"calling.VideoSettings":{"properties":{"status":{"type":"string"}},"type":"object"},"calling.UpdateCallingSettingsResponse":{"description":"Response payload for successful settings update","properties":{"success":{"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.
