Avochato API
Welcome!
If anything isn’t working as documented, please message Avochato Support @ 415-214-8977.
To use the Avochato API, you will need a pair of Auth ID and Secret tokens. Tokens are account-specific and are bound to your specific User, so a pair of tokens must be generated per account. To generate a new set of tokens, please log into www.avochato.com and go to Settings > API Access.
Getting Started
To get started, here are some common routes you may want to check out:
- Contacts, which represent a unique external phone number that is interacting with your Avochato number
- Tickets, which represent a conversation between an Account and a Contact
- Messages, which represent the messages sent and received by your Avochato number
- Broadcasts, which let you create and schedule messages to an audience of Contacts
The Default Scope of API Credentials
One set of API credentials is required to use the Avochato API. By default, your API credentials are scoped to the inbox they were created in, and all the actions taken are associated with the user who was assigned to the credentials. Any actions you take will be scoped to that inbox and its settings and capabilities.
For example, any contacts, messages, broadcasts etc that you create with the API will appear in the inbox associated with these credentials.
To view which inbox your API credentials are scoped to, you can send a GET request to the /whoami route.
If the user associated with a pair of API credentials is removed from an inbox, or the credentials are deleted, they will cease to function in that inbox and you will receive an authentication error when attempting to use the API.
Accessing other inboxes with the “subdomain” parameter
You can scope your request to a different inbox using the optional “subdomain” parameter as part of the body of any API request e.g. “subdomain=my_avochato_inbox”.
Use the List Accounts route to view the list of inboxes you have access to, including the list of subdomains.
You may use the subdomain parameter for any request to specify any inbox that your user is a member of. This must equal the subdomain (/accounts/my_avochato_inbox/tickets) of an inbox.
If you cannot access an inbox using your credentials, make sure you are spelling the subdomain correctly and that your user has access to that inbox.
Rate limits
The API is subject to rate-limiting - sending too many requests too quickly will return a 429 HTTP response and the API request will be ignored.
If you receive a rate limit error while using the API, stop making requests immediately and slow down the speed at which you are sending requests.