# Create a recording for the call **POST /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Recordings.json** Create a recording for the call A Recording resource represents the recording associated with a voice call, conference, or SIP Trunk. ## Servers - https://api.twilio.com: https://api.twilio.com () ## Authentication methods - Account sid auth token ## Parameters ### Path parameters - **AccountSid** (string) The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. - **CallSid** (string) The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) to associate the resource with. ### Body: application/x-www-form-urlencoded (object) - **RecordingStatusCallbackEvent** (array[string]) The recording status events on which we should call the `recording_status_callback` URL. Can be: `in-progress`, `completed` and `absent` and the default is `completed`. Separate multiple event values with a space. - **RecordingStatusCallback** (string(uri)) The URL we should call using the `recording_status_callback_method` on each recording event specified in `recording_status_callback_event`. For more information, see [RecordingStatusCallback parameters](https://www.twilio.com/docs/voice/api/recording#recordingstatuscallback). - **RecordingStatusCallbackMethod** (string(http-method)) The HTTP method we should use to call `recording_status_callback`. Can be: `GET` or `POST` and the default is `POST`. - **Trim** (string) Whether to trim any leading and trailing silence in the recording. Can be: `trim-silence` or `do-not-trim` and the default is `do-not-trim`. `trim-silence` trims the silence from the beginning and end of the recording and `do-not-trim` does not. - **RecordingChannels** (string) The number of channels used in the recording. Can be: `mono` or `dual` and the default is `mono`. `mono` records all parties of the call into one channel. `dual` records each party of a 2-party call into separate channels. - **RecordingTrack** (string) The audio track to record for the call. Can be: `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the audio that is received by Twilio. `outbound` records the audio that is generated from Twilio. `both` records the audio that is received and generated by Twilio. ## Responses ### 200 OK #### Headers - **Access-Control-Allow-Origin** (string) Specify the origin(s) allowed to access the resource - **Access-Control-Allow-Methods** (string) Specify the HTTP methods allowed when accessing the resource - **Access-Control-Allow-Headers** (string) Specify the headers allowed when accessing the resource - **Access-Control-Allow-Credentials** (boolean) Indicates whether the browser should include credentials - **Access-Control-Expose-Headers** (string) Headers exposed to the client #### Body: application/json (object) - **account_sid** (string | null) The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording resource. - **api_version** (string | null) The API version used to make the recording. - **call_sid** (string | null) The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Recording resource is associated with. - **conference_sid** (string | null) The Conference SID that identifies the conference associated with the recording, if a conference recording. - **date_created** (string(date-time-rfc-2822) | null) The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. - **date_updated** (string(date-time-rfc-2822) | null) The date and time in GMT that the resource was last updated, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. - **start_time** (string(date-time-rfc-2822) | null) The start time of the recording in GMT and in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. - **duration** (string | null) The length of the recording in seconds. - **sid** (string | null) The unique string that that we created to identify the Recording resource. - **price** (number | null) The one-time cost of creating the recording in the `price_unit` currency. - **uri** (string | null) The URI of the resource, relative to `https://api.twilio.com`. - **encryption_details** () How to decrypt the recording if it was encrypted using [Call Recording Encryption](https://www.twilio.com/docs/voice/tutorials/voice-recording-encryption) feature. - **price_unit** (string(currency) | null) The currency used in the `price` property. Example: `USD`. - **status** (string) The status of the recording. Can be: `processing`, `completed` and `absent`. For more detailed statuses on in-progress recordings, check out how to [Update a Recording Resource](https://www.twilio.com/docs/voice/api/recording#update-a-recording-resource). - **channels** (integer) The number of channels in the final recording file. Can be: `1`, or `2`. Separating a two leg call into two separate channels of the recording file is supported in [Dial](https://www.twilio.com/docs/voice/twiml/dial#attributes-record) and [Outbound Rest API](https://www.twilio.com/docs/voice/make-calls) record options. - **source** (string) How the recording was created. Can be: `DialVerb`, `Conference`, `OutboundAPI`, `Trunking`, `RecordVerb`, `StartCallRecordingAPI`, and `StartConferenceRecordingAPI`. - **error_code** (integer | null) The error code that describes why the recording is `absent`. The error code is described in our [Error Dictionary](https://www.twilio.com/docs/api/errors). This value is null if the recording `status` is not `absent`. - **track** (string | null) The recorded track. Can be: `inbound`, `outbound`, or `both`. ### 201 Created #### Headers - **Access-Control-Allow-Origin** (string) Specify the origin(s) allowed to access the resource - **Access-Control-Allow-Methods** (string) Specify the HTTP methods allowed when accessing the resource - **Access-Control-Allow-Headers** (string) Specify the headers allowed when accessing the resource - **Access-Control-Allow-Credentials** (boolean) Indicates whether the browser should include credentials - **Access-Control-Expose-Headers** (string) Headers exposed to the client #### Body: application/json (object) - **account_sid** (string | null) The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording resource. - **api_version** (string | null) The API version used to make the recording. - **call_sid** (string | null) The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Recording resource is associated with. - **conference_sid** (string | null) The Conference SID that identifies the conference associated with the recording, if a conference recording. - **date_created** (string(date-time-rfc-2822) | null) The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. - **date_updated** (string(date-time-rfc-2822) | null) The date and time in GMT that the resource was last updated, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. - **start_time** (string(date-time-rfc-2822) | null) The start time of the recording in GMT and in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. - **duration** (string | null) The length of the recording in seconds. - **sid** (string | null) The unique string that that we created to identify the Recording resource. - **price** (number | null) The one-time cost of creating the recording in the `price_unit` currency. - **uri** (string | null) The URI of the resource, relative to `https://api.twilio.com`. - **encryption_details** () How to decrypt the recording if it was encrypted using [Call Recording Encryption](https://www.twilio.com/docs/voice/tutorials/voice-recording-encryption) feature. - **price_unit** (string(currency) | null) The currency used in the `price` property. Example: `USD`. - **status** (string) The status of the recording. Can be: `processing`, `completed` and `absent`. For more detailed statuses on in-progress recordings, check out how to [Update a Recording Resource](https://www.twilio.com/docs/voice/api/recording#update-a-recording-resource). - **channels** (integer) The number of channels in the final recording file. Can be: `1`, or `2`. Separating a two leg call into two separate channels of the recording file is supported in [Dial](https://www.twilio.com/docs/voice/twiml/dial#attributes-record) and [Outbound Rest API](https://www.twilio.com/docs/voice/make-calls) record options. - **source** (string) How the recording was created. Can be: `DialVerb`, `Conference`, `OutboundAPI`, `Trunking`, `RecordVerb`, `StartCallRecordingAPI`, and `StartConferenceRecordingAPI`. - **error_code** (integer | null) The error code that describes why the recording is `absent`. The error code is described in our [Error Dictionary](https://www.twilio.com/docs/api/errors). This value is null if the recording `status` is not `absent`. - **track** (string | null) The recorded track. Can be: `inbound`, `outbound`, or `both`. [Powered by Bump.sh](https://bump.sh)