Skip to content

Create new Profiles API token (legacy)

Request

Create a new Profiles API token.


This endpoint is for Audience Studio legacy. For the latest Audience Studio, contact your Customer Success Representative.

Security
TdApikeyAuth
Path
audienceIdinteger, (int64)required

Master Segment ID of the token

Bodyapplication/jsonrequired

Token parameters to create

descriptionstring

description

Example:"description"
tokenstring, (uuid)

UUID of the token

keyColumnstringrequired

A key column name to fetch the information of a customer.

Example:"td_client_id"
segmentsArray of objects

associated segments

Example:
[ { "id": 1234 } ]
attributeColumnsArray of stringsrequired

associated attribute column names. Max the number of attribute columns is 5. You must specify empty array if you don't need attributes.

Example:
[ "gender", "country" ]
curl -i -X POST \
  'https://api-cdp.treasuredata.com/audiences/{audienceId}/tokens' \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '{
    "description": "description",
    "token": "b5507016-7da2-4777-a161-1e8042a6a377",
    "keyColumn": "td_client_id",
    "segments": [
      {
        "id": 1234
      }
    ],
    "attributeColumns": [
      "gender",
      "country"
    ]
  }'

Responses

Given parameters are not valid

Bodyapplication/json
codestringrequired
messagestringrequired
Response
{ "code": "string", "message": "string" }