Email subscriptions
For instructions on how to authenticate to use this endpoint, see API overview.
Endpoints
GET | |
POST | |
GET | |
PATCH | |
DELETE | |
POST | |
POST | |
GET | |
DELETE | |
DELETE | |
DELETE | |
POST | |
POST | |
POST | |
POST | |
GET | |
POST | |
GET | |
POST |
List all messaging categories
Required API key scopes
hog_flow:readQuery parameters
- limitinteger
- offsetinteger
Response
Example request
GET /api /projects /:project_id /messaging_categoriesExample response
Status 200
Create messaging categories
Required API key scopes
hog_flow:writeRequest parameters
- keystring
- namestring
- descriptionstring
- public_descriptionstring
- category_type
- deletedboolean
Response
Example request
POST /api /projects /:project_id /messaging_categoriesExample response
Status 201
Retrieve messaging categories
Required API key scopes
hog_flow:readPath parameters
- idstring
Response
Example request
GET /api /projects /:project_id /messaging_categories /:idExample response
Status 200
Update messaging categories
Required API key scopes
hog_flow:writePath parameters
- idstring
Request parameters
- keystring
- namestring
- descriptionstring
- public_descriptionstring
- category_type
- deletedboolean
Response
Example request
PATCH /api /projects /:project_id /messaging_categories /:idExample response
Status 200
Delete messaging categories
Hard delete of this model is not allowed. Use a patch API call to set "deleted" to true
Required API key scopes
hog_flow:writePath parameters
- idstring
Example request
DELETE /api /projects /:project_id /messaging_categories /:idExample response
Status 405 No response body
Create messaging categories import from customerio
Import subscription topics and globally unsubscribed users from Customer.io API. Persists the App API key in Integration(kind="customerio-app"). If no app_api_key is provided, reuses the stored Integration key.
Request parameters
- keystring
- namestring
- descriptionstring
- public_descriptionstring
- category_type
- deletedboolean
Response
Example request
POST /api /projects /:project_id /messaging_categories /import_from_customerioExample response
Status 200
Create messaging categories import preferences csv
Import customer preferences from CSV file Expected CSV columns: id, email, unsubscribed, cio_subscription_preferences
Response
Example request
Example response
Status 200
Retrieve messaging categories optout sync config
Get the Customer.io sync configuration state for this team. Used by the frontend to derive step completion.
Response
Example request
GET /api /projects /:project_id /messaging_categories /optout_sync_configExample response
Status 200
Delete messaging categories remove customerio app config
Remove the Customer.io App API integration and reset import state.
Example request
DELETE /api /projects /:project_id /messaging_categories /remove_customerio_app_configExample response
Status 204 No response body
Delete messaging categories remove track config
Remove the Customer.io Track API integration and reset outbound sync state.
Example request
DELETE /api /projects /:project_id /messaging_categories /remove_track_configExample response
Status 204 No response body
Delete messaging categories remove webhook config
Remove the Customer.io webhook integration and reset inbound sync state.
Example request
DELETE /api /projects /:project_id /messaging_categories /remove_webhook_configExample response
Status 204 No response body
Create messaging categories save track config
Save Customer.io Track API credentials and/or toggle outbound sync.
Accepts:
- site_id (optional): set on first creation only
- api_key (optional): set on first creation only
- region (optional): "us" or "eu", set on first creation only
- track_enabled (required): enable or disable outbound sync
Request parameters
- keystring
- namestring
- descriptionstring
- public_descriptionstring
- category_type
- deletedboolean
Response
Example request
POST /api /projects /:project_id /messaging_categories /save_track_configExample response
Status 200
Create messaging categories save webhook config
Save webhook signing secret and/or toggle the Customer.io webhook sync.
Accepts:
- webhook_signing_secret (optional): set on first creation only
- webhook_enabled (required): enable or disable the webhook
Request parameters
- keystring
- namestring
- descriptionstring
- public_descriptionstring
- category_type
- deletedboolean
Response
Example request
POST /api /projects /:project_id /messaging_categories /save_webhook_configExample response
Status 200
Create messaging preferences add opt out
Manually add a recipient to the opt-out list for a specific category or all marketing messages.
Required API key scopes
hog_flow:writeRequest parameters
- identifierstring
- category_keystring
Response
Example request
POST /api /projects /:project_id /messaging_preferences /add_opt_outExample response
Status 201
Create messaging preferences bulk add opt outs
Opt every recipient in the list out of the category named on their entry, or a default category.
Required API key scopes
hog_flow:writeRequest parameters
- opt_outsarray
- category_keystring
Response
Example request
POST /api /projects /:project_id /messaging_preferences /bulk_add_opt_outsExample response
Status 200
Status 404
Retrieve messaging preferences export opt outs csv
Stream the opt-out list for a category as a CSV file that can be re-imported as-is.
Required API key scopes
hog_flow:readQuery parameters
- category_keystring
Example request
GET /api /projects /:project_id /messaging_preferences /export_opt_outs_csvExample response
Status 200
Status 404
Create messaging preferences generate link
Generate an unsubscribe link for the current user's email address
Request parameters
- recipientstring
Response
Example request
POST /api /projects /:project_id /messaging_preferences /generate_linkExample response
Status 200
Retrieve messaging preferences opt outs
Get opt-outs filtered by category or overall opt-outs if no category specified
Required API key scopes
hog_flow:readQuery parameters
- category_keystring
- pageinteger
- page_sizeinteger
- searchstring
Response
Example request
GET /api /projects /:project_id /messaging_preferences /opt_outsExample response
Status 200
Status 404
Create messaging preferences remove opt out
Opt a recipient back in to a specific category, or to all marketing messages.
Required API key scopes
hog_flow:writeRequest parameters
- identifierstring
- category_keystring
Response
Example request
POST /api /projects /:project_id /messaging_preferences /remove_opt_out




