api.post.m7.org API Reference

api.post.m7.org lets an application create delivery policies, prepare message content, and run notification or proof jobs. A proof job delivers an email challenge and can then be verified or consumed by a recipient.

Base URL

https://api.post.m7.org

All routes in this reference use POST with a JSON request body.

Management app

Use post.m7.org to manage message groups and templates, delivery policies, and jobs through the production interface. Use this API for programmatic integrations with the same service.

Authentication

Authorization is project-specific because this API combines authenticated member resources with public, job-scoped proof credentials. See the complete authorization guide.

Member routes require an M7 access token for a local user, admin, or root role:

Authorization: Bearer ACCESS_TOKEN

Member resources always belong to the token principal. Do not send owner: the API determines it from the access token, and a caller cannot use these routes to operate on another principal's resources.

The proof routes are different: they do not require a bearer token. They use an active job's job or job_id as the lookup value, so treat that ID and the delivered secret as sensitive workflow values.

Token principal Supported use
User Creates and operates on that user's message, policy, and job resources.
Admin Has the same documented member-route access.
Root Has the same documented member-route access.
No token May use only the proof routes for an active proof job.

Request and response format

Send JSON with Content-Type: application/json. Successful responses use this envelope:

{
  "status": 1,
  "comment": "OK",
  "data": {}
}

Member authorization failures return an application error with an HTTP 401 for a missing principal or 403 for insufficient access:

{
  "status": 0,
  "code": 403,
  "comment": "Access denied",
  "reason": "access_denied"
}

Handle the HTTP status and the application-level status independently. The successful comment is currently OK; use documented data fields, rather than the comment text, for application flow.

Pagination

Every documented list route accepts the following fields. Page numbers are one-based. Omit them to begin at the first page.

Field Required Type Behavior
limit No Integer Defaults to 20; values below 1 normalize to 3; maximum 100.
offset No Integer Zero-based alternative to page_number.
page_number No Integer One-based page number.
cursor No String Opaque continuation value from next_cursor; takes precedence over the other paging fields.

List responses place this object in data:

{
  "items": [],
  "limit": 20,
  "total_count": 0,
  "next_offset": 20,
  "page_number": 1,
  "page_total": 0,
  "next_cursor": null
}

next_cursor is null when no next page is available. next_offset is returned on every page; use next_cursor to decide whether to request more.

Concepts

Concept Purpose
Message template Reusable email or SMS content.
Message group A named set of templates used when a job is activated.
Policy group A named owner-scoped collection of suppression and domain-policy records.
Job A draft, active, completed, failed, or cancelled delivery workflow.
Proof The public recipient step for an active job with proof_policy single or any.

Guides

  • Authorization — obtain and send an M7 access token, understand ownership, and handle public proof credentials safely.
  • Message groups and templates — create content and link it to a message group.
  • Jobs — create, activate, cancel, retry, and inspect workflows.
  • Policies — manage policy groups, DNE entries, and domain policies.
  • Proof — inspect, resend, verify, and consume email proof challenges.