Easymailing
Privacy

Create a treatment purpose

POST /treatment_purposes

POST/treatment_purposes

Adds a purpose for which personal data is collected, with the text people accept in each language.

When to use: When the account needs a consent that is not among the existing ones (for example a specific marketing use).

When not to use: To change an existing one use update_treatment_purpose.

Permissions: Requires the manager role or higher, or the account.security.manage capability.

Authorization

X-Auth-Token<token>

Value for the X-Auth-Token header parameter.

In: header

Request Body

The new TreatmentPurpose resource

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://api.easymailing.com/treatment_purposes" \  -H "X-Auth-Token: YOUR_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "translations": [      {        "title": "string",        "locale": "string"      }    ],    "name": "string",    "description": "string",    "custom": true,    "channels": [      "email"    ]  }'
{  "id": 0,  "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",  "translations": [    {      "title": "string",      "locale": "string"    }  ],  "name": "string",  "description": "string",  "custom": true,  "channels": [    "email"  ]}