mcp
v0.1.1Form backend that routes: one tool per Postbag API operation, plus quickstart and explain.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
auth_providers
Which sign-in methods this instance has configured Public, unauthenticated — no API key needed. Email+password is always available. `social` lists only the OAuth providers this instance has both a client id and secret for (self-host parity: a self-hosted instance with neither configured returns an empty list). The dashboard calls this once, cached, to decide which social sign-in buttons to render.
auth_request_code
Email a 6-digit sign-in code (step 1 of agent onboarding without a browser) Public, unauthenticated. Sends a 6-digit code good for 10 minutes to the given address. Always 200 for a well-formed email, whether or not an account exists — this endpoint never confirms or denies an account's existence. Rate limited per email and per client IP. The human reads the code out of their inbox and gives it to the agent, which calls POST /v1/auth/verify-code next.
| Parameter | Type | Description |
|---|---|---|
email * | string | Lowercased and trimmed before use. Always 200s for a well-formed address. |
auth_verify_code
Verify a code and mint an API key (step 2 of agent onboarding without a browser) Public, unauthenticated. Verifies the code sent by POST /v1/auth/request-code and, on success, mints an API key through the same path POST /v1/api-keys uses — default scope manage. A new email provisions a personal organization first, exactly like every other sign-up path. An existing user's key is minted against their personal organization (the one they own, oldest first, if they belong to several). This does not set a session cookie — it mints a key, it does not log a browser in.
| Parameter | Type | Description |
|---|---|---|
code * | string | The 6-digit code from the email. |
email * | string | |
key_name | string | Defaults to "agent · <YYYY-MM-DD>". |
scopes | array |
me_get
Identify the caller and summarise the organization The first call an agent holding only an API key should make: who it is, which org, which scopes the key has, plan limits and usage, and what already exists (counts). Call this before anything else.
api_keys_list
List API keys for the active organization Prefixes only — full key values are never returned again after creation.
api_keys_create
Create an API key for the active organization (session only) Requires a signed-in dashboard session, not another API key — an agent cannot mint its own first key this way. The full key is only ever returned once, in this response; store it immediately.
| Parameter | Type | Description |
|---|---|---|
name | string | A label to tell keys apart, e.g. 'CI deploy key'. |
scopes | array | manage ⊇ read ⊇ submit — a manage key satisfies every read- or submit-scoped call too. |
api_keys_revoke
Delete an API key Revokes the key immediately; any client still using it starts getting 401s.
| Parameter | Type | Description |
|---|---|---|
id * | string | The API key id (not the key value itself). |
quickstart
One call to a working, routed form Creates (idempotently, by name within project) the project if missing, the form, a destination for whichever of notify_email/telegram/webhook was given, and a direct route, then returns the form, an embeddable snippet, a curl command to verify delivery, and next steps. Everything it does is also available as individual calls (POST /v1/forms, /v1/destinations, /v1/routes); this is a convenience, not a special path.
| Parameter | Type | Description |
|---|---|---|
name * | string | |
notify_email | string | |
origin | string | |
project | string | |
redirect_url | string | |
tags | array | |
telegram | object | |
webhook | object |
projects_list
List projects
| Parameter | Type | Description |
|---|---|---|
cursor | string | |
limit | integer |
projects_create
Create a project A project groups forms — one per site or app. Pass `if_exists: "return"` to make this call safe to re-run.
| Parameter | Type | Description |
|---|---|---|
if_exists | string | |
name | string | |
slug | string | |
tags | array |
projects_get
Get a project
| Parameter | Type | Description |
|---|---|---|
projectId * | string |
projects_update
Update a project
| Parameter | Type | Description |
|---|---|---|
projectId * | string | |
if_exists | string | |
name | string | |
slug | string | |
tags | array |
projects_delete
Delete an empty project Fails with 409 while the project still has forms — delete or move them first.
| Parameter | Type | Description |
|---|---|---|
projectId * | string |
forms_list
List forms
| Parameter | Type | Description |
|---|---|---|
cursor | string | |
limit | integer | |
project | string | Filter to one project id. |
stream | string | Filter to forms attached to this stream id. |
tag | string | Filter to forms carrying this tag. |
forms_create
Create a form Pass `from_template` (a stream id) to attach the new form to that stream with a schema copied 1:1 from it, so the mapping is trivially complete. Pass `if_exists: "return"` to make this call safe to re-run.
| Parameter | Type | Description |
|---|---|---|
from_template | string | |
if_exists | string | |
name | string | |
project | string | |
schema | object | |
schema_mode | string | |
settings | object | |
slug | string | |
status | string | |
tags | array |
forms_get
Get a form
| Parameter | Type | Description |
|---|---|---|
formId * | string |
forms_update
Update a form
| Parameter | Type | Description |
|---|---|---|
formId * | string | |
from_template | string | |
if_exists | string | |
name | string | |
project | string | |
schema | object | |
schema_mode | string | |
settings | object | |
slug | string | |
status | string | |
tags | array |
forms_delete
Delete a form
| Parameter | Type | Description |
|---|---|---|
formId * | string |
forms_embed
Embed snippets Ready-to-paste HTML, fetch, React, Astro and Next.js server-action snippets for this form's submit URL.
| Parameter | Type | Description |
|---|---|---|
formId * | string |
forms_schema_get
Current schema version For observe-mode forms with no published version yet, falls back to the last inferred draft (marked `inferred: true`) if one exists; publishing is still a separate, explicit act.
| Parameter | Type | Description |
|---|---|---|
formId * | string |
forms_schema_publish
Publish a new schema version Schemas are immutable versions — this always creates version N+1, never mutates an existing one.
| Parameter | Type | Description |
|---|---|---|
formId * | string | |
json_schema * | object | JSON Schema draft 2020-12 describing the submission data. `required` drives drift detection and mapping completeness. |
changelog | string | A short human note on what changed in this version, shown in the version history. |
ui | object | Per-field rendering hints keyed by field name (label, placeholder, widget, options, order) — used to render embed snippets. |
forms_schema_versions
All schema versions
| Parameter | Type | Description |
|---|---|---|
formId * | string |
forms_schema_infer
Infer a draft schema now, from recent submissions (observe mode, no schema yet) Only for observe-mode forms with no published schema. Looks at recent non-spam submissions and produces a draft schema; call forms_schema_publish with the result (or an edited version of it) to make it real.
| Parameter | Type | Description |
|---|---|---|
formId * | string |
forms_drift
Unresolved drift events Fields submitters are sending that the published schema doesn't declare. Resolve by publishing an updated schema.
| Parameter | Type | Description |
|---|---|---|
formId * | string |
forms_submissions_list
List submissions for a form
| Parameter | Type | Description |
|---|---|---|
formId * | string | |
cursor | string | |
limit | integer | |
q | string | Free-text search over submission data. |
since | string | ISO timestamp; only submissions received after this. |
status | string | Filter by status: received, quarantined or spam. |
submissions_list
Search submissions across the organization
| Parameter | Type | Description |
|---|---|---|
cursor | string | |
form | string | Filter to one form id. |
limit | integer | |
q | string | Free-text search over submission data. |
status | string | Filter by status: received, quarantined or spam. |
stream | string | Filter to submissions routed through this stream id. |
submissions_get
Get a submission with its deliveries
| Parameter | Type | Description |
|---|---|---|
submissionId * | string |
submissions_update
Change status (re-routes if moving to received) Moving a quarantined submission to `received` re-runs routing and queues deliveries for it.
| Parameter | Type | Description |
|---|---|---|
status * | string | |
submissionId * | string |
submissions_delete
Delete permanently (GDPR) Irreversible. Use for data-subject deletion requests; deliveries already sent are unaffected.
| Parameter | Type | Description |
|---|---|---|
submissionId * | string |
streams_list
List streams
| Parameter | Type | Description |
|---|---|---|
cursor | string | |
limit | integer |
streams_create
Create a stream (optionally with its first schema version and sources) A stream (shown as 'Bag' in the dashboard) fans one canonical schema in from many forms.
| Parameter | Type | Description |
|---|---|---|
if_exists | string | |
name | string | |
schema | object | |
slug | string | |
sources | array |
streams_get
Get a stream with schema, sources, mapping status and routes
| Parameter | Type | Description |
|---|---|---|
streamId * | string |
streams_update
Update name/slug
| Parameter | Type | Description |
|---|---|---|
streamId * | string | |
if_exists | string | |
name | string | |
schema | object | |
slug | string | |
sources | array |
streams_delete
Delete a stream
| Parameter | Type | Description |
|---|---|---|
streamId * | string |
streams_schema_get
Current stream schema
| Parameter | Type | Description |
|---|---|---|
streamId * | string |
streams_schema_publish
Publish a new stream schema version Schemas are immutable versions — this always creates version N+1. Re-validates every attached source's mapping against the new schema and returns the updated mapping statuses alongside it.
| Parameter | Type | Description |
|---|---|---|
json_schema * | object | JSON Schema draft 2020-12 describing the submission data. `required` drives drift detection and mapping completeness. |
streamId * | string | |
changelog | string | A short human note on what changed in this version, shown in the version history. |
ui | object | Per-field rendering hints keyed by field name (label, placeholder, widget, options, order) — used to render embed snippets. |
streams_sources_list
List sources and their mapping status
| Parameter | Type | Description |
|---|---|---|
streamId * | string |
streams_sources_add
Attach a form or selector with a mapping Fails 422 mapping_incomplete (with the missing fields listed) if the mapping does not cover every field the stream's current schema requires — a form can't join a stream it can't feed.
| Parameter | Type | Description |
|---|---|---|
streamId * | string | |
form_id | string | The form feeding this stream (mutually exclusive with `selector` in principle, though only one source kind is currently supported). |
mapping | object | Keyed by the stream schema's field names. Each entry is exactly one of `from` (copy a field from the form's data), `const` (a fixed value) or `expr` (a JSONata expression), plus an optional `default`.… |
selector | string | Reserved for non-form sources (not yet implemented). |
streams_sources_update
Update the mapping
| Parameter | Type | Description |
|---|---|---|
sourceId * | string | |
streamId * | string | |
form_id | string | The form feeding this stream (mutually exclusive with `selector` in principle, though only one source kind is currently supported). |
mapping | object | Keyed by the stream schema's field names. Each entry is exactly one of `from` (copy a field from the form's data), `const` (a fixed value) or `expr` (a JSONata expression), plus an optional `default`.… |
selector | string | Reserved for non-form sources (not yet implemented). |
streams_sources_remove
Detach
| Parameter | Type | Description |
|---|---|---|
sourceId * | string | |
streamId * | string |
streams_preview
Run a sample submission through a source's mapping Dry-runs a form's attached mapping against sample data without storing anything — useful before publishing a schema change.
| Parameter | Type | Description |
|---|---|---|
data * | object | Sample submission data to map through. |
form_id * | string | The form whose attached mapping to run. |
streamId * | string |
destinations_list
List destinations (secrets redacted)
| Parameter | Type | Description |
|---|---|---|
cursor | string | |
limit | integer |
destinations_create
Create a destination type is one of email, telegram, webhook, slack, discord; config shape depends on type. Call destinations_test after creating to verify it works.
| Parameter | Type | Description |
|---|---|---|
body * |
destinations_get
Get a destination (secrets redacted)
| Parameter | Type | Description |
|---|---|---|
destinationId * | string |
destinations_update
Update config
| Parameter | Type | Description |
|---|---|---|
destinationId * | string | |
config | object | Merged shallowly into the existing config (type-specific: to/cc for email, chat_id/bot_token for telegram, url/secret for webhook). |
name | string | A display label for this destination. |
destinations_delete
Delete (fails if routes reference it) Fails with 409 while a route still points at this destination — delete or repoint those routes first.
| Parameter | Type | Description |
|---|---|---|
destinationId * | string |
destinations_test
Send a sample payload now and return the provider response Verifies a destination is actually reachable and configured correctly — do this right after creating one, before wiring routes to it.
| Parameter | Type | Description |
|---|---|---|
destinationId * | string | |
sample | object | Override the default sample payload sent for the test. |
routes_list
List routes
| Parameter | Type | Description |
|---|---|---|
cursor | string | |
destination | string | Filter to routes pointing at this destination id. |
form | string | Filter to routes whose source is this form id. |
limit | integer | |
stream | string | Filter to routes whose source is this stream id. |
routes_create
Create a route (source is exactly one of form_id / stream_id) A route ties one source (a form or a stream) to one destination, with a mode (instant or digest) and optional filter/transform/quality rules.
| Parameter | Type | Description |
|---|---|---|
destination_id * | string | |
enabled | boolean | |
filter | string | |
form_id | string | |
mode | ||
quality | object | |
stream_id | string | |
transform | string | |
window | object |
routes_get
Get a route
| Parameter | Type | Description |
|---|---|---|
routeId * | string |
routes_update
Update rules / enable / disable
| Parameter | Type | Description |
|---|---|---|
routeId * | string | |
enabled | boolean | Disable a route without deleting it. |
filter | string | A JSONata boolean expression; only matching submissions are delivered. |
mode | object | instant delivers as submissions arrive; digest batches into one payload per period. |
quality | object | Defaults to excluding spam and quarantined submissions from delivery. |
transform | string | A JSONata expression applied to the payload before delivery. |
window | object | Only deliver submissions received in this ISO datetime range. |
routes_delete
Delete a route
| Parameter | Type | Description |
|---|---|---|
routeId * | string |
deliveries_list
List deliveries (the outbox) A submission is a row before it is anything else; delivery is this outbox drained by a worker. Poll here to confirm a submission actually arrived at its destination.
| Parameter | Type | Description |
|---|---|---|
cursor | string | |
destination | string | Filter to one destination id. |
limit | integer | |
route | string | Filter to one route id. |
status | string | Filter by status: pending, sending, sent, failed, dead or skipped. |
submission | string | Filter to one submission id. |
deliveries_get
Get a delivery with payload snapshot and last response
| Parameter | Type | Description |
|---|---|---|
deliveryId * | string |
deliveries_retry
Re-snapshot the payload against current mapping/transform and queue again Use after fixing a destination's config or a stream's mapping so a `failed` or `dead` delivery gets another chance.
| Parameter | Type | Description |
|---|---|---|
deliveryId * | string |
events_list
Organization event log Every notable thing that happened in this org — form.created, form.schema.changed, stream.schema.changed, submission.received, and more. System webhooks (below) are just subscriptions to this same log.
| Parameter | Type | Description |
|---|---|---|
cursor | string | |
limit | integer | |
since | string | ISO timestamp; only events after this. |
type | string | Filter to one event type, e.g. 'submission.received'. |
webhooks_list
List system webhooks System webhooks notify an external system when org events happen (not to be confused with a webhook destination, which delivers submissions).
webhooks_create
Subscribe a URL to event types Every delivery is signed with the returned (or supplied) secret so the receiver can verify authenticity.
| Parameter | Type | Description |
|---|---|---|
events * | array | |
url * | string | |
enabled | boolean | |
secret | string |
webhooks_update
Update a system webhook
| Parameter | Type | Description |
|---|---|---|
webhookId * | string | |
enabled | boolean | |
events | array | |
secret | string | |
url | string |
webhooks_delete
Delete a system webhook
| Parameter | Type | Description |
|---|---|---|
webhookId * | string |
webhooks_deliveries
Delivery history for a system webhook
| Parameter | Type | Description |
|---|---|---|
webhookId * | string | |
cursor | string | |
limit | integer |
health_get
Liveness and readiness Public, unauthenticated. Reports database connectivity, worker heartbeat and the oldest pending delivery age.
postbag_quickstart
The one call to make first when setting up a new form: creates (idempotently, by name within project) the project if missing, the form, a destination for whichever of notify_email/telegram/webhook you pass, and a direct route between them — a working, routed form in a single call. Everything it does is also available as individual tools (forms_create, destinations_create, routes_create) if you need more control; this is a convenience, not a special path. The response's "next" array lists ready-to-use follow-up calls (e.g. adding a second destination), and "verify" gives you a test submissio…
| Parameter | Type | Description |
|---|---|---|
name * | string | |
notify_email | string | |
origin | string | |
project | string | |
redirect_url | string | |
tags | array | |
telegram | object | |
webhook | object |
postbag_explain
Returns Postbag's agent onboarding guide (the same content as GET /llms.txt): what Postbag is, the vocabulary (Form, Submission, Stream, Destination, Route, Delivery), and the handful of calls that matter. Call this first, before anything else, if you are not already familiar with Postbag — then call postbag_quickstart to create a working form.