API operational
Agents & tooling

SDKs & MCP

Build from the OpenAPI contract in six languages or give AI agents a smaller, safety-oriented tool surface.

01

Generated SDKs

PostGate generates clients for Node.js/TypeScript, Python, Go, Ruby, PHP, and .NET. Every OpenAPI operationId becomes a typed client operation, so the SDK and HTTP contract evolve together.
Regenerate from the contractPostGate API
pnpm sdk:generate
02

Use the live OpenAPI document

Import the OpenAPI 3.1 document into code generators, API clients, contract tests, or AI tooling. The runtime replaces the server origin with the deployed API URL.
Download schemaPostGate API
curl https://postgate.studio/openapi.json -o postgate-openapi.json
03

Account timezone

Choose the account IANA timezone in Settings → Workspace, or use PATCH /api/account/settings with an organization-scoped full key. Read it with GET /api/account/settings. MCP exposes get_account_settings and update_account_settings. Responses carry ISO timestamps with the account offset and time_context.timezone; agents should honor that offset and name the timezone when reporting activation times. Stored instants and existing schedule zones stay unchanged.
04

Connect an MCP client

The hosted MCP server exposes profile discovery, draft-first post creation, status, analytics, comments, replies, messages, deletion, and platform limits. It uses a PostGate API key in the Authorization: Bearer header. The JSON below is for HTTP MCP clients that take a key; connectors that sign in with OAuth only need the URL (next section).
MCP client configurationPostGate API
{
  "mcpServers": {
    "postgate": {
      "type": "http",
      "url": "https://postgate.studio/mcp",
      "headers": {
        "Authorization": "Bearer $POSTGATE_API_KEY"
      }
    }
  }
}
05

Claude, ChatGPT and other connectors (OAuth)

Connectors that support OAuth only need the server URL https://postgate.studio/mcp. They discover PostGate's sign-in automatically: you log in to PostGate, choose the workspace and allow access.

  1. Claude web and Desktop: Customize → Connectors → Add custom connector, enter the URL and choose Connect.
  2. ChatGPT: Settings → Apps & Connectors, enable developer mode under Advanced, then create a connector with the URL and OAuth authentication.
  3. Claude Code: run the command below, then type /mcp and pick postgate to sign in.

Each authorization creates a full-scope API key named after the client, listed under Developers → API keys. Revoke that key to disconnect the assistant. Only workspace owners and admins can authorize. Clients that cannot sign in can still send an API key as Authorization: Bearer, as shown above.

Claude CodePostGate API
claude mcp add --transport http postgate https://postgate.studio/mcp
How the sign-in works
PostGate implements OAuth 2.1 with PKCE and dynamic client registration, advertised from /.well-known/oauth-protected-resource. Authorization codes are single-use and expire after ten minutes.
06

Draft-first agent safety

The create_post tool creates a draft unless the call explicitly includes confirm: true. Give agents group-bound keys and the narrowest scopes compatible with their job.
Confirmation is part of the tool contract
Do not replace draft-first behavior with prompt-only instructions. The API boundary should keep enforcing the destructive choice.