Documentation Index
Fetch the complete documentation index at: https://docs.linkutm.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Workspaces are the top-level container for links, domains, and team members. Workspace endpoints live under/api/v1/workspaces. Every endpoint authenticates with a JWT bearer token. Workspace endpoints never use API keys.
x-workspace-id header, which accepts a workspace UUID or a workspace slug.
Routing order matters on the server. Static paths such as
team, members, invites, deleted, and import-api-keys are matched before the dynamic :id and :slug routes. A workspace whose slug collides with one of those reserved words is not reachable through the slug-check endpoint.Create a workspace
owner role. The newest active system domain (if one exists) becomes the workspace default domain.
This endpoint accepts multipart/form-data so an optional logo file can be uploaded in the same request.
Headers
| Header | Required | Notes |
|---|---|---|
Authorization: Bearer <jwt> | Yes | |
Content-Type: multipart/form-data | Yes | The body is multipart so the logo file part can be included. |
Body
Workspace display name. Must be unique (case-insensitive) among the caller’s other non-deleted workspaces.
URL slug. If omitted, a slug is generated from
name: lowercased, non-alphanumeric runs replaced with hyphens, leading/trailing hyphens stripped, then a 6-character nanoid suffix appended.Optional image file part. Validated as an image. If the upload fails after the workspace is created, the workspace is still saved and the response carries a
logoUploadError field.Example request
Example response
"logoUploadError": "<reason>".
Errors
| Code | When |
|---|---|
400 | Logo file is not a valid image |
409 | Caller already has a workspace with this name, or the slug is already taken |
404 | User not found (try logging in again) |
List workspaces
_count of non-owner members.
Headers
| Header | Required | Notes |
|---|---|---|
Authorization: Bearer <jwt> | Yes |
Example request
Example response
Check slug availability
Headers
| Header | Required | Notes |
|---|---|---|
Authorization: Bearer <jwt> | Yes |
Example request
Example response
Update a workspace
Headers
| Header | Required | Notes |
|---|---|---|
Authorization: Bearer <jwt> | Yes | |
Content-Type: application/json | Yes |
Body
New workspace name. Must be unique (case-insensitive) among workspaces owned by the same owner.
New slug.
Logo URL. Pass an empty string or
null to clear the logo (the stored file is deleted). A data:image/... base64 string is rejected - upload binary images through POST /workspaces/:id/logo instead.Example request
Example response
Returns the full updated workspace record.Errors
| Code | When |
|---|---|
400 | Logo sent as an embedded data:image/... base64 string |
409 | Owner already has another workspace with this name |
Upload or replace the logo
Headers
| Header | Required | Notes |
|---|---|---|
Authorization: Bearer <jwt> | Yes | |
Content-Type: multipart/form-data | Yes |
Body
The logo image. Sent as the multipart part named
file. Validated as an image.Example request
Example response
Errors
| Code | When |
|---|---|
400 | No file provided, or the file is not a valid image |
404 | Workspace not found, or the caller is not the workspace owner |
Delete a workspace
Headers
| Header | Required | Notes |
|---|---|---|
Authorization: Bearer <jwt> | Yes | |
Content-Type: application/json | Yes | Only needed when sending a body. |
Body
soft moves the workspace to trash. permanent deletes it immediately. Defaults to permanent when the field or body is omitted.Confirmation phrase. Must equal
delete/<workspace-slug> exactly, for both soft and permanent delete.Example request (soft delete)
Example response
Soft delete:Errors
| Code | When |
|---|---|
400 | confirmationText does not equal delete/<slug>, or the workspace is already in trash (soft delete) |
403 | Caller is not the workspace owner |
404 | Workspace not found |
Behavior notes
- Soft delete sets
isSoftDeletedandsoftDeletedAt. A purge date 7 days later is included in theworkspaceSoftDeletedemail sent to every member. - Soft-deleted workspaces stop appearing in
GET /workspaces. - After the 7-day window, a soft-deleted workspace is purged permanently and the owner receives a
workspacePurgedemail. - Permanent delete and purge both destroy the record and all data tied to it.
List deleted workspaces
Headers
| Header | Required | Notes |
|---|---|---|
Authorization: Bearer <jwt> | Yes |
Example request
Example response
Restore a workspace
200. The path segment is the workspace UUID.
Headers
| Header | Required | Notes |
|---|---|---|
Authorization: Bearer <jwt> | Yes |
Example request
Example response
workspaceRestored notice.
Errors
| Code | When |
|---|---|
400 | Workspace is not in trash |
403 | Caller is not the workspace owner |
404 | Workspace not found |
Import API keys
linkutm can import links from Bitly, Rebrandly, and Short.io. The provider API keys used for those imports are stored on the workspace.Get saved import API keys
Headers
| Header | Required | Notes |
|---|---|---|
Authorization: Bearer <jwt> | Yes | |
x-workspace-id: <uuid_or_slug> | Yes | Target workspace |
Example request
Example response
Errors
| Code | When |
|---|---|
404 | Workspace not found |
Save an import API key
Headers
| Header | Required | Notes |
|---|---|---|
Authorization: Bearer <jwt> | Yes | |
x-workspace-id: <uuid_or_slug> | Yes | Target workspace |
Content-Type: application/json | Yes |
Body
Provider to store the key for. One of
bitly, rebrandly, shortio.The provider API key value to store.
Example request
Example response
Errors
| Code | When |
|---|---|
400 | Validation failure - bad confirmation text, invalid logo, missing fields |
401 | Missing or invalid JWT |
403 | Caller is not the owner where ownership is required |
404 | Workspace not found |
409 | Duplicate workspace name or slug |
429 | Rate limit exceeded (100 requests/minute per IP) |
Behavior notes
x-workspace-id accepts a UUID or a slug
x-workspace-id accepts a UUID or a slug
Workspace-scoped endpoints read the workspace from the
x-workspace-id header. The value can be the workspace UUID or its slug. Endpoints that take the workspace in the URL path (:id) expect the UUID.Soft delete has a 7-day window
Soft delete has a 7-day window
A soft-deleted workspace can be restored for 7 days through
POST /workspaces/:id/restore. After that window it is purged permanently and cannot be recovered. The purge date is included in the soft-delete email.Emails are queued, not sent inline
Emails are queued, not sent inline
Workspace lifecycle events (delete, soft-delete, restore, purge) enqueue emails through an outbound email queue. Team notifications respect each member’s per-workspace notification flags.
Ownership-gated actions
Ownership-gated actions
Logo upload, update, delete, soft-delete, and restore require the caller to be the workspace owner.