Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
a4c487c
Add POST /identity/map v3
genwhittTTD Jun 6, 2025
4bb0bbf
initial update of identity map docs with v3 fields
sophia-chen-ttd Jun 11, 2025
c7899f4
small fixes
sophia-chen-ttd Jun 11, 2025
e1146d6
added more detail on response properties
sophia-chen-ttd Jun 11, 2025
fb32e80
small fix
sophia-chen-ttd Jun 11, 2025
e2669aa
added example previous uid
sophia-chen-ttd Jun 11, 2025
b5f24e1
fixed wording
sophia-chen-ttd Jun 12, 2025
cf110c4
removed dii object in request
sophia-chen-ttd Jun 13, 2025
cd95e48
fixed response table
sophia-chen-ttd Jun 13, 2025
eaf3bdf
removing unwanted files
sophia-chen-ttd Jun 13, 2025
fc604d3
updated version section
sophia-chen-ttd Jun 13, 2025
d3a8492
small word fix
sophia-chen-ttd Jun 13, 2025
ef811bf
Removed mentions of migration
sophia-chen-ttd Jun 13, 2025
9872640
Update content and links
vishalegbert-ttd Jun 19, 2025
afa8cdf
Rename
vishalegbert-ttd Jun 19, 2025
6ba50ad
Clean up
vishalegbert-ttd Jun 19, 2025
4ed42b2
Update
vishalegbert-ttd Jun 19, 2025
9801714
Update title
vishalegbert-ttd Jun 19, 2025
7c2af7e
Clarity
vishalegbert-ttd Jun 19, 2025
774cbcd
Update Japanese translation links
vishalegbert-ttd Jun 20, 2025
18af9b1
Revert (v3)
vishalegbert-ttd Jun 20, 2025
4f49e04
Add input example
vishalegbert-ttd Jun 24, 2025
3ce7252
Clean up
vishalegbert-ttd Jun 24, 2025
f981484
Clean up
vishalegbert-ttd Jun 24, 2025
0c780ba
Merge branch 'main' into sch-UID2-5558-v3-identity-map
genwhittTTD Jun 24, 2025
32ae9a3
POST /identity/map update, partial GWH edits
genwhittTTD Jun 24, 2025
b09c6f2
Reverted Japanese file changes
gmsdelmundo Jun 26, 2025
84402a1
Updated post-identity-map filenames and corresponding URLs
gmsdelmundo Jun 27, 2025
8278704
Fixed broken link in sidebar
gmsdelmundo Jun 27, 2025
46debc6
Merge pull request #898 from IABTechLab/sch-UID2-5558-v3-identity-map
gmsdelmundo Jun 27, 2025
a290931
integration overview
aulme Jun 26, 2025
25ae8fb
Updated advertiser summary mermaid
aulme Jun 26, 2025
0ffa745
Integration HTTP guide
aulme Jun 26, 2025
26a439f
Endpoint Integration mermaid
aulme Jun 26, 2025
18174c2
FAQ changes for V3 Identity Map
aulme Jun 26, 2025
f74b43e
Fixing some links
aulme Jun 30, 2025
6c2abc3
glossary
aulme Jun 30, 2025
78bb707
Advertiser and Data Provider overviews, excluding diagrams
aulme Jun 30, 2025
997b3e7
Addressed Gen's feedback and some changes in the same spirit
aulme Jul 1, 2025
26bba33
Some more changes inspired by Gen's feedback
aulme Jul 1, 2025
cb50b6b
Including both old and new docs
aulme Jul 1, 2025
c37cfd9
Re-added older faqs
aulme Jul 1, 2025
3caf042
POST Identity Map V3 improvements and tests for sample code
aulme Jul 4, 2025
c38cc60
V3 Identity Map doc
aulme Jul 4, 2025
24b84a8
Merge pull request #909 from IABTechLab/aul-UID2-5560-java-identity-m…
aulme Jul 4, 2025
b66c8fe
Updating in response to feedback
aulme Jul 7, 2025
ab61ebb
Merge pull request #900 from IABTechLab/aul-UID2-5559-integration-page-2
aulme Jul 7, 2025
952f615
Merge pull request #907 from IABTechLab/aul-UID2-5558-identity-map-v3…
aulme Jul 7, 2025
b18cbaa
Making it clear input is a variable
aulme Jul 7, 2025
8a62eeb
Preparing RC
aulme Jul 7, 2025
2dc45e4
Japanese files
aulme Jul 7, 2025
3a488ab
Release notes first draft
aulme Jul 7, 2025
5eb498e
Small fixes
aulme Jul 7, 2025
2d9a8cb
fix broken link in FAQs file
genwhittTTD Jul 7, 2025
656114c
edits to POST /identity/map migration section
genwhittTTD Jul 7, 2025
b1f7301
update to SDK Summary page
genwhittTTD Jul 7, 2025
34b60ce
Java sdk link uncommented
aulme Jul 8, 2025
029854d
at least -> roughly
aulme Jul 8, 2025
12aba10
update sidebar settings, fix merge conflicts
genwhittTTD Jul 8, 2025
c1001cc
edits to adv guide, mermain diagrams, other edits
genwhittTTD Jul 8, 2025
a9fb1cd
Updated V2/3 -> v2/3 for consistency with other docs
aulme Jul 9, 2025
2e288dd
DIIs -> DII
aulme Jul 9, 2025
f499466
Addressed Gen's feedback re v2 stuff docs being too verbose
aulme Jul 9, 2025
5cd5051
Merge branch 'main' into staging-identity-map-v3
genwhittTTD Jul 9, 2025
4710fca
mods to ADP file updates
genwhittTTD Jul 9, 2025
0a5e576
Figma diagram updates
genwhittTTD Jul 9, 2025
9993d26
few edits
genwhittTTD Jul 9, 2025
5b68657
fix typo
genwhittTTD Jul 9, 2025
2f74875
additional edits
genwhittTTD Jul 9, 2025
62adee8
Copy the English Identity Map content into Japanese until translation…
aulme Jul 10, 2025
7cbff81
Clearer optional steps for Java SDK.
aulme Jul 10, 2025
3b0884d
minor edits
genwhittTTD Jul 10, 2025
20a8d39
Merge branch 'main' into staging-identity-map-v3
genwhittTTD Jul 10, 2025
7571842
Using js null instead of Java Null in JSON api docs
aulme Jul 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/endpoints/post-identity-buckets.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ Monitors rotated <Link href="../ref-info/glossary-uid#gl-salt-bucket">salt bucke

Used by: This endpoint is used mainly by advertisers and data providers. For details, see [Advertiser/Data Provider Integration Overview](../guides/integration-advertiser-dataprovider-overview.md).

:::important
If you're using the latest version (v3) of `POST /v3/identity/map`, you don't need to use `POST /identity/buckets` at all. You only need to use it if you're using the earlier version (v2) of `POST /v2/identity/map`.

If you're using the v2 version, we recommend that you upgrade as soon as possible, to take advantage of improvements. For migration guidance, see [Migration from v2 Identity Map](post-identity-map.md#migration-from-v2-identity-map).
:::

## Request Format

`POST '{environment}/v2/identity/buckets'`
Expand Down
207 changes: 207 additions & 0 deletions docs/endpoints/post-identity-map-v2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,207 @@
---
title: POST /identity/map (v2)
description: Maps DII to raw UID2s and salt bucket IDs.
hide_table_of_contents: false
sidebar_position: 07
---

import Link from '@docusaurus/Link';

# POST /identity/map (v2)

Maps multiple email addresses, phone numbers, or their respective hashes to their raw UID2s and <Link href="../ref-info/glossary-uid#gl-salt-bucket-id">salt bucket IDs</Link>. You can also use this endpoint to check for updates to opt-out information.

Used by: This endpoint is used mainly by advertisers and data providers. For details, see [Advertiser/Data Provider Integration Overview](../guides/integration-advertiser-dataprovider-overview.md).

For details about the UID2 opt-out workflow and how users can opt out, see [User Opt-Out](../getting-started/gs-opt-out.md).

## Version

This documentation is for version 2 of this endpoint, which is not the latest version. For the latest version, v3, see [POST /identity/map](post-identity-map.md).

:::note
If you're using the v2 version, we recommend that you upgrade as soon as possible, to take advantage of improvements. For migration guidance, see [Migration from v2 Identity Map](post-identity-map.md#migration-from-v2-identity-map).
:::

## Batch Size and Request Parallelization Requirements

Here's what you need to know:

- The maximum request size is 1MB.
- To map a large number of email addresses, phone numbers, or their respective hashes, send them in *sequential* batches with a maximum batch size of 5,000 items per batch.
- Unless you are using a <Link href="../ref-info/glossary-uid#gl-private-operator">Private Operator</Link>, do not send batches in parallel. In other words, use a single HTTP connection and send batches of hashed or unhashed <Link href="../ref-info/glossary-uid#gl-dii">directly identifying information (DII)</Link> values consecutively, without creating multiple parallel connections.
- Be sure to store mappings of email addresses, phone numbers, or their respective hashes.<br/>Not storing mappings could increase processing time drastically when you have to map millions of email addresses or phone numbers. Recalculating only those mappings that actually need to be updated, however, reduces the total processing time because only about 1/365th of raw UID2s need to be updated daily. See also [Advertiser/Data Provider Integration Overview](../guides/integration-advertiser-dataprovider-overview.md) and [FAQs for Advertisers and Data Providers](../getting-started/gs-faqs.md#faqs-for-advertisers-and-data-providers).

## Request Format

`POST '{environment}/v2/identity/map'`

For authentication details, see [Authentication and Authorization](../getting-started/gs-auth.md).

:::important
You must encrypt all requests using your secret. For details, and code examples in different programming languages, see [Encrypting Requests and Decrypting Responses](../getting-started/gs-encryption-decryption.md).
:::

### Path Parameters

| Path Parameter | Data Type | Attribute | Description |
| :--- | :--- | :--- | :--- |
| `{environment}` | string | Required | Testing (integration) environment: `https://operator-integ.uidapi.com`<br/>Production environment: The best choice depends on where your users are based. For information about how to choose the best URL for your use case, and a full list of valid base URLs, see [Environments](../getting-started/gs-environments.md). |

:::note
The integration environment and the production environment require different <Link href="../ref-info/glossary-uid#gl-api-key">API keys</Link>. For information about getting credentials for each environment, see [Getting Your Credentials](../getting-started/gs-credentials.md#getting-your-credentials).
:::

### Unencrypted JSON Body Parameters

:::important
You must include only **one** of the following four conditional parameters as a key-value pair in the JSON body of the request when encrypting it.
:::

| Body Parameter | Data Type | Attribute | Description |
| :--- | :--- | :--- | :--- |
| `email` | string array | Conditionally Required | The list of email addresses to be mapped. |
| `email_hash` | string array | Conditionally Required | The list of [Base64-encoded SHA-256](../getting-started/gs-normalization-encoding.md#email-address-hash-encoding) hashes of [normalized](../getting-started/gs-normalization-encoding.md#email-address-normalization) email addresses to be mapped. |
| `phone` | string array | Conditionally Required | The list of [normalized](../getting-started/gs-normalization-encoding.md#phone-number-normalization) phone numbers to be mapped. |
| `phone_hash` | string array | Conditionally Required | The list of [Base64-encoded SHA-256](../getting-started/gs-normalization-encoding.md#phone-number-hash-encoding) hashes of [normalized](../getting-started/gs-normalization-encoding.md#phone-number-normalization) phone numbers to be mapped. |

### Request Examples

The following are unencrypted JSON request body examples for each parameter, one of which you should include in your requests to the `POST /identity/map` endpoint:

```json
{
"email":[
"user@example.com",
"user2@example.com"
]
}
```
```json
{
"email_hash":[
"tMmiiTI7IaAcPpQPFQ65uMVCWH8av9jw4cwf/F5HVRQ=",
"KzsrnOhCq4tqbGFMsflgS7ig1QLRr0nFJrcrEIlOlbU="
]
}
```
```json
{
"phone":[
"+12345678901",
"+441234567890"
]
}
```
```json
{
"phone_hash":[
"EObwtHBUqDNZR33LNSMdtt5cafsYFuGmuY4ZLenlue4=",
"Rx8SW4ZyKqbPypXmswDNuq0SPxStFXBTG/yvPns/2NQ="
]
}
```

Here's an encrypted request example to the `POST /identity/map` endpoint for a phone number:

```sh
echo '{"phone": ["+12345678901", "+441234567890"]}' | python3 uid2_request.py https://prod.uidapi.com/v2/identity/map [Your-Client-API-Key] [Your-Client-Secret]
```

For details, and code examples in different programming languages, see [Encrypting Requests and Decrypting Responses](../getting-started/gs-encryption-decryption.md).

## Decrypted JSON Response Format

:::note
The response is encrypted only if the HTTP status code is 200. Otherwise, the response is not encrypted.
:::

A successful decrypted response returns the raw UID2s and salt bucket IDs for the specified email addresses, phone numbers, or their respective hashes.

```json
{
"body":{
"mapped": [
{
"identifier": "EObwtHBUqDNZR33LNSMdtt5cafsYFuGmuY4ZLenlue4=",
"advertising_id": "AdvIvSiaum0P5s3X/7X8h8sz+OhF2IG8DNbEnkWSbYM=",
"bucket_id": "a30od4mNRd"
},
{
"identifier": "Rx8SW4ZyKqbPypXmswDNuq0SPxStFXBTG/yvPns/2NQ=",
"advertising_id": "IbW4n6LIvtDj/8fCESlU0QG9K/fH63UdcTkJpAG8fIQ=",
"bucket_id": "ad1ANEmVZ"
}
]
},
"status":"success"
}
```

If some identifiers are considered invalid, they are included in the response in an "unmapped" list. In this case, the response status is still "success". If all identifiers are mapped, the "unmapped" list is not included in the response.

```json
{
"body":{
"mapped": [
{
"identifier": "EObwtHBUqDNZR33LNSMdtt5cafsYFuGmuY4ZLenlue4=",
"advertising_id": "AdvIvSiaum0P5s3X/7X8h8sz+OhF2IG8DNbEnkWSbYM=",
"bucket_id": "a30od4mNRd"
}
],
"unmapped": [
{
"identifier": "some@malformed@email@hash",
"reason": "invalid identifier"
}
]
},
"status":"success"
}
```

If some identifiers have opted out from the UID2 ecosystem, the opted-out identifiers are moved to the "unmapped" list along with any invalid identifiers found. In this case, the response status is still "success".

```json
{
"body":{
"mapped": [
{
"identifier": "EObwtHBUqDNZR33LNSMdtt5cafsYFuGmuY4ZLenlue4=",
"advertising_id": "AdvIvSiaum0P5s3X/7X8h8sz+OhF2IG8DNbEnkWSbYM=",
"bucket_id": "a30od4mNRd"
}
],
"unmapped": [
{
"identifier": "tMmiiTI7IaAcPpQPFQ65uMVCWH8av9jw4cwf/F5HVRQ=",
"reason": "optout"
}
]
},
"status":"success"
}
```

### Response Body Properties

The response body includes the properties shown in the following table.

| Property | Data Type | Description |
| :--- | :--- | :--- |
| `identifier` | string | The email address, phone number, or respective hash specified in the request body. |
| `advertising_id` | string | The corresponding advertising ID (raw UID2). |
| `bucket_id` | string | The ID of the salt bucket used to generate the raw UID2. |

### Response Status Codes

The following table lists the `status` property values and their HTTP status code equivalents.

| Status | HTTP Status Code | Description |
| :--- | :--- | :--- |
| `success` | 200 | The request was successful. The response will be encrypted. |
| `client_error` | 400 | The request had missing or invalid parameters.|
| `unauthorized` | 401 | The request did not include a bearer token, included an invalid bearer token, or included a bearer token unauthorized to perform the requested operation. |

If the `status` value is anything other than `success`, the `message` field provides additional information about the issue.
Loading