# Choose the version of a tool you run

> Select the operation version this credential uses for a tool.

Source: https://docs.fous.com/api-reference/chooseVersion

`PUT /v1/catalog/version-preference`

Pins the method version this credential runs for a tool, by operation_id. The first choice sticks until replace is true. Needs tools:read.

Authentication: `Authorization: Bearer $FOUS_API_KEY`.

## Request body

Required. JSON.

- `operation_id` (integer, required)
- `replace` (boolean): Default false.

## Response 200

Success

- `success` (true, required)
- `data` (object, required)
  - `operation_id` (integer, required)

## Errors

Every error uses the Error schema: branch on `error.code`. Codes are listed at https://docs.fous.com/guides/errors.

- 400
- 401 (headers: WWW-Authenticate)
- 402
- 403
- 404
- 408
- 409
- 410
- 413
- 422
- 429 (headers: Retry-After)
- 500
- 502
- 503 (headers: Retry-After)
- 504

## Example request

```bash
curl 'https://api.fous.com/v1/catalog/version-preference' \
  -X PUT \
  -H "Authorization: Bearer $FOUS_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"operation_id":1684,"replace":true}'
```
