ONE meta-msg:drain
← Receivers

meta-msg:drain

meta-msg family

Send what the private-reply queue holds, per account at Meta's 750 an hour, oldest deadline first; drop each one past its 7-day deadline (or a Live comment after the broadcast ended) and count it as expired, each drop closing with warn. Answers what was sent, expired and still waiting, per account. Fired by the cron (platform caller only).

Effect
ask
Awaits an outcome — the call returns the response below.
Caller
platform
The class of authority the caller must already hold, decided from the attested context with no round trip.
Cost
free
What one call costs, so you can budget before acting.
Reversible
no
This cannot be undone. Dry-run it first where the contract allows.
Idempotent
no
Not safe to blind-retry — dedupe on the envelope idempotencyKey.
Version
1.0.0
Pin this to keep a contract stable; additive bumps never break callers.

Send it with your agent

One click hands your coding agent a prompt that registers the substrate, reads this contract, and makes the call. Launch opens the app; the others copy the prompt.

Claude Code
Codex
Cursor
Gemini CLI
Claude Desktop
ChatGPT
curl -X POST https://one.ie/api/ask/meta-msg:drain \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": {}}'

The key is never in a link. npx -y @oneie/cli login writes it to ~/.config/oneie/key on your machine.

Request

Validated before dispatch — an invalid payload is refused with the fix, never half-applied.

Takes no arguments.

Response

What comes back from the call.

  • ok boolean
  • sent number
  • expired number
  • remaining number Still queued after this tick (held by the hourly cap); the next tick sends them
  • failed number Rows given up on this tick after Meta refused them the maximum number of tries; each is kept with Meta's reason and closes with warn
  • byAccount object The same three counts, keyed by Page or Instagram account id
  • error string forbidden (not the platform) · no_db

Traffic

Every call to meta-msg:drain, counted where it is dispatched — over HTTP or in-process alike. Aggregate only — no actor, no payload, no workspace.

Counting…

Wiring

Every place in the open source that names meta-msg:drain, and the file that answers it. Read from the tree at build time — a receiver is reached by NAME through one door, so there is no import edge to follow and a grep is the honest shape of the question. Structure, not volume — the count is in Traffic above.

Called from

API route 2
  • one.ie/web/src/lib/receiver-index.generated.ts:303
  • one.ie/web/src/lib/resolvers/meta-inbound.ts:681
Agent runtime 1
  • channels/src/cron.ts:72
→

Answered by

meta-msg:drain one.ie/web/src/lib/resolvers/meta-inbound.ts:679 Dispatched through POST /api/ask/meta-msg:drain, after the envelope validates the payload.
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {}
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "sent": {
      "type": "number"
    },
    "expired": {
      "type": "number"
    },
    "remaining": {
      "description": "Still queued after this tick (held by the hourly cap); the next tick sends them",
      "type": "number"
    },
    "failed": {
      "description": "Rows given up on this tick after Meta refused them the maximum number of tries; each is kept with Meta's reason and closes with warn",
      "type": "number"
    },
    "byAccount": {
      "description": "The same three counts, keyed by Page or Instagram account id",
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {
        "type": "object",
        "properties": {
          "sent": {
            "type": "number"
          },
          "expired": {
            "type": "number"
          },
          "remaining": {
            "type": "number"
          }
        },
        "required": [
          "sent",
          "expired",
          "remaining"
        ]
      }
    },
    "error": {
      "description": "forbidden (not the platform) · no_db",
      "type": "string"
    }
  },
  "required": [
    "ok"
  ]
}