> For the complete documentation index, see [llms.txt](https://mimic-api.gitbook.io/mimic-api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mimic-api.gitbook.io/mimic-api-docs/guides/concepts/statuses-and-errors.md).

# Statuses and errors

Every status value the API reports, and what each HTTP error means.

## Strategy status

Reported by `GET /{action}/{id}` for any recurring strategy.

| Status    | Meaning                                                                       |
| --------- | ----------------------------------------------------------------------------- |
| `pending` | Prepared but the signature has not been submitted, so it has never executed   |
| `stale`   | The signature was not submitted before `signBefore`, so it will never execute |
| `active`  | Running on schedule. `nextExecution` tells you when the next one fires        |
| `stopped` | Deactivated via `POST /{action}/{id}/stop/execute`                            |
| `ended`   | Reached its end condition and will not execute again                          |

`pending`, `stale` and `ended` are all terminal-ish in different ways: `stale` and `ended` can never become `active` again, while `pending` still can — until its deadline passes.

{% hint style="info" %}
A stopped or ended strategy cannot be reactivated. Create a new one to resume.
{% endhint %}

## Execution status

Reported per execution by `GET /{action}/{id}/executions`.

| Status      | Meaning                                                                            |
| ----------- | ---------------------------------------------------------------------------------- |
| `pending`   | Still in flight — queued or submitted, not yet resolved on chain                   |
| `succeeded` | Every intent in the execution completed successfully                               |
| `failed`    | The execution was invalid, or at least one intent was discarded, expired or failed |
| `skipped`   | The trigger fired but produced no intents, so nothing was submitted on chain       |

`skipped` is the one to handle deliberately — it is not an error. A fee ceiling exceeded, or nothing to do this round, both surface here.

`costUsd` is the fee actually paid, and is omitted while `pending`.

## Revocation status

Returned by `POST /{action}/{id}/stop/execute` for each submitted revocation.

| Status      | Meaning                                                                                        |
| ----------- | ---------------------------------------------------------------------------------------------- |
| `succeeded` | Confirmed on chain, the allowance is now zero                                                  |
| `failed`    | Rejected when broadcast, reverted, or not confirmed in time                                    |
| `skipped`   | Not broadcast, because another strategy on the same wallet and token still needs the allowance |

The strategy stops regardless of what these report. A `failed` or `skipped` entry leaves an allowance in place without affecting the stop itself.

## HTTP errors

| Code  | Meaning                                         |
| ----- | ----------------------------------------------- |
| `400` | Invalid parameters or body                      |
| `401` | Missing or invalid `X-Api-Key`                  |
| `403` | The key is valid but does not own this resource |
| `404` | Unknown id                                      |
| `409` | Conflict — see below                            |

`409` is the one with real semantics behind it:

* **On execute** — a *different* signature was already submitted for this id, or the signing window closed and the strategy is now `stale`. Resubmitting the *same* signature is always safe and succeeds.
* **On stop** — the strategy has never executed, so there is nothing to stop.
* **On any endpoint taking `Idempotency-Key`** — the key was reused with a different body, or a request with that key is still in flight.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://mimic-api.gitbook.io/mimic-api-docs/guides/concepts/statuses-and-errors.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
