API docs

Authentication

Every request carries your API key in the Authorization header.

An API key is a 51-character string that starts with ws_. Each key belongs to one project and spends that project's credits.

curl https://api.wesend.mn/v1/balance \
  -H "Authorization: Bearer $WESEND_API_KEY"

Managing keys

  • A project can hold up to 10 active keys. Create a separate key for each system and environment.
  • A key is shown in full only when it is created. Afterwards only its first and last characters are visible.
  • A revoked key stops working at once. This cannot be undone.
  • When a member is removed from the project, the keys they created stop working too.

Use keys only from your server. Never put one in browser or mobile app code: anyone can read it there and send with your credits.

Failures

A missing, unknown or revoked key answers 401 invalid_api_key. Too many wrong keys from one address answer 429 rate_limited, with the seconds to wait in the Retry-After header.

Response401 Unauthorized
{
  "error": {
    "code": "invalid_api_key",
    "message": "The API key is missing, unknown or revoked."
  }
}