ToDesktop API Reference

The ToDesktop API provides HTTP endpoints for checking release state, listing released builds, managing build labels, releasing builds, and controlling app download access.

Base URL

All endpoints in this section are rooted at:

https://api.todesktop.com/v1

Authentication

All protected endpoints use the same header:

Authorization: Bearer <access-token>

Supported credentials are:

  • Account access tokens: ToDesktop CLI/account tokens.
  • Personal access tokens (PATs): active tokens scoped to the target app.
  • Firebase ID tokens: tokens issued for a ToDesktop user session.

The API identifies you from the token; no email is required in the request.

App permissions

You must own the app or have accepted access to it. Personal tokens can only access their assigned apps and cannot grant more permissions than their owner has.

EndpointRequired access
getBuild, getBuildLabels, GET downloadAccessApp owner or collaborator with current app access, including read-only access.
setBuildLabel, removeBuildLabelApp owner or collaborator with build or release permission.
releaseBuildApp owner or collaborator with release permission. The app's programmatic-release setting also applies.
PUT downloadAccessApp owner only.
getReleaseStatus, getReleaseBuildIdsPublic; no bearer token required.

Account IP restrictions apply to protected endpoints. The request must satisfy the caller's allowlist and, for collaborators, the app owner's allowlist. These account restrictions are separate from an app's download-access policy.

Endpoints

MethodEndpointDescription
GET/getReleaseStatusReturns whether a specific build has been released.
GET/getReleaseBuildIdsReturns full and partial releases for an app, ordered by release time.
GET/getBuildReturns build metadata for a specific build.
GET/getBuildLabelsReads a build's custom labels.
POST/setBuildLabelCreates or replaces one custom label.
POST/removeBuildLabelRemoves one custom label.
POST/releaseBuildReleases a build for distribution after validating access and build readiness.
GET/downloadAccessReads an app's public or IP-restricted download policy.
PUT/downloadAccessReplaces an app's download policy; requires the app owner.

Error Handling

Protected endpoints use these authentication and authorization statuses:

StatusReason in structured errorsMeaning
401unauthenticatedMissing, invalid, expired, or revoked credentials, or a deleted or disabled account.
403permission-deniedMissing app permission, a personal token outside its app scope, or a blocked account IP address.
502unavailableThe authentication service is unavailable. Retry later.

Error response formats depend on the endpoint. Authentication and authorization failures on getBuild and releaseBuild use a string-valued error:

{ "error": "Invalid bearer token." }

The download-access API and build-label APIs use structured errors:

{ "error": { "reason": "unauthenticated", "message": "Invalid bearer token." } }

Other errors may use a message and numeric code:

{
  "message": "Parameter appId is required in search params",
  "code": 1
}

See each endpoint's reference for additional errors and retry instructions.