Skip to content
SimpleCold

API docs

Get started

Using your API key

On this page

Every request to the SimpleCold API sends your API key as a Bearer token in the Authorization header.

Header
Authorization: Bearer <your-api-key>

Replace <your-api-key> with the key you copied when you created it. There is no query-string key and no basic auth.

Base URL

Base URL
https://simplecold.com/api/v1

Check that a key works

GET/api/v1/api-validation/validate

This endpoint does nothing except confirm your key. It takes no parameters and uses no credits, so it is a good first call and a useful startup check for long-running workers.

curl "https://simplecold.com/api/v1/api-validation/validate" \
  -H "Authorization: Bearer $SIMPLECOLD_API_KEY"
Response · 200
{
  "code": "SUCCESS",
  "message": "Successfully performed operation.",
  "payload": {
    "valid": true,
    "message": "API key is valid"
  },
  "requestId": "3f1c..."
}

Errors

Authentication runs before anything else on every endpoint. A problem with the key returns 401 with this body:

Response · 401
{
  "code": "FAILURE",
  "message": "Invalid API key",
  "data": null
}
MessageCause
Authorization header is requiredThe header is missing.
Authorization header must be in format: Bearer <token>The header is malformed, for example missing Bearer or with an extra space.
API key is requiredBearer with no key after it.
Invalid API keyNo such key. Often a copy-paste error or a key that was regenerated.
API key is inactiveThe key is disabled in the dashboard.
API key has expiredThe key passed its expiry date. Update its expiry or create a new key.

None of these fix themselves, so don't retry a 401. Fail fast and alert someone.

Keep the key out of your code

.env
SIMPLECOLD_API_KEY=your-api-key
const apiKey = process.env.SIMPLECOLD_API_KEY;

Call the API from your server only. A key in browser or mobile code can be read by anyone.

Next

Using your API key | SimpleCold API docs