Skip to content

Update Profiles API token (legacy)

Request

Update a 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

tokenIdinteger, (int64)required

ID of Token to return

Bodyapplication/json
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 PUT \
  'https://api-cdp.treasuredata.com/audiences/{audienceId}/tokens/{tokenId}' \
  -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

successful operation

Bodyapplication/json
idstring, (integer)
audienceIdstring, (integer)
tokenstring, (uuid)

UUID of the token

descriptionstring
keyColumnstring

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

Example:"td_client_id"
segmentsArray of objects(SegmentSummary)

associated segments

attributeColumnsArray of strings

associated attribute column names.

Example:
[ "gender", "country" ]
v2boolean

whether the token is v2 or not

Example:true
createdAtstring, (date-time)
updatedAtstring, (date-time)
createdByobject(User)
updatedByobject(User)
Response
{ "id": "string", "audienceId": "string", "token": "b5507016-7da2-4777-a161-1e8042a6a377", "description": "string", "keyColumn": "td_client_id", "segments": [ {} ], "attributeColumns": [ "gender", "country" ], "v2": true, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "createdBy": { "id": "string", "td_user_id": "string", "name": "string" }, "updatedBy": { "id": "string", "td_user_id": "string", "name": "string" } }