Skip to main content

API reference

This page is generated from the public OpenAPI source file.

  • Source: docs/api/openapi/bytes-developer-api.openapi.yaml
  • Published spec: /openapi/bytes-developer-api.openapi.yaml The reference below only includes deliberate public /api/v1/* endpoints. Browser-session, admin, billing, domain and analytics routes are intentionally not included.

Endpoints

MethodPathSummary
GET/linksList short links
POST/linksCreate a short link
GET/links/:idGet a short link
PATCH/links/:idUpdate a short link
DELETE/links/:idDelete a short link
POST/links/:id/tagsAttach tags to a link
DELETE/links/:id/tags/:tagIdRemove a tag from a link
GET/tagsList workspace tags
POST/tagsCreate a workspace tag
PATCH/tags/:idUpdate a workspace tag
DELETE/tags/:idDelete a workspace tag

Lists short links in the workspace that owns the API key.

  • Operation ID: listLinks
  • Authentication: Bearer API key
  • Request body: none

Responses

StatusDescription
200Links returned.
401Response
404Response

See the OpenAPI source for schemas, examples and validation rules.

POST /links

Creates a short link in the workspace that owns the API key.

  • Operation ID: createLink
  • Authentication: Bearer API key
  • Request body: CreateLinkRequest

Responses

StatusDescription
201Short link created successfully.
401Response
404Response
422Validation, limit, slug or destination safety error.

See the OpenAPI source for schemas, examples and validation rules.

Returns one short link from the workspace that owns the API key.

  • Operation ID: getLink
  • Authentication: Bearer API key
  • Request body: none

Responses

StatusDescription
200Link returned.
401Response
404Workspace or link not found.

See the OpenAPI source for schemas, examples and validation rules.

Updates one short link in the workspace that owns the API key.

  • Operation ID: updateLink
  • Authentication: Bearer API key
  • Request body: UpdateLinkRequest

Responses

StatusDescription
200Link updated successfully.
401Response
404Workspace or link not found.
422Validation, limit, slug or destination safety error.

See the OpenAPI source for schemas, examples and validation rules.

Soft-deletes one short link in the workspace that owns the API key.

  • Operation ID: deleteLink
  • Authentication: Bearer API key
  • Request body: none

Responses

StatusDescription
204Link deleted successfully. No response body is returned.
401Response
404Workspace or link not found.
422Link cannot be deleted because it is attached to a live Offline Engagement asset.

See the OpenAPI source for schemas, examples and validation rules.

POST /links/:id/tags

Attaches one or more workspace tags to a link.

  • Operation ID: attachTagsToLink
  • Authentication: Bearer API key
  • Request body: AttachTagsRequest

Responses

StatusDescription
200Tags attached successfully.
401Response
404Workspace or link not found.
422Response

See the OpenAPI source for schemas, examples and validation rules.

DELETE /links/:id/tags/:tagId

Removes one workspace tag from one link.

  • Operation ID: detachTagFromLink
  • Authentication: Bearer API key
  • Request body: none

Responses

StatusDescription
204Tag removed from link. No response body is returned.
401Response
404Workspace, link or tag not found.

See the OpenAPI source for schemas, examples and validation rules.

GET /tags

Lists tags for the workspace that owns the API key.

  • Operation ID: listTags
  • Authentication: Bearer API key
  • Request body: none

Responses

StatusDescription
200Tags returned.
401Response
404Response

See the OpenAPI source for schemas, examples and validation rules.

POST /tags

Creates a tag in the workspace that owns the API key.

  • Operation ID: createTag
  • Authentication: Bearer API key
  • Request body: CreateTagRequest

Responses

StatusDescription
201Tag created successfully.
401Response
404Response
422Response

See the OpenAPI source for schemas, examples and validation rules.

PATCH /tags/:id

Updates a tag in the workspace that owns the API key.

  • Operation ID: updateTag
  • Authentication: Bearer API key
  • Request body: UpdateTagRequest

Responses

StatusDescription
200Tag updated successfully.
401Response
404Workspace or tag not found.
422Response

See the OpenAPI source for schemas, examples and validation rules.

DELETE /tags/:id

Deletes a tag from the workspace and removes it from links.

  • Operation ID: deleteTag
  • Authentication: Bearer API key
  • Request body: none

Responses

StatusDescription
204Tag deleted successfully. No response body is returned.
401Response
404Workspace or tag not found.

See the OpenAPI source for schemas, examples and validation rules.

Regenerating this page

Run this from the repository root:

cd docs/public
npm run generate-api-reference
cd ../..

The docs build also regenerates this page automatically before Docusaurus builds the site.