agentlyleads docs
Inbox API

Errors

Every error is a JSON object with a single error string:

{ "error": "<message>" }

The messages are written to be shown to a person, so an integration can pass them straight through.

HTTP status codes

StatusMeaning
200Success
201 CreatedA comment was posted
400 Bad RequestA missing or invalid field, a bad cursor, or an asUserId / assigneeUserId that is not an active user in this workspace
401 UnauthorizedMissing, malformed, expired, or revoked API key
403 ForbiddenThe key lacks the scope: read:emails for GET, write:emails for POST
404 Not FoundNone of the keys matched a conversation in this workspace, or a tag ID or name was not found
429 Too Many RequestsRate limit exceeded

Examples

Validation (400):

{ "error": "folder must be one of: inbox, snoozed, archived, sent, drafts, all, bulk, spam, trash." }
{ "error": "Pass threadKey or threadKeys." }
{ "error": "until must be in the future. Pass null to wake a snoozed conversation now." }
{ "error": "assignee \"me\" needs to know who you are. Pass asUserId, or use a user id." }

Unknown people (400):

{ "error": "assigneeUserId must be the id of an active user in this workspace." }
{ "error": "asUserId must be the id of an active user in this workspace." }

Not found (404):

{ "error": "Conversation not found." }
{ "error": "None of those conversations were found in this workspace." }
{ "error": "Tag not found." }

A conversation in another workspace is reported exactly like one that does not exist.

Partial matches

When you send several keys and only some match, the call succeeds. The keys that matched nothing are listed in notFound:

{ "affected": 2, "notFound": ["18c2-typo"], "threads": [ ... ] }

On this page