API Documentation

Integrate DoPosta into your applications

API Version: v1.0 | Base URL: https://doposta.com/api

SECTIONS

🔐 Authentication

DoPosta API supports two authentication methods: JWT tokens and API keys.

JWT Authentication

Obtain a JWT token by logging in, then include it in the Authorization header.

// Login to get token
POST /api/auth/login
Content-Type: application/json

{
  "email": "user@example.com",
  "password": "your-password"
}

// Response
{
  "success": true,
  "token": "eyJhbGciOiJIUzI1NiIs...",
  "user": { ... }
}

// Use token in requests
GET /api/campaigns
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...

API Key Authentication

For server-to-server communication, use API keys in the X-API-Key header.

// Use API key
GET /api/campaigns
X-API-Key: dp_a1b2c3d4e5f6...