Clienvy API documentation

Marketing unsubscribes

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. An address unsubscribes from mail types one by one, or from every type at once (also types added later); it then gets no mailings of those types from this organization any more. Mail of the system type, and mail about invoices, tickets and websites, is not affected.


List unsubscribed addresses

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

Returns every address that unsubscribed from something, most recently changed first, each with what it unsubscribed from.

List unsubscribed addresses › query Parameters

search
​string

Only return addresses that contain this text.

page
​integer

Page number of the paginated result set.

per_page
​integer

Number of items per page. Defaults to the endpoint's own page size; capped at 500.

List unsubscribed addresses › Headers

X-Organization-Id
​string · uuid · required

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

List unsubscribed addresses › Responses

Array of MarketingUnsubscribeResource

​object

Unsubscribe an address

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

Unsubscribes an address by hand, for instance after a phone call: from the given mail types, or from every type, also types added later, when none are given or they are every type there is. Refused for an address that is unsubscribed already: change that one instead.

Unsubscribe an address › Headers

X-Organization-Id
​string · uuid · required

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

Unsubscribe an address › Request Body

email
​string · email · required
​array · required

UUIDs of the mail types to unsubscribe from, see GET /marketing-mail-types. Empty for every type. The system type cannot be unsubscribed from.

Unsubscribe an address › Responses

MarketingUnsubscribeResource

id
​string · uuid
email
​string
​ContactReferenceResource | null

The contact the address belongs to. Null when it belongs to no contact.

all_mail_types
​boolean

Unsubscribed from every mail type, also from types added later: it has none of its own.

The mail types it unsubscribed from one by one. Empty when it unsubscribed from every type.

updated_at
​string · date-time

When it last changed, such as unsubscribing from one more type.


Get an unsubscribed address

GET
https://api.clienvy.io/employee/v1
/marketing-unsubscribes/{marketingUnsubscribe}

Get an unsubscribed address › path Parameters

marketingUnsubscribe
​string · uuid · required

The marketing unsubscribe UUID

Get an unsubscribed address › Headers

X-Organization-Id
​string · uuid · required

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

Get an unsubscribed address › Responses

MarketingUnsubscribeResource

id
​string · uuid
email
​string
​ContactReferenceResource | null

The contact the address belongs to. Null when it belongs to no contact.

all_mail_types
​boolean

Unsubscribed from every mail type, also from types added later: it has none of its own.

The mail types it unsubscribed from one by one. Empty when it unsubscribed from every type.

updated_at
​string · date-time

When it last changed, such as unsubscribing from one more type.


Change what an address is unsubscribed from

PUT
https://api.clienvy.io/employee/v1
/marketing-unsubscribes/{marketingUnsubscribe}

Sets the mail types the address is unsubscribed from, or every type when none are given or they are every type there is, and subscribes it again to what is left out. To subscribe it to everything again, delete it.

Change what an address is unsubscribed from › path Parameters

marketingUnsubscribe
​string · uuid · required

The marketing unsubscribe UUID

Change what an address is unsubscribed from › Headers

X-Organization-Id
​string · uuid · required

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

Change what an address is unsubscribed from › Request Body

​array · required

UUIDs of the mail types to unsubscribe from, see GET /marketing-mail-types. Empty for every type. The system type cannot be unsubscribed from.

Change what an address is unsubscribed from › Responses

MarketingUnsubscribeResource

id
​string · uuid
email
​string
​ContactReferenceResource | null

The contact the address belongs to. Null when it belongs to no contact.

all_mail_types
​boolean

Unsubscribed from every mail type, also from types added later: it has none of its own.

The mail types it unsubscribed from one by one. Empty when it unsubscribed from every type.

updated_at
​string · date-time

When it last changed, such as unsubscribing from one more type.


Subscribe an address to everything again

DELETE
https://api.clienvy.io/employee/v1
/marketing-unsubscribes/{marketingUnsubscribe}

The address gets every marketing mail again. Only with the consent of the recipient when they unsubscribed themselves.

Subscribe an address to everything again › path Parameters

marketingUnsubscribe
​string · uuid · required

The marketing unsubscribe UUID

Subscribe an address to everything again › Headers

X-Organization-Id
​string · uuid · required

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

Subscribe an address to everything again › Responses

MarketingUnsubscribeResource

id
​string · uuid
email
​string
​ContactReferenceResource | null

The contact the address belongs to. Null when it belongs to no contact.

all_mail_types
​boolean

Unsubscribed from every mail type, also from types added later: it has none of its own.

The mail types it unsubscribed from one by one. Empty when it unsubscribed from every type.

updated_at
​string · date-time

When it last changed, such as unsubscribing from one more type.