> ## Documentation Index
> Fetch the complete documentation index at: https://docs.posttu.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Cancel workflow run

> Cancel an active or pending in-flight workflow run.

Aborts an active or pending workflow execution run. Any remaining downstream step nodes in the pipeline will be skipped and the run status set to `CANCELLED`.

### Path Parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `runId` | `string` | **Yes** | Unique identifier of the in-flight run (`run_...`). |

### cURL Example

```bash theme={null}
curl -X POST "https://posttu.com/api/v1/workflow/runs/run_999/cancel" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

### Response Example

```json theme={null}
{
  "data": {
    "runId": "run_999",
    "status": "CANCELLED"
  },
  "success": true
}
```


## OpenAPI

````yaml openapi.json POST /api/v1/workflow/runs/{runId}/cancel
openapi: 3.1.0
info:
  title: Posttu API
  version: 1.0.0
  description: >-
    Posttu V1 REST API — Workflow automation, social-media post management,
    inbox, tags, and calendar.
servers:
  - url: https://posttu.com
    description: Production
security: []
paths:
  /api/v1/workflow/runs/{runId}/cancel:
    post:
      tags:
        - Workflow
      summary: Cancel a running workflow
      parameters:
        - schema:
            type: string
            description: Run ID to cancel
            example: run_789def
          required: true
          description: Run ID to cancel
          name: runId
          in: path
      responses:
        '200':
          description: Cancellation result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowCancelResponse'
        '401':
          description: Error response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
      security:
        - ApiKeyAuth: []
components:
  schemas:
    WorkflowCancelResponse:
      type: object
      properties:
        runId:
          type: string
          description: Run ID
        status:
          type: string
          description: Cancellation status
          example: CANCELED
        message:
          type: string
          description: Status message
      required:
        - runId
        - status
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      description: 'Pass your API key via the Authorization header: `Bearer <api-key>`'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.