Cakemail
Cakemail API

Create and manage hosted forms for collecting subscriber data. Forms can include reCAPTCHA verification, custom redirect URLs, and double opt-in. Forms are published to generate a public submission URL.


Show all forms

GET
https://api.cakemail.dev
/forms

List all forms in the account.

Required scope(s): forms:read

Show all forms › 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
sort
​string · pattern: [-|+]?[a-zA-Z_]+

Sort term and direction, using syntax [-|+]term.

Valid terms:

  • name
  • language
  • created_on
  • last_updated_on
  • list_id
  • status
  • enabled
  • updated_on
  • published_on
  • branding

Sort term and direction, using syntax [-|+]term.

Valid terms:

  • name
  • language
  • created_on
  • last_updated_on
  • list_id
  • status
  • enabled
  • updated_on
  • published_on
  • branding
filter
​string

Valid Terms:

  • name

Valid Operators:

  • ==

Query separator:

  • ;

Valid Terms:

  • name

Valid Operators:

  • ==

Query separator:

  • ;

Show all forms › Responses

Successful Response

​object · required

Pagination metadata

​array · required

List of forms


Create a form

POST
https://api.cakemail.dev
/forms

Create a new form. The form must be published before it can accept submissions.

Required scope(s): forms:write

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

anyOf
At least one variant must match. Multiple variants may match simultaneously.

Decision Table

VariantMatching Criteria
type = object · requires: name, content, list_id +1 more
type = object · requires: list_id, name
Properties for CreateForm:
name
​string · minLength: 1 · required

Name of the form

​object · required

HTML content of the form

list_id
​integer · min: 1 · required

ID of the contact list to subscribe to

language
​string · enum · required

Language of the form

Enum values:
da
da_DK
de
de_DE
el
el_GR
en
en_US
status
​string · enum

Publication status of the form

Enum values:
active
deleted
Default: active
​object

Post-action redirect URLs

Default: {}
double_opt_in
​boolean

Whether to use double opt-in

Default: true
type
​string
Default: basic

Create a form › Responses

Successful Response

id
​string · required

ID of the created form

​required

Created form details

object
​string

Object type

Default: form
created
​boolean

Whether the form was created

Default: true

Show a form details

GET
https://api.cakemail.dev
/forms/{form_id}

Retrieve the full details of a form, including its configuration, submission URL, and publication status.

Required scope(s): forms:read

Show a form details › path Parameters

form_id
​string · required

Show a form details › 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 form details › Responses

Successful Response

​required

Form details


Update a form

PATCH
https://api.cakemail.dev
/forms/{form_id}

Update a form's configuration. All fields are optional.

Required scope(s): forms:write

Update a form › path Parameters

form_id
​string · required

Update a form › 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 a form › Request Body

anyOf
At least one variant must match. Multiple variants may match simultaneously.

Decision Table

VariantMatching Criteria
type = object
type = object
Properties for PatchForm:
name
​string · minLength: 1

Name of the form

status
​string · minLength: 1

Publication status of the form

​object

HTML content of the form

Default: {}
​object

Post-action redirect URLs

Default: {}
list_id
​integer · min: 1

ID of the contact list to subscribe to

language
​string · enum

Language of the form

Enum values:
da
da_DK
de
de_DE
el
el_GR
en
en_US
double_opt_in
​boolean

Whether to use double opt-in

Update a form › Responses

Successful Response

id
​string · required

ID of the updated form

​required

Updated form details

object
​string

Object type

Default: form
updated
​boolean

Whether the form was updated

Default: true

Delete a form

DELETE
https://api.cakemail.dev
/forms/{form_id}

Delete a form.

Required scope(s): forms:delete

Delete a form › path Parameters

form_id
​string · required

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

Successful Response

id
​string · required

ID of the deleted form

object
​string

Object type

Default: form
deleted
​boolean

Whether the form was deleted

Default: true

Publish a form

POST
https://api.cakemail.dev
/forms/{form_id}/publish

Publish a form, generating a public submission URL.

Required scope(s): forms:publish

Publish a form › path Parameters

form_id
​string · required

Publish a form › 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

Publish a form › Responses

Successful Response

​required

Form details


Render a form

GET
https://api.cakemail.dev
/forms/{form_id}/render

Render the form's HTML for preview.

Required scope(s): forms:read

Render a form › path Parameters

form_id
​string · required

Render a form › query Parameters

published
​boolean

Render the published content of the form

Render the published content of the form

Default: false
account_id
​integer · min: 1

Optional Account ID to be used for the request

Optional Account ID to be used for the request

Render a form › Responses

Successful Response

data
​string

Rendered HTML content of the form


Submit a form

POST
https://api.cakemail.dev
/form_submission/{token}

Submit data to a published form. Processes the submission and creates or updates the contact.

Submit a form › path Parameters

token
​string · required

Submit a form › Request Body

email
​string · email · required
language
​Languages · enum

Supported Locales

Enum values:
da
da_DK
de
de_DE
el
el_GR
en
en_US
g-recaptcha-response
​string
interests
​object
tags
​object
custom_attributes
​object

Submit a form › Responses

Successful Response

status
​string · enum · required

Status of the form submission

Enum values:
pending
processed
object
​string

Object type

Default: form

Disable a form

POST
https://api.cakemail.dev
/forms/{form_id}/disable

Disable a form, preventing it from accepting new submissions.

Required scope(s): forms:publish

Disable a form › path Parameters

form_id
​string · required

Disable a form › 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

Disable a form › Responses

Successful Response

​object · required

Disabled form details

object
​string

Object type

Default: form
enabled
​boolean

Whether the form is enabled

Default: false

Enable a form

POST
https://api.cakemail.dev
/forms/{form_id}/enable

Enable a form, allowing it to accept submissions.

Required scope(s): forms:publish

Enable a form › path Parameters

form_id
​string · required

Enable a form › 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

Enable a form › Responses

Successful Response

​object · required

Enabled form details

object
​string

Object type

Default: form
enabled
​boolean

Whether the form is enabled

Default: true