# POST /api/v1/call

**Preview.** Ships with the next server release.

`POST /api/v1/call {machine?, tool, args | sealed}` → `{"ok": result}`, `{"sealed": answer}`
or `{"error": {code, message}}`.

**In short:** `POST https://<contour>.cmdop.ai/api/v1/call` with `Authorization: Bearer $CMDOP_TOKEN` (owner or agent token (within the agent's grant)).

## Request body

| Field | Type | Always | Meaning |
| --- | --- | --- | --- |
| `args` | `any` | no |  |
| `machine` | `string` | no | Machine id or unique name; optional when exactly one machine is online. |
| `sealed` | `string` | no | The arguments sealed for the machine, instead of `args`. |
| `tool` | `string` | yes |  |

## Responses

| Status | Meaning | Body |
| --- | --- | --- |
| `200` | Tool result | `application/json` |
| `400` | Invalid call | `application/json` |
| `401` | Unauthorized | `application/json` |
| `502` | Machine/tool failure | `application/json` |

## Example

```bash
curl -sS -X POST "https://<contour>.cmdop.ai/api/v1/call" \
  -H "Authorization: Bearer $CMDOP_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"machine":"<machine>","tool":"sys_info","args":{}}'
```
