For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
HomeGet API key
DocumentationIntegrationsAPI Reference
DocumentationIntegrationsAPI Reference
  • API Reference
      • GETList Calls
      • POSTCreate Outbound Call
      • POSTCreate Web Call
      • GETGet Call
      • POSTEnd Call
      • GETGet Call Recording
      • GETGet Call Transcript
      • GETStream Call Transcript
      • GETList Calls For Number
LogoLogo
HomeGet API key
API Referencecalls

End Call

POST
https://api.agentphone.ai/v1/calls/:call_id/end
POST
/v1/calls/:call_id/end
1const url = 'https://api.agentphone.ai/v1/calls/call_id/end';
2const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
3
4try {
5 const response = await fetch(url, options);
6 const data = await response.json();
7 console.log(data);
8} catch (error) {
9 console.error(error);
10}

Terminate an ongoing call.

Works for both hosted-mode and webhook-mode calls. The call_ended webhook from the voice provider updates status/endedAt asynchronously, so this endpoint returns the current call as soon as the stop request is accepted upstream.

Was this page helpful?
Previous

Get Call Recording

Next
Built with

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

call_idstringRequired

Response

Successful Response

Errors

422
Unprocessable Entity Error