LockRecord a finished IVR call

Record a finished IVR call

Appends a LockIvrCallCompleted event (telephony-api, after a call to a resident ends). The lock keeps only a derived list of its last 50 calls. A callId already among those 50 is not recorded again (a retried delivery appends no second event).

curl -X POST "https://api.spkey.co/locks/123/RecordIvrCall" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN (JWT)" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
  "callId": "example_string",
  "userId": "example_string",
  "status": "opened",
  "result": "null",
  "choice": "null",
  "provider": "example_string",
  "country": "null",
  "language": "example_string",
  "createdAt": "2024-12-25T10:00:00Z",
  "answeredAt": "2024-12-25T10:00:00Z",
  "endedAt": "2024-12-25T10:00:00Z",
  "durationSecs": 42
}'
{
  "success": true,
  "aggregateId": "example_string",
  "version": 3.14,
  "event": "null"
}
POST
/locks/{id}/RecordIvrCall
POST
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token (JWT)
Bearer Tokenstring
Required

JWT token from SmartphoneKey authentication. Identifies the B2C user or B2B service.

JWT token from SmartphoneKey authentication. Identifies the B2C user or B2B service.
API Key (header: X-API-Key)
X-API-Keystring
Required

API key for B2B organization access. Provided during organization onboarding.

API key for B2B organization access. Provided during organization onboarding.
path
idinteger
Required

Lock ID (numeric)

Content-Typestring
Required

The media type of the request body

Options: application/json
callIdstring
Required
Min length: 1 • Max length: 128
statusstring
Required
Options: opened, denied, timeout, no_answer, busy, failed, ended
resultstringnull
Required
Options: open_failed, dial_failed, guest_not_connected, talk_limit, hangup_client, hangup_resident, provider_error,
choicestringnull
Required
Options: 0, 1, 9,
createdAtstring
Required
Format: date-time
answeredAtstring
Format: date-time
endedAtstring
Required
Format: date-time
Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token (JWT). JWT token from SmartphoneKey authentication. Identifies the B2C user or B2B service.

header
X-API-Keystring
Required

API Key for authentication. API key for B2B organization access. Provided during organization onboarding.

Path Parameters

idinteger
Required

Lock ID (numeric)

Body

application/json
statusstring
Required
Allowed values:openeddeniedtimeoutno_answerbusyfailedended
resultstring,null
Required
Allowed values:open_faileddial_failedguest_not_connectedtalk_limithangup_clienthangup_residentprovider_error
choicestring,null
Required
Allowed values:019

Responses

successboolean
Required
aggregateIdstring
Required
versionnumber
Required
eventobject,null
Required