Rate this page:
Manages a user's consent.
POST /consent-hub/consent
manage:consent-hub-consent
Array<ConsentRequest>
List of consents to be added or modified.
string
The users email address.
string
URL of the form the user filled out to specify the new consents.
string
The user's 2-letter country code, or UNKNOWN
. Used to determine whether the user is in a GDPR locale. Specifying UNKNOWN
will assume the user is in a GDPR locale. The user locale is most commonly determined based on the user's IP address.
string
Site-specific user ID.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
curl --request POST \
--url 'https://api.atlassian.com/consent-hub/consent' \
--user 'email@example.com:<api_token>' \
--header 'Content-Type: application/json' \
--data '{
"consents": [
{
"displayedText": "Yes, I would like to receive promotional emails including product news, events, and more from Atlassian and its affiliates.\n",
"granted": true,
"key": "generalMarketingOptIn"
}
],
"email": "example@email.com",
"formUrl": "<string>",
"locale": "US",
"providerId": "12345"
}'
If the validation of request data is successful, the status code will be 202 with no response body. This indicates that the request has been accepted for processing. All update operations are asynchronous and may take several seconds to take effect.
A schema has not been defined for this response code.
POST /consent-hub/consent-config/get
manage:consent-hub-consent
string
The user's email address. If provided, this will query ConsentHub for the user's consent preferences using their email address. If not provided, the returned object values will be based solely on the locale determined by the user's IP address. This request field defines hasUserMadeChoiceOnMarketingCommunicationOptIn
and usersChoiceOnMarketingCommunicationOptIn
response fields.
string
The user's IP is used in determining locale via geolocation. This request field defines locale
and localeRequiresMarketingCommunicationOptIn
response fields.
1 2 3 4 5 6 7 8 9
curl --request POST \
--url 'https://api.atlassian.com/consent-hub/consent-config/get' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"email": "example@email.com",
"userIp": "185.166.140.232"
}'
The configuration information was retrieved
Content type | Value |
---|---|
application/json |
Rate this page: