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

# Cancel at the end of the period (a trial ends at its trial end, with no charge). Needs 20 characters of feedback or the text Confirm cancellation

- Product: Reachiz API
- Section: Billing
- Snapshot: v1
- Method: `POST`
- Path: `/v1/billing/cancel`

## Request body

Required: yes  
Content types: `application/json`  

### `reason`

Type: `string`  
Required: yes  
Allowed values: `too_expensive`, `technical`, `results`, `other`  

### `feedback`

Type: `string`  
Required: yes  

At least 20 characters, or the text Confirm cancellation

## Execute with curl

```bash
curl -X POST "https://prestigious-goldfish-661.convex.site/v1/billing/cancel" \
    -H "Authorization: Bearer $REACHIZ_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"reason":"too_expensive","feedback":"<feedback>"}'
```

## Execute with TypeScript

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

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

## Responses

### Response `200`

Category: success  

Success

#### `application/json`

##### Generated example

```json
{
  "trialing": true,
  "canExtend": true,
  "endsAt": "endsAt",
  "cancelAt": "cancelAt"
}
```

##### Schema

###### object

Type: `object`  

###### `trialing`

Type: `boolean`  
Required: yes  

###### `canExtend`

Type: `boolean`  
Required: yes  

###### `endsAt`

Type: `string`  
Required: yes  

###### `cancelAt`

Type: `string`  
Required: yes  

###### string

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

###### unknown

Type: `unknown`  

### 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 `409`

Category: client-error  

The Idempotency-Key belongs to a different request, or the state does not allow this action.

#### `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/billing/operations/post-v1-billing-cancel/)
- [curl Markdown](/reachiz/sections/billing/operations/post-v1-billing-cancel.md?lang=curl)
- [TypeScript Markdown](/reachiz/sections/billing/operations/post-v1-billing-cancel.md?lang=typescript)
- [site llms.txt](/llms.txt)
- [product llms.txt](/reachiz/llms.txt)
- [snapshot llms.txt](/reachiz/llms.txt)
