Endpoint
POSThttps://{yourserver}/webhooks/callContent-Type: application/json This webhook is sent when a new call is created on the platform. It is configured at the application level. Reference: Call Hook (POST)
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Webhook sent when a new call is created on the platform (POST). Configured at the application level.
https://{yourserver}/webhooks/call| Property | Type | Description |
|---|---|---|
| call_sid | string | Unique identifier for the call |
| call_id | string | Call ID on the server |
| application_sid | string | Unique identifier for the Graine application controlling this call |
| account_sid | string | Unique identifier for the Graine account |
| direction | string | inbound — call originated outside Graine; outbound — call originated by Graine |
| from | string | Calling party number |
| to | string | Called party number |
| caller_name | string | Caller name, if known |
| sip_status | number | Most recent SIP status code for the call |
| sip_reason | string | Description of the last SIP status |
| call_status | string | One of: trying, ringing, early-media, in-progress, completed, failed, busy, no-answer |
| sbc_callid | string | Original call ID when the call arrived at Graine |
| originating_sip_ip | string | IP address that sent the call to Graine |
| originating_sip_trunk_name | string | Name of the carrier in Graine that received the call |
| local_sip_address | string | Internal address of the Feature Server handling the call |
| service_provider_sid | string | ID of the service provider the account belongs to |
| sip | object | The SIP request for the call (raw, headers, body, method, version, uri, payload) |
| env_vars | object | Application environment variables |
import requests
url = "https://{yourserver}/webhooks/call"
payload = {
"call_sid": "d2515c3b-b79a-41a2-971a-445e769c823c",
"call_id": "d2515c3b-b79a-41a2-971a-445e769c823c",
"application_sid": "72c5c38f-9bba-40ce-aa83-aaa6be55e1b5",
"account_sid": "bad98250-b34d-459d-9e90-f97dfb9bc519",
"direction": "inbound",
"from": "+12125551212",
"to": "+14155551234",
"caller_name": "John Doe",
"sip_status": 100,
"sip_reason": "Trying",
"call_status": "trying"
}
headers = {
"Authorization": "Basic <username>:<password>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const url = 'https://{yourserver}/webhooks/call';
const options = {
method: 'POST',
headers: {
Authorization: 'Basic <username>:<password>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
call_sid: 'd2515c3b-b79a-41a2-971a-445e769c823c',
call_id: 'd2515c3b-b79a-41a2-971a-445e769c823c',
application_sid: '72c5c38f-9bba-40ce-aa83-aaa6be55e1b5',
account_sid: 'bad98250-b34d-459d-9e90-f97dfb9bc519',
direction: 'inbound',
from: '+12125551212',
to: '+14155551234',
caller_name: 'John Doe',
sip_status: 100,
sip_reason: 'Trying',
call_status: 'trying'
})
};
const response = await fetch(url, options);
const data = await response.json();
console.log(data);