ONE ads:account
← Receivers

ads:account

ads family

chatmcp

Read or choose the ad account every push for a workspace lands in. With no accountId: the chosen account and the accounts the workspace's connection can see (LinkedIn and TikTok: the accounts its own token reaches). With accountId: choose it (Meta, LinkedIn and TikTok also need pageId, the voice the ads run as); an id the connection cannot see is refused account_not_visible

Effect
ask
Awaits an outcome — the call returns the response below.
Caller
manage_integrations
The class of authority the caller must already hold, decided from the attested context with no round trip.
Authority action
manage_integrations
Also gated per node — the caller must be permitted this action over the workspace it names.
Cost
free
What one call costs, so you can budget before acting.
Reversible
yes
The effect can be undone by a later call.
Idempotent
yes
Safe to retry as-is.
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/ads:account \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "workspace": "acme", "platform": "meta" }}'

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.

  • workspace string required Workspace (group slug). The caller must manage its integrations
  • platform meta | google | linkedin | tiktok required
  • accountId string optional Omit to read. Meta: act_<digits> or the digits. Google: the 10-digit customer id, dashes allowed. LinkedIn: urn:li:sponsoredAccount:<n> or the digits. TikTok: the advertiser_id
  • pageId string optional Required with accountId for Meta (the Facebook Page id), LinkedIn (the organization, urn:li:organization:<n> or the digits) and TikTok (the identity_id): who the ads run as. Not used by Google
  • loginCustomerId string optional Google only: the manager (MCC) customer id, when the account sits under one

Response

What comes back from the call.

  • ok boolean
  • platform string
  • chosen any Read: the chosen account row, or null
  • accounts any[] Read: the accounts the connection can see
  • listError string Read: why the visible accounts could not be listed — the list is then empty because unread, not because there are none
  • accountId string
  • pageId string | null
  • loginCustomerId string | null
  • error string forbidden | unavailable | account_id_malformed | page_id_required | organization_id_required | identity_id_required | login_customer_id_malformed | account_list_unavailable | account_not_visible | login_customer_not_visible | no_db
  • reason string

Traffic

Every call to ads:account, 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 ads:account, 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 1
  • one.ie/web/src/lib/receiver-index.generated.ts:20
CLI 1
  • packages/cli/src/ads.ts:263
→

Answered by

ads:account one.ie/web/src/lib/resolvers/ads.ts:117 Dispatched through POST /api/ask/ads:account, after the envelope validates the payload.
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "workspace": {
      "type": "string",
      "description": "Workspace (group slug). The caller must manage its integrations"
    },
    "platform": {
      "type": "string",
      "enum": [
        "meta",
        "google",
        "linkedin",
        "tiktok"
      ]
    },
    "accountId": {
      "description": "Omit to read. Meta: act_<digits> or the digits. Google: the 10-digit customer id, dashes allowed. LinkedIn: urn:li:sponsoredAccount:<n> or the digits. TikTok: the advertiser_id",
      "type": "string"
    },
    "pageId": {
      "description": "Required with accountId for Meta (the Facebook Page id), LinkedIn (the organization, urn:li:organization:<n> or the digits) and TikTok (the identity_id): who the ads run as. Not used by Google",
      "type": "string"
    },
    "loginCustomerId": {
      "description": "Google only: the manager (MCC) customer id, when the account sits under one",
      "type": "string"
    }
  },
  "required": [
    "workspace",
    "platform"
  ]
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "platform": {
      "type": "string"
    },
    "chosen": {
      "description": "Read: the chosen account row, or null"
    },
    "accounts": {
      "description": "Read: the accounts the connection can see",
      "type": "array",
      "items": {}
    },
    "listError": {
      "description": "Read: why the visible accounts could not be listed — the list is then empty because unread, not because there are none",
      "type": "string"
    },
    "accountId": {
      "type": "string"
    },
    "pageId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "loginCustomerId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "error": {
      "description": "forbidden | unavailable | account_id_malformed | page_id_required | organization_id_required | identity_id_required | login_customer_id_malformed | account_list_unavailable | account_not_visible | login_customer_not_visible | no_db",
      "type": "string"
    },
    "reason": {
      "type": "string"
    }
  },
  "additionalProperties": {}
}