# Cancel job Cancel a job that is still in progress. Only the agent who created the job can cancel it. Jobs can only be canceled while in processing status. Completed, errored, or already canceled jobs cannot be canceled. Endpoint: POST /ai/trips/{publicId}/actions/cancel Version: 1.0.0 Security: bearerAuth ## Path parameters: - `publicId` (string, required) Public UUID of the job Example: "1c2c38f3-e596-463e-9f62-75c7c3602770" ## Response 200 fields (application/json): - `jobId` (string, required) Unique public identifier for the job Example: "1c2c38f3-e596-463e-9f62-75c7c3602770" - `status` (string, required) Current status of the job Enum: "processing", "completed", "error", "canceled" - `stage` (string, required) Current processing stage Enum: "initializing", "extractingText", "generatingBlocks", "enrichingBlocks", "completed" - `publicUrl` (string, required) URL to the trip public page Example: "https://v2.app.moguplatform.com/ai/trip/public/1c2c38f3-e596-463e-9f62-75c7c3602770" - `builderUrl` (string, required) URL to the trip builder (requires authentication) Example: "https://v2.app.moguplatform.com/ai/trip/1c2c38f3-e596-463e-9f62-75c7c3602770" - `tripId` (integer,null, required) Trip ID if completed, null otherwise - `tripSlug` (string,null, required) Trip slug if completed, null otherwise - `error` (string) Error message if status is error Example: "Could not extract trip information from document" - `updatedAt` (string, required) Last update timestamp (ISO 8601) Example: "2026-01-27T15:30:28Z" ## Response 400 fields (application/json): - `error` (object, required) - `error.code` (string, required) Error code Enum: "invalid_source", "invalid_url", "unsupported_format", "job_not_cancelable", "missing_api_key", "invalid_api_key", "job_not_found" - `error.message` (string, required) Human readable error message Example: "Source configuration is invalid" ## Response 404 fields (application/json): - `error` (object, required) - `error.code` (string, required) Error code Enum: "invalid_source", "invalid_url", "unsupported_format", "job_not_cancelable", "missing_api_key", "invalid_api_key", "job_not_found" - `error.message` (string, required) Human readable error message Example: "Source configuration is invalid" ## Response 401 fields