Hiver OpenAPI Prod ## Sections • [Hiver API](https://developer.hiverhq.com/hiver-api/introduction.md): The Hiver APIs allows you to programmatically access your Hiver Data. You can use Hiver REST APIs to build custom integrations for your team. If you need any help, you can refer to our help article here . Overview To get started you can get the API keys created by referring to the Getting API Key section below. You need these API keys to access any of the APIs listed below. Getting Started Getting API key You need to create an API key to access the Hiver APIs. Please follow these steps to get an API key Go to Developer settings in the left panel in the Hiver admin panel. Click on Create app. Enter a name for the app and click on Create to Generate the API keys. You’ll see the app created with the API key. Click on the copy icon to get the API key copied. These API keys can be used as a bearer token as follows Plain text curl 'https://api2.hiverhq.com/v1/inboxes' --header 'Authorization: Bearer <your-access-token>' curl 'https://api2.hiverhq.com/v1/inboxes' --header 'Authorization: Bearer <your-access-token>' If you suspect that any of your API keys have been compromised, you must take immediate action and delete them from the Hiver admin panel. Authentication You need to have access to a Hiver API key to access any of these Hiver APIs. Do note that the API key can be created by an administrator in Hiver. The API key will have the access privileges of an admin user. It is very important to store and use your API keys safely. Request Format Hiver uses HTTP methods like GET , POST , PATCH etc for different types of operations. Depending on the type of the request, the query parameters, request body, URL path needs to be formed. For more details, refer to individual APIs in the API reference section below. Response format The response will be a JSON object. The usual object be in the format as follows, enclosed in a data object JSON { "data":{ ... } } The response for list will be as follows: JSON { "data": { "results": [ {..}, ], "pagination": { "next_page": "<next-page-token>" } } } For the paginated results, use the next page token in the subsequent request to get further results. Keep continuing to get the next page until the next_page returns null Pagination Some endpoints return a list like list of inboxes etc. These endpoints return paginated results. To get the complete list, you need to implement the fetching of paginated lists. These endpoints support following parameters Title Description Query Parameter Description limit Limits the number of results in a page. Supported values are 10-100. Defaults to 10 sort_by The field based on which the result need to be sorted. Refer to individual APIs to find the supported fields sort_order Ascending, Descending order. Supported values: asc, desc . Defaults to asc next_page If sent the next page corresponding to the page token is sent All of these field are optional, depending on the endpoint being used. Errors The error response will have an appropriate HTTP status code attached in the response. In addition to this, there could also be message, in some cases, to help identify the errors Title Description Status Code Description 200 Success 204 Success - No response 400 Bad request - Request sent without required params 401, 403 Forbidden - Not authorised to access 404 Not found - Request entity not found 429 Too many requests 500 Internal server error - If this happens, get in touch with us, or watch for any degradation in status.hiverhq.com The error messages will be in one of the following formats: JSON { "errors": [ {"message": "Actual Error message"} .. ] } or { "Message": "Actual Error Message" } Refer to the rate-limiting section to get to know more about rate-limiting enforced by Hiver. Rate limits Hiver enforces rate-limits based per account. The current rate is limited at 1 RPS (request per second). Once you hit the limit, you’ll start getting 429 Too Many Requests error in the response. If you get this error, retry with an exponential backoff. Continuous retries with 429 error could result in the client-ip/api-key getting blacklisted. Also, the APIs are limited to 5000 requests per day. Please get in touch with us if you want to increase this. • [Inbox](https://developer.hiverhq.com/hiver-api/inbox.md): An Inbox is an entity that has conversations & users. Most common form of an Inbox is a shared mailbox ( https://hiverhq.com/shared-inbox ) which manages emails. The APIs only manage the shared mailbox. We plan to add other type of inboxes in the APIs soon. It can have tags to help manage the conversations better. Following is an example of an Inbox object Plain text { "id": "101", "display_name": "Customer Support", "channel_type": "email", "email": "info@hiver.com", "inbox_type": "user", "is_authorised": false, "source_user": { "id": "765676", "email": "info@hiver.com" }, "created_at": 176878888, "updated_at": 176878888 } Following is an example of an Inbox User object Plain text { "id": "456", "first_name": "Phoebe", "last_name": "Buffay", "email": "p.buffay@friends.com", "phone_number": "+19876543444", "is_joined": false } Following is an example of an Inbox Tag object Plain text { "id": "56789", "name": "Priority", "color_code": "#ce93d8", "type": "user", "created_at": 1708945347 } • [List all the inboxes](https://developer.hiverhq.com/hiver-api/inbox/list-all-the-inboxes.md): List all the inboxes • [Get an inbox by id](https://developer.hiverhq.com/hiver-api/inbox/get-an-inbox-by-id.md): Get an Inbox by Id • [Get all users in the inbox](https://developer.hiverhq.com/hiver-api/inbox/get-all-users-in-the-inbox.md): Get all users in the inbox • [Search users in the inbox](https://developer.hiverhq.com/hiver-api/inbox/search-users-in-the-inbox.md): Search users in the inbox • [Get tags in the inbox](https://developer.hiverhq.com/hiver-api/inbox/get-tags-in-the-inbox.md): Get tags in the inbox • [Search tags in the inbox](https://developer.hiverhq.com/hiver-api/inbox/search-tags-in-the-inbox.md): Search tags in the inbox • [Create tag in the inbox](https://developer.hiverhq.com/hiver-api/inbox/create-tags-in-the-inbox.md): Create tag in the inbox • [Conversations](https://developer.hiverhq.com/hiver-api/conversations.md): A conversation can be part of one or more inboxes. It can be assigned to a member of the inbox, have a status and tags associated with it. Following is an example of a Conversation object JSON { "id": "234232", "assignee": { "assignee_type": "user", "assignee_id": "1028399" }, "status": "open", "tag_ids": [ "1234322", "343434" ] } • [Get conversations in the inbox](https://developer.hiverhq.com/hiver-api/conversations/get-conversations-in-the-inbox.md): Get conversations in the inbox Note: The Gmail Thread IDs returned in the response are scoped to the user authenticated with the shared mailbox email address (the source user) . These IDs can be used directly in other Hiver APIs that require Gmail identifiers. • [Get a conversation in the inbox](https://developer.hiverhq.com/hiver-api/conversations/get-a-conversation-in-the-inbox.md): Get a conversation in the inbox Note: The conversation_id field accepts either Hiver conversation ID or Gmail thread ID . The Gmail Thread ID and Message IDs returned in the response are scoped to the user authenticated with the shared mailbox email address (the source user) . These IDs can be used directly in other Hiver APIs that require Gmail identifiers. • [Update conversation in the inbox](https://developer.hiverhq.com/hiver-api/conversations/update-conversation-in-the-inbox.md): Update conversation in the inbox Note : The conversation_id field accepts either Hiver conversation ID or Gmail thread ID. • [Create shared draft for conversation](https://developer.hiverhq.com/hiver-api/conversations/update-conversation-in-the-inbox-copy.md): Create a Shared Draft in an inbox conversation Note: To create a Shared Draft, always use the Gmail Message ID returned for the user authenticated with the shared mailbox email address (the source user). Gmail IDs are user-specific and may not match across different users. If the source user's Gmail Message ID ( id ) is unavailable, you can use the global SMTP Message ID found in payload.headers under the header name Message-ID (e.g. <abc123@mail.gmail.com> ) as a fallback. This ID is consistent across all users for the same email. • [Create note on conversation](https://developer.hiverhq.com/hiver-api/conversations/create-note-on-conversation.md): Create a note on a conversation. Note: For mentions, list the teammate's email in mentions and write the same bare email in content where the mention should appear, it will be rendered as @name .