Postfleet Domains API
Custom sending-domain management (account-plane, paid plan).
Custom sending-domain management (account-plane, paid plan).
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/postfleet-ai:postfleet-ai-domains-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. 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: Postfleet Domains API
version: 1.0.0
description: Hand-authored OpenAPI description of the Postfleet `/api/v1/**` REST surface. Every path, method, status code, request field, and error `code` is transcribed from the shipped route handlers under `src/app/api/v1/`; a drift test asserts this file stays in sync with the code. All endpoints authenticate with a bearer `pf_` API key. This spec documents shipped behavior only — see the `/docs` pages for narrative guides and current limitations.
servers:
- url: /
description: Same-origin (relative). Prefix every path with your deployment origin, e.g. https://your-app.example.com
security:
- bearerAuth: []
tags:
- name: Domains
description: Custom sending-domain management (account-plane, paid plan).
paths:
/api/v1/domains:
post:
operationId: createDomain
tags:
- Domains
summary: Add a custom sending domain
description: Registers a custom domain with the provider and returns the DNS records to add. Account-plane, paid plan only. Returns `200` (not `201`).
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
name:
type: string
description: Domain name, e.g. mail.example.com.
required:
- name
additionalProperties: false
responses:
'200':
description: Domain registered; add the returned DNS records to verify it.
content:
application/json:
schema:
$ref: '#/components/schemas/DomainCreated'
'400':
description: Invalid domain name.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error: invalid domain name
'401':
$ref: '#/components/responses/Unauthorized'
'403':
description: Mailbox-bound key (`code:key_scope`), custom domains require a paid plan, or the email provider has reached its domain cap (`code:provider_domain_limit`; not the Postfleet $20 plan).
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/KeyScopeError'
- $ref: '#/components/schemas/ProviderDomainLimitError'
- $ref: '#/components/schemas/Error'
'409':
description: Domain already registered with Postfleet or the email provider.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'502':
description: Email provider rejected the name for a reason other than already-registered or domain cap.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'503':
description: Email provider is not configured.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
get:
operationId: listDomains
tags:
- Domains
summary: List custom domains
description: Lists this account's custom domains. Account-plane.
responses:
'200':
description: Domains.
content:
application/json:
schema:
type: object
properties:
domains:
type: array
items:
$ref: '#/components/schemas/Domain'
required:
- domains
additionalProperties: false
'401':
$ref: '#/components/responses/Unauthorized'
'403':
description: Mailbox-bound key on an account-plane route (`code:key_scope`).
content:
application/json:
schema:
$ref: '#/components/schemas/KeyScopeError'
/api/v1/domains/{id}/verify:
post:
operationId: verifyDomain
tags:
- Domains
summary: Re-check a domain's verification
description: Refreshes verification status for a domain from the provider. Account-plane, paid plan only.
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
'200':
description: Current verification status.
content:
application/json:
schema:
type: object
properties:
status:
type: string
required:
- status
additionalProperties: false
'401':
$ref: '#/components/responses/Unauthorized'
'403':
description: Mailbox-bound key on an account-plane route (`code:key_scope`), or custom domains require a paid plan.
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/KeyScopeError'
- $ref: '#/components/schemas/Error'
'404':
description: Domain not found for this account.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error: not found
components:
schemas:
Error:
type: object
properties:
error:
type: string
required:
- error
additionalProperties: false
KeyScopeError:
type: object
properties:
error:
type: string
code:
type: string
const: key_scope
required:
- error
- code
additionalProperties: false
ProviderDomainLimitError:
type: object
properties:
error:
type: string
code:
type: string
const: provider_domain_limit
required:
- error
- code
additionalProperties: false
Domain:
type: object
properties:
id:
type: string
name:
type: string
status:
type: string
created_at:
type: string
required:
- id
- name
- status
- created_at
additionalProperties: false
DomainCreated:
type: object
properties:
id:
type: string
name:
type: string
status:
type: string
enum:
- pending
- verified
- failed
records:
type: array
items:
type: object
propertyNames:
type: string
additionalProperties: {}
description: Provider DNS records to add for verification.
required:
- id
- name
- status
- records
additionalProperties: false
responses:
Unauthorized:
description: Missing or invalid bearer token, or a key whose scope is not permitted for this endpoint.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: 'A Postfleet API key, e.g. `Authorization: Bearer pf_...`. Keys carry a scope (`api`/`mcp`/`bootstrap`), optional mailbox binding, and `can_read`/`can_send` capabilities.'