Create a new data processing campaign

POST /api/configuration/consent/data-processing

Overview

Creates a data-processing campaign — a named purpose that members can grant or refuse consent for, covering data collection and processing rather than marketing. Consent is recorded per member as a campaign and channel pair, so you also need at least one communication channel.

A successful call answers 201 with the generated campaign identifier as the response body. You cannot choose the identifier; it is derived from name with random digits appended, so it differs on every call.

Campaign names must be unique across data-processing and marketing campaigns together. The name check covers both kinds, so a data-processing campaign called Newsletter blocks a marketing campaign of the same name, and vice versa. A clash returns 400, not 409.

Because the identifier is generated and the name is checked for uniqueness, a retry after a timeout is safe: if the first attempt succeeded, the retry fails with the duplicate-name 400 rather than creating a second campaign.

One side effect to plan for: on success, consent records for existing members are created against the new campaign asynchronously. Their outcome is not reported, so member consent may take a moment to appear and a failure there will not fail this call.

Endpoint

POST {base_url}/api/configuration/consent/data-processing

{base_url} is the environment URL issued to your integration. See Authenticating with Gladstone APIs.

Request body

FieldTypeRequiredDescription
namestringYesThe campaign name shown to members when they set their preferences. Maximum 50 characters, and it must be unique across both data-processing and marketing campaigns — a clash returns 400 with AgencyName {name} or Agency {id} already exists. It also seeds the generated identifier: the name is upper-cased, spaces are stripped, the first characters form a prefix, and an underscore plus random digits are appended. Although the field is not validated as required, omitting it is not safe — the call fails with 500. Single-character names fail the same way.
descriptionstringNoLonger explanatory text about what members are consenting to, shown alongside the name. Maximum 1024 characters. Omit it, or send null, to store no description.
expiryDatestring (date-time)NoWhen consent given for this campaign lapses, as an ISO 8601 date-time. It is rejected with 400 if it falls in the past. Omit it, or send null, for a campaign whose consent does not expire.
isActivebooleanNoWhether the campaign is offered to members for consent straight away. Defaults to false when omitted, so send true explicitly if the campaign should be live on creation — a campaign created inactive exists but is not presented for consent.

Sample request

cURL
curl -X POST '{base_url}/api/configuration/consent/data-processing' \
  -H 'Authorization: Bearer {accessToken}' \
  -H 'X-Use-SSO: true' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string",
  "description": "string",
  "expiryDate": "2026-08-14T19:00:00Z",
  "isActive": true
}'

Errors

StatusMeaningWhen
400Bad requestname is longer than 50 characters, description is longer than 1024, or expiryDate is in the past. The body is a validation error object keyed by field name.
400Bad requestA campaign — data-processing or marketing — already uses this name: AgencyName {name} or Agency {id} already exists.
409ConflictThe entry clashes with one that already exists — This entry already exists in the database.
500Internal server errorname was omitted, was null, or was a single character, because no identifier can be generated from it. Also any other unexpected server-side failure. The body is empty.

This page as markdown · All pages · llms.txt