---
title: "Set Preferred Spouse Relationship"
method: PUT
path: "/tree/users/{uid}/preferred-spouse-relationships/{pid}"
tags: ["Relationships: Couple"]
---

# Set Preferred Spouse Relationship

`PUT /tree/users/{uid}/preferred-spouse-relationships/{pid}`

## Request

- Base URL: `https://apibeta.familysearch.org/platform`
- URL: `https://apibeta.familysearch.org/platform/tree/users/{uid}/preferred-spouse-relationships/{pid}`
- Auth: HTTP bearer

Set the preferred spouse relationship for the given user and tree person. The preferred spouse relationship affects only the user that creates it.

## Path parameters

- `uid` string, required
- `pid` string, required

## Headers

- `Location` string, required

## Response `204`

The update was successful.

## Other responses

- `404`: The person was not found.
- `410`: The person has been merged or deleted.
- `429`: The request was throttled.

---

[API](https://skmtc.dev/familysearch/apis/family-tree-endpoints.md) - [All operations](https://skmtc.dev/familysearch/apis/family-tree-endpoints/llms.txt) - [OpenAPI document](https://skmtc.dev/familysearch/apis/family-tree-endpoints/revisions/e248abd029e6?raw)
