openapi: 3.1.0
info:
title: API Reference
version: 1.0.0
paths:
/publications/{publicationId}/advertisement_opportunities:
get:
operationId: index
summary: 'Get advertisement opportunities OAuth Scope: posts:read'
description: Retrieve a list of accepted advertisement opportunities for the publication.
tags:
- subpackage_advertisement_opportunities
parameters:
- name: publicationId
in: path
description: The prefixed ID of the publication object
required: true
schema:
$ref: '#/components/schemas/type_ids:PublicationId'
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/type_advertisement_opportunities:AdvertisementOpportunitiesGetResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'404':
description: Resource Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'429':
description: Rate Limit Exceeded
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
/publications/{publicationId}/authors:
get:
operationId: index
summary: List authors
description: Retrieve a list of authors available for the publication.
tags:
- subpackage_authors
parameters:
- name: publicationId
in: path
description: The prefixed ID of the publication object
required: true
schema:
$ref: '#/components/schemas/type_ids:PublicationId'
- name: limit
in: query
description: >-
A limit on the number of objects to be returned. The limit can range between 1 and 100, and the default is
10.
required: false
schema:
type: integer
- name: page
in: query
description: >-
Pagination returns the results in pages. Each page contains the number of results specified by the `limit`
(default: 10).
If not specified, results 1-10 from page 1 will be returned.
required: false
schema:
type: integer
- name: name
in: query
description: Optionally filter authors by full name or first name (case-insensitive).
required: false
schema:
type: string
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/type_authors:AuthorsListResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'404':
description: Resource Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'429':
description: Rate Limit Exceeded
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
/publications/{publicationId}/authors/{authorId}:
get:
operationId: show
summary: Get author
description: Retrieve a single author from a publication.
tags:
- subpackage_authors
parameters:
- name: publicationId
in: path
description: The prefixed ID of the publication object
required: true
schema:
$ref: '#/components/schemas/type_ids:PublicationId'
- name: authorId
in: path
description: The author identifier. This accepts author UUID, full name, or first name.
required: true
schema:
type: string
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/type_authors:AuthorsGetResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'404':
description: Resource Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'429':
description: Rate Limit Exceeded
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
/publications/{publicationId}/automations/{automationId}/journeys:
post:
operationId: create
summary: 'Add subscription to an automation OAuth Scope: automations:write'
description: >-
Add an existing subscription to an automation flow. Requires the automation to have an active *Add by API*
trigger. The specified `email` or `subscription_id` will be matched against your existing subscribers. If an
existing subscriber is found, they will be enrolled immediately.
Looking to enroll new subscribers? Use the **[Create Subscription](/api-reference/subscriptions/create)**
endpoint instead and specify the `automation_ids` param.
tags:
- subpackage_automationJourneys
parameters:
- name: publicationId
in: path
description: The prefixed ID of the publication object
required: true
schema:
$ref: '#/components/schemas/type_ids:PublicationId'
- name: automationId
in: path
description: The prefixed ID of the automation object
required: true
schema:
$ref: '#/components/schemas/type_ids:AutomationId'
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
responses:
'200':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/type_automationJourneys:AutomationJourneysResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'404':
description: Resource Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'429':
description: Rate Limit Exceeded
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
requestBody:
content:
application/json:
schema:
type: object
properties:
email:
type: string
description: The email address associated with the subscription.
subscription_id:
$ref: '#/components/schemas/type_ids:SubscriptionId'
double_opt_override:
$ref: '#/components/schemas/type_:DoubleOptOverride'
description: >-
Override the publication's default double opt-in settings for this subscription. Possible values
are:
- "on" — The subscriber will receive a double opt-in confirmation email and will need to confirm
their subscription prior to being marked as active.
- "off" — The subscriber will be marked as active immediately and will not receive a double opt-in
confirmation email.
- "not_set" — The publication's default double opt-in settings will be applied to this subscription.
get:
operationId: index
summary: 'List automation journeys OAuth Scope: automations:read'
description: Retrieve a list of automation journeys that have occurred within a specific automation.
tags:
- subpackage_automationJourneys
parameters:
- name: publicationId
in: path
description: The prefixed ID of the publication object
required: true
schema:
$ref: '#/components/schemas/type_ids:PublicationId'
- name: automationId
in: path
description: The prefixed ID of the automation object
required: true
schema:
$ref: '#/components/schemas/type_ids:AutomationId'
- name: status
in: query
description: Optionally filter the results by the automation journey's status.
required: false
schema:
$ref: '#/components/schemas/type_automationJourneys:AutomationJourneysGetRequestStatus'
- name: limit
in: query
description: >-
A limit on the number of objects to be returned. The limit can range between 1 and 100, and the default is
10.
required: false
schema:
type: integer
- name: page
in: query
description: >-
Pagination returns the results in pages. Each page contains the number of results specified by the `limit`
(default: 10).
required: false
schema:
type: integer
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/type_automationJourneys:AutomationJourneysIndexResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'404':
description: Resource Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'429':
description: Rate Limit Exceeded
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
/publications/{publicationId}/automations/{automationId}/journeys/{automationJourneyId}:
get:
operationId: show
summary: 'Get automation journey OAuth Scope: automations:read'
description: Retrieve a single automation journey by ID.
tags:
- subpackage_automationJourneys
parameters:
- name: publicationId
in: path
description: The prefixed ID of the publication object
required: true
schema:
$ref: '#/components/schemas/type_ids:PublicationId'
- name: automationId
in: path
description: The prefixed ID of the automation object
required: true
schema:
$ref: '#/components/schemas/type_ids:AutomationId'
- name: automationJourneyId
in: path
description: The prefixed automation journey id
required: true
schema:
$ref: '#/components/schemas/type_ids:AutomationJourneyId'
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/type_automationJourneys:AutomationJourneysResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'404':
description: Resource Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'429':
description: Rate Limit Exceeded
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
/publications/{publicationId}/automations:
get:
operationId: index
summary: 'List automations OAuth Scope: automations:read'
description: Retrieve automations for a publication.
tags:
- subpackage_automations
parameters:
- name: publicationId
in: path
description: The prefixed ID of the publication object
required: true
schema:
$ref: '#/components/schemas/type_ids:PublicationId'
- name: expand[]
in: query
description: Optional list of expandable objects.
required: false
schema:
$ref: '#/components/schemas/type_automations:AutomationsListRequestExpandItem'
- name: limit
in: query
description: >-
A limit on the number of objects to be returned. The limit can range between 1 and 100, and the default is
10.
required: false
schema:
type: integer
- name: page
in: query
description: >-
Pagination returns the results in pages. Each page contains the number of results specified by the `limit`
(default: 10).
If not specified, results 1-10 from page 1 will be returned.
required: false
schema:
type: integer
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/type_automations:AutomationsListResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'404':
description: Resource Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'429':
description: Rate Limit Exceeded
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
/publications/{publicationId}/automations/{automationId}:
get:
operationId: show
summary: 'Get automation OAuth Scope: automations:read'
description: Retrieve a single automation for a publication.
tags:
- subpackage_automations
parameters:
- name: publicationId
in: path
description: The prefixed ID of the publication object
required: true
schema:
$ref: '#/components/schemas/type_ids:PublicationId'
- name: automationId
in: path
description: The prefixed ID of the automation object
required: true
schema:
$ref: '#/components/schemas/type_ids:AutomationId'
- name: expand[]
in: query
description: Optional list of expandable objects.
required: false
schema:
$ref: '#/components/schemas/type_automations:AutomationsGetRequestExpandItem'
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/type_automations:AutomationsGetResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'404':
description: Resource Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'429':
description: Rate Limit Exceeded
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
/publications/{publicationId}/automations/{automationId}/emails:
get:
operationId: list-emails
summary: List automation emails
description: Retrieve all emails belonging to a specific automation, including engagement statistics for each email.
tags:
- subpackage_automations
parameters:
- name: publicationId
in: path
description: The prefixed ID of the publication object
required: true
schema:
$ref: '#/components/schemas/type_ids:PublicationId'
- name: automationId
in: path
description: The prefixed ID of the automation object
required: true
schema:
$ref: '#/components/schemas/type_ids:AutomationId'
- name: limit
in: query
description: >-
A limit on the number of objects to be returned. The limit can range between 1 and 100, and the default is
10.
required: false
schema:
type: integer
- name: cursor
in: query
description: >-
**Cursor-based pagination (recommended)**: Use this opaque cursor token to fetch the next page of results.
Obtain it from the `next_cursor` field of a previous response.
required: false
schema:
type: string
- name: page
in: query
description: '**Deprecated**: Use `cursor` instead. Pagination returns the results in pages. Limited to 100 pages maximum.'
required: false
schema:
type: integer
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/type_automations:AutomationEmailsListResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'404':
description: Resource Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'429':
description: Rate Limit Exceeded
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
/publications/{publicationId}/bulk_subscriptions:
post:
operationId: create
summary: 'Bulk create subscription OAuth Scope: subscriptions:write'
description: Create new subscriptions for a publication.
tags:
- subpackage_bulk_subscriptions
parameters:
- name: publicationId
in: path
description: The prefixed ID of the publication object
required: true
schema:
$ref: '#/components/schemas/type_ids:PublicationId'
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
responses:
'200':
description: Subscriptions created
content:
application/json:
schema:
$ref: '#/components/schemas/type_bulk_subscriptions:BulkSubscriptionCreateResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'404':
description: Resource Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'429':
description: Rate Limit Exceeded
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
requestBody:
content:
application/json:
schema:
type: object
properties:
subscriptions:
type: array
items:
$ref: '#/components/schemas/type_:SubscriptionRequest'
required:
- subscriptions
/publications/{publicationId}/bulk_subscription_updates:
get:
operationId: index
summary: 'List subscription updates OAuth Scope: subscriptions:read'
description: Returns a list of Subscription Update objects for a publication.
tags:
- subpackage_bulkSubscriptionUpdates
parameters:
- name: publicationId
in: path
description: The prefixed ID of the publication object
required: true
schema:
$ref: '#/components/schemas/type_ids:PublicationId'
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/type_bulkSubscriptionUpdates:BulkSubscriptionUpdatesListResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'404':
description: Resource Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'429':
description: Rate Limit Exceeded
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
/publications/{publicationId}/bulk_subscription_updates/{id}:
get:
operationId: show
summary: 'Get subscription update OAuth Scope: subscriptions:read'
description: Returns a single Subscription Update object for a publication.
tags:
- subpackage_bulkSubscriptionUpdates
parameters:
- name: publicationId
in: path
description: The prefixed ID of the publication object
required: true
schema:
$ref: '#/components/schemas/type_ids:PublicationId'
- name: id
in: path
description: The ID of the Subscription Update object
required: true
schema:
type: string
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/type_bulkSubscriptionUpdates:BulkSubscriptionUpdatesGetResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'404':
description: Resource Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'429':
description: Rate Limit Exceeded
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
/publications/{publicationId}/subscriptions/bulk_actions:
put:
operationId: put
summary: 'Update subscriptions OAuth Scope: subscriptions:write'
description: Bulk update multiple subscriptions fields, including status, custom fields, and tiers.
tags:
- subpackage_bulkSubscriptionUpdates
parameters:
- name: publicationId
in: path
description: The prefixed ID of the publication object
required: true
schema:
$ref: '#/components/schemas/type_ids:PublicationId'
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/type_subscriptions:SubscriptionsPatchResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'404':
description: Resource Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'429':
description: Rate Limit Exceeded
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
requestBody:
content:
application/json:
schema:
type: object
properties:
subscriptions:
type: array
items:
$ref: '#/components/schemas/type_bulkSubscriptionUpdates:SubscriptionsPatchRequestSubscriptionsItem'
description: An array of objects representing the subscriptions to be updated (max 1000).
patch:
operationId: patch
summary: 'Update subscriptions OAuth Scope: subscriptions:write'
description: Bulk update multiple subscriptions fields, including status, custom fields, and tiers.
tags:
- subpackage_bulkSubscriptionUpdates
parameters:
- name: publicationId
in: path
description: The prefixed ID of the publication object
required: true
schema:
$ref: '#/components/schemas/type_ids:PublicationId'
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/type_subscriptions:SubscriptionsPatchResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'404':
description: Resource Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'429':
description: Rate Limit Exceeded
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
requestBody:
content:
application/json:
schema:
type: object
properties:
subscriptions:
type: array
items:
$ref: '#/components/schemas/type_bulkSubscriptionUpdates:SubscriptionsPatchRequestSubscriptionsItem'
description: An array of objects representing the subscriptions to be updated (max 1000).
/publications/{publicationId}/subscriptions:
put:
operationId: put-status
summary: 'Update subscriptions'' status OAuth Scope: subscriptions:write'
description: Bulk update subscriptions' status.
tags:
- subpackage_bulkSubscriptionUpdates
parameters:
- name: publicationId
in: path
description: The prefixed ID of the publication object
required: true
schema:
$ref: '#/components/schemas/type_ids:PublicationId'
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
responses:
'200':
description: Successful response
requestBody:
content:
application/json:
schema:
type: object
properties:
subscription_ids:
type: array
items:
type: string
description: An array of subscription IDs to be updated
new_status:
type: string
description: The new status to set for the subscriptions
required:
- subscription_ids
- new_status
patch:
operationId: patch-status
summary: 'Update subscriptions'' status OAuth Scope: subscriptions:write'
description: Bulk update subscriptions' status.
tags:
- subpackage_bulkSubscriptionUpdates
parameters:
- name: publicationId
in: path
description: The prefixed ID of the publication object
required: true
schema:
$ref: '#/components/schemas/type_ids:PublicationId'
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
responses:
'200':
description: Successful response
requestBody:
content:
application/json:
schema:
type: object
properties:
subscription_ids:
type: array
items:
type: string
description: An array of subscription IDs to be updated
new_status:
type: string
description: The new status to set for the subscriptions
required:
- subscription_ids
- new_status
post:
operationId: create
summary: 'Create subscription OAuth Scope: subscriptions:write'
description: Create new subscriptions for a publication.
tags:
- subpackage_subscriptions
parameters:
- name: publicationId
in: path
description: The prefixed ID of the publication object
required: true
schema:
$ref: '#/components/schemas/type_ids:PublicationId'
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
responses:
'200':
description: Subscription created
content:
application/json:
schema:
$ref: '#/components/schemas/type_subscriptions:SubscriptionResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'404':
description: Resource Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'429':
description: Rate Limit Exceeded
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/type_:SubscriptionRequest'
get:
operationId: index
summary: 'List subscriptions OAuth Scope: subscriptions:read'
description: >-
Retrieve all subscriptions belonging to a specific publication.
**New**: This endpoint now supports cursor-based pagination for better performance and consistency. Use
the `cursor` parameter instead of `page` for new integrations.
**Deprecation Notice**: Offset-based pagination (using `page` parameter) is deprecated and limited to
100 pages maximum. Please migrate to cursor-based pagination. See our [Pagination Guide](/welcome/pagination)
for details.
tags:
- subpackage_subscriptions
parameters:
- name: publicationId
in: path
description: The prefixed ID of the publication object
required: true
schema:
$ref: '#/components/schemas/type_ids:PublicationId'
- name: expand[]
in: query
description: >-
Optional list of expandable objects.
`subscription_premium_tiers ` - Returns an array of tiers the
subscription is associated with.
`referrals` - Returns an array of subscriptions with limited data -
`id`, `email`, and `status`. These are the subscriptions that were referred by this subscription.
`stats`
- Returns statistics about the subscription(s).
`custom_fields` - Returns an array of custom field values
that have been set on the subscription.
`newsletter_lists` - Returns an array of newsletter list
prefixed IDs the subscription is actively subscribed to.
required: false
schema:
$ref: '#/components/schemas/type_subscriptions:SubscriptionsListRequestExpandItem'
- name: status
in: query
description: Optionally filter the results by a status
required: false
schema:
$ref: '#/components/schemas/type_subscriptions:SubscriptionsListRequestStatus'
- name: tier
in: query
description: Optionally filter the results by a their tier
required: false
schema:
$ref: '#/components/schemas/type_subscriptions:SubscriptionsListRequestTier'
- name: premium_tiers[]
in: query
description: Optionally filter the results by one or multiple premium tiers
required: false
schema:
type: string
- name: premium_tier_ids[]
in: query
description: Optionally filter the results by one or multiple premium tier ids
required: false
schema:
type: string
- name: limit
in: query
description: >-
A limit on the number of objects to be returned. The limit can range between 1 and 100, and the default is
10.
required: false
schema:
type: integer
- name: cursor
in: query
description: >-
**Cursor-based pagination (recommended)**: Use this opaque cursor token to fetch the next page of results.
When provided, pagination will use cursor-based method which is more efficient and consistent than
offset-based pagination. See the [Pagination Guide](/welcome/pagination) for more details.
required: false
schema:
type: string
- name: page
in: query
description: >-
**Offset-based pagination (deprecated)**: Page number for offset-based pagination. This method is deprecated
and limited to 100 pages maximum. Please migrate to cursor-based pagination using the `cursor` parameter. If
not specified, results 1-10 from page 1 will be returned. See the [Pagination Guide](/welcome/pagination)
for migration guidance.
required: false
schema:
type: integer
- name: email
in: query
description: Optional email address to find a subscription.
This param must be an exact match and is case insensitive.
required: false
schema:
type: string
- name: order_by
in: query
description: >-
The field that the results are sorted by. Defaults to created
`created` - The time in which the
subscription was first created.
required: false
schema:
$ref: '#/components/schemas/type_subscriptions:SubscriptionsListRequestOrderBy'
- name: direction
in: query
description: >-
The direction that the results are sorted in. Defaults to asc
`asc` - Ascending, sorts from smallest to
largest.
`desc` - Descending, sorts from largest to smallest.
required: false
schema:
$ref: '#/components/schemas/type_:RequestDirection'
- name: creation_date
in: query
description: Optional date entry (in the format YYYY/MM/DD) that filters returned subscriptions by their creation date.
required: false
schema:
type: string
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/type_subscriptions:SubscriptionsListResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'404':
description: Resource Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'429':
description: Rate Limit Exceeded
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
/publications/{publicationId}/condition_sets:
get:
operationId: index
summary: 'List condition sets OAuth Scope: condition_sets:read'
description: >-
Retrieve all active condition sets for a publication. Condition sets define reusable audience segments for
targeting content to specific subscribers. Use the `purpose` parameter to filter by a specific use case.
tags:
- subpackage_conditionSets
parameters:
- name: publicationId
in: path
description: The prefixed ID of the publication object
required: true
schema:
$ref: '#/components/schemas/type_ids:PublicationId'
- name: limit
in: query
description: >-
A limit on the number of objects to be returned. The limit can range between 1 and 100, and the default is
10.
required: false
schema:
type: integer
- name: cursor
in: query
description: >-
**Cursor-based pagination (recommended)**: Use this opaque cursor token to fetch the next page of results.
When provided, pagination will use cursor-based method which is more efficient and consistent than
offset-based pagination.
required: false
schema:
type: string
- name: page
in: query
description: >-
**Offset-based pagination (deprecated)**: Page number for offset-based pagination. Please migrate to
cursor-based pagination using the `cursor` parameter. If not specified, results 1-10 from page 1 will be
returned.
required: false
schema:
type: integer
- name: purpose
in: query
description: Filter condition sets by purpose. When not specified, all active condition sets are returned.
required: false
schema:
$ref: '#/components/schemas/type_conditionSets:ConditionSetPurpose'
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/type_conditionSets:ConditionSetsListResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'404':
description: Resource Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'429':
description: Rate Limit Exceeded
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
/publications/{publicationId}/condition_sets/{conditionSetId}:
get:
operationId: show
summary: 'Get condition set OAuth Scope: condition_sets:read'
description: >-
Retrieve a single active dynamic content condition set for a publication. Use `expand[]=stats` to calculate and
return the active subscriber count synchronously.
tags:
- subpackage_conditionSets
parameters:
- name: publicationId
in: path
description: The prefixed ID of the publication object
required: true
schema:
$ref: '#/components/schemas/type_ids:PublicationId'
- name: conditionSetId
in: path
description: The UUID of the condition set object
required: true
schema:
type: string
- name: expand[]
in: query
description: >-
Optionally expand the response to include additional data.
`stats` - Calculates and returns the active
subscriber count for this condition set synchronously.
required: false
schema:
type: array
items:
$ref: '#/components/schemas/type_conditionSets:ConditionSetShowExpandItems'
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/type_conditionSets:ConditionSetShowResponse'
'404':
description: Resource Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'429':
description: Rate Limit Exceeded
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
/publications/{publicationId}/custom_fields:
post:
operationId: create
summary: 'Create custom field OAuth Scope: custom_fields:write'
description: Create a custom field on a publication, for use in subscriptions.
tags:
- subpackage_customFields
parameters:
- name: publicationId
in: path
description: The prefixed ID of the publication object
required: true
schema:
$ref: '#/components/schemas/type_ids:PublicationId'
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/type_customFields:CustomFieldResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'404':
description: Resource Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'429':
description: Rate Limit Exceeded
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
requestBody:
content:
application/json:
schema:
type: object
properties:
kind:
$ref: '#/components/schemas/type_:CustomFieldType'
display:
type: string
required:
- kind
- display
get:
operationId: index
summary: 'List custom fields OAuth Scope: custom_fields:read'
description: List all custom fields on a publication.
tags:
- subpackage_customFields
parameters:
- name: publicationId
in: path
description: The prefixed ID of the publication object
required: true
schema:
$ref: '#/components/schemas/type_ids:PublicationId'
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/type_customFields:CustomFieldIndexResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'404':
description: Resource Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'429':
description: Rate Limit Exceeded
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
/publications/{publicationId}/custom_fields/{id}:
get:
operationId: show
summary: 'Get custom field OAuth Scope: custom_fields:read'
description: View a specific custom field on a publication.
tags:
- subpackage_customFields
parameters:
- name: publicationId
in: path
description: The prefixed ID of the publication object
required: true
schema:
$ref: '#/components/schemas/type_ids:PublicationId'
- name: id
in: path
description: The ID of the Custom Fields object
required: true
schema:
type: string
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/type_customFields:CustomFieldResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'404':
description: Resource Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'429':
description: Rate Limit Exceeded
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
put:
operationId: put
summary: 'Update custom field OAuth Scope: custom_fields:write'
description: Update a custom field on a publication.
tags:
- subpackage_customFields
parameters:
- name: publicationId
in: path
description: The prefixed ID of the publication object
required: true
schema:
$ref: '#/components/schemas/type_ids:PublicationId'
- name: id
in: path
description: The ID of the Custom Fields object
required: true
schema:
type: string
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/type_customFields:CustomFieldResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'404':
description: Resource Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'429':
description: Rate Limit Exceeded
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
requestBody:
content:
application/json:
schema:
type: object
properties:
display:
type: string
patch:
operationId: patch
summary: 'Update custom field OAuth Scope: custom_fields:write'
description: Update a custom field on a publication.
tags:
- subpackage_customFields
parameters:
- name: publicationId
in: path
description: The prefixed ID of the publication object
required: true
schema:
$ref: '#/components/schemas/type_ids:PublicationId'
- name: id
in: path
description: The ID of the Custom Fields object
required: true
schema:
type: string
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/type_customFields:CustomFieldsPatchResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'404':
description: Resource Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'429':
description: Rate Limit Exceeded
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
requestBody:
content:
application/json:
schema:
type: object
properties:
display:
type: string
delete:
operationId: delete
summary: 'Delete custom field OAuth Scope: custom_fields:write'
description: Delete a custom field from a publication.
tags:
- subpackage_customFields
parameters:
- name: publicationId
in: path
description: The prefixed ID of the publication object
required: true
schema:
$ref: '#/components/schemas/type_ids:PublicationId'
- name: id
in: path
description: The ID of the Custom Fields object
required: true
schema:
type: string
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
responses:
'204':
description: No Content
content:
application/json:
schema:
$ref: '#/components/schemas/type_customFields:CustomFieldsDeleteResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'404':
description: Resource Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'429':
description: Rate Limit Exceeded
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
/publications/{publicationId}/data_privacy/deletion_requests:
post:
operationId: create
summary: 'Create data deletion request OAuth Scope: data_deletion:write'
description: >-
This is a gated feature that requires enablement. Contact support to enable Data Deletion API access
for your organization.
Creates a data deletion request for a subscriber within your organization. The subscriber's data will be
redacted from all publications in the organization after a 14-day safety delay. This action cannot be undone
once processing begins.
tags:
- subpackage_dataDeletion
parameters:
- name: publicationId
in: path
description: The prefixed ID of the publication object
required: true
schema:
$ref: '#/components/schemas/type_ids:PublicationId'
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/type_dataDeletion:DataDeletionRequestResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'404':
description: Resource Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'409':
description: Conflict
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'429':
description: Rate Limit Exceeded
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
requestBody:
content:
application/json:
schema:
type: object
properties:
email:
type: string
description: The email address of the subscriber to delete.
required:
- email
get:
operationId: index
summary: 'List data deletion requests OAuth Scope: data_deletion:read'
description: >-
This is a gated feature that requires enablement. Contact support to enable Data Deletion API access
for your organization.
List all data deletion requests for your organization.
tags:
- subpackage_dataDeletion
parameters:
- name: publicationId
in: path
description: The prefixed ID of the publication object
required: true
schema:
$ref: '#/components/schemas/type_ids:PublicationId'
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/type_dataDeletion:DataDeletionRequestIndexResponse'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'404':
description: Resource Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'429':
description: Rate Limit Exceeded
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
/publications/{publicationId}/data_privacy/deletion_requests/{id}:
get:
operationId: show
summary: 'Get data deletion request OAuth Scope: data_deletion:read'
description: >-
This is a gated feature that requires enablement. Contact support to enable Data Deletion API access
for your organization.
Retrieve the details and current status of a specific data deletion request.
tags:
- subpackage_dataDeletion
parameters:
- name: publicationId
in: path
description: The prefixed ID of the publication object
required: true
schema:
$ref: '#/components/schemas/type_ids:PublicationId'
- name: id
in: path
description: The ID of the data deletion request
required: true
schema:
type: string
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/type_dataDeletion:DataDeletionRequestResponse'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'404':
description: Resource Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'429':
description: Rate Limit Exceeded
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
/publications/{publicationId}/engagements:
get:
operationId: index
summary: 'Get publication engagements OAuth Scope: publications:read'
description: >-
Retrieve email engagement metrics for a specific publication over a defined date range and granularity.
By default, the endpoint returns metrics for the past day, aggregated daily. The max number of days allowed is
31. All dates and times are in UTC.
tags:
- subpackage_engagements
parameters:
- name: publicationId
in: path
required: true
schema:
$ref: '#/components/schemas/type_ids:PublicationId'
- name: start_date
in: query
description: The starting date for the engagement metrics in `YYYY-MM-DD` format. Defaults to 1 day ago if not provided.
required: false
schema:
type: string
format: date
- name: number_of_days
in: query
description: >-
The number of days to return engagement metrics for, starting from `start_date`. Must be between 1 and 31.
Defaults to `1` if not provided.
required: false
schema:
$ref: '#/components/schemas/type_engagements:NumberOfDays'
- name: granularity
in: query
description: The granularity at which to report the engagement metrics. Defaults to `day` if not provided.
required: false
schema:
$ref: '#/components/schemas/type_engagements:PublicationEngagementGranularity'
- name: email_type
in: query
description: >-
Filter engagement metrics by email type. If omitted, all email engagement is included.
`post`: Only post
emails.
`message`: Only automated and system-generated emails.
required: false
schema:
$ref: '#/components/schemas/type_engagements:PublicationEngagementEmailType'
- name: direction
in: query
description: >-
The direction that the results are sorted in. Defaults to `asc`.
`asc`: Oldest to newest
`desc`:
Newest to oldest
required: false
schema:
$ref: '#/components/schemas/type_:RequestDirection'
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/type_engagements:PublicationEngagementsResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'404':
description: Resource Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'429':
description: Rate Limit Exceeded
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
/publications/{publicationId}/newsletter_lists:
get:
operationId: index
summary: >-
List newsletter lists Beta OAuth Scope: newsletter_lists:read
description: |-
Newsletter Lists is currently in beta, the API is subject to change.
List all newsletter lists for a publication.
tags:
- subpackage_newsletterLists
parameters:
- name: publicationId
in: path
description: The prefixed ID of the publication object
required: true
schema:
$ref: '#/components/schemas/type_ids:PublicationId'
- name: limit
in: query
description: >-
A limit on the number of objects to be returned. The limit can range between 1 and 100, and the default is
10.
required: false
schema:
type: integer
- name: page
in: query
description: >-
Pagination returns the results in pages. Each page contains the number of results specified by the `limit`
(default: 10).
If not specified, results 1-10 from page 1 will be returned.
required: false
schema:
type: integer
- name: direction
in: query
description: >-
The direction that the results are sorted in. Defaults to asc
`asc` - Ascending, sorts from smallest to
largest.
`desc` - Descending, sorts from largest to smallest.
required: false
schema:
$ref: '#/components/schemas/type_:RequestDirection'
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/type_newsletterLists:NewsletterListIndexResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'404':
description: Resource Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'429':
description: Rate Limit Exceeded
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
/publications/{publicationId}/newsletter_lists/{newsletterListId}:
get:
operationId: show
summary: >-
Get newsletter list Beta OAuth Scope: newsletter_lists:read
description: |-
Newsletter Lists is currently in beta, the API is subject to change.
Retrieve a single newsletter list belonging to a specific publication.
tags:
- subpackage_newsletterLists
parameters:
- name: publicationId
in: path
description: The prefixed ID of the publication object
required: true
schema:
$ref: '#/components/schemas/type_ids:PublicationId'
- name: newsletterListId
in: path
description: The prefixed ID of the newsletter list object
required: true
schema:
$ref: '#/components/schemas/type_ids:NewsletterListId'
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/type_newsletterLists:NewsletterListResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'404':
description: Resource Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'429':
description: Rate Limit Exceeded
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
/publications/{publicationId}/newsletter_lists/{newsletterListId}/subscriptions:
post:
operationId: create
summary: >-
Create newsletter list subscription Beta OAuth Scope: newsletter_lists:write
description: >-
Newsletter Lists is currently in beta, the API is subject to change.
Subscribe a subscription to a newsletter list. Accepts either a subscription_id or email to identify the
subscription.
tags:
- subpackage_newsletterListSubscriptions
parameters:
- name: publicationId
in: path
description: The prefixed ID of the publication object
required: true
schema:
$ref: '#/components/schemas/type_ids:PublicationId'
- name: newsletterListId
in: path
description: The prefixed ID of the newsletter list object
required: true
schema:
$ref: '#/components/schemas/type_ids:NewsletterListId'
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
responses:
'200':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/type_newsletterListSubscriptions:NewsletterListSubscriptionResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'404':
description: Resource Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'422':
description: Unprocessable Entity
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'429':
description: Rate Limit Exceeded
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
requestBody:
content:
application/json:
schema:
type: object
properties:
subscription_id:
$ref: '#/components/schemas/type_ids:SubscriptionId'
description: The prefixed ID of the subscription to subscribe. Either subscription_id or email must be provided.
email:
type: string
description: >-
The email address of the subscription to subscribe. Either subscription_id or email must be
provided.
get:
operationId: index
summary: >-
List newsletter list subscriptions Beta OAuth Scope: newsletter_lists:read
description: |-
Newsletter Lists is currently in beta, the API is subject to change.
List all subscriptions for a newsletter list.
tags:
- subpackage_newsletterListSubscriptions
parameters:
- name: publicationId
in: path
description: The prefixed ID of the publication object
required: true
schema:
$ref: '#/components/schemas/type_ids:PublicationId'
- name: newsletterListId
in: path
description: The prefixed ID of the newsletter list object
required: true
schema:
$ref: '#/components/schemas/type_ids:NewsletterListId'
- name: limit
in: query
description: >-
A limit on the number of objects to be returned. The limit can range between 1 and 100, and the default is
10.
required: false
schema:
type: integer
- name: cursor
in: query
description: >-
**Cursor-based pagination (recommended)**: Use this opaque cursor token to fetch the next page of results.
When provided, pagination will use cursor-based method which is more efficient and consistent than
offset-based pagination.
required: false
schema:
type: string
- name: page
in: query
description: >-
**Offset-based pagination (deprecated)**: Page number for offset-based pagination. Please migrate to
cursor-based pagination using the `cursor` parameter. If not specified, results 1-10 from page 1 will be
returned.
required: false
schema:
type: integer
- name: direction
in: query
description: >-
The direction that the results are sorted in. Defaults to asc
`asc` - Ascending, sorts from smallest to
largest.
`desc` - Descending, sorts from largest to smallest.
required: false
schema:
$ref: '#/components/schemas/type_:RequestDirection'
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/type_newsletterListSubscriptions:NewsletterListSubscriptionIndexResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'404':
description: Resource Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'429':
description: Rate Limit Exceeded
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
/publications/{publicationId}/newsletter_lists/{newsletterListId}/subscriptions/{newsletterListSubscriptionId}:
get:
operationId: show
summary: >-
Get newsletter list subscription Beta OAuth Scope: newsletter_lists:read
description: |-
Newsletter Lists is currently in beta, the API is subject to change.
Retrieve a single newsletter list subscription.
tags:
- subpackage_newsletterListSubscriptions
parameters:
- name: publicationId
in: path
description: The prefixed ID of the publication object
required: true
schema:
$ref: '#/components/schemas/type_ids:PublicationId'
- name: newsletterListId
in: path
description: The prefixed ID of the newsletter list object
required: true
schema:
$ref: '#/components/schemas/type_ids:NewsletterListId'
- name: newsletterListSubscriptionId
in: path
description: The prefixed ID of the newsletter list subscription object
required: true
schema:
$ref: '#/components/schemas/type_ids:NewsletterListSubscriptionId'
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/type_newsletterListSubscriptions:NewsletterListSubscriptionResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'404':
description: Resource Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'429':
description: Rate Limit Exceeded
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
patch:
operationId: update
summary: >-
Update newsletter list subscription Beta OAuth Scope: newsletter_lists:write
description: |-
Newsletter Lists is currently in beta, the API is subject to change.
Update a newsletter list subscription. Currently supports unsubscribing a subscription from a newsletter list.
tags:
- subpackage_newsletterListSubscriptions
parameters:
- name: publicationId
in: path
description: The prefixed ID of the publication object
required: true
schema:
$ref: '#/components/schemas/type_ids:PublicationId'
- name: newsletterListId
in: path
description: The prefixed ID of the newsletter list object
required: true
schema:
$ref: '#/components/schemas/type_ids:NewsletterListId'
- name: newsletterListSubscriptionId
in: path
description: The prefixed ID of the newsletter list subscription object
required: true
schema:
$ref: '#/components/schemas/type_ids:NewsletterListSubscriptionId'
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/type_newsletterListSubscriptions:NewsletterListSubscriptionResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'404':
description: Resource Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'422':
description: Unprocessable Entity
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'429':
description: Rate Limit Exceeded
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
requestBody:
content:
application/json:
schema:
type: object
properties:
unsubscribe:
type: boolean
description: Set to true to unsubscribe the subscription from this newsletter list.
/publications/{publicationId}/newsletter_lists/{newsletterListId}/subscriptions/by_subscription_id/{subscriptionId}:
patch:
operationId: update-by-subscription-id
summary: >-
Update newsletter list subscription by subscription ID Beta
OAuth Scope: newsletter_lists:write
description: >-
Newsletter Lists is currently in beta, the API is subject to change.
Update a newsletter list subscription by subscription ID. An alternative to the update endpoint when you don't
have the newsletter list subscription ID. Accepts either a subscription_id or email to identify the
subscription. Currently supports unsubscribing a subscription from a newsletter list.
tags:
- subpackage_newsletterListSubscriptions
parameters:
- name: publicationId
in: path
description: The prefixed ID of the publication object
required: true
schema:
$ref: '#/components/schemas/type_ids:PublicationId'
- name: newsletterListId
in: path
description: The prefixed ID of the newsletter list object
required: true
schema:
$ref: '#/components/schemas/type_ids:NewsletterListId'
- name: subscriptionId
in: path
description: The prefixed ID of the subscription
required: true
schema:
$ref: '#/components/schemas/type_ids:SubscriptionId'
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/type_newsletterListSubscriptions:NewsletterListSubscriptionResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'404':
description: Resource Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'422':
description: Unprocessable Entity
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'429':
description: Rate Limit Exceeded
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
requestBody:
content:
application/json:
schema:
type: object
properties:
unsubscribe:
type: boolean
description: Set to true to unsubscribe the subscription from this newsletter list.
/users/identify:
get:
operationId: identify
summary: 'Identify user OAuth Scope: identify:read'
description: Retrieve information about the user who authorized the OAuth access token.
tags:
- subpackage_oauth_users
parameters:
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/type_oauth_users:UserIdentifyResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'404':
description: Resource Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'429':
description: Rate Limit Exceeded
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
/publications/{publicationId}/polls:
get:
operationId: index
summary: 'List polls OAuth Scope: polls:read'
description: >-
Retrieve all polls belonging to a specific publication. Poll choices are always included. Use `expand[]=stats`
to include aggregate vote counts per choice.
tags:
- subpackage_polls
parameters:
- name: publicationId
in: path
description: The prefixed ID of the publication object
required: true
schema:
$ref: '#/components/schemas/type_ids:PublicationId'
- name: limit
in: query
description: >-
A limit on the number of objects to be returned. The limit can range between 1 and 100, and the default is
10.
required: false
schema:
type: integer
- name: cursor
in: query
description: >-
**Cursor-based pagination (recommended)**: Use this opaque cursor token to fetch the next page of results.
When provided, pagination will use cursor-based method which is more efficient and consistent than
offset-based pagination.
required: false
schema:
type: string
- name: page
in: query
description: >-
**Offset-based pagination (deprecated)**: Page number for offset-based pagination. Please migrate to
cursor-based pagination using the `cursor` parameter. If not specified, results 1-10 from page 1 will be
returned.
required: false
schema:
type: integer
- name: order_by
in: query
description: >-
The field that the results are sorted by. Defaults to created.
`created` - The time the poll was
created.
`name` - The name of the poll.
required: false
schema:
$ref: '#/components/schemas/type_polls:PollOrderBy'
- name: direction
in: query
description: >-
The direction that the results are sorted in. Defaults to asc.
`asc` - Ascending, sorts from smallest to
largest.
`desc` - Descending, sorts from largest to smallest.
required: false
schema:
$ref: '#/components/schemas/type_:RequestDirection'
- name: expand[]
in: query
description: >-
Optionally expand the response to include additional data.
`stats` - Returns aggregate vote counts per
choice and total completions.
`poll_responses` - Returns up to 10 most recent subscriber responses. Use
/polls/{pollId}/responses for paginated access to all responses.
`trivia_answer` - Returns the correct
answer for trivia-type polls.
required: false
schema:
type: array
items:
$ref: '#/components/schemas/type_polls:PollsExpandItems'
- name: post_id
in: query
description: >-
Filter to only return polls that were embedded in the specified post. Accepts a prefixed post ID (e.g.
`post_abc123`).
required: false
schema:
type: string
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/type_polls:PollsListResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'404':
description: Resource Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'429':
description: Rate Limit Exceeded
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
/publications/{publicationId}/polls/{pollId}:
get:
operationId: show
summary: 'Get poll OAuth Scope: polls:read'
description: >-
Retrieve detailed information about a specific poll belonging to a publication. Use `expand[]=stats` for
aggregate vote counts, or `expand[]=poll_responses` for individual subscriber responses.
tags:
- subpackage_polls
parameters:
- name: publicationId
in: path
description: The prefixed ID of the publication object
required: true
schema:
$ref: '#/components/schemas/type_ids:PublicationId'
- name: pollId
in: path
description: The prefixed ID of the poll object
required: true
schema:
$ref: '#/components/schemas/type_ids:PollId'
- name: expand[]
in: query
description: >-
Optionally expand the response to include additional data.
`stats` - Returns aggregate vote counts per
choice and total completions.
`poll_responses` - Returns up to 10 most recent subscriber responses. Use
/polls/{pollId}/responses for paginated access to all responses.
`trivia_answer` - Returns the correct
answer for trivia-type polls.
required: false
schema:
type: array
items:
$ref: '#/components/schemas/type_polls:PollsExpandItems'
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/type_polls:PollShowResponse'
'404':
description: Resource Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'429':
description: Rate Limit Exceeded
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
/publications/{publicationId}/polls/{pollId}/responses:
get:
operationId: list-responses
summary: 'List poll responses OAuth Scope: polls:read'
description: >-
Retrieve all individual subscriber responses for a specific poll with cursor-based pagination. Use this endpoint
for large datasets instead of the `expand[]=poll_responses` parameter on the poll show endpoint.
tags:
- subpackage_polls
parameters:
- name: publicationId
in: path
description: The prefixed ID of the publication object
required: true
schema:
$ref: '#/components/schemas/type_ids:PublicationId'
- name: pollId
in: path
description: The prefixed ID of the poll object
required: true
schema:
$ref: '#/components/schemas/type_ids:PollId'
- name: limit
in: query
description: >-
A limit on the number of objects to be returned. The limit can range between 1 and 100, and the default is
10.
required: false
schema:
type: integer
- name: cursor
in: query
description: '**Cursor-based pagination (recommended)**: Use this opaque cursor token to fetch the next page of results.'
required: false
schema:
type: string
- name: page
in: query
description: '**Offset-based pagination (deprecated)**: Page number for offset-based pagination.'
required: false
schema:
type: integer
- name: order_by
in: query
description: The field that the results are sorted by. Defaults to created.
required: false
schema:
$ref: '#/components/schemas/type_polls:PollResponsesOrderBy'
- name: direction
in: query
description: >-
The direction that the results are sorted in. Defaults to asc.
`asc` - Ascending, sorts from smallest to
largest.
`desc` - Descending, sorts from largest to smallest.
required: false
schema:
$ref: '#/components/schemas/type_:RequestDirection'
- name: expand[]
in: query
description: >-
Optionally expand the response to include additional data.
`post` - Returns the post title and
publication date for the post where each response was collected.
required: false
schema:
type: array
items:
$ref: '#/components/schemas/type_polls:PollResponsesExpandItems'
- name: post_id
in: query
description: >-
Filter to only return responses collected via the specified post. Accepts a prefixed post ID (e.g.
`post_abc123`).
required: false
schema:
type: string
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/type_polls:PollResponsesListResponse'
'404':
description: Resource Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'429':
description: Rate Limit Exceeded
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/type_:Error'
/publications/{publicationId}/posts:
post:
operationId: create
summary: 'Create post OAuth Scope: posts:write'
description: >-
This feature is currently in beta, the API is subject to change, and available only to Enterprise users.
To inquire about Enterprise pricing,
please visit our Enterprise page.
Create a post for a specific publication. For a detailed walkthrough including setup, testing workflows, and
working with custom HTML and templates, see the Using
the Send API and Create Post Endpoint guide.
## Content methods
There are three ways to provide content for a post. You must provide either `blocks` or `body_content`, but not
both.
### 1. Blocks
Use the `blocks` field to build your post with structured content blocks such as paragraphs, images, headings,
buttons, tables, and more. Each block has a `type` and its own set of properties. This method gives you
fine-grained control over individual content elements and supports features like visual settings, visibility
settings, and dynamic content targeting.
### 2. Raw HTML (`body_content`)
Use the `body_content` field to provide a single string of raw HTML. The HTML is wrapped in an `htmlSnippet`
block internally. This is useful when you have pre-built HTML content or are migrating from another platform.
### 3. HTML blocks within blocks
Use `type: html` blocks inside the `blocks` array to embed raw HTML snippets alongside other structured blocks.
This lets you mix structured content (paragraphs, images, etc.) with custom HTML where needed.
## CSS and styling guardrails
beehiiv processes all HTML content through a sanitization pipeline. When using `body_content` or `html` blocks,
be aware of the following:
- **`