Skip to main content

Update Account

This request updates an account, targeted by secure ID.

patch /accounts/{account_sid}
put /accounts/{account_sid}

An Account object can be updated using either a PATCH or PUT request.

  • A PATCH request can be used to update one or more attribute values. When using a PATCH request, only the attributes specified in the request payload will be updated, all other attributes and values will remain the same. The account secure ID is passed in the query URL, and the values to be modified are passed in the request body.

  • A PUT request can be used to update an entire Account object. The account secure ID is passed in the query URL, and the entire Account object is passed in the request body.

note

Note, while all fields must be present in a PUT request, not all attributes values may be modified after initial creation.

Sample

A sample PATCH request to update the Account object, targeted by secure ID, with the values in the request body:

curl -X PATCH \
'https://api.carrierx.com/flexml/v1/accounts/1d4adc32-45d1-4789-9780-928049e2bce1' \
-H 'Content-Type: application/json' \
--data-binary '{"method":"POST", "error_handler": "none"}' \
-u 'flexml_user_123:qwerty123'

Response

200 status code with a serialized copy of the updated Account object:

{
"account_sid": "1d4adc32-45d1-4789-9780-928049e2bce1",
"date_created": "2025-05-20T21:56:49.000Z",
"error_handler": "none",
"login": "flexml_user_123",
"method": "POST",
"name": "John Smith",
"status_callback_method": "POST",
"status_callback_url": null,
"url": null
}

Path Arguments

ParameterData TypeDescription
account_sid requiredstringThe account secure ID.

Body Arguments

JSON representation of the fields and values to be updated.

Fields that can be modified are:

  • error_handler
  • method
  • name
  • url

For a complete list of Account object attributes, refer to this table.