---
title: "Retry a finished thread run"
---

> Documentation Index
> Fetch the complete documentation index at: https://tryshiba.dev/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Shiba public API › runs

`POST /threads/{threadId}/retry`

## Authentication

Requires one of the following:

- `bearerAuth`, http, header `Authorization`, format `API key`
- `cookieAuth`, apiKey, in cookie

## Path parameters

- `threadId` (`retryThreadRun.path.threadId`; string, required)

## Request body

_Optional._

## Example request

```json
{}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url '<base-url>/api/v1/threads/<threadId>/retry' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{}'
```

### TypeScript

```typescript
const url = '<base-url>/api/v1/threads/<threadId>/retry';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({})
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "<base-url>/api/v1/threads/<threadId>/retry"

payload = {}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

Success

#### Example

```json
{}
```

### 401

Unauthorized

#### Example

```json
{
  "ok": false,
  "error": "string",
  "detail": "string",
  "code": "string"
}
```

- `error` (`retryThreadRun.response.401.error`; string, required)
- `ok` (`retryThreadRun.response.401.ok`; boolean, optional)
- `detail` (`retryThreadRun.response.401.detail`; string, optional)
- `code` (`retryThreadRun.response.401.code`; string, optional)

### 404

Not found

#### Example

```json
{
  "ok": false,
  "error": "string",
  "detail": "string",
  "code": "string"
}
```

- `error` (`retryThreadRun.response.404.error`; string, required)
- `ok` (`retryThreadRun.response.404.ok`; boolean, optional)
- `detail` (`retryThreadRun.response.404.detail`; string, optional)
- `code` (`retryThreadRun.response.404.code`; string, optional)


Source: https://tryshiba.dev/reference/api/runs/retryThreadRun/index.md
