> ## Documentation Index
> Fetch the complete documentation index at: https://reach-owl.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# PATCH/PUT /api/v1/queues — Retry or Edit Queue Entries

> Retry a failed queue entry by queue id, or by campaign_id plus audience_id or member_id. PUT updates the message text on a queued entry.

Use the queues endpoint to retry failed campaign actions or update the message text on a queued entry before it runs. Retry by queue ID for precision, or by campaign and audience identifiers when the queue ID is unknown.

## Retry by Queue ID

Retry a specific queue entry using its unique ID.

### Endpoint

```http theme={null}
PATCH /api/v1/queues
```

### Parameters

<ParamField body="id" type="integer" required>
  The queue entry ID to retry.
</ParamField>

<ParamField body="retry" type="boolean" required>
  Must be `true` to trigger a retry.
</ParamField>

### Request Example

```bash theme={null}
curl -X PATCH 'https://reachowl.com/api/v1/queues' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"id": 99, "retry": true}'
```

***

## Retry by Audience and Step

Retry a queue entry by campaign ID and audience identifier.

### Endpoint

```http theme={null}
PATCH /api/v1/queues
```

### Parameters

<ParamField body="campaign_id" type="integer" required>
  The campaign ID the queued action belongs to.
</ParamField>

<ParamField body="audience_id" type="integer">
  The audience ID of the queued action. Provide `audience_id` or `member_id`.
</ParamField>

<ParamField body="member_id" type="string">
  The member ID of the queued action. Provide `audience_id` or `member_id`.
</ParamField>

<ParamField body="step" type="integer" required>
  The campaign step number to retry.
</ParamField>

<ParamField body="retry" type="boolean" required>
  Must be `true` to trigger a retry.
</ParamField>

### Request Example

```bash theme={null}
curl -X PATCH 'https://reachowl.com/api/v1/queues' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"campaign_id": 1, "audience_id": 42, "step": 1, "retry": true}'
```

***

## Update Message on Queue Entry

Change the message text on a queued entry before it is processed.

### Endpoint

```http theme={null}
PUT /api/v1/queues
```

### Parameters

<ParamField body="id" type="integer" required>
  The queue entry ID to update.
</ParamField>

<ParamField body="message" type="string" required>
  The new message text for the queued action.
</ParamField>

### Request Example

```bash theme={null}
curl -X PUT 'https://reachowl.com/api/v1/queues' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"id": 99, "message": "Updated message text"}'
```

## Response Examples

### Retry Response

```json theme={null}
{
  "message": "Queue entry retried successfully"
}
```

### Update Response

```json theme={null}
{
  "id": 99,
  "message": "Updated message text",
  "updated_at": "2024-01-20T14:00:00Z"
}
```

## Error Responses

| Status | Description                                    |
| ------ | ---------------------------------------------- |
| 401    | Unauthorized                                   |
| 404    | Queue entry not found                          |
| 422    | Validation error - Missing required parameters |
