Skip to content
Ask for an invite

Topics

Topics are the lists your contacts subscribe to: make them, change or archive them, and subscribe contacts. This page is generated from the OpenAPI document of release main-6976024, the one the API serves, so it lists only what the API has.

How to authenticate, where errors are explained, and the other resources are in the API reference.

The account's topics

GET /v1/topics

A page of topics, oldest first, archived ones included, each with how many contacts stand where on it.

Its API key needs contacts:read.

Parameters

ParameterWhat it is
cursortext, in the query. The previous page’s next_cursor.
limita whole number from 1 to 100, in the query.

Answers

What a 200 answers

FieldWhat it is
data (required)a list, each an object.
data[].id (required)text.
data[].name (required)text.
data[].description (required)text, or null.
data[].shown_on_preference_page (required)true or false. Whether the preference page offers it to people, to join or leave.
data[].archived_at (required)a date and time (RFC 3339), or null. When it was archived: nobody can be subscribed to it since, and no new mail goes to it.
data[].contacts (required)an object. How many contacts stand where on it, as each contact’s topics says.
data[].contacts.subscribed (required)a whole number.
data[].contacts.unsubscribed (required)a whole number.
data[].contacts.expired (required)a whole number.
data[].created_at (required)a date and time (RFC 3339).
next_cursor (required)text, or null. Null on the last page.

Make a topic (owners and admins; keys need topics:write)

POST /v1/topics

A topic that isn't archived with this name and these words already answers 200, so a retry is safe; one with this name in any case and other words is 409 topic_name_taken.

Its API key needs topics:write.

Request body

A application/json body.

FieldWhat it is
name (required)text, up to 100 characters.
descriptiontext, up to 500 characters, or null. What people get from it, as the preference page says. Null clears it.
shown_on_preference_pagetrue or false. True if left out.

Answers

What a 200 answers

FieldWhat it is
id (required)text.
name (required)text.
description (required)text, or null.
shown_on_preference_page (required)true or false. Whether the preference page offers it to people, to join or leave.
archived_at (required)a date and time (RFC 3339), or null. When it was archived: nobody can be subscribed to it since, and no new mail goes to it.
contacts (required)an object. How many contacts stand where on it, as each contact’s topics says.
contacts.subscribed (required)a whole number.
contacts.unsubscribed (required)a whole number.
contacts.expired (required)a whole number.
created_at (required)a date and time (RFC 3339).

What a 201 answers

FieldWhat it is
id (required)text.
name (required)text.
description (required)text, or null.
shown_on_preference_page (required)true or false. Whether the preference page offers it to people, to join or leave.
archived_at (required)a date and time (RFC 3339), or null. When it was archived: nobody can be subscribed to it since, and no new mail goes to it.
contacts (required)an object. How many contacts stand where on it, as each contact’s topics says.
contacts.subscribed (required)a whole number.
contacts.unsubscribed (required)a whole number.
contacts.expired (required)a whole number.
created_at (required)a date and time (RFC 3339).

Change a topic (owners and admins; keys need topics:write)

PATCH /v1/topics/{topic_id}

New words are the topic’s next version, which the consent given from now on names; what people agreed to before keeps the words they saw.

Its API key needs topics:write.

Parameters

ParameterWhat it is
topic_id (required)text, up to 64 characters, in the path. The topic’s id (tpc_…).

Request body

A application/json body.

FieldWhat it is
nametext, up to 100 characters.
descriptiontext, up to 500 characters, or null. What people get from it, as the preference page says. Null clears it.
shown_on_preference_pagetrue or false.

Answers

What a 200 answers

FieldWhat it is
id (required)text.
name (required)text.
description (required)text, or null.
shown_on_preference_page (required)true or false. Whether the preference page offers it to people, to join or leave.
archived_at (required)a date and time (RFC 3339), or null. When it was archived: nobody can be subscribed to it since, and no new mail goes to it.
contacts (required)an object. How many contacts stand where on it, as each contact’s topics says.
contacts.subscribed (required)a whole number.
contacts.unsubscribed (required)a whole number.
contacts.expired (required)a whole number.
created_at (required)a date and time (RFC 3339).

Delete a topic (owners and admins; keys need topics:write)

DELETE /v1/topics/{topic_id}

Only a topic nobody's consent and no campaign email names: one anyone was ever subscribed to is the record of what they agreed to, and an email that names one keeps it, so either is refused with 409 topic_in_use. Archive it instead.

Its API key needs topics:write.

Parameters

ParameterWhat it is
topic_id (required)text, up to 64 characters, in the path. The topic’s id (tpc_…).

Answers

Archive a topic (owners and admins; keys need topics:write)

POST /v1/topics/{topic_id}/archive

Nobody can be subscribed to it from now on, the preference page and forms stop offering it, and no new mail goes to it. Its history stays. Archiving it again changes nothing.

Its API key needs topics:write.

Parameters

ParameterWhat it is
topic_id (required)text, up to 64 characters, in the path. The topic’s id (tpc_…).

Answers

What a 200 answers

FieldWhat it is
id (required)text.
name (required)text.
description (required)text, or null.
shown_on_preference_page (required)true or false. Whether the preference page offers it to people, to join or leave.
archived_at (required)a date and time (RFC 3339), or null. When it was archived: nobody can be subscribed to it since, and no new mail goes to it.
contacts (required)an object. How many contacts stand where on it, as each contact’s topics says.
contacts.subscribed (required)a whole number.
contacts.unsubscribed (required)a whole number.
contacts.expired (required)a whole number.
created_at (required)a date and time (RFC 3339).

Subscribe contacts to a topic

POST /v1/topics/{topic_id}/contacts

Subscribes each contact named, at most 1000, under one way of agreeing, recorded as their consent with you as its source. Nobody is subscribed back to a topic they left, or after leaving everything, and nobody whose address is on the account's suppression list: each is counted instead. All or none.

Its API key needs contacts:write.

Parameters

ParameterWhat it is
topic_id (required)text, up to 64 characters, in the path. The topic’s id (tpc_…).

Request body

A application/json body.

FieldWhat it is
contact_ids (required)a list of up to 1,000, each text.
agreed (required)an object. How they agreed to hear from you, as the app asks it: signed_up (online, on paper, or at an event), asked (they asked you to add them), or customer (a customer or member who hasn't said no, with roughly when). Recorded as their consent's basis with you as its source.
agreed.choice (required)one of signed_up or asked.
agreed.ona date (YYYY-MM-DD). The day it happened, if known (YYYY-MM-DD); today if not.
agreed.roughlytext. Roughly when they bought or paid: a month (YYYY-MM) or a day.
statementan object. The words behind the consent, kept with it as evidence. Without one, Flyanote records the words of the agreed choice the app shows.
statement.text (required)text, up to 10,000 characters. The words they agreed to, or that you used to ask, exactly as shown. No email addresses.
statement.wording_version (required)text. Your name for this wording and its version, changed whenever the words do.

Answers

What a 200 answers

FieldWhat it is
subscribed (required)a whole number.
already_subscribed (required)a whole number.
skipped_unsubscribed (required)a whole number. They left this topic, or everything.
skipped_suppressed (required)a whole number. The account's suppression list holds them.
skipped_no_address (required)a whole number. They have no email address left.