Create a new communication channel

POST /api/configuration/consent/communication-channels

Overview

Creates a communication channel — the medium (email, SMS, post and so on) that a member's consent is recorded against. Channels are tenant-wide; a member consent record pairs one channel with one campaign.

The channel identifier is generated for you and is not returned. A successful call answers 201 with the body "Created" and a Location header pointing at the channel list, not at the new channel. To learn the id, list the channels afterwards and match on channelName.

This call is not idempotent and nothing enforces uniqueness. There is no check on the name and the generated id includes random digits, so posting the same body twice produces two channels with the same name and different ids, both of which members can be consented against. Check the existing channel list before retrying a request that timed out.

Channels created here are marked as non-system, which is what makes them deletable later. The new channel is visible to subsequent reads immediately.

Endpoint

POST {base_url}/api/configuration/consent/communication-channels

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

Request body

FieldTypeRequiredDescription
channelNamestringYesThe display name of the channel, for example Email or SMS. Required and no longer than 50 characters. It also seeds the generated identifier: the name is upper-cased, spaces are stripped, the first characters are taken as a prefix and an underscore plus random digits are appended to make a 16-character id. Note the prefix rule truncates short names by one character — a name under 10 characters contributes only its first length - 1 characters, so Email yields a prefix of EMAI. Names are not checked for uniqueness.

Sample request

cURL
curl -X POST '{base_url}/api/configuration/consent/communication-channels' \
  -H 'Authorization: Bearer {accessToken}' \
  -H 'X-Use-SSO: true' \
  -H 'Content-Type: application/json' \
  -d '{
  "channelName": "string"
}'

Errors

StatusMeaningWhen
400Bad requestchannelName is missing or longer than 50 characters. The body is a validation error object keyed by field name.
500Internal server errorAn unexpected server-side failure while saving the channel. A single-character channelName also returns 500, because no identifier can be generated from it. The body is empty.

This page as markdown · All pages · llms.txt