---
title: "Inserts or updates a foreign key"
method: PUT
path: "/v3/users/{userId}/foreign-key/update/{key}"
tags: ["Users"]
---

# Inserts or updates a foreign key

`PUT /v3/users/{userId}/foreign-key/update/{key}`

Inserts or updates the provided foreign key, if the supplied `userId` and `key` match.

## Path parameters

- `userId` string, required
- `key` string, required

## Request body

- string

## Response `200`

OK - Foreign key was successfully inserted or updated

## Other responses

- `404` — Not Found - Cannot find a user with the supplied `userId`

---

[API](https://skmtc.dev/zuora/apis/admin-api-reference.md) · [All operations](https://skmtc.dev/zuora/apis/admin-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/zuora/admin-api-reference/revisions/789812d35ac8/schema)
