Async (202) vs. Sync (200)
Table of Contents
Current list of supported "Create" actionsBy default, the API will submit requests to its service bus for replication to all nodes/servers, saving them to the DBs and applying them to real-time memory for immediate use in the application. For most writes (Creates/POST, Updates/PUT, Deletes/DELETE), the success response code will be 202, meaning Accepted. This success message should be treated as a full success with an immediate ability to use the new resources.
If you want to get the full resource data, including any defaults that might have been applied by the system, you can request a Synchronous request. A 200 OK will be returned instead of a 202 with a full JSON response in the same format as a Read/GET of that specific item. Synchronous requests are only available today on Creates (POSTs) and certain APIs listed below.
Current list of supported "Create" actions
- Resellers
- Domains
- Users
- Devices
- Callqueues
- Agents
- Answerrules
- Contacts
- Dialrules
- Audio (Moh/Greeting) upload/tts
- Timeframes
- Event Subscriptions
- Calls - Click to Call requests