Graine AI

Stop or cancel a call

Hang up a live call, or cancel a scheduled one that has not dialled yet.

Hang up a live call, or cancel a scheduled one that has not dialled yet.

Two outcomes, deliberately given different status codes:

200 — cancelled before dial. The call was still scheduled. Nothing was ever placed, nobody was rung, and no minutes are billed.

202 — hangup requested. The call is live and the hangup has been sent to the telephony provider. This is a 202 and not a 200 on purpose: the provider's hangup is best-effort, and the stored status flips to a terminal value whether or not the audio actually stopped. Treat it as "requested", and confirm with GET /v2/calls/{execution_id}.

409 covers the three states where stopping is not possible, each with its own message: the call already ended; it has been dialled but has not yet reported a leg to hang up (retry in a moment — Retry-After: 2); or the provider refused the hangup.

Rate limit: 600 requests per minute per organization (bucket calls.create). Exceeding it returns 429 with Retry-After; the X-RateLimit-* response headers report your remaining allowance on every call.

POST
/v2/calls/{execution_id}/stop
/v2/calls/dbcffa37-92a1-4ae7-9814-71ca7b8ab3d3/stop

The Authorization access token

Authorization

Authorization
Required
Bearer <token>

Your Graine API key. Create one in the dashboard under Developers, or via POST /v2/api-keys. Send it as Authorization: Bearer <key>.

In: header

Request Body

application/jsonOptional

reasonReason | null

Free-text reason recorded alongside the hangup request.

Maximum length: 200

Path Parameters

execution_id
Required
Execution Id

The call's id, as returned by POST /v2/calls or GET /v2/calls.

Query Parameters

organization_idOrganization Id

Optional. Must equal your key's organization.

Response Body

200

Scheduled call cancelled before dialling.

execution_id
Required
Execution Id

The call that was cancelled.

status
Required
Status

Always "canceled" — call statuses spell it with one l, unlike the batch status "cancelled".

canceled_before_dialCanceled Before Dial

Always true here: nobody was rung and no minutes are billed.

Default: true

scheduled_atScheduled At | null

The start time that will now never fire.

202

Hangup requested for a live call.

execution_id
Required
Execution Id

The call a hangup was sent for.

status
Required
Status

Always "stopped".

requested_atRequested At | null

When the hangup was sent.

reasonReason | null

The reason you supplied, or user_request.

401

1100 — missing, unknown or inactive API key. 1101 — a browser session token was presented instead of an API key.

error
Required
Error

Stable integer code from the /v2 error table. Branch on this.

message
Required
Message

One human-readable sentence. Wording may change; the code will not.

403

1102 — the key is valid but lacks the scope this endpoint requires, or names another organization. GET /v2/scopes reports what a key holds.

error
Required
Error

Stable integer code from the /v2 error table. Branch on this.

message
Required
Message

One human-readable sentence. Wording may change; the code will not.

404

1200 — no such resource in your organization. A resource belonging to another organization answers 404, never 403.

error
Required
Error

Stable integer code from the /v2 error table. Branch on this.

message
Required
Message

One human-readable sentence. Wording may change; the code will not.

409

1201 — the resource's current state does not allow this action.

error
Required
Error

Stable integer code from the /v2 error table. Branch on this.

message
Required
Message

One human-readable sentence. Wording may change; the code will not.

422

1001 — the body or query failed validation; the message names the first offending field.

error
Required
integer

Stable integer code from the error table. Branch on this, not on the message.

message
Required
string

One human-readable sentence. Wording may change; the code will not.

429

1300 — the per-organization request rate or concurrent-call limit was reached. Carries Retry-After.

error
Required
Error

Stable integer code from the /v2 error table. Branch on this.

message
Required
Message

One human-readable sentence. Wording may change; the code will not.

503

1501 — a service this endpoint depends on is unreachable or returned a 5xx.

error
Required
Error

Stable integer code from the /v2 error table. Branch on this.

message
Required
Message

One human-readable sentence. Wording may change; the code will not.

504

1502 — a service this endpoint depends on did not answer in time.

error
Required
Error

Stable integer code from the /v2 error table. Branch on this.

message
Required
Message

One human-readable sentence. Wording may change; the code will not.

curl -X POST "https://api.graine.ai/v2/calls/dbcffa37-92a1-4ae7-9814-71ca7b8ab3d3/stop?organization_id=string" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "reason": "Customer asked us to stop calling."
  }'

Scheduled call cancelled before dialling.

{
  "execution_id": "dbcffa37-92a1-4ae7-9814-71ca7b8ab3d3",
  "status": "canceled",
  "canceled_before_dial": true,
  "scheduled_at": "2026-08-27T09:30:00.000Z"
}