Docs menuTool connectors

Tool connectors

GET /api/v1/tool-connectors

The user's tool connectors (outside services whose tools Postory's own chat uses for posts) with their tools and policies, and the catalog of services that can be connected. No token or tool description is answered. Free.

  • Scopepostory:read
  • Limit classREAD
  • Success200

Example

Request
curl https://postory.io/api/v1/tool-connectors \
  -H "Authorization: Bearer $POSTORY_API_KEY"
Response 200
{
  "connections": [
    {
      "connection_id": "<connection_id>",
      "slug": "notion",
      "name": "Notion",
      "status": "connected",
      "enabled": true,
      "auth_kind": "oauth",
      "scopes": "default",
      "tools": [
        {
          "name": "notion-search",
          "read_only": true,
          "destructive": false,
          "policy": "always",
          "changed": false
        },
        {
          "name": "notion-create-pages",
          "read_only": false,
          "destructive": false,
          "policy": "ask",
          "changed": false
        },
        {
          "name": "notion-update-page",
          "read_only": false,
          "destructive": true,
          "policy": "ask",
          "changed": false
        }
      ],
      "review": null,
      "last_error_code": null,
      "created_at": "2026-12-01T09:00:00+00:00"
    }
  ],
  "count": 1,
  "limit": 10,
  "catalog": [
    {
      "slug": "notion",
      "name": "Notion",
      "description": "Turn your notes, docs and content calendars into posts.",
      "connection_id": "<connection_id>"
    },
    {
      "slug": "canva",
      "name": "Canva",
      "description": "Find your designs and brand assets for a post.",
      "connection_id": null
    }
  ],
  "settings_url": "https://postory.io/settings/connectors",
  "acting_as": {"postory": "[email protected]", "plan": "free"}
}

Other responses

401

No API key, or an invalid or revoked one

403

The key lacks the scope, or access is paused

422

A request parameter is not valid

429

Rate limit spent; see Retry-After

PATCH /api/v1/tool-connectors/{connection_id}

Turn a tool connector on or off, set its tools' policies, or rename it; only what is sent changes, and a value already so is a success. A tool changed under review is approved in Postory's Settings → Connectors only.

  • Scopepostory:drafts
  • Limit classWRITE
  • Success200

Parameters

NameInTypeDescription
connection_idrequiredpathstring

A connection's connection_id from GET /tool-connectors.

Up to 36 characters

Request body

FieldTypeDescription
enabledboolean

false: Postory's chat does not use it.

namestring

What the user calls it.

Up to 80 characters
policiesobject

Tool name -> always (runs without asking), ask (the user approves each call) or off, for the tools named only. always on a tool that is not read_only: 403 tool_connector_policy_in_app_only; on a destructive one: 422 tool_connector_policy_locked.

Example

Request
curl -X PATCH "https://postory.io/api/v1/tool-connectors/<connection_id>" \
  -H "Authorization: Bearer $POSTORY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"enabled": false}'
Response 200
{
  "connection": {
    "connection_id": "<connection_id>",
    "slug": "notion",
    "name": "Notion",
    "status": "connected",
    "enabled": false,
    "auth_kind": "oauth",
    "scopes": "default",
    "tools": [
      {
        "name": "notion-search",
        "read_only": true,
        "destructive": false,
        "policy": "always",
        "changed": false
      },
      {
        "name": "notion-create-pages",
        "read_only": false,
        "destructive": false,
        "policy": "ask",
        "changed": false
      },
      {
        "name": "notion-update-page",
        "read_only": false,
        "destructive": true,
        "policy": "ask",
        "changed": false
      }
    ],
    "review": null,
    "last_error_code": null,
    "created_at": "2026-12-01T09:00:00+00:00"
  },
  "changed": ["enabled"],
  "acting_as": {"postory": "[email protected]", "plan": "free"}
}

Other responses

401

No API key, or an invalid or revoked one

403

The key lacks the scope, or access is paused

404

Not found, or not this user's

422

A request parameter is not valid

429

Rate limit spent; see Retry-After

DELETE /api/v1/tool-connectors/{connection_id}

Disconnect a tool connector: Postory revokes its sign-in at the service where it can (revoked_at_server) and deletes it with its tokens.

  • Scopepostory:drafts
  • Limit classDELETE
  • Success200

Parameters

NameInTypeDescription
connection_idrequiredpathstring

A connection's connection_id from GET /tool-connectors.

Up to 36 characters

Example

Request
curl -X DELETE "https://postory.io/api/v1/tool-connectors/<connection_id>" \
  -H "Authorization: Bearer $POSTORY_API_KEY"
Response 200
{
  "connection_id": "<connection_id>",
  "slug": "notion",
  "name": "Notion",
  "disconnected": true,
  "revoked_at_server": true,
  "acting_as": {"postory": "[email protected]", "plan": "free"}
}

Other responses

401

No API key, or an invalid or revoked one

403

The key lacks the scope, or access is paused

404

Not found, or not this user's

422

A request parameter is not valid

429

Rate limit spent; see Retry-After

GET /api/v1/tool-connectors/activity

Postory's chat's calls to the user's tool connectors and the connectors' events (connected, disconnected, tool_changed…), newest first; no arguments or results. Next page: offset = next_offset. Free.

  • Scopepostory:read
  • Limit classREAD
  • Success200

Parameters

NameInTypeDescription
limitqueryinteger

At most this many items, 1-100 (default 20).

Default: 20 · From 1 to 100
offsetqueryinteger

Items to skip: the previous page's next_offset.

Default: 0 · From 0 to 10000

Example

Request
curl https://postory.io/api/v1/tool-connectors/activity \
  -H "Authorization: Bearer $POSTORY_API_KEY"
Response 200
{
  "items": [
    {
      "type": "call",
      "id": "<call_id>",
      "connection_id": "<connection_id>",
      "connection_name": "Notion",
      "created_at": "2026-12-01T09:05:00+00:00",
      "tool": "notion-search",
      "kind": "read",
      "decision": "auto",
      "status": "ok",
      "duration_ms": 1322,
      "error_code": null
    },
    {
      "type": "event",
      "id": "<event_id>",
      "connection_id": "<connection_id>",
      "connection_name": "Notion",
      "created_at": "2026-12-01T09:00:00+00:00",
      "event": "connected"
    }
  ],
  "next_offset": null,
  "acting_as": {"postory": "[email protected]", "plan": "free"}
}

Other responses

401

No API key, or an invalid or revoked one

403

The key lacks the scope, or access is paused

422

A request parameter is not valid

429

Rate limit spent; see Retry-After