API Overview

Learn how to authenticate and interact with the Sendook REST API.

The Sendook REST API powers everything you can do from the dashboard and SDKs. It uses predictable JSON payloads, standard HTTP verbs, and bearer token authentication so you can integrate from any language or runtime.

Base URL

All requests start from the production base URL:

https://api.sendook.com

Development and self-hosted environments typically expose the same routes on your own domain. Replace the host while keeping the paths identical.

Authentication

Pass your API key as a bearer token on every request:

Authorization: Bearer <YOUR_API_KEY>
  • Keys are managed in the dashboard or through the API Keys endpoints.
  • Treat API keys like passwords—store them securely and rotate regularly.

Example request

curl https://api.sendook.com/v1/inboxes \
  -H "Authorization: Bearer $SENDOOK_API_KEY" \
  -H "Content-Type: application/json"

Request & response format

  • Request bodies use JSON unless otherwise noted.
  • Successful responses include standard HTTP status codes (200, 201, 202, 204).
  • Collection endpoints return objects with a data array.
  • Timestamp fields use ISO 8601 strings in UTC (for example 2024-05-01T12:00:00Z).

Error handling

Errors return an application/json payload with the following schema:

{
  "message": "Human readable message",
  "code": "machine_readable_code",
  "details": {
    "...": "Additional diagnostic context"
  }
}

Example error

{
  "message": "Authentication token is invalid or expired.",
  "code": "auth_invalid_token",
  "details": {
    "requestId": "req_abc123"
  }
}

Retryable errors (5xx) are rare but can occur during network turbulence; follow standard exponential backoff practices.

Resources

Explore the resource-specific guides for request and response details:

Need the full SDK? Check the Sendook Node SDK repository for higher-level abstractions and code samples.