---
title: "POST /_matrix/identity/v2/lookups"
method: POST
path: "/_matrix/identity/v2/lookups"
tags: ["Federated identity service"]
---

# POST /_matrix/identity/v2/lookups

`POST /_matrix/identity/v2/lookups`

## Request

- The document declares no server URL.
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/linagora/apis/twake-on-matrix-apis-documentation/docs/_matrix/identity/v2/lookups/post.ts> (a function with typed inputs; its response is checked against the schema)

Implements https://github.com/guimard/matrix-spec-proposals/blob/unified-identity-service/proposals/4004-unified-identity-service-view.md

## Request body

- object
  - `mappings` object: List of hashed addresses by identity server hostname
    - `hostname` object[]
      - `hash` string
      - `active` number
  - `algorithm` string, required: Algorithm the client is using to encode the addresses
  - `pepper` string, required: Pepper from '/hash_details'

## Response `201`

Success

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `404`: Not Found
- `405`: Unrecognized
- `500`: Internal server error

## Changes

- **2024-06-06** `ecce38b281bc`: 2 info
  - api tag `Federated identity service` added
  - api tag `Federation server` removed
- **2024-01-09** `c7a6d3a400a7`: 2 info
  - api tag `Federation server` added
  - api tag `Federated identity service` removed

[Operation history](https://skmtc.dev/linagora/apis/twake-on-matrix-apis-documentation/changes/_matrix/identity/v2/lookups/post.md)

---

[API](https://skmtc.dev/linagora/apis/twake-on-matrix-apis-documentation.md) - [All operations](https://skmtc.dev/linagora/apis/twake-on-matrix-apis-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/linagora/apis/twake-on-matrix-apis-documentation/revisions/3428c7bb5a46?raw)
