Get started
Create an API key
Sending and managing use one key. Reading emails uses another, created in a different place. Pick the one that fits what you are building.
Which key do you need?
Mail & Graph
Send and manage
For sending email and for everything else in the API: domains, contacts, tracking, senders and logs.
Created in
Dashboard, Developer page
Open the Developer pageRead emails
Read a mailbox
For reading, searching and organizing the emails of one email account.
Created in
Webmail, Settings of each email account
Open WebmailMail & Graph
Send and manage
One key from the Developer page works on mail.sendcorex.com and graph.sendcorex.com.
- 1
Open the Developer page
Sign in at app.sendcorex.com and go to the Developer page of the dashboard.
Open Developer page - 2
- 3
Send it with every request
Pass it in the Authorization header on mail.sendcorex.com and graph.sendcorex.com.
Authorization: Bearer YOUR_API_KEYRead emails
Read a mailbox
These keys are created inside Webmail, one for each email account, and used on g.sendcorex.com.
- 1
Open Webmail
Go to webmail.sendcorex.com and sign in with the email account you want to read.
Open Webmail - 2
Go to Settings
Open the Settings section of that email account.
- 3
Generate the key
Create the API key there and copy it. Every email account has its own.
curl -s https://g.sendcorex.com/v1 \
-H "Authorization: $TOKEN" \
-H "Content-Type: application/json" \
-d '{"commands":[{"command":"list_folders"}]}'curl -s https://g.sendcorex.com/v1/token/refresh \
-H "Content-Type: application/json" \
-d "{\"refresh_token\":\"$REFRESH\"}" Send the token as Authorization: <token> or Authorization: Bearer <token>. Tokens start with S.C.G. and the refresh token with R.S.C.G.
One mailbox per key
The key decides whose emails you read. No argument in a request can pick another owner.
Tokens expire
An expired token returns TOKEN_EXPIRED. Rotate the pair with Refresh Token. The refresh token you used stops working right away.
Revoked keys
A token is cached for up to 1 hour, so a revoked token can keep working until that cache runs out.
Rate limit
15 requests per second and 15 at the same time, per IP and mailbox. Above that you get 429 RATE_LIMITED with a Retry-After header.
Auth errors
What the read emails API returns when the key is the problem.
| Code | HTTP | When |
|---|---|---|
MISSING_AUTH_HEADER | 401 | The request has no Authorization header. |
INVALID_TOKEN | 401 | Wrong format, unknown token or revoked. |
TOKEN_EXPIRED | 401 | The token is past its expiry. Use the refresh token. |
RATE_LIMITED | 429 | More than 15 requests per second or 15 in flight. |
AUTH_UNAVAILABLE | 503 | Authentication is temporarily unavailable. |