Cakemail
Cakemail API

Custom Attribute

Define custom data fields for contacts. Custom attributes extend the contact model with account-specific fields (e.g. company name, purchase date) that can be used in segmentation and merge tags.


Show all custom attributes

GET
https://api.cakemail.dev
/lists/{list_id}/custom-attributes

List all custom attributes defined for the account.

Required scope(s): custom_attributes:read

Show all custom attributes › path Parameters

list_id
​integer · min: 1 · required

Show all custom attributes › 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 custom attributes › Responses

Successful Response

​object · required

Pagination metadata

​CustomAttributeFullResponse[] · required

List of custom attributes


Create a custom attribute

POST
https://api.cakemail.dev
/lists/{list_id}/custom-attributes

Define a new custom attribute for contacts.

Required scope(s): custom_attributes:write

Create a custom attribute › path Parameters

list_id
​integer · min: 1 · required

Create a custom attribute › 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 a custom attribute › Request Body

name
​string · pattern: ^[A-Za-z0-9\-_]+$ · required

Cannot be one of the reserved terms: id, email, status, registered, bounce_type, bounce_count, tags, _tags

type
​string · enum · required

An enumeration.

Enum values:
text
mediumtext
integer
timestamp
datetime

Create a custom attribute › Responses

Successful Response

name
​string · required

Name of the created custom attribute

​object · required

Created custom attribute details

object
​string

Object type

Default: attribute
created
​boolean

Whether the attribute was created

Default: true

Show a custom attribute

GET
https://api.cakemail.dev
/lists/{list_id}/custom-attributes/{name}

Retrieve the details of a custom attribute.

Required scope(s): custom_attributes:read

Show a custom attribute › path Parameters

list_id
​integer · min: 1 · required
name
​string · required

Show a custom attribute › 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

Show a custom attribute › Responses

Successful Response

​object · required

Custom attribute details


Delete a custom attribute

DELETE
https://api.cakemail.dev
/lists/{list_id}/custom-attributes/{name}

Delete a custom attribute definition. Existing values on contacts are removed.

Required scope(s): custom_attributes:delete

Delete a custom attribute › path Parameters

list_id
​integer · min: 1 · required
name
​string · pattern: ^[A-Za-z0-9\-_]+$ · required

Cannot be one of the reserved terms: id, email, status, registered, bounce_type, bounce_count, tags, _tags

Cannot be one of the reserved terms: id, email, status, registered, bounce_type, bounce_count, tags, _tags

Delete a custom attribute › 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 a custom attribute › Responses

Successful Response

name
​string · required

Name of the deleted custom attribute

object
​string

Object type

Default: attribute
deleted
​boolean

Whether the attribute was deleted

Default: true