Postfleet Comprehend API
BYO inbound trust report. No mailbox required.
BYO inbound trust report. No mailbox required.
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-comprehend-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 Comprehend 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: comprehend
description: BYO inbound trust report. No mailbox required.
paths:
/api/v1/comprehend:
post:
operationId: comprehendEmail
tags:
- comprehend
summary: Screen an email you already have
description: 'BYO inbound: submit subject/text/html, get a trust report. Does not provision a mailbox and does not evaluate malware. Paid LLM injection scan runs when quota admits (metered as extractions). Extraction runs only when extraction_schema_id is also supplied. Quota miss is deterministic sanitization + heuristic scan (unmetered). virus_risk is always null.'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ComprehendRequest'
responses:
'200':
description: Trust report.
content:
application/json:
schema:
$ref: '#/components/schemas/ComprehendResult'
'400':
description: Neither text nor html, or invalid body.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
description: Bootstrap key (`scope` not permitted). Mailbox-bound keys are allowed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: extraction_schema_id not found on this account.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error: schema not found
'413':
description: Combined payload over 1,048,576 characters.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error: payload too large
'429':
description: Per-account hourly cap.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error: too many comprehend requests
components:
schemas:
Error:
type: object
properties:
error:
type: string
required:
- error
additionalProperties: false
ComprehendResult:
type: object
properties:
subject_clean:
anyOf:
- type: string
- type: 'null'
body_clean:
type: string
truncated:
type: boolean
sanitization:
type: array
items:
type: object
properties:
kind:
type: string
detail:
type: string
stripped:
type: string
required:
- kind
- detail
- stripped
additionalProperties: false
status:
type: string
enum:
- complete
- partial
- skipped_injection_risk
- skipped_spam
- skipped_virus
classification:
anyOf:
- type: string
- type: 'null'
extraction:
anyOf:
- {}
- type: 'null'
extraction_error:
anyOf:
- type: string
- type: 'null'
confidence:
anyOf:
- type: number
- type: 'null'
model:
anyOf:
- type: string
- type: 'null'
scan_risk:
anyOf:
- type: string
enum:
- low
- high
- error
- type: 'null'
heuristic_risk:
type: string
enum:
- low
- high
spam_risk:
anyOf:
- type: string
enum:
- low
- high
- error
- type: 'null'
virus_risk:
type: 'null'
description: Always null. Malware scanning is not evaluated on this surface.
not_evaluated:
type: array
items:
type: string
enum:
- malware
- spam
spam_evaluated:
type: string
enum:
- none
- content
- auth_and_content
from:
anyOf:
- type: string
- type: 'null'
auth_results:
anyOf:
- type: object
properties:
spf:
type: string
enum:
- pass
- fail
- softfail
- neutral
- none
- temperror
- permerror
dkim:
type: string
enum:
- pass
- fail
- softfail
- neutral
- none
- temperror
- permerror
dmarc:
type: string
enum:
- pass
- fail
- softfail
- neutral
- none
- temperror
- permerror
required:
- spf
- dkim
- dmarc
additionalProperties: false
- type: 'null'
required:
- subject_clean
- body_clean
- truncated
- sanitization
- status
- classification
- extraction
- extraction_error
- confidence
- model
- scan_risk
- heuristic_risk
- spam_risk
- virus_risk
- not_evaluated
- spam_evaluated
- from
- auth_results
additionalProperties: false
ComprehendRequest:
type: object
properties:
subject:
type: string
text:
type: string
html:
type: string
attachment_text:
type: string
authentication_results:
description: Raw Authentication-Results header. Restores the SPF/DKIM/DMARC prior. Omit if you do not have it.
type: string
from:
description: Echo-only sender string. Invisible characters are stripped; it is not part of the screened surface.
type: string
extraction_schema_id:
description: 'Account-owned schema. Optional: runs extract on the same extractions reservation as the LLM scan. Omit to scan without extract. Quota miss is deterministic sanitization + heuristic (unmetered) either way.'
type: string
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.'