Update consent type
  • 19 Nov 2024
  • 1 Minute to read
  • Dark
    Light

Update consent type

  • Dark
    Light

Article summary

The API endpoint `/messaging/client//consent/channel` is designed to update consent types for a specific notification channel, primarily for SMS communications. It requires several parameters, including a client ID, channel address (a mobile phone number), and channel type, which must be 'sms'. The request must include an API key in the header and a JSON document in the body specifying the consent type, which can be 'written', 'express', or 'stop'. Successful requests return a 200 OK status, confirming the phone number's removal from the customer or patient record. Other possible responses include 400 for invalid requests, 401 for unauthorized access, 404 for not found errors, 409 for conflicts, and 500 for server errors. Each response provides additional context regarding the outcome of the request, ensuring clarity for users interacting with the API.

Put
/messaging/client/{client_id}/consent/channel_addr/{channel_addr}/channel_type/{channel_type}

This API is used to change the consent_types for a specific notification channel.

Header parameters
xx-relay-api-key
stringRequired

Contains the API key needed.

Path parameters
client_id
stringRequired

Client ID

Minimum1
channel_addr
stringRequired

Channel address - a mobile phone number.

channel_type
stringRequired

Channel type - supported values are 'sms'.

Body parameters

A customer onboard JSON document

object
consent_type
string

Identifies the consent update for the channel_address of the Customer or Patient.

Valid values[ "written", "express", "stop" ]
Examplewritten
Responses
200

OK - The phone number was successfully removed from the Customer or Patient record.

Expand All
object
consent
object
client_id
string

Identifies the client to which the consent is associated.

Examplerelay_developer
created_at
string

Contains the date and time when the Consent was created.

Example2024-07-05T22:16:12.934Z
updated_at
string

Contains the date and time when the Consent was last updated.

Example2024-07-05T22:16:12.934Z
channel_type
string

Identifies the channel type of the channel_addr field.

Valid values[ "sms" ]
channel_addr
string

Contains the channel address.

Minimum10
Max length11
Example6105551212
consent_type
string

Identifies the consent of the Customer or Patient.

Valid values[ "written", "express", "stop" ]
400

Invalid request

401

Unauthorized

404

Not Found - The requested resource was not found. Please verify the route parameter.

409

Conflict - Indicates the request could not be processed. A common reason is when attempting to create a new Journey object, but the ID already exists in the system.

500

An unexpected server error occurred. The response body should contain additional information related to the server error. Please retry your request.


Was this article helpful?