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

# Output and exit codes

> Tables for people, JSON for scripts.

Results go to **stdout**: tables for people, or the API's JSON with `--json`. Progress and errors go to **stderr**, so piping stdout gets only the result.

## Errors

With `--json`, an error is printed as:

```json theme={"system"}
{
  "error": {
    "code": "invalid_input",
    "message": "Choose a time in the future.",
    "status": 400,
    "errors": { "schedule.at": ["Choose a time in the future."] }
  }
}
```

`code` is stable for scripts:

| `code` | Meaning |
| - | - |
| `invalid_input` | A wrong command or input. |
| `not_logged_in` | No saved login and no `POSTINGER_API_KEY`. |
| `unauthorized` | The key is revoked or expired. |
| `forbidden` | The key lacks a scope. |
| `not_found` | Not in this workspace. |
| `conflict` | The post changed or is being published. |
| `payment_required` | Your plan doesn't cover this. |
| `rate_limited` | Too many requests. |
| `api_error` | Another error from the API or storage. |
| `network_error` | The API couldn't be reached. |
| `login_failed` | Logging in didn't finish. |
| `config_error` | The config file can't be read or written. |

## Exit codes

| Exit code | Meaning |
| - | - |
| `0` | Done. |
| `1` | The API refused, or couldn't be reached. |
| `2` | A wrong command or input. |

## Retries

A `POST` that fails without an answer (a dropped connection, a server error) is sent once more with the same `Idempotency-Key`, so it never happens twice.


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