Skip to main content

API Introduction

Welcome to the SendDock API. You can use our API to send transactional emails and manage subscribers.

Base URL

All requests must be made to:

https://senddock.dev/api/v1
CORS Support

We support CORS for frontend use (using Public Keys).

Response Format

We use standard JSON for all responses.

{
"success": true,
"data": { ... }
}

Authentication

We use Bearer Token authentication. You have two types of keys:

  • Public Key (pk_...): Safe for client-side use (browsers, mobile apps). Only for adding subscribers.
  • Secret Key (sdk_...): Keep secret! Only for server-side use. Full access to send emails and broadcasts.

How API Keys work?

  1. Generate an API Key from the SendDock dashboard (Settings → API Keys).
  2. Save it in your .env. Never publish it in the frontend.
  3. Send the API Key in the header of every request:
Authorization: Bearer sdk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Rate Limits

SendDock uses Redis to control traffic and protect sending reputation.

EndpointBase LimitNotes
POST /api/v1/send60 req/minFast transactional sends.
POST /api/v1/join60 req/minUser signups.
POST /api/v1/broadcast10 req/minMass campaign queuing.
GET endpoints60 req/minRead queries.
note

Pro and Protocol plans may have higher configured limits.

Error Codes

CodeMeaningCause
400Bad RequestMissing fields (email, template) or invalid format.
401UnauthorizedMissing or invalid API Key. Check your Bearer token.
403ForbiddenUsing Public Key for a protected endpoint (like /send).
404Not FoundProject or Template not found.
429Rate LimitToo many requests. See limits above.
500Server ErrorInternal error or SMTP connection failure.