> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sendbaze.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> Base URL, conventions, headers and response codes for the Sendbaze REST API.

> [!NOTE]
>
> For Node.js and TypeScript we recommend the [official SDK](https://docs.sendbaze.com/resources/sdks.md). It handles authentication, idempotency and typed errors. Every endpoint page on this reference shows a raw request in cURL, JavaScript, Python, Ruby, PHP and Go.

## Base URL

All requests go to:

```
https://api.sendbaze.com
```

HTTPS is required. Requests and responses are JSON; send `Content-Type: application/json` on every request with a body. Timestamps are ISO 8601 in UTC. Ids are prefixed by type: `em_` emails, `sm_` SMS, `tpl_` templates, `dom_` domains, `sup_` suppressions, `whk_` webhook endpoints, `whd_` deliveries, `evt_` events.

## Authentication

Send your API key as a bearer token. See [authentication](https://docs.sendbaze.com/api-reference/authentication.md).

```
Authorization: Bearer sk_live_xxxxxxxx
```

## Request headers

| Header | Purpose |
| - | - |
| `Authorization` | `Bearer` and the key. Required. |
| `Content-Type` | `application/json` on requests with a body. |
| `Idempotency-Key` | Any POST. The same key and body return the same response for 24 hours. See [idempotency](https://docs.sendbaze.com/learn/sending/idempotency.md). |

## Response headers

| Header | Purpose |
| - | - |
| `x-request-id` | Unique per request; quote it to support. |
| `x-ratelimit-limit`, `x-ratelimit-remaining` | See [rate limits](https://docs.sendbaze.com/resources/rate-limits.md). |
| `retry-after` | On `429`: seconds to wait. |
| `idempotent-replayed` | `true` when the response was served from an earlier request with the same key. |

## Response codes

| Code | Meaning |
| - | - |
| `200` | Success. Sends return `200` with the new id because the message is queued, not yet delivered. |
| `201` | A resource was created (domain, template, suppression, webhook endpoint). |
| `400` | The body is not valid JSON. |
| `401` | Missing, malformed or revoked key. |
| `402` | Allowance, credits or plan limit. |
| `403` | Insufficient scope, unverified domain or suspended organisation. |
| `404` | No such resource in your organisation. |
| `409` | Idempotency conflict or duplicate name. |
| `413` | Attachments over the size limit. |
| `422` | Validation failed; `fields` says where. |
| `423` | Sending paused by the complaint monitor. |
| `429` | Rate limited. |
| `500`, `503` | Our side; retry with the same idempotency key. |

Every error uses one envelope with a stable `code`. See [errors](https://docs.sendbaze.com/errors.md).

## Test mode

Keys that start with `sk_test_` validate everything and return ids, but never send, never use your allowance and never contact a provider. See [test mode](https://docs.sendbaze.com/learn/sending/test-mode.md).

## Versioning

The API is versioned in the path (`/v1`). Fields are only added, never removed or renamed, within a version. New event types and error codes may appear; treat unknown values as "other" rather than failing.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.