---
title: "POST /api/v1/hosting/apps/{app_id}/deployments/{id}/fail"
method: POST
path: "/api/v1/hosting/apps/{app_id}/deployments/{id}/fail"
tags: ["hosting"]
---

# POST /api/v1/hosting/apps/{app_id}/deployments/{id}/fail

`POST /api/v1/hosting/apps/{app_id}/deployments/{id}/fail`

## Request

- Base URL: `https://composal.com` (the document declares no server; this is the origin it was published from)
- URL: `https://composal.com/api/v1/hosting/apps/{app_id}/deployments/{id}/fail`
- Auth: HTTP bearer

## Path parameters

- `app_id` string, required
- `id` string, required

## Request body

- object

## Response `200`

Updated app deployment

- object
  - `deployment` AppDeployment, required
    - `id` string, required
    - `hosted_app_id` string, required
    - `organization_id` string, required
    - `app_service_id` string, required
    - `app_environment_id` string, required
    - `location_id` string, required
    - `creator_user_id` string, nullable, required
    - `number` integer, required
    - `display_id` integer, required
    - `status` 'queued' | 'building' | 'deploying' | 'active' | 'failed' | 'rolled_back' | 'canceled', required
    - `location` HostingLocation, required
      - `id` string, required
      - `code` string, required
      - `name` string, required
      - `nomad_datacenter` string, required
      - `created_at` string, date-time, required
      - `updated_at` string, date-time, required
    - `source_ref` string, nullable, required
    - `commit_sha` string, nullable, required
    - `artifact_locator` string, nullable, required
    - `deployed_url` string, nullable, required
    - `trigger_kind` 'manual' | 'push' | 'schedule' | 'api' | 'rollback', required
    - `operation_key` string, nullable, required
    - `build_role` 'leader' | 'follower' | 'standalone', nullable, required
    - `is_rollback` boolean, required
    - `rollback_source_release_id` string, nullable, required
    - `rollback_target_release_id` string, nullable, required
    - `rollback_source_deployment_id` string, nullable, required
    - `rollback_reason` string, nullable, required
    - `idempotency_key` string, nullable, required
    - `failure_message` string, nullable, required
    - `started_at` string, date-time, nullable, required
    - `finished_at` string, date-time, nullable, required
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required
    - `started_at_label` string, nullable, required
    - `finished_at_label` string, nullable, required
    - `created_at_label` string, nullable, required
    - `updated_at_label` string, nullable, required

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not found
- `422`: Unprocessable entity
- `502`: Bad gateway

---

[API](https://skmtc.dev/composal/apis/vex-api.md) - [All operations](https://skmtc.dev/composal/apis/vex-api/llms.txt) - [OpenAPI document](https://skmtc.dev/composal/apis/vex-api/revisions/74298a24e040?raw)
