API reference · Calls

End a call

POSThttps://goblins-call-api.onrender.com/v1/calls/:id/end

Closes the room and records the call as ended, with api as the reason. Safe to send for a call that has already ended.

Works with a workspace API key or the agent’s own key.

Path parameters

idstringRequired

The callId returned when the call was started.

Errors

404

No call in your workspace has that ID.

Every request can also answer 401, 429 and 500: see Errors.

Notes

  • DELETE /v1/calls/:id does the same thing.
curl -X POST "https://goblins-call-api.onrender.com/v1/calls/8f1c2c1e-7b1a-4e0a-9c55-2f6f0d3b1a90/end" \
  -H "Authorization: Bearer $CRACKLE_API_KEY"
Response · 200 OK
{
  "call": {
    "id": "8f1c2c1e-7b1a-4e0a-9c55-2f6f0d3b1a90",
    "status": "ended",
    "endReason": "api",
    "durationSeconds": 42,
    …
  }
}