Instance methods:GETDELETEPOST
connect_tokens contacts email_addresses files messages sources sync threads webhooks
| name | type | description |
|---|---|---|
| optional: | ||
| string | Only return account associated to this email address | |
| status | string | Only return accounts with sources whose status is of a specific value. If an account has many sources, only those matching the given value will be included in the response. Possible statuses are: INVALID_CREDENTIALS, CONNECTION_IMPOSSIBLE, NO_ACCESS_TO_ALL_MAIL, OK, TEMP_DISABLED and DISABLED |
| status_ok | integer | Set to 0 to get all accounts with sources that are not working correctly. Set to 1 for the opposite. As for the status filter above, only sources matching the specific value are included in the response. |
| limit | integer | The maximum number of results to return. |
| offset | integer | Start the list at this offset (zero-based). |
[
{
"id": stringId of the account,
"username": stringUsername assigned to the account,
"created": numberUnix timestamp of account creation time,
"suspended": numberUnix timestamp of account suspension time 0 means not suspended,
"email_addresses": arrayArray of email addresses for this account,
"first_name": stringFirst name of account holder,
"last_name": stringLast name of account holder,
"password_expired": numberUnix timestamp of user's password expiration. 0 means still valid,
"sources": arrayList of email accounts where this account gets data from. See sources for details,
"nb_messages": numberTotal number of messages in all sources of this account,
"nb_files": numberTotal number of files in all sources of this account
},
...
]
| name | type | description |
|---|---|---|
| required: | ||
| string | The primary email address of the account holder. | |
| optional: | ||
| first_name | string | First name of the account holder |
| last_name | string | Last name of the account holder |
{
"success": booleantrue if account has been created (HTTP status 201), false on error,
"id": stringId of the account that has been created,
"resource_url": stringFull URI of resource created
}
The POST call to create an account also accepts all parameters used to create a source.
Beyond the convenience of doing both operation in a single call, this has the advantage of making error handling easier. If the source parameters aren't valid or don't map to an existing and accessible mailbox, the account isn't created and this call fails.
{
"success": booleantrue if account has been created (HTTP status 201), false on error,
"id": stringId of the account that has been created,
"resource_url": stringFull URI of resource created,
"source": {
"label":stringLabel of the source that has been created,
"resource_url":stringFull URI of the source created for the account
}
}
{
"id": stringId of the account,
"username": stringUsername assigned to the account,
"created": numberUnix timestamp of account creation time,
"suspended": numberUnix timestamp of account suspension time 0 means not suspended,
"email_addresses": arrayArray of email addresses for this account,
"first_name": stringFirst name of account holder,
"last_name": stringLast name of account holder,
"password_expired": numberUnix timestamp of user's password expiration. 0 means still valid,
"sources": arrayList of email accounts where this account gets data from. See sources for details,
"nb_messages": numberTotal number of messages in all sources of this account,
"nb_files": numberTotal number of files in all sources of this account
}
| name | type | description |
|---|---|---|
| optional: | ||
| first_name | string | First name of the account holder |
| last_name | string | Last name of the account holder |
{
"success": booleantrue if account has been updated (HTTP status 200), false on error
}