Skip to content

Initiate and end a call

Updated: Mar 23, 2026

After the consumer has granted call permission, use the new call API to initiate a call by providing an SDP offer.

Before you begin

Initiate a call

Use this API to start a call by providing the consumer's PSID and an SDP offer. A successful response includes an SDP answer that you apply to your local peer connection.

Request syntax

POST /{page-id}/calls  
{  
  "platform": "messenger",  
  "to": "{psid}",  
  "action": "connect",  
  "session": {  
      "sdp_type": "offer",  
      "sdp": "<<RFC 4566 SDP>>"  
   }  
}

Request parameters

PropertyDescription
to stringThe Page-scoped ID of the consumer to call
action stringSet to connect to initiate a call
session JSONConnection information containing: * sdp: SDP offer compliant with RFC 4566⁠ * sdp_type: Set to offer

Example response

{  
  "success": true,  
  "id": "c_M5YPhGE5jm0L_PMQdScLlYJlR7tU_f0rgXinCqnTQ",  
  "session": {  
    "sdp_response": {  
      "sdp_type": "answer",  
      "sdp": "<<RFC 4566 SDP>>"  
    }  
  }  
}

Response fields

PropertyDescription
success booleanWhether the operation was successful
id stringUnique ID for this call. Use this ID for subsequent API calls and to correlate webhooks.
session JSONContains sdp_response with the SDP answer. Apply this answer to your local peer connection.

Error response

The following errors can occur:

  • Invalid Page ID
  • Permissions or authorization errors
  • Consumer has not given permission to call
  • Request format validation errors (for example, connection info, SDP, or ICE)

For more details, see the Messenger Platform error codes reference.

Terminate a call

Use this API to end an active call.

Request syntax

POST /{page-id}/calls  
{  
  "platform": "messenger",  
  "call_id": "{call-id}",  
  "action" : "terminate"  
}

Request parameters

PropertyDescription
platform Optional stringOnly Messenger is supported
call_id stringID of the call from the webhook or the new call API response
action stringSet to terminate

Example response

{  
  "success" : true  
}

Error response

The following errors can occur:

  • Invalid call ID or Page ID
  • Call already terminated
  • Cannot terminate a failed or completed call
  • Permissions or authorization errors

For more details, see the Messenger Platform error codes reference.

Next steps

  • Handle calling webhooks for call status, media updates, and termination events
  • See the end-to-end call flow for a complete walkthrough www/flib/intern/public-developer-docs/social/mdsourcedc/business-messaging/messenger-platform/_staging/calling/biz2consumer/webhooks.md

Unofficial mirror for reference/search purposes. All content originates from developers.facebook.com — see the source link at the top of each page. Machine-readable indexes: llms.txt · llms-full.txt · About