KanutusDocs
kanutus.com Sign in / Create accountSign in

Phone calls

GET/v1/calls/quote

Quote a destination and check the call purpose for that country

Permission: calls:read

Parameters

NameTypeDescription
to requiredquery · string
purposequery · "transactional" | "scheduling" | "support" | "marketing"
consentquery · "existing_customer" | "prior_express" | "written"
fromquery · string

Response 200

NameTypeDescription
to requiredstringMasked number
country requiredstring
kind requiredstring
allowed requiredboolean
minute_factor requirednumber
reason requiredstring
purpose requiredobject | null
purpose.purpose required"transactional" | "scheduling" | "support" | "marketing"
purpose.allowed requiredboolean
purpose.code requiredstring
purpose.message requiredstring | null
purpose.requires requiredstring[]
purpose.legal_reviewed requiredboolean
simulator requiredstring | null

Example

curl
curl "https://api.kanutus.com/v1/calls/quote?to=string" \
  -H "Authorization: Bearer $KANUTUS_API_KEY"
Try it

Runs from your browser against the real API. Use a kt_test_ key: nothing is charged. The key stays in this tab only.

GET /v1/calls/quote

Responses by status

200 Destination, minute factor and whether this purpose is allowed there
200
{
  "to": "string",
  "country": "string",
  "kind": "string",
  "allowed": true,
  "minute_factor": 0,
  "reason": "string",
  "purpose": {
    "purpose": "transactional",
    "allowed": true,
    "code": "string",
    "message": "string",
    "requires": [
      "string"
    ],
    "legal_reviewed": true
  },
  "simulator": "string"
}
400 Invalid request
400 application/problem+json
{
  "type": "https://docs.kanutus.com/errors",
  "title": "<code>",
  "status": 400,
  "code": "<code>",
  "message": "…",
  "request_id": "req_…"
}

See all error codes

401 Missing, invalid, expired or revoked credential
401 application/problem+json
{
  "type": "https://docs.kanutus.com/errors",
  "title": "<code>",
  "status": 401,
  "code": "<code>",
  "message": "…",
  "request_id": "req_…"
}

See all error codes

403 Missing permission, blocked or not allowed
403 application/problem+json
{
  "type": "https://docs.kanutus.com/errors",
  "title": "<code>",
  "status": 403,
  "code": "<code>",
  "message": "…",
  "request_id": "req_…"
}

See all error codes

429 Rate limit exceeded (see RateLimit-* and Retry-After headers)
429 application/problem+json
{
  "type": "https://docs.kanutus.com/errors",
  "title": "<code>",
  "status": 429,
  "code": "<code>",
  "message": "…",
  "request_id": "req_…"
}

See all error codes

POST/v1/calls

Place a translated call as an AI agent (always announces it is an AI) Soon

Permission: calls:dial

Live mode answers 501 coming soon. Try it now with a kt_test_ key (simulator).

Parameters

NameTypeDescription
idempotency-key requiredheader · stringUnique key per create request; retries with the same key return the same result.

Request body

NameTypeDescription
to requiredstringlength 4–32
fromstringCaller ID (one of the organization's numbers) · length 0–32
purpose required"transactional" | "scheduling" | "support" | "marketing"
consentobject
consent.kind required"existing_customer" | "prior_express" | "written"
consent.refstringYour reference to the consent record · length 0–200
agent_langstringdefault "en"
remote_langstring
voice_idstringlength 0–100

Response 201

NameTypeDescription
id requiredstring
to requiredstring
country requiredstring
purpose required"transactional" | "scheduling" | "support" | "marketing"
status required"queued" | "ringing" | "answered" | "completed" | "busy" | "voicemail" | "no_answer" | "failed" | "blocked"
ai_disclosure requiredtrue
billed_seconds requiredinteger
created_at requiredstring
answered_atstring | null
ended_atstring | null
end_reasonstring | nullagent_hangup, remote_hangup, max_duration, busy, voicemail, no_answer…
livemode requiredboolean

Example

curl
curl -X POST "https://api.kanutus.com/v1/calls" \
  -H "Authorization: Bearer $KANUTUS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"to":"+1 555 0100","from":"string","purpose":"transactional","consent":{"kind":"existing_customer","ref":"string"},"agent_lang":"en","remote_lang":"string","voice_id":"string"}'
Try it

Runs from your browser against the real API. Use a kt_test_ key: nothing is charged. The key stays in this tab only.

POST /v1/calls

Responses by status

201 Call created
201
{
  "id": "string",
  "to": "string",
  "country": "string",
  "purpose": "transactional",
  "status": "queued",
  "ai_disclosure": true,
  "billed_seconds": 0,
  "created_at": "string",
  "answered_at": "string",
  "ended_at": "string",
  "end_reason": "string",
  "livemode": true
}
400 Invalid request
400 application/problem+json
{
  "type": "https://docs.kanutus.com/errors",
  "title": "<code>",
  "status": 400,
  "code": "<code>",
  "message": "…",
  "request_id": "req_…"
}

See all error codes

401 Missing, invalid, expired or revoked credential
401 application/problem+json
{
  "type": "https://docs.kanutus.com/errors",
  "title": "<code>",
  "status": 401,
  "code": "<code>",
  "message": "…",
  "request_id": "req_…"
}

See all error codes

402 Spend limit of this credential reached
402 application/problem+json
{
  "type": "https://docs.kanutus.com/errors",
  "title": "<code>",
  "status": 402,
  "code": "<code>",
  "message": "…",
  "request_id": "req_…"
}

See all error codes

403 Missing permission, blocked or not allowed
403 application/problem+json
{
  "type": "https://docs.kanutus.com/errors",
  "title": "<code>",
  "status": 403,
  "code": "<code>",
  "message": "…",
  "request_id": "req_…"
}

See all error codes

409 Conflict (idempotency or state)
409 application/problem+json
{
  "type": "https://docs.kanutus.com/errors",
  "title": "<code>",
  "status": 409,
  "code": "<code>",
  "message": "…",
  "request_id": "req_…"
}

See all error codes

429 Rate limit exceeded (see RateLimit-* and Retry-After headers)
429 application/problem+json
{
  "type": "https://docs.kanutus.com/errors",
  "title": "<code>",
  "status": 429,
  "code": "<code>",
  "message": "…",
  "request_id": "req_…"
}

See all error codes

501 Not available yet in live mode (use a kt_test_ key)
501 application/problem+json
{
  "type": "https://docs.kanutus.com/errors",
  "title": "<code>",
  "status": 501,
  "code": "<code>",
  "message": "…",
  "request_id": "req_…"
}

See all error codes

GET/v1/calls

Calls placed by this credential

Permission: calls:read

Response 200

NameTypeDescription
data requiredobject[]
data[].id requiredstring
data[].to requiredstring
data[].country requiredstring
data[].purpose required"transactional" | "scheduling" | "support" | "marketing"
data[].status required"queued" | "ringing" | "answered" | "completed" | "busy" | "voicemail" | "no_answer" | "failed" | "blocked"
data[].ai_disclosure requiredtrue
data[].billed_seconds requiredinteger
data[].created_at requiredstring
data[].answered_atstring | null
data[].ended_atstring | null
data[].end_reasonstring | nullagent_hangup, remote_hangup, max_duration, busy, voicemail, no_answer…
data[].livemode requiredboolean

Example

curl
curl "https://api.kanutus.com/v1/calls" \
  -H "Authorization: Bearer $KANUTUS_API_KEY"
Try it

Runs from your browser against the real API. Use a kt_test_ key: nothing is charged. The key stays in this tab only.

GET /v1/calls

Responses by status

200 Calls, newest first
200
{
  "data": [
    {
      "id": "string",
      "to": "string",
      "country": "string",
      "purpose": "transactional",
      "status": "queued",
      "ai_disclosure": true,
      "billed_seconds": 0,
      "created_at": "string",
      "answered_at": "string",
      "ended_at": "string",
      "end_reason": "string",
      "livemode": true
    }
  ]
}
400 Invalid request
400 application/problem+json
{
  "type": "https://docs.kanutus.com/errors",
  "title": "<code>",
  "status": 400,
  "code": "<code>",
  "message": "…",
  "request_id": "req_…"
}

See all error codes

401 Missing, invalid, expired or revoked credential
401 application/problem+json
{
  "type": "https://docs.kanutus.com/errors",
  "title": "<code>",
  "status": 401,
  "code": "<code>",
  "message": "…",
  "request_id": "req_…"
}

See all error codes

403 Missing permission, blocked or not allowed
403 application/problem+json
{
  "type": "https://docs.kanutus.com/errors",
  "title": "<code>",
  "status": 403,
  "code": "<code>",
  "message": "…",
  "request_id": "req_…"
}

See all error codes

429 Rate limit exceeded (see RateLimit-* and Retry-After headers)
429 application/problem+json
{
  "type": "https://docs.kanutus.com/errors",
  "title": "<code>",
  "status": 429,
  "code": "<code>",
  "message": "…",
  "request_id": "req_…"
}

See all error codes

GET/v1/calls/{id}

Get a call

Permission: calls:read

Parameters

NameTypeDescription
id requiredpath · string

Response 200

NameTypeDescription
id requiredstring
to requiredstring
country requiredstring
purpose required"transactional" | "scheduling" | "support" | "marketing"
status required"queued" | "ringing" | "answered" | "completed" | "busy" | "voicemail" | "no_answer" | "failed" | "blocked"
ai_disclosure requiredtrue
billed_seconds requiredinteger
created_at requiredstring
answered_atstring | null
ended_atstring | null
end_reasonstring | nullagent_hangup, remote_hangup, max_duration, busy, voicemail, no_answer…
livemode requiredboolean

Example

curl
curl "https://api.kanutus.com/v1/calls/call_7Hn2Qd9Wk4Lp6Rt1Xb8Mc3Zf" \
  -H "Authorization: Bearer $KANUTUS_API_KEY"
Try it

Runs from your browser against the real API. Use a kt_test_ key: nothing is charged. The key stays in this tab only.

GET /v1/calls/{id}

Responses by status

200 Call
200
{
  "id": "string",
  "to": "string",
  "country": "string",
  "purpose": "transactional",
  "status": "queued",
  "ai_disclosure": true,
  "billed_seconds": 0,
  "created_at": "string",
  "answered_at": "string",
  "ended_at": "string",
  "end_reason": "string",
  "livemode": true
}
400 Invalid request
400 application/problem+json
{
  "type": "https://docs.kanutus.com/errors",
  "title": "<code>",
  "status": 400,
  "code": "<code>",
  "message": "…",
  "request_id": "req_…"
}

See all error codes

401 Missing, invalid, expired or revoked credential
401 application/problem+json
{
  "type": "https://docs.kanutus.com/errors",
  "title": "<code>",
  "status": 401,
  "code": "<code>",
  "message": "…",
  "request_id": "req_…"
}

See all error codes

403 Missing permission, blocked or not allowed
403 application/problem+json
{
  "type": "https://docs.kanutus.com/errors",
  "title": "<code>",
  "status": 403,
  "code": "<code>",
  "message": "…",
  "request_id": "req_…"
}

See all error codes

404 Not found
404 application/problem+json
{
  "type": "https://docs.kanutus.com/errors",
  "title": "<code>",
  "status": 404,
  "code": "<code>",
  "message": "…",
  "request_id": "req_…"
}

See all error codes

429 Rate limit exceeded (see RateLimit-* and Retry-After headers)
429 application/problem+json
{
  "type": "https://docs.kanutus.com/errors",
  "title": "<code>",
  "status": 429,
  "code": "<code>",
  "message": "…",
  "request_id": "req_…"
}

See all error codes

POST/v1/calls/{id}/hangup

Hang up (idempotent: an ended call is returned as is) Soon

Permission: calls:dial

Live mode answers 501 coming soon. Try it now with a kt_test_ key (simulator).

Parameters

NameTypeDescription
id requiredpath · string

Response 200

NameTypeDescription
id requiredstring
to requiredstring
country requiredstring
purpose required"transactional" | "scheduling" | "support" | "marketing"
status required"queued" | "ringing" | "answered" | "completed" | "busy" | "voicemail" | "no_answer" | "failed" | "blocked"
ai_disclosure requiredtrue
billed_seconds requiredinteger
created_at requiredstring
answered_atstring | null
ended_atstring | null
end_reasonstring | nullagent_hangup, remote_hangup, max_duration, busy, voicemail, no_answer…
livemode requiredboolean

Example

curl
curl -X POST "https://api.kanutus.com/v1/calls/call_7Hn2Qd9Wk4Lp6Rt1Xb8Mc3Zf/hangup" \
  -H "Authorization: Bearer $KANUTUS_API_KEY"
Try it

Runs from your browser against the real API. Use a kt_test_ key: nothing is charged. The key stays in this tab only.

POST /v1/calls/{id}/hangup

Responses by status

200 The call, ended
200
{
  "id": "string",
  "to": "string",
  "country": "string",
  "purpose": "transactional",
  "status": "queued",
  "ai_disclosure": true,
  "billed_seconds": 0,
  "created_at": "string",
  "answered_at": "string",
  "ended_at": "string",
  "end_reason": "string",
  "livemode": true
}
400 Invalid request
400 application/problem+json
{
  "type": "https://docs.kanutus.com/errors",
  "title": "<code>",
  "status": 400,
  "code": "<code>",
  "message": "…",
  "request_id": "req_…"
}

See all error codes

401 Missing, invalid, expired or revoked credential
401 application/problem+json
{
  "type": "https://docs.kanutus.com/errors",
  "title": "<code>",
  "status": 401,
  "code": "<code>",
  "message": "…",
  "request_id": "req_…"
}

See all error codes

403 Missing permission, blocked or not allowed
403 application/problem+json
{
  "type": "https://docs.kanutus.com/errors",
  "title": "<code>",
  "status": 403,
  "code": "<code>",
  "message": "…",
  "request_id": "req_…"
}

See all error codes

404 Not found
404 application/problem+json
{
  "type": "https://docs.kanutus.com/errors",
  "title": "<code>",
  "status": 404,
  "code": "<code>",
  "message": "…",
  "request_id": "req_…"
}

See all error codes

409 Conflict (idempotency or state)
409 application/problem+json
{
  "type": "https://docs.kanutus.com/errors",
  "title": "<code>",
  "status": 409,
  "code": "<code>",
  "message": "…",
  "request_id": "req_…"
}

See all error codes

429 Rate limit exceeded (see RateLimit-* and Retry-After headers)
429 application/problem+json
{
  "type": "https://docs.kanutus.com/errors",
  "title": "<code>",
  "status": 429,
  "code": "<code>",
  "message": "…",
  "request_id": "req_…"
}

See all error codes

POST/v1/calls/{id}/dtmf

Press phone keys (DTMF) for menus like "press 2 for sales": 0-9, * and #, up to 32 Soon

Permission: calls:dial

Live mode answers 501 coming soon. Try it now with a kt_test_ key (simulator).

Parameters

NameTypeDescription
id requiredpath · string

Request body

NameTypeDescription
digits requiredstring0-9, * and #; spaces and dashes are ignored · length 1–64

Response 200

NameTypeDescription
id requiredstring
sent requiredstring
status required"queued" | "ringing" | "answered" | "completed" | "busy" | "voicemail" | "no_answer" | "failed" | "blocked"
livemode requiredboolean

Example

curl
curl -X POST "https://api.kanutus.com/v1/calls/call_7Hn2Qd9Wk4Lp6Rt1Xb8Mc3Zf/dtmf" \
  -H "Authorization: Bearer $KANUTUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"digits":"2#"}'
Try it

Runs from your browser against the real API. Use a kt_test_ key: nothing is charged. The key stays in this tab only.

POST /v1/calls/{id}/dtmf

Responses by status

200 Keys sent
200
{
  "id": "string",
  "sent": "string",
  "status": "queued",
  "livemode": true
}
400 Invalid request
400 application/problem+json
{
  "type": "https://docs.kanutus.com/errors",
  "title": "<code>",
  "status": 400,
  "code": "<code>",
  "message": "…",
  "request_id": "req_…"
}

See all error codes

401 Missing, invalid, expired or revoked credential
401 application/problem+json
{
  "type": "https://docs.kanutus.com/errors",
  "title": "<code>",
  "status": 401,
  "code": "<code>",
  "message": "…",
  "request_id": "req_…"
}

See all error codes

403 Missing permission, blocked or not allowed
403 application/problem+json
{
  "type": "https://docs.kanutus.com/errors",
  "title": "<code>",
  "status": 403,
  "code": "<code>",
  "message": "…",
  "request_id": "req_…"
}

See all error codes

404 Not found
404 application/problem+json
{
  "type": "https://docs.kanutus.com/errors",
  "title": "<code>",
  "status": 404,
  "code": "<code>",
  "message": "…",
  "request_id": "req_…"
}

See all error codes

409 Conflict (idempotency or state)
409 application/problem+json
{
  "type": "https://docs.kanutus.com/errors",
  "title": "<code>",
  "status": 409,
  "code": "<code>",
  "message": "…",
  "request_id": "req_…"
}

See all error codes

429 Rate limit exceeded (see RateLimit-* and Retry-After headers)
429 application/problem+json
{
  "type": "https://docs.kanutus.com/errors",
  "title": "<code>",
  "status": 429,
  "code": "<code>",
  "message": "…",
  "request_id": "req_…"
}

See all error codes