Favicon

You are here: Home > App Distribution > API > Builds > DELETE - Remove a Build

DELETE - Remove a Build

Learn how to permanently delete builds from Applivery using the Integrations API or Workspace API. Understand authentication and parameters.

5 min read

TL;DR

Learn how to permanently delete builds from Applivery using either the Integrations API (App API Token) or the Workspace API (Service Account token).

Permanently deletes a build from Applivery. This action removes the build record and its associated file from storage.

Warning

This operation is permanent and irreversible. Once a build is deleted, it cannot be recovered. Any publication pointing exclusively to this build will no longer be able to serve the app for download. Verify that the build is not actively used in any publication before deleting it.

Applivery provides two separate APIs for deleting builds, each requiring a different authentication credential.


Choosing the Right API

Integrations API Workspace API
Designed for Per-app integrations and CI/CD cleanup pipelines Workspace-level automation across multiple apps
Authentication App API Token (per-app) Service Account token (workspace-level)
App context Implicit — token is already scoped to an app Explicit — organizationId and applicationId required in the path
Typical users CI scripts pruning old or failed builds automatically Platform engineers managing build retention across multiple apps
Warning

Access to the different APIs might not be available in your current plan. Please check availability on our pricing page.


Integrations API

Use this endpoint when deleting builds within the scope of a single app. Authentication uses an App API Token, scoped to the specific app.

To create an App API Token, see Apps API Authentication.

Endpoint

DELETE https://api.applivery.io/v1/integrations/builds/{buildId}

Authentication

Authorization: Bearer <your_app_token>

Path Parameters

Parameter Type Required Description
buildId String Yes The unique identifier of the build to delete. E.g. 552ae3cfcb5abfc58d733b81. The buildId is returned in the response of POST – Upload a Build and GET – List of Builds.

Example Request

curl 'https://api.applivery.io/v1/integrations/builds/552ae3cfcb5abfc58d733b81' \
  -X DELETE \
  -H 'Authorization: Bearer YOUR_APP_TOKEN'

Responses

{
  "status": true,
  "data": {
    "deleted": true
  }
}

Build not yet processed. Builds that are still in a pending or in_progress state cannot be deleted. Wait for processing to complete before attempting to delete.

{
  "status": false,
  "error": {
    "code": 5014,
    "message": "Build Not Processed"
  }
}
{
  "status": false,
  "error": {
    "code": 3002,
    "message": "Token Expired"
  }
}
{
  "status": false,
  "error": {
    "code": 3001,
    "message": "Entity not found"
  }
}

Workspace API

Use this endpoint when deleting builds at the workspace level — for example, in automated build retention pipelines that operate across multiple apps using a single credential.

Authentication uses a Service Account token, which is workspace-scoped and not tied to any individual app. The app and build context are both provided via path parameters.

To create a Service Account, see Service Accounts.

Endpoint

DELETE https://api.applivery.io/v1/organizations/{organizationId}/apps/{applicationId}/builds/{buildId}

Path Parameters

Parameter Type Required Description
organizationId String Yes The unique identifier of your Applivery organization.
applicationId String Yes The unique identifier of the app the build belongs to.
buildId String Yes The unique identifier of the build to delete.

Authentication

Authorization: Bearer <your_service_account_token>

Example Request

curl 'https://api.applivery.io/v1/organizations/ORG_ID/apps/APP_ID/builds/552ae3cfcb5abfc58d733b81' \
  -X DELETE \
  -H 'Authorization: Bearer YOUR_SERVICE_ACCOUNT_TOKEN'

The response schema is identical to the Integrations API. A successful deletion returns { "status": true, "data": { "deleted": true } }.

Key Takeaways

  • Deleting a build is a permanent and irreversible action.
  • Choose the Integrations API for per-app build deletion and the Workspace API for workspace-level build deletion.
  • Authentication differs between the two APIs: App API Token vs. Service Account token.
  • Builds must be fully processed before they can be deleted.
  • Always verify the build ID before deleting to avoid accidental data loss.