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.sendcorex.comgraph.sendcorex.com

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 page
g.sendcorex.comOne per account

Read emails

Read a mailbox

For reading, searching and organizing the emails of one email account.

Created in

Webmail, Settings of each email account

Open Webmail

Mail & Graph

Send and manage

One key from the Developer page works on mail.sendcorex.com and graph.sendcorex.com.

  1. 1

    Open the Developer page

    Sign in at app.sendcorex.com and go to the Developer page of the dashboard.

    Open Developer page
  2. 2

    Create a key

    Generate a new key there and copy it. Keep it somewhere safe.

    Create API key
  3. 3

    Send it with every request

    Pass it in the Authorization header on mail.sendcorex.com and graph.sendcorex.com.

Request header
Authorization: Bearer YOUR_API_KEY

Read emails

Read a mailbox

These keys are created inside Webmail, one for each email account, and used on g.sendcorex.com.

  1. 1

    Open Webmail

    Go to webmail.sendcorex.com and sign in with the email account you want to read.

    Open Webmail
  2. 2

    Go to Settings

    Open the Settings section of that email account.

  3. 3

    Generate the key

    Create the API key there and copy it. Every email account has its own.

First request
curl -s https://g.sendcorex.com/v1 \
  -H "Authorization: $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"commands":[{"command":"list_folders"}]}'
Refresh the token
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.

CodeHTTPWhen
MISSING_AUTH_HEADER401The request has no Authorization header.
INVALID_TOKEN401Wrong format, unknown token or revoked.
TOKEN_EXPIRED401The token is past its expiry. Use the refresh token.
RATE_LIMITED429More than 15 requests per second or 15 in flight.
AUTH_UNAVAILABLE503Authentication is temporarily unavailable.