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

# Run a command

> Send an approved command to the live server. Needs the commands scope.

Read [Commands](https://apidocs.eraus.gg/commands.md) for the list and the rules.

**command** `string` *required*

Like `:announce Hello`. Up to 220 characters, with messages up to 200.

**id** `string`

Use it with [Get a command](https://apidocs.eraus.gg/api/get-command.md).

**status** `string`

Always `queued` here.

**command** `string`

The command as it will run, with the full name, like `:announce Hello` for `:h Hello`.

**delivery** `string`

`instant` if it was pushed to the server straight away, `next_sync` if the server will pick it up within about 10 seconds.

**statusUrl** `string`

| Error | When |
| - | - |
| `missing_scope` | The key can only read. |
| `restricted_command` | Not an API command. |
| `invalid_command` | Wrong arguments, a mass target like `all`, or text over 200 characters. |
| `server_offline` | Nobody is in the server. |
| `rate_limited` | More than 20 a minute on this key, or 30 a minute on this server. |

```bash cURL theme={null}
curl -X POST https://api.eraus.gg/v1/server/commands \
  -H "Authorization: Bearer $ERA_KEY" \
  -H "Content-Type: application/json" \
  -d '{"command": ":ban Darkbot99 Exploiting 7d"}'
```

```json 202 theme={null}
{
  "id": "cmd_9qk3v0nfqg74ib8y",
  "status": "queued",
  "command": ":ban Darkbot99 Exploiting 7d",
  "delivery": "instant",
  "statusUrl": "/v1/server/commands/cmd_9qk3v0nfqg74ib8y"
}
```


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