---
title: "Update Profiles API token (legacy)"
method: PUT
path: "/audiences/{audienceId}/tokens/{tokenId}"
tags: ["Tokens"]
---

# Update Profiles API token (legacy)

`PUT /audiences/{audienceId}/tokens/{tokenId}`

Update a Profiles API token. <br> <br> <br> _This endpoint is for Audience Studio legacy. For the latest Audience Studio, contact your Customer Success Representative._

## Path parameters

- `audienceId` integer, required
- `tokenId` integer, required

## Request body

- TokenParameters
  - `description` string — description
  - `token` string, uuid — UUID of the token
  - `keyColumn` string, required — A key column name to fetch the information of a customer.
  - `segments` object[] — associated segments
    - `id` integer
  - `attributeColumns` string[], required — associated attribute column names. Max the number of attribute columns is 5. You must specify empty array if you don't need attributes.

## Response `200`

successful operation

- Token
  - `id` string, integer
  - `audienceId` string, integer
  - `token` string, uuid — UUID of the token
  - `description` string
  - `keyColumn` string — A key column name to fetch the information of a customer.
  - `segments` SegmentSummary[] — associated segments
    - `id` integer
    - `name` string
    - `realtime` boolean — use `kind` instead
    - `kind` integer — 0: batch, 1: realtime, 2: funnel_stage
    - `description` string
    - `segmentFolderId` integer
    - `population` integer — The population of the segment
  - `attributeColumns` string[] — associated attribute column names.
  - `v2` boolean — whether the token is v2 or not
  - `createdAt` string, date-time
  - `updatedAt` string, date-time
  - `createdBy` User
    - `id` string
    - `td_user_id` string
    - `name` string
  - `updatedBy` User
    - `id` string
    - `td_user_id` string
    - `name` string

## Other responses

- `400` — Given parameters are not valid
- `401` — Unauthorized; You don't provide valid credentials. Maybe you didn't specify valid TD's Master API Key as 'TD1 {Your TD Master API Key}'.
- `403` — Requested resource or action is not allowed because you don't have sufficient permissions
- `404` — The specified resource was not found
- `4XX` — There is a high possibility of error of the authentication system. Please check the contents and authority of the key. Please contact the TD support team if you do not resolve it.
- `5XX` — System error. Because there is a possibility of a temporary error due to network trouble and so on, we recommend several times retry on request side. Please contact the TD support team if you do not resolve it.

---

[API](https://skmtc.net/treasure/apis/cdp-api.md) · [All operations](https://skmtc.net/treasure/apis/cdp-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/treasure/cdp-api/revisions/24caa8eb809b/schema)
