wakato-io Agent Mail API
The Agent Mail API from wakato-io — 7 operation(s) for agent mail.
The Agent Mail API from wakato-io — 7 operation(s) for agent mail.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/wakato-io:wakato-io-agent-mail-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Wakato Space Agent Mail API
version: 1.0.0
description: 'The **Wakato Space API** lets an external agent or tool (Claude Code, Cursor,
Zapier, a partner integration, your own scripts) operate a single Wakato
**Space** using a scoped Bearer token (a *Space API key*, `wks_live_…`).
The **same token** works two ways:
- **REST** — the endpoints documented here (`/functions/v1/space-api/…`).
- **MCP** — a Model Context Protocol server at `/functions/v1/space-mcp`
that exposes the same operations as tools to MCP clients. MCP clients
self-discover the tools via `tools/list`; see the Quickstart to connect.
### Authentication
Send the key as a Bearer token: `Authorization: Bearer wks_live_…`.
A key is locked to exactly one Space and cannot read or write any other
Space, the wallet (beyond read), member permissions, or other users.
### Scopes
Every key grants per-domain scopes with up to three actions:
- `read` — list / inspect
- `write` — create / edit
- `run` — the *consequential* action (publish a page, send an SMS, post
socially, run an automation). Public/billable actions are deliberately
split into `run` so you grant them explicitly.
Each operation below notes its required scope via `x-required-scope`.
A call without the scope returns `403`.
### Safety model
- Wallet, Finance, Integrations are **read-only**. Money is never moved.
- Secrets returns **names only** — values are never exposed.
- Social posts and ad campaigns default to **drafts**; going live requires
the `run` scope. Connecting new OAuth accounts is never done by a key.'
servers:
- url: https://api.wakato.io/functions/v1/space-api
description: Production
- url: https://pnwxrleocjbcvrrwrycq.supabase.co/functions/v1/space-api
description: Development
security:
- bearerAuth: []
tags:
- name: Agent Mail
paths:
/agent-mail/send:
post:
tags:
- Agent Mail
summary: Send email from a space agent-mail address
x-required-scope: agent_mail:write
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- from_address_id
- to
- subject
properties:
from_address_id:
type: string
to:
oneOf:
- type: string
- type: array
items:
type: string
subject:
type: string
body_html:
type: string
body_text:
type: string
responses:
'200':
$ref: '#/components/responses/Ok'
description: '**Required scope:** `agent_mail:write`'
x-codeSamples:
- lang: bash
label: cURL
source: "curl -X POST \"https://api.wakato.io/functions/v1/space-api/agent-mail/send\" \\\n -H \"Authorization: Bearer wks_live_YOUR_TOKEN\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"from_address_id\": \"b7e4a1c2-9d3f-4e8a-b2c1-5f6d7e8a9b0c\",\n \"to\": \"example\",\n \"subject\": \"example\"\n}'"
operationId: postAgentMailSend
x-operation-id-source: derived
/agent-mail/addresses:
get:
tags:
- Agent Mail
summary: List email addresses assigned to this space (campaign senders)
x-required-scope: agent_mail:read
responses:
'200':
$ref: '#/components/responses/Ok'
description: '**Required scope:** `agent_mail:read`'
x-codeSamples:
- lang: bash
label: cURL
source: "curl -X GET \"https://api.wakato.io/functions/v1/space-api/agent-mail/addresses\" \\\n -H \"Authorization: Bearer wks_live_YOUR_TOKEN\""
operationId: getAgentMailAddresses
x-operation-id-source: derived
/agent-mail/campaigns:
get:
tags:
- Agent Mail
summary: List email campaigns
x-required-scope: agent_mail:read
parameters:
- in: query
name: status
schema:
type: string
- in: query
name: limit
schema:
type: integer
default: 50
maximum: 200
responses:
'200':
$ref: '#/components/responses/Ok'
description: '**Required scope:** `agent_mail:read`'
x-codeSamples:
- lang: bash
label: cURL
source: "curl -X GET \"https://api.wakato.io/functions/v1/space-api/agent-mail/campaigns\" \\\n -H \"Authorization: Bearer wks_live_YOUR_TOKEN\""
operationId: getAgentMailCampaigns
x-operation-id-source: derived
post:
tags:
- Agent Mail
summary: Create a DRAFT email campaign (broadcast or drip)
description: '**Required scope:** `agent_mail:write`
Drafting never requires a connected email address — from_address_id is optional and the campaign stays a draft until one is set. Sending is a separate run-scoped action. For drips pass ordered steps.'
x-required-scope: agent_mail:write
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- name
properties:
name:
type: string
campaign_type:
type: string
enum:
- broadcast
- drip
default: broadcast
subject:
type: string
body_text:
type: string
body_html:
type: string
from_address_id:
type: string
audience_id:
type: string
template_id:
type: string
enrollment_mode:
type: string
enum:
- one_shot
- continuous
trigger_audience_id:
type: string
steps:
type: array
description: Drip steps in order
items:
type: object
properties:
delay_minutes:
type: integer
subject:
type: string
body_text:
type: string
body_html:
type: string
template_id:
type: string
responses:
'201':
$ref: '#/components/responses/Created'
x-codeSamples:
- lang: bash
label: cURL
source: "curl -X POST \"https://api.wakato.io/functions/v1/space-api/agent-mail/campaigns\" \\\n -H \"Authorization: Bearer wks_live_YOUR_TOKEN\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"name\": \"Launch plan\"\n}'"
operationId: postAgentMailCampaigns
x-operation-id-source: derived
/agent-mail/campaigns/{id}:
parameters:
- in: path
name: id
required: true
schema:
type: string
get:
tags:
- Agent Mail
summary: Get an email campaign (incl. drip steps)
x-required-scope: agent_mail:read
responses:
'200':
$ref: '#/components/responses/Ok'
description: '**Required scope:** `agent_mail:read`'
x-codeSamples:
- lang: bash
label: cURL
source: "curl -X GET \"https://api.wakato.io/functions/v1/space-api/agent-mail/campaigns/b7e4a1c2-9d3f-4e8a-b2c1-5f6d7e8a9b0c\" \\\n -H \"Authorization: Bearer wks_live_YOUR_TOKEN\""
operationId: getAgentMailCampaignsById
x-operation-id-source: derived
patch:
tags:
- Agent Mail
summary: Update a draft/paused/scheduled email campaign
description: '**Required scope:** `agent_mail:write`
Passing steps REPLACES all drip steps.'
x-required-scope: agent_mail:write
requestBody:
content:
application/json:
schema:
type: object
responses:
'200':
$ref: '#/components/responses/Ok'
x-codeSamples:
- lang: bash
label: cURL
source: "curl -X PATCH \"https://api.wakato.io/functions/v1/space-api/agent-mail/campaigns/b7e4a1c2-9d3f-4e8a-b2c1-5f6d7e8a9b0c\" \\\n -H \"Authorization: Bearer wks_live_YOUR_TOKEN\" \\\n -H \"Content-Type: application/json\" \\\n -d '{}'"
operationId: patchAgentMailCampaignsById
x-operation-id-source: derived
/agent-mail/campaigns/{id}/send:
post:
tags:
- Agent Mail
summary: Send/start an email campaign (consequential)
description: '**Required scope:** `agent_mail:run`
Broadcast: schedules the send (scheduled_at defaults to now). Drip: starts the sequence. Requires a sender address, an audience, and content on the campaign.'
x-required-scope: agent_mail:run
parameters:
- in: path
name: id
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
properties:
scheduled_at:
type: string
description: ISO; omit to send ASAP
responses:
'202':
$ref: '#/components/responses/Ok'
x-codeSamples:
- lang: bash
label: cURL
source: "curl -X POST \"https://api.wakato.io/functions/v1/space-api/agent-mail/campaigns/b7e4a1c2-9d3f-4e8a-b2c1-5f6d7e8a9b0c/send\" \\\n -H \"Authorization: Bearer wks_live_YOUR_TOKEN\" \\\n -H \"Content-Type: application/json\" \\\n -d '{}'"
operationId: postAgentMailCampaignsByIdSend
x-operation-id-source: derived
/agent-mail/templates:
get:
tags:
- Agent Mail
summary: List email templates
x-required-scope: agent_mail:read
responses:
'200':
$ref: '#/components/responses/Ok'
description: '**Required scope:** `agent_mail:read`'
x-codeSamples:
- lang: bash
label: cURL
source: "curl -X GET \"https://api.wakato.io/functions/v1/space-api/agent-mail/templates\" \\\n -H \"Authorization: Bearer wks_live_YOUR_TOKEN\""
operationId: getAgentMailTemplates
x-operation-id-source: derived
post:
tags:
- Agent Mail
summary: Create an email template (designed HTML or plain text)
x-required-scope: agent_mail:write
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- name
properties:
name:
type: string
kind:
type: string
enum:
- html
- plain_text
default: html
subject:
type: string
body_html:
type: string
description: Required for kind html
body_text:
type: string
description: Required for kind plain_text
description:
type: string
category:
type: string
variables:
type: array
items:
type: object
responses:
'201':
$ref: '#/components/responses/Created'
description: '**Required scope:** `agent_mail:write`'
x-codeSamples:
- lang: bash
label: cURL
source: "curl -X POST \"https://api.wakato.io/functions/v1/space-api/agent-mail/templates\" \\\n -H \"Authorization: Bearer wks_live_YOUR_TOKEN\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"name\": \"Launch plan\"\n}'"
operationId: postAgentMailTemplates
x-operation-id-source: derived
/agent-mail/templates/{id}:
parameters:
- in: path
name: id
required: true
schema:
type: string
get:
tags:
- Agent Mail
summary: Get an email template
x-required-scope: agent_mail:read
responses:
'200':
$ref: '#/components/responses/Ok'
description: '**Required scope:** `agent_mail:read`'
x-codeSamples:
- lang: bash
label: cURL
source: "curl -X GET \"https://api.wakato.io/functions/v1/space-api/agent-mail/templates/b7e4a1c2-9d3f-4e8a-b2c1-5f6d7e8a9b0c\" \\\n -H \"Authorization: Bearer wks_live_YOUR_TOKEN\""
operationId: getAgentMailTemplatesById
x-operation-id-source: derived
patch:
tags:
- Agent Mail
summary: Update an email template
x-required-scope: agent_mail:write
requestBody:
content:
application/json:
schema:
type: object
responses:
'200':
$ref: '#/components/responses/Ok'
description: '**Required scope:** `agent_mail:write`'
x-codeSamples:
- lang: bash
label: cURL
source: "curl -X PATCH \"https://api.wakato.io/functions/v1/space-api/agent-mail/templates/b7e4a1c2-9d3f-4e8a-b2c1-5f6d7e8a9b0c\" \\\n -H \"Authorization: Bearer wks_live_YOUR_TOKEN\" \\\n -H \"Content-Type: application/json\" \\\n -d '{}'"
operationId: patchAgentMailTemplatesById
x-operation-id-source: derived
components:
responses:
Ok:
description: Success
content:
application/json:
schema:
type: object
Created:
description: Created
content:
application/json:
schema:
type: object
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: A Space API key, e.g. `wks_live_…`.