Skip to main content
Version: 2025-12-18

Upload test respondent unique codes

POST 

/demand/accounts/{account_id}/target-groups/{target_group_id}/respondent-unique-codes/test

Uploads a batch of respondent unique codes for a target group. These codes are inserted into the test URL for each respondent who enters a survey session for testing purposes.

:::note URL Setup Required Before using this endpoint, you must set up your target group's test URL to include the [%RESPONDENT_UNIQUE_CODE%] placeholder.

Example test URL setup: https://example_test_url.com?id=[%RESPONDENT_UNIQUE_CODE%] :::

Processing Rules​

  • Batch Size: You can submit a minimum of 1 and a maximum of 20,000 codes in a single request.
  • Code Format: Codes must be between 1 and 128 characters and contain only alphanumeric characters, hyphens (-), and underscores (_). Leading and trailing whitespace will be removed.
  • Uniqueness: Only unique codes are processed.
    • If you include duplicates within a single batch, only the first occurrence is considered.
    • If you upload codes that already exist for this target group's test URL, they will be ignored.

:::caution Feature Access This feature must be enabled for your account. If it's not enabled, this endpoint will return a 403 Forbidden error. Please contact your account manager for more information. :::

Request​

Responses​

Returns a summary of the upload operation, including the number of new codes that were successfully added and the number of codes that were ignored because they were duplicates or already existed, and the number of codes in the pool after the upload. Counts reflect the pool when the response is built; concurrent uploads or consumption may already be included.