---
title: "Named users association"
method: POST
path: "/api/named_users/associate"
tags: ["Named Users"]
---

# Named users association

`POST /api/named_users/associate`

## Request

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

Associate a channel or email address with a named user (`named_user_id`). If the `named_user_id` does not already exist, this operation will create it. If the `channel_id` or `email address` is already associated with the `named_user_id`, this operation will do nothing.

## Request body

- union
  - ChannelIdNamedUserAssociation
    - `channel_id` string, uuid, required: The channel ID you want to associate with a named user.
    - `device_type` 'ios' | 'android' | 'amazon' | 'web' | 'open' | 'email' | 'sms': The device type of the channel.
    - `named_user_id` string, required: A string value identifying the user, without leading or trailing whitespace.
  - EmailAddressNamedUserAssociation
    - `email_address` string, email, required: The email address you want to associate with a named user.
    - `named_user_id` string, required: The existing named user ID

## Response `200`

The request was accepted but is not guaranteed to be successfully processed.
If the named user has more than 1,000 channels associated with it, the request will be ignored.

- OkResponseObject: Returned with 2xx Responses. At a minimum, successful calls return `true` for the `ok` key. If your call includes a verbose response (as with `GET` requests, etc.), the `ok` key will appear in the top-most object, outside the verbose response.
  - `ok` boolean, required: Success.
  - `operation_id` string, uuid: A unique string identifying the operations that modify resources. Use the operation ID to locate and track grouped operations (i.e., a batch push operation may generate multiple `push_id` strings, but a single `operation_id`) or operations that change an existing resource.

## 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.
- `406`: Return when the client requests a version of the API that cannot be satisfied, because no compatible version is currently deployed.

## Changes

- **2026-06-24** `38241778b0c1`: 1 breaking, 1 info
  - removed `subschema #1: Named User association payload with Channel ID, subschema #2: Named User association payload with email address` from the request body `oneOf` list
  - added `#/components/schemas/channelIdNamedUserAssociation, #/components/schemas/emailAddressNamedUserAssociation` to the request body `oneOf` list
  - …this revision’s changelog is incomplete
- **2025-08-28** `3304568aaadc`: 1 breaking
  - removed `subschema #1: Associate channel_id with named user, subschema #2: Associate email with named user` from the request body `oneOf` list
  - …this revision’s changelog is incomplete

[Operation history](https://skmtc.dev/airship/apis/airship-api/changes/api/named_users/associate/post.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)
