Skip to main content
The Ark Email API is organized around REST. It uses standard HTTP methods, returns JSON responses, and uses conventional HTTP response codes.

Authentication

All API requests require authentication via Bearer token:
Authorization: Bearer ark_live_xxxxxxxxxxxxxxxxxxxx
See Authentication for details on obtaining and using API keys.

Request Format

Send request bodies as JSON with the Content-Type: application/json header:
curl -X POST https://api.arkhq.io/v1/emails \
  -H "Authorization: Bearer $ARK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"from": "[email protected]", "to": "[email protected]", "subject": "Hello"}'

Response Format

HTTP Status Codes

StatusDescription
200Success
201Resource created
400Bad request - check your request body
401Unauthorized - invalid or missing API key
403Forbidden - insufficient permissions
404Resource not found
429Rate limit exceeded
500Server error

Rate Limiting

See Rate Limits for detailed information.

Pagination

List endpoints return paginated results using page-number pagination:
{
  "data": [...],
  "page": 1,
  "perPage": 30,
  "total": 150,
  "totalPages": 5,
  "meta": {
    "requestId": "req_abc123"
  }
}
Use page and perPage query parameters to navigate:
# First page (default)
curl "https://api.arkhq.io/v1/emails" \
  -H "Authorization: Bearer $ARK_API_KEY"

# Second page with 50 items per page
curl "https://api.arkhq.io/v1/emails?page=2&perPage=50" \
  -H "Authorization: Bearer $ARK_API_KEY"
ParameterTypeDefaultDescription
pageinteger1Page number (1-indexed)
perPageinteger30Items per page (max 100)

Idempotency

For safe retries on network errors, include an Idempotency-Key header on POST requests:
curl -X POST https://api.arkhq.io/v1/emails \
  -H "Authorization: Bearer $ARK_API_KEY" \
  -H "Idempotency-Key: unique-request-id-123" \
  -H "Content-Type: application/json" \
  -d '{"from": "[email protected]", "to": "[email protected]", "subject": "Hello"}'
Keys are valid for 24 hours. Repeating a request with the same key returns the original response.

API Resources

Error Codes

For complete error handling guidance, see Errors.