API Overview
Reference for the WarpLink REST API: authentication, rate limiting, error handling, and the endpoints for links, apps, and attribution.
The WarpLink REST API manages links, apps, API keys, custom domains, and install attribution. All endpoints live under https://api.warplink.app/v1, authenticate with Bearer API keys, and share a flat rate limit of 60 requests per minute on every plan. Errors return a consistent JSON envelope.
Base URL
All API requests use the following base URL:
https://api.warplink.app/v1
Authentication
Authenticate requests using a Bearer token in the Authorization header:
curl -H "Authorization: Bearer wl_live_YOUR_API_KEY" \
https://api.warplink.app/v1/links
API keys are created under Keys > API keys in the WarpLink dashboard. The full key is only shown once at creation time. Store it securely.
The dashboard issues two credential types and both use the wl_live_ prefix followed by 32 alphanumeric characters, so they are indistinguishable by sight. API keys carry the scopes you choose and are meant for backend scripts, CI, and AI agents. SDK keys are pre-scoped for the mobile SDKs and are the only credential that can record install attribution. An SDK key can call only the four SDK endpoints (/v1/sdk/validate, /v1/links/resolve/{slug}, /v1/attribution/match and /v1/referrals/claims); every other endpoint answers it with 403 SDK_KEY_ROUTE_FORBIDDEN. See Authentication for the full comparison.
Required Scopes
Each endpoint requires specific scopes on the API key:
| Scope | Description |
|---|---|
links:read | Read link data |
links:write | Create, update, and delete links |
apps:read | Read app configuration |
apps:write | Create, update, and delete apps |
analytics:read | Read click analytics, install records, and attribution attempts |
keys:read | Read API key metadata |
keys:write | Create and revoke API keys |
domains:read | Read custom domain configuration |
domains:write | Create, verify, and delete custom domains |
org:read | Read organization details |
org:delete | Delete an organization |
team:read | Read team members and invitations |
team:write | Invite, remove, and manage team members |
Attribution match requests (POST /v1/attribution/match) require an SDK key, not an API key. SDK keys are auto-granted links:read and attribution:write. attribution:write cannot be requested on an API key, so an API key on this endpoint always returns 403 FORBIDDEN.
Rate Limiting
API keys are rate limited to 60 requests per minute per key. The SDK routes (GET /v1/sdk/validate, GET /v1/links/resolve/{slug}, POST /v1/attribution/match and POST /v1/referrals/claims) are limited to 60 requests per minute per key per client IP address. Devices on different IP addresses get separate allowances. Devices behind one public IP address, such as an office or carrier network, share one.
Rate limit headers are included on every response:
| Header | Description |
|---|---|
X-RateLimit-Limit | Max requests per window |
X-RateLimit-Remaining | Requests remaining |
X-RateLimit-Reset | Seconds until window resets |
When the rate limit is exceeded, the API returns 429 Too Many Requests with a Retry-After header. See the full rate limiting reference for backoff strategies and best practices.
Error Format
All errors return a consistent JSON structure:
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request body",
"details": {
"fields": [
{ "field": "destination_url", "message": "Invalid URL" }
]
}
}
}
details is optional. Besides fields, it carries fix (what to do next, in one sentence) and docs_url (the code's row in the error reference) for every code in the reference. A client or an AI agent can apply the fix and retry.
Error Codes
| HTTP Status | Code | Description |
|---|---|---|
| 400 | VALIDATION_ERROR | Request body or query params failed validation |
| 401 | UNAUTHORIZED | Missing or invalid API key |
| 403 | FORBIDDEN | Key lacks required scope, or an API key was used where an SDK key is required |
| 403 | SDK_KEY_ROUTE_FORBIDDEN | An SDK key was used on an endpoint that is not an SDK endpoint. Use an API key for this request |
| 403 | PASSWORD_REQUIRED | The link is password protected and cannot be resolved |
| 403 | UNCLAIMED_LIMIT / CLAIM_REQUIRED | An agent-made workspace that no person has claimed yet is over its cap, or the call needs a claimed workspace |
| 404 | NOT_FOUND | Resource not found |
| 409 | SLUG_TAKEN / DUPLICATE_APP / APP_HANDLE_TAKEN | Resource already exists |
| 409 | RENAME_PERIOD_OPEN / RENAME_PERIOD_NOT_OPEN / RENAME_EXTENSION_LIMIT / CONFIRMATION_REQUIRED / LINK_MOVE_NOT_PENDING | The app or link is not in the state the request needs |
| 409 | IDEMPOTENCY_IN_PROGRESS / IDEMPOTENCY_RESULT_TOO_LARGE | A request with the same Idempotency-Key is still running, or its stored result is too large to replay |
| 410 | GONE | Resource has expired |
| 422 | INVALID_DOMAIN | The domain is not allowed for the link |
| 422 | IDEMPOTENCY_KEY_REUSED | The Idempotency-Key was used with a different request body |
| 415 | UNSUPPORTED_MEDIA_TYPE | The body was not sent as application/json |
| 429 | RATE_LIMIT_EXCEEDED | Too many requests |
| 429 | AGENT_SIGNUP_RATE_LIMITED | Too many agent sign-ups from this address, or for this email |
| 500 | INTERNAL_ERROR | Server error |
| 503 | AGENT_SIGNUP_UNAVAILABLE | Agent sign-up cannot create a workspace right now |
See the full errors reference for troubleshooting guidance on each code.
Unknown Request Fields
The API ignores a body field it does not know when the body also holds a valid field. The request still succeeds with 2xx, and the unknown field is dropped without an error. An update (PATCH) body with no known field at all fails with 400 VALIDATION_ERROR and the message "Invalid request body". The field details hold "At least one field must be provided". Always check the fields in the response body to confirm WarpLink saved what you sent. A common mistake is deep_link_url on a link: the iPhone and Android in-app URLs are ios_url and android_url, and deep_link_url is saved nowhere.
The word claim
Three things in this API are called a claim. Claiming a workspace is when a person takes over a workspace an AI agent started, from the emailed claim link (UNCLAIMED_LIMIT, CLAIM_REQUIRED). A referral claim ties one install to the invitation link that brought it (POST /v1/referrals/claims). A claim attempt is an attribution attempt that created an install record, and a webhook event referral.claimed reports a referral claim.
Pagination
List endpoints return paginated results:
{
"data": [...],
"pagination": {
"total": 42,
"limit": 20,
"offset": 0,
"has_more": true
}
}
Use limit (1–100, default 20) and offset (default 0) query parameters to page through results.
Safe Retries and Dry Runs
Idempotency-Key
Send an Idempotency-Key header on POST /v1/links or POST /v1/apps so a retry cannot create a second resource. The key is 1 to 255 printable ASCII characters that you choose, such as a UUID.
curl -X POST https://api.warplink.app/v1/links \
-H "Authorization: Bearer wl_live_YOUR_API_KEY" \
-H "Idempotency-Key: 6b0c2f4e-9d1a-4c35-8e7b-3a5d1f9c0b42" \
-H "Content-Type: application/json" \
-d '{ "destination_url": "https://example.com/promo" }'
- A repeat with the same key and the same body returns the first response, with the status it had, and adds the response header
Idempotent-Replayed: true. Nothing new is created. - The same key with a different body returns
422 IDEMPOTENCY_KEY_REUSED. - The same key while the first request is still running returns
409 IDEMPOTENCY_IN_PROGRESS. Wait a second and retry with the same key. - A
5xxor429response is not remembered, so a retry with the same key runs again. - A replay of a response larger than 64 KB returns
409 IDEMPOTENCY_RESULT_TOO_LARGE. Read the resource with the get call instead. - A key is remembered for 24 hours. It is scoped to your organization, the API key, and the endpoint, so the same string on
POST /v1/appsis a different key.
The MCP tools create_link and create_app take the same value as an idempotency_key argument.
dry_run
Add ?dry_run=true to POST /v1/links, POST /v1/apps, or PATCH /v1/links/{id} to check a change before you make it. WarpLink runs every check a real call runs: authentication, role, validation, plan limits, link safety, and the slug, handle, and duplicate checks. It answers 200 with the result the call would have returned, and saves nothing. No audit entry is written, and no idempotency key is stored.
{
"dry_run": true,
"result": {
"id": null,
"slug": null,
"short_url": null,
"slug_note": "assigned at create",
"destination_url": "https://example.com/promo",
"is_active": true
}
}
A create has id: null. When WarpLink would generate the slug, slug and short_url are null and slug_note explains it. A refusal is the error the real call returns, with its details.fix: a dry run over a plan limit answers 403 with the same code. The MCP tools create_link, create_app, and update_link take dry_run: true and return the same shape.
Endpoints
- Links: Create, list, retrieve, update, delete, and resolve deep links, including destinations, fallbacks, and UTM parameters
- Apps: Register and manage the mobile apps used for deep linking, including iOS and Android platform configuration
- Organizations: Read an organization and delete it
- Keys: Create, list, and revoke the SDK keys and API keys used to authenticate requests
- Custom Domains: Register, verify, and manage the custom domains that serve your short links
- Analytics: Query an overview, one link's detail, a filtered breakdown with period comparison, or a comparison of several links
- Exports: Start a click export for an organization or one link, poll its status, and download the CSV file
- Invitations: Invite team members by email, list pending invitations, and revoke access
- Attribution: Match an app install to the link click that drove it, using device signals, probabilistic matching, or referrers
- Installs: List every install record and every attribution attempt, matched or not, with stable IDs and match details
- Agent sign-up: Start a workspace for an AI agent and email its claim link to a person
- SDK endpoints: Authentication endpoint used by the mobile SDKs to validate SDK keys