Actions
Create scenario
Create a new Callr Actions scenario.
post/actions
Request body
Example request
{
"name": "Call Forwarding",
"script": "defaults:\n language: en-US\n\nbranches:\n inbound-call:\n actions:\n - action: log@v1\n params:\n message: Hello inbound call\n\n inbound-sms:\n actions:\n - action: log@v1\n params:\n message: Hello inbound sms\n\n api-initiated:\n actions:\n - action: log@v1\n params:\n message: Hello from API\n",
"format": "yaml"
}Response
Actions scenario created
Example response
{
"name": "Call Forwarding",
"script": "defaults:\n language: en-US\n\nbranches:\n inbound-call:\n actions:\n - action: log@v1\n params:\n message: Hello inbound call\n\n inbound-sms:\n actions:\n - action: log@v1\n params:\n message: Hello inbound sms\n\n api-initiated:\n actions:\n - action: log@v1\n params:\n message: Hello from API\n",
"format": "yaml",
"sid": "callrsid",
"numbers": [
{
"e164": "+33199001234",
"class": "classic",
"type": "geographic",
"assigned": "2024-04-24T17:42:28Z",
"country": "FR"
}
],
"version": "1.0",
"created": "2024-04-24T17:42:28Z",
"updated": "2024-04-24T17:42:28Z"
}