API Reference
OpenAPI reference for the Wraps Platform API with interactive documentation.
OpenAPI reference for the Wraps Platform API. Browse endpoints, auth, and the interactive spec.
Try endpoints directly in your browser with the OpenAPI spec.
All API requests are made to:
Authenticate using a Bearer token in the Authorization header. Two methods are supported:
Prefixed with wraps_. Best for server-to-server and SDK usage.
Create keys in the dashboard under Settings > API Keys.
better-auth session token. Used by the dashboard and browser-based clients.
The API is organized into endpoint groups. See the interactive docs for full request/response schemas.
Health check and API info
Create, update, delete, and list contacts
Batch email sending for broadcasts
Custom event ingestion for triggering workflows
API-triggered workflow execution
AWS account connection management
Receive SES delivery events
RFC 8058 one-click unsubscribe
Free email deliverability tools
Trigger, manage, and control workflow executions via the API. Workflows must have triggerType: "api" and be enabled.
/v1/workflows/:workflowId/triggerTriggers a workflow for a single contact. Identify the contact by ID or email. Arbitrary data can be passed through to the workflow.
| Field | Type | Description |
|---|---|---|
contactId | string | Contact UUID (provide this or contactEmail) |
contactEmail | string | Contact email (alternative to contactId) |
data | object | Arbitrary data passed to the workflow |
/v1/workflows/:workflowId/trigger/batchTrigger a workflow for multiple contacts in one request. Per-contact data is merged with common data. Duplicate contacts are automatically deduplicated.
| Field | Type | Description |
|---|---|---|
contacts | array | Array of { contactId?, contactEmail?, data? } |
data | object | Common data merged into every trigger |
/v1/workflows/executions/:executionId/retryRetries a failed workflow execution from the step where it failed. Previously completed steps are preserved. Only executions with status failed can be retried.
/v1/workflows/executions/:executionId/cancelCancels an active workflow execution. Cleans up any pending schedulers and adjusts workflow stats.
The GET /v1/batch/:id endpoint returns the full batch status including progress tracking fields:
| Field | Type | Description |
|---|---|---|
id | string | Batch ID |
status | string | queued, scheduled, processing, completed, failed, or cancelled |
channel | string | email or sms |
name | string | null | Batch name |
totalRecipients | number | Total targeted recipients |
processedRecipients | number | Recipients processed so far |
sent | number | Successfully sent count |
failed | number | Failed send count |
startedAt | string | null | ISO 8601 timestamp when processing began |
completedAt | string | null | ISO 8601 timestamp when processing finished |
createdAt | string | ISO 8601 creation timestamp |
Use DELETE /v1/batch/:id to cancel a batch in scheduled, queued, or processing status.
Topic subscriptions support two update strategies with different semantics:
Adds topics to existing subscriptions. No topics are removed. Safe for incremental updates from multiple sources.
Replaces all subscriptions. Topics not in the new list are unsubscribed. Triggers workflow events for both additions and removals.
Both endpoints accept topicIds (UUIDs) and topicSlugs (human-readable slugs). Topics with double opt-in enabled will send a confirmation email unless the contact was previously confirmed.
The @wraps.dev/client SDK provides a typed wrapper around the API.
The full OpenAPI 3.0.3 specification is auto-generated from route definitions. Use it with any OpenAPI-compatible tool.
Browse and test endpoints in the Swagger UI.
Open Swagger UIImport into Postman, Insomnia, Scalar, or any OpenAPI tool.
Download OpenAPI JSONPer-minute and daily limits by plan.
View Rate LimitsComplete reference for CLI and SDK error codes.
View Error CodesTyped TypeScript wrapper for the API.
View SDK ReferenceAll env vars for CLI, SDKs, and CI/CD.
View Env Vars