---
title: "Look up contact ID by named user ID"
method: GET
path: "/api/contacts/lookup/named_user/{named_user_id}"
tags: ["Contacts"]
---

# Look up contact ID by named user ID

`GET /api/contacts/lookup/named_user/{named_user_id}`

## Request

- Base URL: `https://go.urbanairship.com`
- URL: `https://go.urbanairship.com/api/contacts/lookup/named_user/{named_user_id}`
- Auth: one of:
  - HTTP basic
  - HTTP bearer
  - OAuth 2
    - Client credentials
    - Token URL: `http://oauth2.{domain}.com/token` scopes: `cnt`
- TypeScript: <https://skmtc.dev/airship/apis/airship-api/docs/api/contacts/lookup/named_user/:named_user_id/get.ts> (a function with typed inputs; its response is checked against the schema)

Looks up a contact ID for the given named user ID.

## Path parameters

- `named_user_id` string, required

## Response `200`

The request was accepted.

- IdentifyAnonymousContactResponse: The contact ID in the response will be based on these precedence rules: * From the named user if it exists * From the channel if it is associated to an [anonymous contact](/developer/sdk-integration/mobile/audience/#contacts) * From the payload if provided * Randomly generated
  - `contact_id` string, uuid, required: The resolved contact ID.
  - `ok` boolean, required: Set to `true` when status code is `200`.

## Other responses

- `400`: There was a parsing or validation error in the request. Bad Request errors typically include `path` and `location` in the response to help you find the cause of the error.
- `401`: Authentication information (the app key and secret or bearer token) was either incorrect or missing.
- `403`: Authentication was correct, but the user does not have permission to access the requested API, e.g., if the feature in question is not included in your pricing plan.
- `404`: The requested resource doesn't exist.
- `406`: Return when the client requests a version of the API that cannot be satisfied, because no compatible version is currently deployed.

## Changes

- **2026-02-20** `e2bd980cb50b`: 1 info
  - the endpoint scheme security `oauth2Token` was added to the API
- **2025-11-19** `43eb86d7e2d0`: 1 info
  - endpoint added
  - …this revision’s changelog is incomplete

[Operation history](https://skmtc.dev/airship/apis/airship-api/changes/api/contacts/lookup/named_user/:named_user_id/get.md)

---

[API](https://skmtc.dev/airship/apis/airship-api.md) - [All operations](https://skmtc.dev/airship/apis/airship-api/llms.txt) - [OpenAPI document](https://skmtc.dev/airship/apis/airship-api/revisions/bd6ab947117a?raw)
