---
title: "POST /api/v1/users/{user}/linkedIdentities"
method: POST
path: "/api/v1/users/{user}/linkedIdentities"
tags: ["UserService"]
---

# POST /api/v1/users/{user}/linkedIdentities

`POST /api/v1/users/{user}/linkedIdentities`

CreateLinkedIdentity links an SSO identity to the authenticated user.

## Path parameters

- `user` string, required

## Request body

- CreateLinkedIdentityRequest
  - `parent` string, required — Required. The parent user who owns the linked identity. Format: users/{user}
  - `idpName` string, required — Required. The identity provider to link. Format: identity-providers/{idp}
  - `code` string, required — Required. The authorization code from the identity provider.
  - `redirectUri` string, required — Required. The redirect URI used in the OAuth flow.
  - `codeVerifier` string — Optional. The PKCE code verifier used in the OAuth flow.

## Response `200`

OK

- LinkedIdentity — LinkedIdentity represents an SSO identity linked to a user account.
  - `name` string — The resource name of the linked identity. Format: users/{user}/linkedIdentities/{linked_identity}
  - `idpName` string — The resource name of the identity provider. Format: identity-providers/{idp}
  - `externUid` string — The external user identifier from the identity provider.

## Other responses

- `default` — Default error response

---

[API](https://skmtc.net/usememos/apis/untitled-api.md) · [All operations](https://skmtc.net/usememos/apis/untitled-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/usememos/untitled-api/versions/f01e84cf5acc/schema)
