Consents

    Rate this page:

    Consents

    Manages a user's consent.

    Sets a user's required legal consent statuses

    POST /consent-hub/consent

    manage:consent-hub-consent

    Request

    Body parameters
    consents

    Array<ConsentRequest>

    List of consents to be added or modified.

    email Required

    string

    The users email address.

    formUrl

    string

    URL of the form the user filled out to specify the new consents.

    locale Required

    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.

    providerId

    string

    Site-specific user ID.

    Example

    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"
    }'

    Responses

    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.

    Retrieves user consent and locale information by IP address and user email

    POST /consent-hub/consent-config/get

    manage:consent-hub-consent

    Request

    Body parameters
    email

    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.

    userIp

    string

    The user's IP is used in determining locale via geolocation. This request field defines locale and localeRequiresMarketingCommunicationOptIn response fields.

    Example

    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"
    }'

    Responses

    The configuration information was retrieved

    Content typeValue
    application/json

    ConsentConfiguration

    Rate this page: