# Serve a kept release again

`POST /api/projects/{name}/rollback` · Praecise Cloud · Projects

Serve a kept release again. Answers when the release is live and healthy, which can take a few minutes; allow five. Anything that is not a kept release answers 400.

- Scope: rollback
- Role: member

## Parameters

- `name` (path, required), string: The project's name.
- `Idempotency-Key` (header), string: Send the same key when retrying. Within 24 hours the first successful answer is returned again, with Idempotent-Replayed: true, instead of running twice.

## Request body

`application/json`

```json
{
  "type": "object",
  "required": [
    "release"
  ],
  "properties": {
    "release": {
      "type": "string",
      "description": "A release id from the kept releases, or \"previous\" for the release that was live before the current one."
    }
  }
}
```

## Responses

- `200`: The release is live.
- `400`: The request is not valid: a bad parameter, or a release that is not kept. Code bad_request or bad_release.
- `401`: No token, or the token is unknown, revoked or expired. Code unauthenticated, token_revoked or token_expired.
- `403`: The token lacks the scope, the call is not open to tokens, or the caller is not an owner. Code scope_missing, session_required or owner_required.
- `404`: No such project, or one the caller cannot see. The two are not told apart. Code not_found.
- `409`: A deploy is already running for the project, or the first request with this Idempotency-Key has not finished. Code deploy_running, no_source or request_in_progress.
- `422`: The Idempotency-Key was already used for a different request. Code idempotency_key_reused.
- `429`: Too many requests for this token. Retry-After says how many seconds to wait. Code rate_limited.
- `500`: The rollback did not complete; the answer carries its output. Code rollback_failed.

## Example

```sh
curl -X POST 'https://console.praecise.cloud/api/projects/{name}/rollback' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "release": "string"
}'
```
