# Cancel a publishing task

- API version: 1.11.0
- Last updated: 2026-11-16
- Server: `https://api.ailingtu.com`
- Web document: [Cancel a publishing task](/en/openapi/cancel-post)
- Full schema: [JSON Schema](/en/openapi/operations/cancelCreatorPost.json)
- Discovery: [Operation index](/en/openapi/operations/index.json)

## POST /v1/creator/post/cancel

Operation ID: `cancelCreatorPost`

Cancel a publishing task that has not reached a terminal state by using its postId.

Authentication: Request header `x-api-key: <YOUR_API_KEY>`; keep the key on the server and never expose it in client code, logs or shared files.

Success criteria: HTTP 2xx with code=0; for asynchronous tasks, also query the final status.

### Request parameters

| Field | Location | Type | Required | Description |
|---|---|---|---|---|
| `postId` | body | string | Yes | postId returned when the publishing task was created |

Request format: `application/json`

### Request example

```json
{
  "postId": "post_xxx"
}
```

### Success response

```json
{
  "code": 0,
  "data": null,
  "message": "success"
}
```

### Response fields

Main levels are listed below. The endpoint JSON Schema is authoritative for the full structure, unions and validation rules; Required refers to the containing object.

| Field | Type | Required | Description |
|---|---|---|---|
| `code` | integer | Yes | Fixed value: 0 |
| `data` | null | Yes | — |
| `message` | string | Yes | — |
| `timestamp` | integer | No | Response timestamp in milliseconds. |

### Integration notes and limits

- A completed, failed, or already cancelled task cannot be cancelled again.

### Error handling

| HTTP | Description |
|---|---|
| 400 | The request parameters or body are invalid. Fix them and retry. |
| 401 | The API key is missing or invalid. Check x-api-key. |
| 403 | The API key has no permission to call this endpoint. |
| 429 | Too many requests. Retry with exponential backoff. |
| 500 | The server failed. Retry transient failures with exponential backoff. |

Treat any non-zero business code as a failure. Do not blindly retry parameter, permission or authorization errors. If creating a publishing or generation task times out, query the existing task first instead of creating another one.

### Related endpoints

- [List publishing records](/en/openapi/post-records) · [Markdown](/en/openapi/operations/listCreatorPosts.md)
