Cakemail
Cakemail API

Interest

Manage interests (preference categories) that can be assigned to contacts. Interests enable preference-based segmentation and can be used in preference centers.


Show all Interests

GET
https://api.cakemail.dev
/lists/{list_id}/interests

List all interests defined for the account.

Required scope(s): interests:read

Show all Interests › path Parameters

list_id
​integer · required

Show all Interests › query Parameters

account_id
​integer · min: 1

Optional Account ID to be used for the request

Optional Account ID to be used for the request

page
​integer · min: 1
Default: 1
per_page
​integer · min: 1
Default: 50
with_count
​boolean

Include count in the response

Include count in the response

Default: false

Show all Interests › Responses

Successful Response

​object · required

Pagination metadata

​InterestFullResponse[] · required

List of interests


Create an Interest

POST
https://api.cakemail.dev
/lists/{list_id}/interests

Create a new interest category.

Required scope(s): interests:write

Create an Interest › path Parameters

list_id
​integer · required

Create an Interest › query Parameters

account_id
​integer · min: 1

Optional Account ID to be used for the request

Optional Account ID to be used for the request

Create an Interest › Request Body

name
​string · minLength: 1 · maxLength: 255 · pattern: ^[+@\-_#a-zA-Z0-9]+$ · required
alias
​string

Create an Interest › Responses

Successful Response

​object · required

Created interest details

object
​string

Object type

Default: interest
created
​boolean

Whether the interest was created

Default: true

Get an Interest

GET
https://api.cakemail.dev
/lists/{list_id}/interests/{interest_name}

Retrieve the details of an interest.

Required scope(s): interests:read

Get an Interest › path Parameters

list_id
​integer · required
interest_name
​string · minLength: 1 · maxLength: 255 · pattern: ^[+@\-_#a-zA-Z0-9]+$ · required

Get an Interest › query Parameters

account_id
​integer · min: 1

Optional Account ID to be used for the request

Optional Account ID to be used for the request

Get an Interest › Responses

Successful Response

​object · required

Interest details


Update an Interest

PATCH
https://api.cakemail.dev
/lists/{list_id}/interests/{interest_name}

Update an interest's name.

Required scope(s): interests:write

Update an Interest › path Parameters

list_id
​integer · required
interest_name
​string · minLength: 1 · maxLength: 255 · pattern: ^[+@\-_#a-zA-Z0-9]+$ · required

Update an Interest › query Parameters

account_id
​integer · min: 1

Optional Account ID to be used for the request

Optional Account ID to be used for the request

Update an Interest › Request Body

name
​string
alias
​string

Update an Interest › Responses

Successful Response

​object · required

Patched interest details

object
​string

Object type

Default: interest
patched
​boolean

Whether the interest was patched

Default: true

Delete an Interest

DELETE
https://api.cakemail.dev
/lists/{list_id}/interests/{interest_name}

Delete an interest. Contacts that had this interest will have it removed.

Required scope(s): interests:delete

Delete an Interest › path Parameters

list_id
​integer · required
interest_name
​string · minLength: 1 · maxLength: 255 · pattern: ^[+@\-_#a-zA-Z0-9]+$ · required

Delete an Interest › query Parameters

account_id
​integer · min: 1

Optional Account ID to be used for the request

Optional Account ID to be used for the request

Delete an Interest › Responses

Successful Response

​object · required

Deleted interest details

object
​string

Object type

Default: interest
deleted
​boolean

Whether the interest was deleted

Default: true