ChangelogStatus
Docs/Get started

Core concepts

A handful of objects make up everything in Anypost. This page defines them and shows how they fit together. The rest of the docs assume this vocabulary.

Team

A team owns everything: domains, API keys, templates, webhooks, and the messages you send. Your account belongs to a team, and every resource you create belongs to that same team.

Resources never cross team boundaries. A request authenticated for one team cannot see another team's domains or messages, and a 404 is returned for any ID that belongs elsewhere.

Domain

A sending domain is a domain you own that Anypost is authorized to send mail for. You verify it once by publishing DNS records; from then on, mail from addresses at that domain is properly authenticated.

The domain in a message's from address must be verified for your team. A send from an unverified domain is rejected. See Domains & DNS setup.

API key

An API key authenticates everything you send. One key works for both transports: it is the bearer token for the HTTP API and the password for SMTP.

A key has a public ID (key_...) that names it and a secret (ap_...) that authenticates requests. Keys are scoped by permission level and can be restricted to specific domains or IP addresses. See Authentication.

Message

A message is one email Anypost has accepted. You create one by sending: a JSON request to POST /v1/email, or an SMTP submission. Anypost authenticates it, signs it, and hands it off for delivery.

Every accepted message gets an ID (email_...). Acceptance is not delivery: a 202 response means Anypost has the message, not that it reached an inbox. What happens after acceptance arrives as events. See Send a single email.

Event

An event records something that happened to a message: it was delivered, bounced, marked as spam, opened, or had a link clicked. Delivery is neither instant nor guaranteed, so events are how Anypost tells you the outcome.

Common event types:

EventMeaning
email.sentAnypost accepted the message and queued it.
email.deliveredThe receiving mail server accepted the message.
email.bouncedDelivery failed permanently.
email.complainedThe recipient marked the message as spam.
email.openedThe recipient opened the message.
email.clickedThe recipient clicked a tracked link.

Every event carries the email_ ID of the message it belongs to, so you can correlate an outcome back to the send that produced it.

Webhook

A webhook delivers events to your application. You register an HTTPS endpoint, Anypost POSTs each event to it as it happens, and your endpoint reacts: suppress a bounced address, flag a complaint, record an open.

Events are also visible in the dashboard, but a webhook is how an application reacts to them in real time. See Webhooks.

Template

A template is stored message content (subject, HTML, and text) with placeholders. Instead of sending a body inline, you reference a template by ID and supply per-recipient variables, and Anypost renders the message. See Sending with templates.

Suppression

A suppression is an address Anypost will not send to. Hard bounces and spam complaints add an address automatically, which protects your sending reputation: continuing to mail an address that bounces or complains is what damages it.

A send to a suppressed address is dropped rather than delivered. See Suppressions.

Correlation dimensions

Four optional labels travel with a message so its events can be sliced and filtered later: tags, topic, campaign, and template_id. They carry no delivery meaning. They exist so that when an open or a bounce arrives, you can attribute it to the campaign or template that produced it. See Tags, topics & campaigns.

How it fits together

The path is always the same:

  1. Verify a domain so Anypost can authenticate your mail.
  2. Create an API key to authenticate your requests.
  3. Send a message from a verified domain with that key.
  4. Receive events about that message through a webhook.

Everything else (templates, suppressions, correlation dimensions) refines those four steps. It does not change their order.

Where to go next