Modulify

Cancel a running generation

cancel_job

Stops a generation that is currently running on a site.

POST /v1/cancel_jobScopechat:writeMakes changes

Work the agent has already written to the site is kept. Leave out jobId to cancel whichever generation is running, and when none is, the call answers There is no generation running for this site!

Stopping a generation parks the site's message queue, so anything queued waits until resume_queue releases it. Set clearSession to also reset the agent session, so the next message starts a fresh conversation. See Stop a run.

Request

Call it with a POST to https://api.modulify.ai/v1/cancel_job, sending the inputs below as a JSON object. The token needs the chat:write scope.

It makes changes, so send an Idempotency-Key header whenever you might retry it. A retry with the same key gets the first answer back instead of running again.

curl -X POST https://api.modulify.ai/v1/cancel_job \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"projectId":"PROJECT_ID"}'

Over MCP, the same method is the cancel_job tool.

Inputs

Input Type Required Description
projectId string Yes The site id.
jobId string No The generation to cancel. Leave it out for the one running now.
clearSession boolean No True to also reset the agent session, so the next message starts a fresh conversation.

Response

Every call answers with the JSON envelope of success, message, data, code and version. data holds the result described above, and on a method that returns a total, count carries it. The response headers carry the call's X-Request-Id and what is left of your per-minute budget in X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Errors explains every status code a call can answer with.