Version 1 · Base path /api/v1 · JSON in, JSON out · Keys from Settings, API
Make, read, retarget and delete your dynamic codes from a script. Call it from a server, never from a browser page: the API sends no CORS headers.
On this page
Authentication
Send an API key as a bearer token: Authorization: Bearer <key>. Make keys under Settings, API. A key is shown once when it is made and cannot be shown again.
A key acts as one role in one workspace: a read key can list and read; a read and write key can also make, retarget and delete. It never has more standing than the person who made it, and it stops working the moment it is revoked.
Plans, editing and limits
Reading, listing, retargeting and deleting codes that already exist work on every plan. Editing is never capped by plan.
Making codes also has a daily allowance per workspace, set by the plan. It resets at 00:00 UTC. A batch that would go past it is refused whole.
403Making codes, single or batch, needs a plan that includes API access, and a batch must fit the plan's batch size. A 403 with plan_required or plan_limit says which.
423When a code's editing is paused, retargeting it answers 423 edits_locked and the code keeps redirecting. Deleting is never locked.
429A create past the day's allowance answers 429 daily_limit with Retry-After in seconds, until 00:00 UTC.
429Requests are limited per key and per workspace. A 429 carries Retry-After in seconds.
List your codes
GET/api/v1/codes
Newest first. Needs a read key. Pass nextCursor back as cursor for the next page.
Your browser blocked copying. The code is selected: copy it from here.
Make many codes in one request
POST/api/v1/codes/batch
Needs a read and write key, a plan that includes API access, and a batch within the plan's batch size, never more than 1000. Items succeed or fail one by one: created and rejected each carry the index of the item in your request.
Body
Field
Type
Notes
items
NewCode[]
1 to 1000 items; the request body stays under 1 MB
Your browser blocked copying. The code is selected: copy it from here.
Delete a code
DELETE/api/v1/codes/{code}
Needs a read and write key. Works on every plan and is never locked. Anything printed with the code stops working, and its address is never given to anyone else.
The key can read but not change; the plan does not include this; the plan's codes are all in use; the email is not verified
404
—
No such code on your account
413
payload_too_large
The request body is over 1 MB
422
invalid_destination · destination_blocked
The address is not http(s), or is blocked
423
edits_locked · creation_locked
Editing is paused for this code (it keeps redirecting until redirectsUntil); new codes cannot be made while the plan is not active
429
rate_limited · busy · daily_limit
Too many requests, other creates for the workspace are still running, or the workspace has used its new-codes allowance for the day (daily_limit, until 00:00 UTC). Nothing was made. Try again after the seconds in Retry-After
503
unavailable · create_timeout
unavailable: nothing changed; it is safe to try again. create_timeout: a create ran out of time and the code may have been made, so list your codes before trying again
Example · 423 error
{
"error": "edits_locked",
"message": "Editing is paused for this code."
}
Your browser blocked copying. The code is selected: copy it from here.