releaseBuild

Releases a build for distribution.

By default, apps cannot be released via the API. For security reasons, you can only release apps through the web UI with security token authentication. If you want to enable releases via the API, contact support with your app ID.

Request

POST /v1/releaseBuild
Authorization: Bearer <access-token>
Content-Type: application/json

Headers

HeaderRequiredDescription
AuthorizationYesMust be set to Bearer <access-token>.
Content-TypeYesShould be application/json.

JSON Body

{
  "email": "you@example.com",
  "appId": "your-app-id",
  "buildId": "your-build-id",
  "shouldSkipEmail": false
}

Body Fields

FieldTypeRequiredDescription
emailstringYesThe email address of the ToDesktop account performing the release.
appIdstringYesThe ToDesktop app ID.
buildIdstringYesThe build ID to release.
shouldSkipEmailbooleanNoWhen true, skips the release success email.

Authorization Rules

The bearer token must satisfy one of these paths:

  • the account's legacy access token matches the supplied email, or
  • an active personal access token belongs to that same user and has app access for the target app

The authenticated user must also have permission to release the target app.

Response

{
  "message": "success"
}

Example

curl \
  -X POST \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"email":"you@example.com","appId":"your-app-id","buildId":"your-build-id"}' \
  "https://api.todesktop.com/v1/releaseBuild"

Errors

  • 400 if email, appId, or buildId is missing or not a string.
  • 403 if the bearer token is missing, invalid, the app is not enabled for API releases, or the user does not have release permission for the app.
  • 404 if the user for the supplied email cannot be found.
  • 412 if the build is not in a releasable state.