Calls

Update a Call

Redirects an active call to new cXML instructions, cancels a queued call, or completes an in-progress call. Use it when controlling a call by Call SID and form-encoded cXML settings; use the Calling API for SWML call commands.

Permissions

The API token used to authenticate must have the following scope(s) enabled to make a successful request: Voice.

Learn more about API scopes.

post/Accounts/{AccountSid}/Calls/{Sid}

Path parameters

AccountSidstring uuid required

Universal Unique Identifier.

The Project ID that uniquely identifies the Account.

Sidstring uuid required

Universal Unique Identifier.

The unique identifier for the call.

Response

The request has succeeded.

sidstring uuid required

Universal Unique Identifier.

account_sidstring uuid required

Universal Unique Identifier.

date_createdstring required

The date, in RFC 2822 GMT format, this call was created.

date_updatedstring required

The date, in RFC 2822 GMT format, this call was updated.

parent_call_sidstring uuid required

Universal Unique Identifier.

tostring required

The address that received the call.

formatted_tostring required

The formatted number that received the call.

to_formattedstring required

The formatted number that received the call. Alias for formatted_to.

fromstring required

The address that initiated the call.

formatted_fromstring required

The formatted number that initiated the call.

from_formattedstring required

The formatted number that initiated the call. Alias for formatted_from.

phone_number_sidstring uuid required

Universal Unique Identifier.

status'queued' | 'ringing' | 'in-progress' | 'canceled' | 'completed' | 'busy' | 'failed' | 'no-answer' required

Call status.

start_timestring nullable required

The time, in RFC 2822 GMT format, on which the call began.

end_timestring nullable required

The time, in RFC 2822 GMT format, on which the call was terminated.

durationinteger required

The duration, in seconds, of the call.

pricenumber float nullable required

The charge for the call.

price_unitstring required

The currency, in ISO 4127 format, for the price of the call.

direction'inbound' | 'outbound' required

Call direction.

answered_by'human' | 'machine' required

Who/what answered the call.

api_versionstring required

The version of the SignalWire API.

forwarded_fromstring nullable required

The number this call was forwarded from. Always null.

caller_namestring nullable required

The caller name. Always null.

uristring required

The URI for the call.

annotationstring nullable required

The annotation for the call. Always null.

group_sidstring nullable required

The group SID for the call. Always null.

audio_in_mosnumber float nullable required

The Mean Opinion Score for audio quality (1.0-5.0).

sip_result_codestring nullable required

The SIP result code for the call.

audio_rtt_avginteger nullable required

The average round-trip time for audio in milliseconds.

audio_rtt_mininteger nullable required

The minimum round-trip time for audio in milliseconds.

audio_rtt_maxinteger nullable required

The maximum round-trip time for audio in milliseconds.

audio_out_jitter_mininteger nullable required

The minimum outbound audio jitter in milliseconds.

audio_out_jitter_maxinteger nullable required

The maximum outbound audio jitter in milliseconds.

audio_out_jitter_avginteger nullable required

The average outbound audio jitter in milliseconds.

audio_out_lostinteger nullable required

The number of outbound audio packets lost.

Example response

{
  "date_created": "Wed, 19 Sep 2018 20:00:00 +0000",
  "date_updated": "Wed, 19 Sep 2018 21:00:00 +0000",
  "to": "+13105678901",
  "formatted_to": "(310) 567-8901",
  "to_formatted": "(310) 567-8901",
  "from": "+13103384645",
  "formatted_from": "(310) 338-4645",
  "from_formatted": "(310) 338-4645",
  "start_time": "Wed, 19 Sep 2018 20:00:01 +0000",
  "end_time": "Fri, 21 Sep 2018 10:00:00 +0000",
  "duration": 20,
  "price": 0.003,
  "price_unit": "USD",
  "api_version": "2010-04-01",
  "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Calls/b3877c40-da60-4998-90ad-b792e98472ca.json",
  "subresource_uris": {
    "recordings": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Calls/b3877c40-da60-4998-90ad-b792e98472ca/Recordings.json"
  },
  "audio_in_mos": 4.5,
  "sip_result_code": "200",
  "audio_rtt_avg": 50,
  "audio_rtt_min": 20,
  "audio_rtt_max": 100,
  "audio_out_jitter_min": 1,
  "audio_out_jitter_max": 10,
  "audio_out_jitter_avg": 5
}

Changes

Changed in 9 of the 40 revisions of this API.46577

  • 2916d5e3072e46See the full diff
    • the account_sid response's property type/format changed from string/uuid to / for status 200

      response-property-type-changed

    • the parent_call_sid response's property type/format changed from /uuid to / for status 200

      response-property-type-changed

    • the phone_number_sid response's property type/format changed from /uuid to / for status 200

      response-property-type-changed

    • the sid response's property type/format changed from string/uuid to / for status 200

      response-property-type-changed

    • added uuid to the account_sid response property allOf list for the response status 200

      response-property-all-of-added

    • added uuid to the sid response property allOf list for the response status 200

      response-property-all-of-added

    • added uuid to the parent_call_sid response property anyOf list for the response status 200

      response-property-any-of-added

    • added uuid to the phone_number_sid response property anyOf list for the response status 200

      response-property-any-of-added

    • removed subschema #1 from the parent_call_sid response property anyOf list for the response status 200

      response-property-any-of-removed

    • removed subschema #1 from the phone_number_sid response property anyOf list for the response status 200

      response-property-any-of-removed

  • 5344c0c93a4c17See the full diff
    • added 'unevaluatedProperties' constraint to the request body

      request-body-unevaluated-properties-added

    • added 'unevaluatedProperties' constraint to the response body for the status 200

      response-body-unevaluated-properties-added

    • added 'unevaluatedProperties' constraint to the response body for the status 400

      response-body-unevaluated-properties-added

    • added 'unevaluatedProperties' constraint to the response body for the status 401

      response-body-unevaluated-properties-added

    • added 'unevaluatedProperties' constraint to the response body for the status 404

      response-body-unevaluated-properties-added

    • added 'unevaluatedProperties' constraint to the response body for the status 422

      response-body-unevaluated-properties-added

    • added 'unevaluatedProperties' constraint to the response body for the status 503

      response-body-unevaluated-properties-added

    • added 'unevaluatedProperties' constraint to the subresource_uris/allOf[CallSubresourceUris]/ response property for the status 200

      response-property-unevaluated-properties-added

  • 2e516ba2383f192See the full diff
    • response property annotation list-of-types was widened by adding types null to media type application/json of response 200

      response-property-list-of-types-widened

    • response property audio_in_mos list-of-types was widened by adding types null to media type application/json of response 200

      response-property-list-of-types-widened

    • response property audio_out_jitter_avg list-of-types was widened by adding types null to media type application/json of response 200

      response-property-list-of-types-widened

    • response property audio_out_jitter_max list-of-types was widened by adding types null to media type application/json of response 200

      response-property-list-of-types-widened

    • response property audio_out_jitter_min list-of-types was widened by adding types null to media type application/json of response 200

      response-property-list-of-types-widened

    • response property audio_out_lost list-of-types was widened by adding types null to media type application/json of response 200

      response-property-list-of-types-widened

    • response property audio_rtt_avg list-of-types was widened by adding types null to media type application/json of response 200

      response-property-list-of-types-widened

    • response property audio_rtt_max list-of-types was widened by adding types null to media type application/json of response 200

      response-property-list-of-types-widened

    • response property audio_rtt_min list-of-types was widened by adding types null to media type application/json of response 200

      response-property-list-of-types-widened

    • response property caller_name list-of-types was widened by adding types null to media type application/json of response 200

      response-property-list-of-types-widened

    • response property end_time list-of-types was widened by adding types null to media type application/json of response 200

      response-property-list-of-types-widened

    • response property forwarded_from list-of-types was widened by adding types null to media type application/json of response 200

      response-property-list-of-types-widened

    • response property group_sid list-of-types was widened by adding types null to media type application/json of response 200

      response-property-list-of-types-widened

    • response property parent_call_sid list-of-types was widened by adding types null to media type application/json of response 200

      response-property-list-of-types-widened

    • response property phone_number_sid list-of-types was widened by adding types null to media type application/json of response 200

      response-property-list-of-types-widened

    • response property price list-of-types was widened by adding types null to media type application/json of response 200

      response-property-list-of-types-widened

    • response property sip_result_code list-of-types was widened by adding types null to media type application/json of response 200

      response-property-list-of-types-widened

    • response property start_time list-of-types was widened by adding types null to media type application/json of response 200

      response-property-list-of-types-widened

    • response property subresource_uris/allOf[CallSubresourceUris]/notifications list-of-types was widened by adding types null to media type application/json of response 200

      response-property-list-of-types-widened

    • removed AnsweredBy from the answered_by response property allOf list for the response status 200

      response-property-all-of-removed

    • added AnsweredBy subschema #2 to the answered_by response property anyOf list for the response status 200

      response-property-any-of-added

    • removed the request property Laml

      request-property-removed

    • removed the request property Twiml

      request-property-removed

    This revision also has 2 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • added the non-success response with the status 400

      response-non-success-status-added

    • added the non-success response with the status 503

      response-non-success-status-added

  • d5fbaaddfa3e12141See the full diff
    • the FallbackUrl request property type/format changed from string/ to string/uri

      request-property-type-changed

    • the StatusCallback request property type/format changed from string/ to string/uri

      request-property-type-changed

    • the Url request property type/format changed from string/ to string/uri

      request-property-type-changed

    • the response property annotation became nullable for the status 200

      response-property-became-nullable

    • the response property answered_by became nullable for the status 200

      response-property-became-nullable

    • the response property end_time became nullable for the status 200

      response-property-became-nullable

    • the response property forwarded_from became nullable for the status 200

      response-property-became-nullable

    • the response property parent_call_sid became nullable for the status 200

      response-property-became-nullable

    • the response property phone_number_sid became nullable for the status 200

      response-property-became-nullable

    • the response property price became nullable for the status 200

      response-property-became-nullable

    • the response property start_time became nullable for the status 200

      response-property-became-nullable

    • the response property subresource_uris/allOf[CallSubresourceUris]/notifications became nullable for the status 200

      response-property-became-nullable

    • added the new no-answer enum value to the status/allOf[CallStatus]/ response property for the response status 200

      response-property-enum-value-added

    • added the new optional request property Laml

      new-optional-request-property

    • added the new optional request property Twiml

      new-optional-request-property

    • added the non-success response with the status 422

      response-non-success-status-added

    • the response property account_sid became required for the status 200

      response-property-became-required

    • the response property annotation became required for the status 200

      response-property-became-required

    • the response property answered_by became required for the status 200

      response-property-became-required

    • the response property api_version became required for the status 200

      response-property-became-required

    • the response property date_created became required for the status 200

      response-property-became-required

    • the response property date_updated became required for the status 200

      response-property-became-required

    • the response property direction became required for the status 200

      response-property-became-required

    • the response property duration became required for the status 200

      response-property-became-required

    • the response property end_time became required for the status 200

      response-property-became-required

    • the response property formatted_from became required for the status 200

      response-property-became-required

    • the response property formatted_to became required for the status 200

      response-property-became-required

    • the response property forwarded_from became required for the status 200

      response-property-became-required

    • the response property from became required for the status 200

      response-property-became-required

    • the response property parent_call_sid became required for the status 200

      response-property-became-required

    • the response property phone_number_sid became required for the status 200

      response-property-became-required

    • the response property price became required for the status 200

      response-property-became-required

    • the response property price_unit became required for the status 200

      response-property-became-required

    • the response property sid became required for the status 200

      response-property-became-required

    • the response property start_time became required for the status 200

      response-property-became-required

    • the response property status became required for the status 200

      response-property-became-required

    • the response property subresource_uris became required for the status 200

      response-property-became-required

    • the response property subresource_uris/allOf[CallSubresourceUris]/notifications became required for the status 200

      response-property-became-required

    • the response property subresource_uris/allOf[CallSubresourceUris]/recordings became required for the status 200

      response-property-became-required

    • the response property to became required for the status 200

      response-property-became-required

    • the response property uri became required for the status 200

      response-property-became-required

    • added the required property audio_in_mos to the response with the 200 status

      response-required-property-added

    • added the required property audio_out_jitter_avg to the response with the 200 status

      response-required-property-added

    • added the required property audio_out_jitter_max to the response with the 200 status

      response-required-property-added

    • added the required property audio_out_jitter_min to the response with the 200 status

      response-required-property-added

    • added the required property audio_out_lost to the response with the 200 status

      response-required-property-added

    • added the required property audio_rtt_avg to the response with the 200 status

      response-required-property-added

    • added the required property audio_rtt_max to the response with the 200 status

      response-required-property-added

    • added the required property audio_rtt_min to the response with the 200 status

      response-required-property-added

    • added the required property caller_name to the response with the 200 status

      response-required-property-added

    • added the required property from_formatted to the response with the 200 status

      response-required-property-added

    • added the required property group_sid to the response with the 200 status

      response-required-property-added

    • added the required property sip_result_code to the response with the 200 status

      response-required-property-added

    • added the required property to_formatted to the response with the 200 status

      response-required-property-added

    This revision also has 11 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • 07f73f74a61d11See the full diff
    • removed the media type application/json from the request body

      request-body-media-type-removed

    • added the media type application/x-www-form-urlencoded to the request body

      request-body-media-type-added

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • the response property annotation became nullable for the status 200

      response-property-became-nullable

  • 3c88f14db21e8218See the full diff
    • added the new path request parameter AccountSid

      new-request-path-parameter

    • added the new path request parameter Sid

      new-request-path-parameter

    • removed the media type application/x-www-form-urlencoded from the request body

      request-body-media-type-removed

    • the answered_by response's property type/format changed from string/ to / for status 200

      response-property-type-changed

    • the api_version response's property type/format changed from / to string/ for status 200

      response-property-type-changed

    • the direction response's property type/format changed from string/ to / for status 200

      response-property-type-changed

    • the status response's property type/format changed from string/ to / for status 200

      response-property-type-changed

    • the subresource_uris response's property type/format changed from object/ to / for status 200

      response-property-type-changed

    • removed the optional property subresource_uris/notifications from the response with the 200 status

      response-optional-property-removed

    • removed the optional property subresource_uris/recordings from the response with the 200 status

      response-optional-property-removed

    • added the media type application/json to the request body

      request-body-media-type-added

    • added the non-success response with the status 401

      response-non-success-status-added

    • added the non-success response with the status 404

      response-non-success-status-added

    • added AnsweredBy to the answered_by response property allOf list for the response status 200

      response-property-all-of-added

    • added CallDirection to the direction response property allOf list for the response status 200

      response-property-all-of-added

    • added CallStatus to the status response property allOf list for the response status 200

      response-property-all-of-added

    • added CallSubresourceUris to the subresource_uris response property allOf list for the response status 200

      response-property-all-of-added

    • removed the busy enum value from the status response property for the response status 200

      response-property-enum-value-removed

    • removed the canceled enum value from the status response property for the response status 200

      response-property-enum-value-removed

    • removed the completed enum value from the status response property for the response status 200

      response-property-enum-value-removed

    • removed the failed enum value from the status response property for the response status 200

      response-property-enum-value-removed

    • removed the human enum value from the answered_by response property for the response status 200

      response-property-enum-value-removed

    • removed the in-progress enum value from the status response property for the response status 200

      response-property-enum-value-removed

    • removed the inbound enum value from the direction response property for the response status 200

      response-property-enum-value-removed

    • removed the machine enum value from the answered_by response property for the response status 200

      response-property-enum-value-removed

    • removed the outbound enum value from the direction response property for the response status 200

      response-property-enum-value-removed

    • removed the queued enum value from the status response property for the response status 200

      response-property-enum-value-removed

    • removed the ringing enum value from the status response property for the response status 200

      response-property-enum-value-removed

    This revision also has 14 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog