PATCH /flexi/cancel/:id
Cancel a single bot. Only bots in status '1' (awaiting payment)
can be cancelled.
Refused once payment has been detected (including a token payment that
the worker has already accepted) — use /flexi/stop/bulk for running
bots.
Use case
Drop one bot from an initiated group before funding (e.g. user decreases campaign size).
Path params
| Param | Required | Description |
|---|---|---|
id | yes | Bot id. |
Response 200
{ "message": "Bot canceled" }
Errors
| Status | Meaning |
|---|---|
400 | Bot not in a cancellable state, or its payment was accepted in the meantime. |
403 | Bot not owned by caller. |
404 | Bot not found. |
Example
curl -X PATCH "$BASE_URL/flexi/cancel/<botId>" \
-H "Authorization: Bearer $ACCESS" \
-H "x-user-id: $USER_ID"