Add a labeler to the directory (ops, human admin or curator)
POST /v1/ops/community/labelers- quién puede llamarla
- Un operador
- una persona:
adminocurator - cuán reciente
- Nunca en caché
- cada respuesta lleva la altura del índice y la del nodo
- Herramienta MCP
- Ninguna
En esta página
A labeler is a pubkey whose NIP-32 labels readers may choose as a lens. Unlisted unless listed is true; no labeler is ever a default. Audited; the row keeps a changelog.
Parámetros
| Nombre | Dónde | Tipo | Obligatorio | Qué hace |
|---|---|---|---|---|
pubkey | cuerpo | string | obligatorio | 64 hex characters or an npub1… id. |
name | cuerpo | string | obligatorio | The labeler's name, 1 to 120 characters once trimmed. Required. |
description | cuerpo | string | opcional | What the labeler does, at most 1,000 characters. |
url | cuerpo | string | opcional | The labeler's site, an http(s) URL. |
criteria_url | cuerpo | string | opcional | Where the labeler states its criteria, an http(s) URL. |
listed | cuerpo | boolean | opcional | Whether the directory lists the labeler: unlisted unless this says otherwise. |
El cuerpo es application/json.
esquema LabelerBody
pubkeystring obligatorio — 64 hex characters or an npub1… id.namestring obligatorio — The labeler's name, 1 to 120 characters once trimmed. Required. · como mucho 120 caracteresdescriptionstring — What the labeler does, at most 1,000 characters. · como mucho 1000 caracteresurlstring (uri) — The labeler's site, an http(s) URL.criteria_urlstring (uri) — Where the labeler states its criteria, an http(s) URL.listedboolean — Whether the directory lists the labeler: unlisted unless this says otherwise. · por defecto false
Qué responde
201 · application/json
The directory entry.
| Campo | Tipo | Qué lleva |
|---|---|---|
pubkey | string | The labeler's public key, 64 hex. |
npub | string o null | That key as an npub (NIP-19). Null when it does not encode. |
name | string | The labeler's name in the directory. |
namespace | string | io.btcintel. |
description | string o null | What the labeler does. Null when the directory says nothing. |
url | string o null | The labeler's site. Null when it has none. |
criteria_url | string o null | Where the labeler explains its criteria. |
listed | boolean | Shown in the public directory. |
added_by | string o null | Who added it to the directory. |
added_at | string | When it was added. |
esquema Labeler
pubkeystring obligatorio — The labeler's public key, 64 hex.npubstring | null — That key as an npub (NIP-19). Null when it does not encode.namestring obligatorio — The labeler's name in the directory.namespacestring obligatorio —io.btcintel.descriptionstring | null — What the labeler does. Null when the directory says nothing.urlstring | null (uri) — The labeler's site. Null when it has none.criteria_urlstring | null (uri) — Where the labeler explains its criteria.listedboolean obligatorio — Shown in the public directory.added_bystring | null — Who added it to the directory.added_atstring (date-time) obligatorio — When it was added.
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/community/labelers \
-H "Authorization: Bearer $BTCINTEL_KEY" \
-H 'Content-Type: application/json' \
-d '{"pubkey":"…","name":"…"}' | 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.