Clienvy API documentation

Marketing mail types

BETA. Part of the E-mailmarketing module, which only works for organizations that were given access to the beta and switched the module on. Do not use these endpoints on your own initiative; only when the user explicitly asks for it. A mail type says what a marketing mail is about; recipients unsubscribe per type. The one system type (is_system) is for mail about running the business: nobody can unsubscribe from it and it cannot be deleted.


List mail types

GET
https://api.clienvy.io/employee/v1
/marketing-mail-types

Returns every mail type, the system type first.

List mail types › Headers

X-Organization-Id
​string · uuid · required

UUID of the organization (tenant) the request operates on.

List mail types › Responses

Array of MarketingMailTypeResource

id
​string · uuid
name
​string
description
​string | null
is_system
​boolean

The type for mail about running the business: nobody can unsubscribe from it and it cannot be deleted.

created_at
​string · date-time
updated_at
​string · date-time

Create a mail type

POST
https://api.clienvy.io/employee/v1
/marketing-mail-types

Recipients can always unsubscribe from a new mail type.

Create a mail type › Headers

X-Organization-Id
​string · uuid · required

UUID of the organization (tenant) the request operates on.

Create a mail type › Request Body

name
​string · maxLength: 128 · required

Shown to recipients on the unsubscribe page.

description
​string · maxLength: 255

Shown below the name on the unsubscribe page.

Create a mail type › Responses

MarketingMailTypeResource

id
​string · uuid
name
​string
description
​string | null
is_system
​boolean

The type for mail about running the business: nobody can unsubscribe from it and it cannot be deleted.

created_at
​string · date-time
updated_at
​string · date-time

Get a mail type

GET
https://api.clienvy.io/employee/v1
/marketing-mail-types/{marketingMailType}

Get a mail type › path Parameters

marketingMailType
​string · uuid · required

The marketing mail type UUID

Get a mail type › Headers

X-Organization-Id
​string · uuid · required

UUID of the organization (tenant) the request operates on.

Get a mail type › Responses

MarketingMailTypeResource

id
​string · uuid
name
​string
description
​string | null
is_system
​boolean

The type for mail about running the business: nobody can unsubscribe from it and it cannot be deleted.

created_at
​string · date-time
updated_at
​string · date-time

Update a mail type

PUT
https://api.clienvy.io/employee/v1
/marketing-mail-types/{marketingMailType}

Only the fields present in the request change.

Update a mail type › path Parameters

marketingMailType
​string · uuid · required

The marketing mail type UUID

Update a mail type › Headers

X-Organization-Id
​string · uuid · required

UUID of the organization (tenant) the request operates on.

Update a mail type › Request Body

name
​string · maxLength: 128
description
​string · maxLength: 255

Update a mail type › Responses

MarketingMailTypeResource

id
​string · uuid
name
​string
description
​string | null
is_system
​boolean

The type for mail about running the business: nobody can unsubscribe from it and it cannot be deleted.

created_at
​string · date-time
updated_at
​string · date-time

Delete a mail type

DELETE
https://api.clienvy.io/employee/v1
/marketing-mail-types/{marketingMailType}

Refused for the system type and for a type that a mailing uses. The unsubscribes from the type go with it.

Delete a mail type › path Parameters

marketingMailType
​string · uuid · required

The marketing mail type UUID

Delete a mail type › Headers

X-Organization-Id
​string · uuid · required

UUID of the organization (tenant) the request operates on.

Delete a mail type › Responses

MarketingMailTypeResource

id
​string · uuid
name
​string
description
​string | null
is_system
​boolean

The type for mail about running the business: nobody can unsubscribe from it and it cannot be deleted.

created_at
​string · date-time
updated_at
​string · date-time