Record a Call

Record a call. This command will record the call until one of the conditions apply:

  • the endKey DTMF is detected.

  • silence is detected for more than the duration defined in timeout.

  • duration exceeds the maxLength.

This command doesn't record the whole call. This command is useful to record messages in a typical voicemail use case.

Command record a call

type: object
title: Record one Call
additionalProperties: false
properties:
  endKey:
    $ref: '../properties/Key.yml'
  maxLength:
    type: integer
  timeout:
    type: integer
  beep:
    type: boolean
  transcribe:
    type: boolean
  transcribeLocale:
    type: string
    format: locale-bcp47
    default: en-US
    example:
      - en-US
    enum:
      - ar-AE
      - ar-SA
      - zh-CN
      - zh-TW
      - da-DK
      - nl-NL
      - en-AU
      - en-GB
      - en-IN
      - en-IE
      - en-NZ
      - en-AB
      - en-ZA
      - en-US
      - en-WL
      - fr-FR
      - fr-CA
      - fa-IR
      - de-DE
      - de-CH
      - he-IL
      - hi-IN
      - id-ID
      - it-IT
      - ja-JP
      - ko-KR
      - ms-MY
      - pt-PT
      - pt-BR
      - ru-RU
      - es-ES
      - es-US
      - sv-SE
      - ta-IN
      - te-IN
      - th-TH
      - tr-TR
      - vi-VN

Record call

Record a channel call

post

/workspaces/{workspaceId}/channels/{channelId}/calls/{callId}/record

Authorizations
Path parameters
workspaceIdstring uuidrequired

The ID of the workspace

callIdstring uuidrequired

The ID for a call

channelIdstring uuidrequired

The ID for a channel

Body
endKeyenum
Options: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, *, #
maxLengthinteger
timeoutinteger
beepboolean
transcribeboolean
transcribeLocaleenum
Example: en-US
Options: ar-AE, ar-SA, zh-CN, zh-TW, da-DK, nl-NL, en-AU, en-GB, en-IN, en-IE, en-NZ, en-AB, en-ZA, en-US, en-WL, fr-FR, fr-CA, fa-IR, de-DE, de-CH, he-IL, hi-IN, id-ID, it-IT, ja-JP, ko-KR, ms-MY, pt-PT, pt-BR, ru-RU, es-ES, es-US, sv-SE, ta-IN, te-IN, th-TH, tr-TR, vi-VN
Responses
curl -L \
  --request POST \
  --url '/workspaces/{workspaceId}/channels/{channelId}/calls/{callId}/record' \
  --header 'Authorization: Bearer jwt' \
  --header 'Content-Type: application/json' \
  --data '{"endKey":"0","transcribeLocale":"en-US"}'
{
  "command": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "callId": "123e4567-e89b-12d3-a456-426614174000",
    "callFlowId": "123e4567-e89b-12d3-a456-426614174000",
    "status": "text",
    "command": "text",
    "conditions": [
      {
        "variable": "keys",
        "operator": "eq",
        "value": "text"
      }
    ]
  },
  "recordingId": "123e4567-e89b-12d3-a456-426614174000"
}

Example 1: Record one inbound / outbound call

curl -X POST "https://nest.messagebird.one/workspaces/8bc02f53-87ac-48d2-b4fd-c2cf856a305f/channels/880d8171-cbab-47bb-81b6-b1a0902da136/calls/4fc2edf7-68f5-437a-89eb-3ce0095409d6
/record" \
     -H 'Authorization: Bearer {Token}'

Last updated

Was this helpful?