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
PATCHrequest can be used to update one or more attribute values. When using aPATCHrequest, 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
PUTrequest 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, while all fields must be present in a PUT request, not all attributes values may be modified after initial creation.
Example Request
An example 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'
Example 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
| Parameter | Data Type | Description |
|---|---|---|
| account_sid required | string | The account secure ID. |
Body Arguments
JSON representation of the fields and values to be updated.
Fields that can be modified are:
error_handlermethodnameurl
For a complete list of Account object attributes, refer to this table.