---
title: "Ask us to fix a failed build"
method: POST
path: "/client/services/{id}/autofix"
tags: ["Apps"]
---

# Ask us to fix a failed build

`POST /client/services/{id}/autofix`

## Request

- Base URL: `https://api.roar-ai.com`
- URL: `https://api.roar-ai.com/client/services/{id}/autofix`
- Auth: HTTP bearer

USES THE COMPANY'S AI CREDITS. Reads the build log, has our model write a minimal fix, stores it as a reversible overlay on the app's build (the repository itself is not changed — `DELETE .../ai-fixes` removes it) and redeploys with it; the settled result is `{ ok, summary }`, where `ok: false` means there was nothing to offer. Only a failed deploy that is marked fixable; repeating it on the same failure spends credits again. Answers **202** `{ operationId, status: "running" }` at once and runs the work in the background — it can take minutes. Poll `GET /client/operations/{operationId}` until it is `done` (the body is in `result`) or `failed` (`error` carries what the call would have refused with). `id` is a SERVICE id — take it from `services[].id` on `GET /client/apps/{appId}`, not the app id itself. Requires `apps:deploy`.

## Path parameters

- `id` string, uuid, required

## Response `202`

The fix has started — follow it on GET /client/operations/{id}

- OperationStarted
  - `operationId` string, uuid, required
  - `status` 'running', required

## Other responses

- `404`: No such service for you

---

[API](https://skmtc.dev/roar-ai/apis/roar-ai-api.md) · [All operations](https://skmtc.dev/roar-ai/apis/roar-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/roar-ai/apis/roar-ai-api/revisions/37e4d0d5a7fe?raw)
