Create or replace an operator (human admin)
POST /v1/ops/operators- quién puede llamarla
- Un operador
- una persona:
admin - cuán reciente
- Nunca en caché
- cada respuesta lleva la altura del índice y la del nodo
- Herramienta MCP
- Ninguna
En esta página
Parámetros
| Nombre | Dónde | Tipo | Obligatorio | Qué hace |
|---|---|---|---|---|
id | cuerpo | string | obligatorio | The operator's id. An operator of that id is replaced. |
kind | cuerpo | string | obligatorio | A human or an agent. |
display_name | cuerpo | string | opcional | The name shown for the operator; its id when left out. |
roles | cuerpo | array | opcional | What the operator may do. |
daily_action_budget | cuerpo | integer | opcional | Required for agents. |
active | cuerpo | boolean | opcional | Whether the operator is switched on: true when left out. False switches it off everywhere (403). |
El cuerpo es application/json.
esquema
idstring obligatorio — The operator's id. An operator of that id is replaced.kindstring obligatorio — A human or an agent. · uno de "human", "agent"display_namestring — The name shown for the operator; its id when left out.rolesarray de string — What the operator may do.daily_action_budgetinteger — Required for agents.activeboolean — Whether the operator is switched on: true when left out. False switches it off everywhere (403).
Qué responde
201 · application/json
The operator.
| Campo | Tipo | Qué lleva |
|---|---|---|
id | string | The operator's id. |
kind | string | A human or an agent. |
display_name | string | The name shown for the operator. |
roles | array | What the operator may do: admin, curator, moderator, drafter. |
daily_action_budget | integer o null | An agent operator's budget: the audited actions it may take in a UTC day before its writes answer 429. Null when none is set; a human's is never checked. |
active | boolean | Whether the operator is switched on. False switches it off everywhere (403). |
created_at | string | When the operator was created. |
account_id | integer | The account a human operator signs in with; absent when none is linked. |
esquema Operator
idstring — The operator's id.kindstring — A human or an agent. · uno de "human", "agent"display_namestring — The name shown for the operator.rolesarray de string — What the operator may do: admin, curator, moderator, drafter.daily_action_budgetinteger | null — An agent operator's budget: the audited actions it may take in a UTC day before its writes answer 429. Null when none is set; a human's is never checked.activeboolean — Whether the operator is switched on. False switches it off everywhere (403).created_atstring (date-time) — When the operator was created.account_idinteger — The account a human operator signs in with; absent when none is linked.
Errores
| Estado | Código | Cuándo |
|---|---|---|
| 400 | invalid_input | Malformed input (invalid_input). |
| 401 | unauthorized | unauthorized: the request does not say who makes it, or what it offers does not verify: no key or session where one is needed, or a password, a code, a passkey or a signed event that does not check. The message says what is missing. |
| 403 | forbidden | forbidden: the caller is known but may not do this: a key without the scope or the tier the action needs, a session without an npub, a second factor or a recent sign-in, an operator without the role or switched off, or a source that does not allow it. The message says which. |
| 429 | quota_exceeded | quota_exceeded: the caller's tier ran out of requests for the minute or the day. Retry-After says when to try again; every rate-limited answer carries X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset and X-RateLimit-Tier. While the deployment runs in log-only mode the decision is logged instead and X-RateLimit-Policy: log-only is set. |
Cada uno llega en el sobre de error único, y ninguno se guarda en caché: un error lleva Cache-Control: no-store.
Ejemplo
curl y jq, en cualquier shell.
curl -s -X POST https://api.btcintel.io/v1/ops/operators \
-H "Authorization: Bearer $BTCINTEL_KEY" \
-H 'Content-Type: application/json' \
-d '{"id":"…","kind":"human"}' | jqThis route needs an operator credential. Set BTCINTEL_KEY to the ops bearer or a btci_ key with the ops:agent scope first: the snippet reads it from there and holds no key.