> This page is optimized for agents. Use the linked Markdown pages and llms.txt indexes for related API content.

# Edit the text of a waiting message or email. It stays waiting unless approve is true

- Product: Reachiz API
- Section: Approvals
- Snapshot: v1
- Method: `PATCH`
- Path: `/v1/approvals/{id}`

## Path parameters

### `id`

Type: `number`  
Required: yes  

## Request body

Required: yes  
Content types: `application/json`  

### `text`

Type: `string`  
Required: yes  

### `subject`

Type: `string`  
Required: no  

### `approve`

Type: `boolean`  
Required: no  
Default: `false`  

## Execute with curl

```bash
curl -X PATCH "https://prestigious-goldfish-661.convex.site/v1/approvals/$ID" \
    -H "Authorization: Bearer $REACHIZ_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"text":"<text>"}'
```

## Execute with TypeScript

```ts
const response = await fetch("https://prestigious-goldfish-661.convex.site/v1/approvals/$ID", {
  method: "PATCH",
  headers: {
    Authorization: `Bearer ${process.env.REACHIZ_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"text":"<text>"}),
});

const data = await response.json();
```

## Responses

### Response `200`

Category: success  

Success

#### `application/json`

##### Generated example

```json
{
  "id": -9007199254740991,
  "campaignId": -9007199254740991,
  "campaignName": "campaignName",
  "kind": "message",
  "status": "pending",
  "text": "text",
  "subject": "subject",
  "edited": true,
  "lead": {
    "id": -9007199254740991,
    "name": "name",
    "title": "title",
    "company": "company",
    "imageUrl": "imageUrl"
  },
  "sender": "sender",
  "createdAt": "createdAt"
}
```

##### Schema

###### object

Type: `object`  

###### `id`

Type: `number`  
Required: yes  

###### `campaignId`

Type: `number`  
Required: yes  

###### `campaignName`

Type: `string`  
Required: yes  

###### `kind`

Type: `string`  
Required: yes  
Allowed values: `message`, `inmail`, `email`  

###### `status`

Type: `string`  
Required: yes  
Allowed values: `pending`, `approved`, `skipped`, `done`  

###### `text`

Type: `string`  
Required: yes  

###### `subject`

Type: `string`  
Required: yes  

###### `edited`

Type: `boolean`  
Required: yes  

###### `lead`

Type: `object`  
Required: yes  

###### object

Type: `object`  

###### `id`

Type: `number`  
Required: yes  

###### `name`

Type: `string`  
Required: yes  

###### `title`

Type: `string`  
Required: yes  

###### `company`

Type: `string`  
Required: yes  

###### `imageUrl`

Type: `string`  
Required: yes  

###### unknown

Type: `unknown`  

###### `sender`

Type: `string`  
Required: yes  

###### `createdAt`

Type: `string`  
Format: `date-time`  
Required: yes  

### Response `400`

Category: client-error  

The request is not valid. error.fields lists each problem.

#### `application/json`

##### Generated example

```json
{
  "error": {
    "code": "invalid_request",
    "message": "message",
    "requestId": "requestId",
    "recovery": "recovery",
    "fields": [
      {
        "path": "path",
        "message": "message"
      }
    ]
  }
}
```

##### Schema

###### Error

Type: `Error`  

###### `error`

Type: `object`  
Required: yes  

###### `code`

Type: `string`  
Required: yes  
Allowed values: `invalid_request`, `not_supported`, `unauthorized`, `subscription_required`, `forbidden`, `plan_limit_exceeded`, `workspace_suspended`, `not_found`, `conflict`, `conversation_changed`, `rate_limited`, `internal`, `unavailable`  

###### `message`

Type: `string`  
Required: yes  

###### `requestId`

Type: `string`  
Required: yes  

###### `recovery`

Type: `string`  
Required: no  

What to do next.

###### `fields`

Type: `object[]`  
Required: no  

###### object

Type: `object`  

###### `path`

Type: `string`  
Required: yes  

###### `message`

Type: `string`  
Required: yes  

### Response `401`

Category: client-error  

The API key is missing or not valid.

#### `application/json`

##### Generated example

```json
{
  "error": {
    "code": "invalid_request",
    "message": "message",
    "requestId": "requestId",
    "recovery": "recovery",
    "fields": [
      {
        "path": "path",
        "message": "message"
      }
    ]
  }
}
```

##### Schema

###### Error

Type: `Error`  

###### `error`

Type: `object`  
Required: yes  

###### `code`

Type: `string`  
Required: yes  
Allowed values: `invalid_request`, `not_supported`, `unauthorized`, `subscription_required`, `forbidden`, `plan_limit_exceeded`, `workspace_suspended`, `not_found`, `conflict`, `conversation_changed`, `rate_limited`, `internal`, `unavailable`  

###### `message`

Type: `string`  
Required: yes  

###### `requestId`

Type: `string`  
Required: yes  

###### `recovery`

Type: `string`  
Required: no  

What to do next.

###### `fields`

Type: `object[]`  
Required: no  

###### object

Type: `object`  

###### `path`

Type: `string`  
Required: yes  

###### `message`

Type: `string`  
Required: yes  

### Response `403`

Category: client-error  

The key lacks the scope this route needs.

#### `application/json`

##### Generated example

```json
{
  "error": {
    "code": "invalid_request",
    "message": "message",
    "requestId": "requestId",
    "recovery": "recovery",
    "fields": [
      {
        "path": "path",
        "message": "message"
      }
    ]
  }
}
```

##### Schema

###### Error

Type: `Error`  

###### `error`

Type: `object`  
Required: yes  

###### `code`

Type: `string`  
Required: yes  
Allowed values: `invalid_request`, `not_supported`, `unauthorized`, `subscription_required`, `forbidden`, `plan_limit_exceeded`, `workspace_suspended`, `not_found`, `conflict`, `conversation_changed`, `rate_limited`, `internal`, `unavailable`  

###### `message`

Type: `string`  
Required: yes  

###### `requestId`

Type: `string`  
Required: yes  

###### `recovery`

Type: `string`  
Required: no  

What to do next.

###### `fields`

Type: `object[]`  
Required: no  

###### object

Type: `object`  

###### `path`

Type: `string`  
Required: yes  

###### `message`

Type: `string`  
Required: yes  

### Response `404`

Category: client-error  

The resource does not exist, or belongs to another account.

#### `application/json`

##### Generated example

```json
{
  "error": {
    "code": "invalid_request",
    "message": "message",
    "requestId": "requestId",
    "recovery": "recovery",
    "fields": [
      {
        "path": "path",
        "message": "message"
      }
    ]
  }
}
```

##### Schema

###### Error

Type: `Error`  

###### `error`

Type: `object`  
Required: yes  

###### `code`

Type: `string`  
Required: yes  
Allowed values: `invalid_request`, `not_supported`, `unauthorized`, `subscription_required`, `forbidden`, `plan_limit_exceeded`, `workspace_suspended`, `not_found`, `conflict`, `conversation_changed`, `rate_limited`, `internal`, `unavailable`  

###### `message`

Type: `string`  
Required: yes  

###### `requestId`

Type: `string`  
Required: yes  

###### `recovery`

Type: `string`  
Required: no  

What to do next.

###### `fields`

Type: `object[]`  
Required: no  

###### object

Type: `object`  

###### `path`

Type: `string`  
Required: yes  

###### `message`

Type: `string`  
Required: yes  

### Response `429`

Category: client-error  

Too many requests.

#### `application/json`

##### Generated example

```json
{
  "error": {
    "code": "invalid_request",
    "message": "message",
    "requestId": "requestId",
    "recovery": "recovery",
    "fields": [
      {
        "path": "path",
        "message": "message"
      }
    ]
  }
}
```

##### Schema

###### Error

Type: `Error`  

###### `error`

Type: `object`  
Required: yes  

###### `code`

Type: `string`  
Required: yes  
Allowed values: `invalid_request`, `not_supported`, `unauthorized`, `subscription_required`, `forbidden`, `plan_limit_exceeded`, `workspace_suspended`, `not_found`, `conflict`, `conversation_changed`, `rate_limited`, `internal`, `unavailable`  

###### `message`

Type: `string`  
Required: yes  

###### `requestId`

Type: `string`  
Required: yes  

###### `recovery`

Type: `string`  
Required: no  

What to do next.

###### `fields`

Type: `object[]`  
Required: no  

###### object

Type: `object`  

###### `path`

Type: `string`  
Required: yes  

###### `message`

Type: `string`  
Required: yes  

### Response `503`

Category: server-error  

The service is busy. Retry with backoff.

#### `application/json`

##### Generated example

```json
{
  "error": {
    "code": "invalid_request",
    "message": "message",
    "requestId": "requestId",
    "recovery": "recovery",
    "fields": [
      {
        "path": "path",
        "message": "message"
      }
    ]
  }
}
```

##### Schema

###### Error

Type: `Error`  

###### `error`

Type: `object`  
Required: yes  

###### `code`

Type: `string`  
Required: yes  
Allowed values: `invalid_request`, `not_supported`, `unauthorized`, `subscription_required`, `forbidden`, `plan_limit_exceeded`, `workspace_suspended`, `not_found`, `conflict`, `conversation_changed`, `rate_limited`, `internal`, `unavailable`  

###### `message`

Type: `string`  
Required: yes  

###### `requestId`

Type: `string`  
Required: yes  

###### `recovery`

Type: `string`  
Required: no  

What to do next.

###### `fields`

Type: `object[]`  
Required: no  

###### object

Type: `object`  

###### `path`

Type: `string`  
Required: yes  

###### `message`

Type: `string`  
Required: yes  

## Related representations

- [Human documentation](/reachiz/sections/approvals/operations/patch-v1-approvals-id/)
- [curl Markdown](/reachiz/sections/approvals/operations/patch-v1-approvals-id.md?lang=curl)
- [TypeScript Markdown](/reachiz/sections/approvals/operations/patch-v1-approvals-id.md?lang=typescript)
- [site llms.txt](/llms.txt)
- [product llms.txt](/reachiz/llms.txt)
- [snapshot llms.txt](/reachiz/llms.txt)
