diff --git a/docs/endpoints/post-identity-map-v2.md b/docs/endpoints/post-identity-map-v2.md
new file mode 100644
index 000000000..53674fe68
--- /dev/null
+++ b/docs/endpoints/post-identity-map-v2.md
@@ -0,0 +1,203 @@
+---
+title: POST /identity/map (v2)
+description: Maps DII to raw UID2s and salt bucket IDs.
+hide_table_of_contents: false
+sidebar_position: 08
+---
+
+import Link from '@docusaurus/Link';
+
+# POST /identity/map (v2)
+
+Maps multiple email addresses, phone numbers, or their respective hashes to their raw UID2s and salt bucket IDs. 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 earlier version 2 of this endpoint. For documentation for the latest version 3 of this endpoint, see: [POST /identity/map](post-identity-map.md).
+
+## 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 Private Operator, do not send batches in parallel. In other words, use a single HTTP connection and send batches of hashed or unhashed directly identifying information (DII) values consecutively, without creating multiple parallel connections.
+- Be sure to store mappings of email addresses, phone numbers, or their respective hashes. 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` 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 API keys. 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.
diff --git a/docs/endpoints/post-identity-map.md b/docs/endpoints/post-identity-map.md
index 70b2bfb7c..c1dfd1eb7 100644
--- a/docs/endpoints/post-identity-map.md
+++ b/docs/endpoints/post-identity-map.md
@@ -1,20 +1,27 @@
---
title: POST /identity/map
-description: Maps DII to raw UID2s and salt bucket IDs.
+description: Maps DII to UID2s.
hide_table_of_contents: false
sidebar_position: 08
+displayed_sidebar: docs
---
import Link from '@docusaurus/Link';
# POST /identity/map
-Maps multiple email addresses, phone numbers, or their respective hashes to their raw UID2s and salt bucket IDs. You can also use this endpoint to check for updates to opt-out information.
+Maps multiple email addresses, phone numbers, or their respective hashes to their UID2s. You can also use this endpoint to check for updates to opt-out information, check when a UID2 can be refreshed, or view the previous UID2 if the current UID2 is less than 90 days old.
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 the latest version of this endpoint.
+
+If needed, documentation is also available for the earlier version 2 of this endpoint, see: [POST /identity/map (v2)](post-identity-map-v2.md).
+
## Batch Size and Request Parallelization Requirements
Here's what you need to know:
@@ -22,11 +29,11 @@ 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 Private Operator, do not send batches in parallel. In other words, use a single HTTP connection and send batches of hashed or unhashed directly identifying information (DII) values consecutively, without creating multiple parallel connections.
-- Be sure to store mappings of email addresses, phone numbers, or their respective hashes. 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).
+- Be sure to store mappings of email addresses, phone numbers, or their respective hashes. 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 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'`
+`POST '{environment}/v3/identity/map'`
For authentication details, see [Authentication and Authorization](../getting-started/gs-auth.md).
@@ -47,46 +54,40 @@ The integration environment and the production environment require different
environment as well as the production environment, you'll get a separate set of credentials for each environment. See [Getting Your Credentials](#getting-your-credentials).
In addition, in some cases, we recommend, but do not require, that you have a different set of credentials for a different scenario. For example:
-- If you're a publisher who generates UID2 tokens (via [POST /token/generate](../endpoints/post-token-generate.md) or in some other way), but you also create/map raw UID2s on your own behalf (see [POST /identity/map](../endpoints/post-identity-map.md)), you might have separate credentials for each of these activities.
+- If you're a publisher who generates UID2 tokens (via [POST /token/generate](../endpoints/post-token-generate.md) or in some other way), but you also create/map raw UID2s on your own behalf (see [POST /identity/map)](../endpoints/post-identity-map.md)), you might have separate credentials for each of these activities.
- If you're an advertiser, in a scenario where you allow multiple service providers to operate using your advertiser keys, you might choose to have separate credentials for each service provider.
## Getting Your Credentials
diff --git a/docs/getting-started/gs-permissions.md b/docs/getting-started/gs-permissions.md
index 4a76db34e..c55faa312 100644
--- a/docs/getting-started/gs-permissions.md
+++ b/docs/getting-started/gs-permissions.md
@@ -26,4 +26,4 @@ The following table lists the key permissions, the types of participants that co
| Generator | Publishers | Permission to call the [POST /token/generate](../endpoints/post-token-generate.md), [POST /token/validate](../endpoints/post-token-validate.md), and [POST /token/refresh](../endpoints/post-token-refresh.md) endpoints, to generate UID2 tokens from DII and to refresh them, using one of these integration methods:
A Prebid integration
The SDK for JavaScript
An integration that directly calls the applicable API endpoints for retrieving and managing UID2 tokens.
|
| Bidder | DSPs | Permission to decrypt UID2 tokens coming in from the bidstream from publishers into raw UID2s for bidding purposes. |
| Sharer | Any participant type that takes part in UID2 sharing. For details, see [UID2 Sharing: Overview](../sharing/sharing-overview.md). | Permission to do both of the following:
Encrypt raw UID2s into UID2 tokens for sharing with another authorized sharing participant, using a UID2 SDK or Snowflake
Decrypt UID2 tokens received from another authorized sharing participant into raw UID2s.
|
-| Mapper | Advertisers Data Providers | Permission to use the [POST /identity/buckets](../endpoints/post-identity-buckets.md) endpoint to monitor rotated salt buckets and to use the [POST /identity/map](../endpoints/post-identity-map.md) endpoint to map multiple email addresses, phone numbers, or their respective hashes to their raw UID2s and salt bucket IDs. |
+| Mapper | Advertisers Data Providers | Permission to call the [POST /identity/map](../endpoints/post-identity-map.md) endpoint to map multiple email addresses, phone numbers, or their respective hashes to their raw UID2s, previous raw UID2s and refresh timestamps. Permission to use the earlier V2 Identity Map [POST /identity/map (v2)](../endpoints/post-identity-map-v2.md) and [POST /identity/buckets](../endpoints/post-identity-buckets.md) endpoints as well. |
diff --git a/docs/guides/integration-advertiser-dataprovider-endpoints.md b/docs/guides/integration-advertiser-dataprovider-endpoints.md
index 1f523e229..358c4c593 100644
--- a/docs/guides/integration-advertiser-dataprovider-endpoints.md
+++ b/docs/guides/integration-advertiser-dataprovider-endpoints.md
@@ -62,8 +62,8 @@ DII refers to a user's normalized email address or phone number, or the normaliz
| Step | Endpoint | Description |
| --- | --- | --- |
-| 1-a | [POST /identity/map](../endpoints/post-identity-map.md) request | Send a request containing DII to the identity mapping endpoint. |
-| 1-b | [POST /identity/map](../endpoints/post-identity-map.md) response | The `advertising_id` (raw UID2) returned in the response can be used to target audiences on relevant DSPs. The response returns a user's raw UID2 and the corresponding `bucket_id` for the salt bucket. The salt assigned to the bucket rotates annually, which impacts the generated raw UID2. For details on how to check for salt bucket rotation, see [5: Monitor for salt bucket rotations related to your stored raw UID2s](#5-monitor-for-salt-bucket-rotations-for-your-stored-raw-uid2s). |
+| 1-a | [POST /identity/map (v2)](../endpoints/post-identity-map-v2.md) request | Send a request containing DII to the identity mapping endpoint. |
+| 1-b | [POST /identity/map (v2)](../endpoints/post-identity-map-v2.md) response | The `advertising_id` (raw UID2) returned in the response can be used to target audiences on relevant DSPs. The response returns a user's raw UID2 and the corresponding `bucket_id` for the salt bucket. The salt assigned to the bucket rotates annually, which impacts the generated raw UID2. For details on how to check for salt bucket rotation, see [5: Monitor for salt bucket rotations related to your stored raw UID2s](#5-monitor-for-salt-bucket-rotations-for-your-stored-raw-uid2s). |
### 2: Store Raw UID2s and Salt Bucket IDs
@@ -105,8 +105,8 @@ The following table shows the steps for checking for salt bucket rotation.
| --- | --- | --- |
| 5-a | [POST /identity/buckets](../endpoints/post-identity-buckets.md) | Send a request to the `POST /identity/buckets` endpoint for all salt buckets that have changed since a specific timestamp. |
| 5-b | [POST /identity/buckets](../endpoints/post-identity-buckets.md) | UID2 service: The `POST /identity/buckets` endpoint returns a list of `bucket_id` and `last_updated` timestamps. |
-| 5-c | [POST /identity/map](../endpoints/post-identity-map.md) | Compare the returned `bucket_id` to the salt buckets of raw UID2s that you've cached. If you find that the salt bucket was updated for one or more raw UID2s, re-send the DII to the `POST /identity/map` endpoint for a new raw UID2. |
-| 5-d | [POST /identity/map](../endpoints/post-identity-map.md) | Store the new values returned for `advertising_id` and `bucket_id`. |
+| 5-c | [POST /identity/map (v2)](../endpoints/post-identity-map-v2.md) | Compare the returned `bucket_id` to the salt buckets of raw UID2s that you've cached. If you find that the salt bucket was updated for one or more raw UID2s, re-send the DII to the `POST /identity/map (v2)` endpoint for a new raw UID2. |
+| 5-d | [POST /identity/map (v2)](../endpoints/post-identity-map-v2.md) | Store the new values returned for `advertising_id` and `bucket_id`. |
#### Determine whether the salt bucket has been rotated
@@ -126,7 +126,7 @@ It's important to honor user opt-out status. Periodically, monitor for opt-out s
There are two ways that you can check with the UID2 Operator Service to make sure you have the latest opt-out information:
-- Call the [POST /identity/map](../endpoints/post-identity-map.md) endpoint to check for opt-outs. If the DII has been opted out, no raw UID2 is generated.
+- Call the [POST /identity/map (v2)](../endpoints/post-identity-map-v2.md) endpoint to check for opt-outs. If the DII has been opted out, no raw UID2 is generated.
- Check the opt-out status of raw UID2s using the [POST /optout/status](../endpoints/post-optout-status.md) endpoint.
diff --git a/docs/guides/integration-advertiser-dataprovider-overview.md b/docs/guides/integration-advertiser-dataprovider-overview.md
index 651abf6f2..bc0179b04 100644
--- a/docs/guides/integration-advertiser-dataprovider-overview.md
+++ b/docs/guides/integration-advertiser-dataprovider-overview.md
@@ -49,7 +49,7 @@ The following table shows the implementation options that are available for adve
| High-Level Step | Implementation Options |
| --- | --- |
-| [1: Generate Raw UID2s from DII](#1-generate-raw-uid2s-from-dii) | Use any of the following options to map DII to raw UID2s:
One of these UID2 SDKs:
Python SDK: [Map DII to Raw UID2s](../sdks/sdk-ref-python.md#map-dii-to-raw-uid2s)
Java SDK: [Usage for Advertisers/Data Providers](../sdks/sdk-ref-java.md#usage-for-advertisersdata-providers)