> For complete lifecycle-event payload schemas and examples, use the canonical overview: Session /api/sessions; Room lifecycle, members, and room playback /api/rooms; Session playback /api/playback; Recording /api/recording; DTMF /api/keypad-input; Messages /api/messages; WebSocket Session /api/web-socket. Use /api/event-delivery for transport behavior. Endpoint pages name relevant events, but these overviews are the canonical references.

# Cancel an outbound fax

POST https://api.vorbal.dev/v1/messages/{message_uuid}/cancel

Persist a cancellation request for a non-terminal outbound fax. The response confirms the cancellation barrier, while the final delivery status is reported separately.

Reference: https://docs.vorbal.dev/api/messages/cancel-fax-message

## Authentication

- `Authorization` header (bearer token, required) — Send `Authorization: Bearer <app_uuid>:<api_key>` using an active API key. See [Authentication](https://voice-platform.docs.buildwithfern.com/api/authentication) for details.

## Request

### Path parameters

- `message_uuid` (string, required)

### Headers

- `Idempotency-Key` (string, required)

## Response

### 202

The fax cancellation barrier was persisted.

- `cancellation_requested` (boolean, required)
- `message_uuid` (string, required)

## Errors

### 400 Bad Request Error

Missing `Authorization` or malformed Bearer credentials return `invalid_authorization_header`; invalid request parameters return `invalid_request`. A syntactically valid credential with an invalid API key returns `401 unauthorized` instead.

- `code` (enum, required) — Stable, machine-readable error class from a closed set. Branch on this for programmatic handling. New codes are only added with a documented API change. Maps to the HTTP status as follows: `invalid_request` (400/405/406/415/422), `invalid_authorization_header` (400), `payload_too_large` and `result_set_too_large` (413), `unauthorized` (401), `forbidden` (403), `not_found` (404), `recording_not_active` (400); `conflict` and `room_full` (409), `rate_limited` (429), and `unavailable` (503/529). Unexpected failures use the separate `InternalErrorResponse` schema. Note: `413` is the only status shared by two codes — `payload_too_large` means the request body exceeded its size cap, while `result_set_too_large` means a list response exceeded the system result ceiling (narrow the query with filters and retry). Note: `unavailable` maps to multiple HTTP statuses, which represent different retry conditions: `503` means a required store or service is temporarily unavailable, and `529` means the platform is overloaded. Use the HTTP status and operation description, not just `code`, to distinguish them.
  - Allowed values: `invalid_request`, `invalid_authorization_header`, `payload_too_large`, `result_set_too_large`, `unauthorized`, `forbidden`, `not_found`, `conflict`, `recording_not_active`, `room_full`, `rate_limited`, `unavailable`
- `message` (string, required) — Human-readable, English-only error message. For display only — phrasing may change without notice, so branch on `code`, not on this string.

### 401 Unauthorized Error

The Bearer credential is syntactically valid but its API key is invalid. Missing `Authorization` or malformed Bearer credentials return `400 invalid_authorization_header`.

- `code` (enum, required) — Stable, machine-readable error class from a closed set. Branch on this for programmatic handling. New codes are only added with a documented API change. Maps to the HTTP status as follows: `invalid_request` (400/405/406/415/422), `invalid_authorization_header` (400), `payload_too_large` and `result_set_too_large` (413), `unauthorized` (401), `forbidden` (403), `not_found` (404), `recording_not_active` (400); `conflict` and `room_full` (409), `rate_limited` (429), and `unavailable` (503/529). Unexpected failures use the separate `InternalErrorResponse` schema. Note: `413` is the only status shared by two codes — `payload_too_large` means the request body exceeded its size cap, while `result_set_too_large` means a list response exceeded the system result ceiling (narrow the query with filters and retry). Note: `unavailable` maps to multiple HTTP statuses, which represent different retry conditions: `503` means a required store or service is temporarily unavailable, and `529` means the platform is overloaded. Use the HTTP status and operation description, not just `code`, to distinguish them.
  - Allowed values: `invalid_request`, `invalid_authorization_header`, `payload_too_large`, `result_set_too_large`, `unauthorized`, `forbidden`, `not_found`, `conflict`, `recording_not_active`, `room_full`, `rate_limited`, `unavailable`
- `message` (string, required) — Human-readable, English-only error message. For display only — phrasing may change without notice, so branch on `code`, not on this string.

### 404 Not Found Error

The requested resource was not found.

- `code` (enum, required) — Stable, machine-readable error class from a closed set. Branch on this for programmatic handling. New codes are only added with a documented API change. Maps to the HTTP status as follows: `invalid_request` (400/405/406/415/422), `invalid_authorization_header` (400), `payload_too_large` and `result_set_too_large` (413), `unauthorized` (401), `forbidden` (403), `not_found` (404), `recording_not_active` (400); `conflict` and `room_full` (409), `rate_limited` (429), and `unavailable` (503/529). Unexpected failures use the separate `InternalErrorResponse` schema. Note: `413` is the only status shared by two codes — `payload_too_large` means the request body exceeded its size cap, while `result_set_too_large` means a list response exceeded the system result ceiling (narrow the query with filters and retry). Note: `unavailable` maps to multiple HTTP statuses, which represent different retry conditions: `503` means a required store or service is temporarily unavailable, and `529` means the platform is overloaded. Use the HTTP status and operation description, not just `code`, to distinguish them.
  - Allowed values: `invalid_request`, `invalid_authorization_header`, `payload_too_large`, `result_set_too_large`, `unauthorized`, `forbidden`, `not_found`, `conflict`, `recording_not_active`, `room_full`, `rate_limited`, `unavailable`
- `message` (string, required) — Human-readable, English-only error message. For display only — phrasing may change without notice, so branch on `code`, not on this string.

### 406 Not Acceptable Error

The public API returns JSON and does not expose a Server-Sent Events representation. Requests that explicitly negotiate `text/event-stream` without accepting JSON are rejected.

- `code` (enum, required) — Stable, machine-readable error class from a closed set. Branch on this for programmatic handling. New codes are only added with a documented API change. Maps to the HTTP status as follows: `invalid_request` (400/405/406/415/422), `invalid_authorization_header` (400), `payload_too_large` and `result_set_too_large` (413), `unauthorized` (401), `forbidden` (403), `not_found` (404), `recording_not_active` (400); `conflict` and `room_full` (409), `rate_limited` (429), and `unavailable` (503/529). Unexpected failures use the separate `InternalErrorResponse` schema. Note: `413` is the only status shared by two codes — `payload_too_large` means the request body exceeded its size cap, while `result_set_too_large` means a list response exceeded the system result ceiling (narrow the query with filters and retry). Note: `unavailable` maps to multiple HTTP statuses, which represent different retry conditions: `503` means a required store or service is temporarily unavailable, and `529` means the platform is overloaded. Use the HTTP status and operation description, not just `code`, to distinguish them.
  - Allowed values: `invalid_request`, `invalid_authorization_header`, `payload_too_large`, `result_set_too_large`, `unauthorized`, `forbidden`, `not_found`, `conflict`, `recording_not_active`, `room_full`, `rate_limited`, `unavailable`
- `message` (string, required) — Human-readable, English-only error message. For display only — phrasing may change without notice, so branch on `code`, not on this string.

### 409 Conflict Error

The message is not a cancellable fax.

- `code` (enum, required) — Stable, machine-readable error class from a closed set. Branch on this for programmatic handling. New codes are only added with a documented API change. Maps to the HTTP status as follows: `invalid_request` (400/405/406/415/422), `invalid_authorization_header` (400), `payload_too_large` and `result_set_too_large` (413), `unauthorized` (401), `forbidden` (403), `not_found` (404), `recording_not_active` (400); `conflict` and `room_full` (409), `rate_limited` (429), and `unavailable` (503/529). Unexpected failures use the separate `InternalErrorResponse` schema. Note: `413` is the only status shared by two codes — `payload_too_large` means the request body exceeded its size cap, while `result_set_too_large` means a list response exceeded the system result ceiling (narrow the query with filters and retry). Note: `unavailable` maps to multiple HTTP statuses, which represent different retry conditions: `503` means a required store or service is temporarily unavailable, and `529` means the platform is overloaded. Use the HTTP status and operation description, not just `code`, to distinguish them.
  - Allowed values: `invalid_request`, `invalid_authorization_header`, `payload_too_large`, `result_set_too_large`, `unauthorized`, `forbidden`, `not_found`, `conflict`, `recording_not_active`, `room_full`, `rate_limited`, `unavailable`
- `message` (string, required) — Human-readable, English-only error message. For display only — phrasing may change without notice, so branch on `code`, not on this string.

### 422 Unprocessable Entity Error

The Idempotency-Key was reused for a different cancellation request.

- `code` (enum, required) — Stable, machine-readable error class from a closed set. Branch on this for programmatic handling. New codes are only added with a documented API change. Maps to the HTTP status as follows: `invalid_request` (400/405/406/415/422), `invalid_authorization_header` (400), `payload_too_large` and `result_set_too_large` (413), `unauthorized` (401), `forbidden` (403), `not_found` (404), `recording_not_active` (400); `conflict` and `room_full` (409), `rate_limited` (429), and `unavailable` (503/529). Unexpected failures use the separate `InternalErrorResponse` schema. Note: `413` is the only status shared by two codes — `payload_too_large` means the request body exceeded its size cap, while `result_set_too_large` means a list response exceeded the system result ceiling (narrow the query with filters and retry). Note: `unavailable` maps to multiple HTTP statuses, which represent different retry conditions: `503` means a required store or service is temporarily unavailable, and `529` means the platform is overloaded. Use the HTTP status and operation description, not just `code`, to distinguish them.
  - Allowed values: `invalid_request`, `invalid_authorization_header`, `payload_too_large`, `result_set_too_large`, `unauthorized`, `forbidden`, `not_found`, `conflict`, `recording_not_active`, `room_full`, `rate_limited`, `unavailable`
- `message` (string, required) — Human-readable, English-only error message. For display only — phrasing may change without notice, so branch on `code`, not on this string.

### 429 Too Many Requests Error

Rate limit exceeded for the applicable per-command, per-room, or global scope. The `Retry-After` response header gives the integer seconds to wait before retrying.

- `code` (enum, required) — Stable, machine-readable error class from a closed set. Branch on this for programmatic handling. New codes are only added with a documented API change. Maps to the HTTP status as follows: `invalid_request` (400/405/406/415/422), `invalid_authorization_header` (400), `payload_too_large` and `result_set_too_large` (413), `unauthorized` (401), `forbidden` (403), `not_found` (404), `recording_not_active` (400); `conflict` and `room_full` (409), `rate_limited` (429), and `unavailable` (503/529). Unexpected failures use the separate `InternalErrorResponse` schema. Note: `413` is the only status shared by two codes — `payload_too_large` means the request body exceeded its size cap, while `result_set_too_large` means a list response exceeded the system result ceiling (narrow the query with filters and retry). Note: `unavailable` maps to multiple HTTP statuses, which represent different retry conditions: `503` means a required store or service is temporarily unavailable, and `529` means the platform is overloaded. Use the HTTP status and operation description, not just `code`, to distinguish them.
  - Allowed values: `invalid_request`, `invalid_authorization_header`, `payload_too_large`, `result_set_too_large`, `unauthorized`, `forbidden`, `not_found`, `conflict`, `recording_not_active`, `room_full`, `rate_limited`, `unavailable`
- `message` (string, required) — Human-readable, English-only error message. For display only — phrasing may change without notice, so branch on `code`, not on this string.

### 500 Internal Server Error

An unexpected platform failure. Quote `support_id` to support; the technical cause and vendor event identifier are never exposed.

- `code` ("internal_error", required)
- `message` ("An internal error occurred", required)
- `support_id` (string, required) — Opaque occurrence identifier to quote to support. It is not a Sentry Event ID and must not be parsed.

### 503 Service Unavailable Error

Fax cancellation is temporarily unavailable.

- `code` (enum, required) — Stable, machine-readable error class from a closed set. Branch on this for programmatic handling. New codes are only added with a documented API change. Maps to the HTTP status as follows: `invalid_request` (400/405/406/415/422), `invalid_authorization_header` (400), `payload_too_large` and `result_set_too_large` (413), `unauthorized` (401), `forbidden` (403), `not_found` (404), `recording_not_active` (400); `conflict` and `room_full` (409), `rate_limited` (429), and `unavailable` (503/529). Unexpected failures use the separate `InternalErrorResponse` schema. Note: `413` is the only status shared by two codes — `payload_too_large` means the request body exceeded its size cap, while `result_set_too_large` means a list response exceeded the system result ceiling (narrow the query with filters and retry). Note: `unavailable` maps to multiple HTTP statuses, which represent different retry conditions: `503` means a required store or service is temporarily unavailable, and `529` means the platform is overloaded. Use the HTTP status and operation description, not just `code`, to distinguish them.
  - Allowed values: `invalid_request`, `invalid_authorization_header`, `payload_too_large`, `result_set_too_large`, `unauthorized`, `forbidden`, `not_found`, `conflict`, `recording_not_active`, `room_full`, `rate_limited`, `unavailable`
- `message` (string, required) — Human-readable, English-only error message. For display only — phrasing may change without notice, so branch on `code`, not on this string.

## Examples

**Response**

```json
{
  "cancellation_requested": true,
  "message_uuid": "string"
}
```

**SDK Code**

```python
import requests

url = "https://api.vorbal.dev/v1/messages/message_uuid/cancel"

headers = {
    "Idempotency-Key": "Idempotency-Key",
    "Authorization": "Bearer <token>"
}

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

print(response.json())
```

```javascript
const url = 'https://api.vorbal.dev/v1/messages/message_uuid/cancel';
const options = {
  method: 'POST',
  headers: {'Idempotency-Key': 'Idempotency-Key', Authorization: 'Bearer <token>'}
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.vorbal.dev/v1/messages/message_uuid/cancel"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("Idempotency-Key", "Idempotency-Key")
	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.vorbal.dev/v1/messages/message_uuid/cancel")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = 'Idempotency-Key'
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.vorbal.dev/v1/messages/message_uuid/cancel")
  .header("Idempotency-Key", "Idempotency-Key")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.vorbal.dev/v1/messages/message_uuid/cancel', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Idempotency-Key' => 'Idempotency-Key',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.vorbal.dev/v1/messages/message_uuid/cancel");
var request = new RestRequest(Method.POST);
request.AddHeader("Idempotency-Key", "Idempotency-Key");
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Idempotency-Key": "Idempotency-Key",
  "Authorization": "Bearer <token>"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.vorbal.dev/v1/messages/message_uuid/cancel")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```