# Insert a foreign key

Adds a foreign key mapping to a user. This operation does not update or overwrite an existing mapping. A user can have multiple foreign keys for the same system. To replace an existing mapping, first delete the current mapping using the Delete a foreign key operation, then call this operation with the new foreign key value.

Endpoint: PUT /v3/users/{userId}/foreign-key/update/{key}
Version: 2026-11-17
Security: ZephrHmacHttp

## Security:

  - `ZephrHmacHttp` (unknown)
    http ZEPHR-HMAC-*

## Path parameters:

  - `userId` (string, required)
    Unique User identifier

  - `key` (string, required)
    Foreign system key

## Response 200:

  - `200` (unknown)
    OK - Foreign key was successfully inserted or updated

## Response 404:

  - `404` (unknown)
    Not Found - Cannot find a user with the supplied `userId`

