---
title: "Set Couple Relationship Spouses Order"
method: POST
path: "/tree/couple-relationships/{crid}/spouses/order"
tags: ["Relationships: Couple"]
---

# Set Couple Relationship Spouses Order

`POST /tree/couple-relationships/{crid}/spouses/order`

## Request

- Base URL: `https://apibeta.familysearch.org/platform`
- URL: `https://apibeta.familysearch.org/platform/tree/couple-relationships/{crid}/spouses/order`
- Auth: HTTP bearer

Set the ordering of spouse1 and spouse2 in a relationship by explicitly designating which existing spouse should be person1 and which should be person2.

## Path parameters

- `crid` string, required

## Headers

- `X-Reason` string

## Request body

- SetCoupleRelationshipSpousesOrder
  - `relationships` object[], required: Array containing exactly one couple relationship with the desired spouse ordering. See <a href="https://developers.familysearch.org/main/docs/json-schema#relationship" target="_blank">Relationship Schema (JSON)</a>
    - `type` string, required: The relationship type. Must be "http://gedcomx.org/Couple".
    - `person1` object, required: The first spouse (will become person1 in the relationship). See <a href="https://developers.familysearch.org/main/docs/json-schema#resourcereference" target="_blank">ResourceReference Schema (JSON)</a>
      - `resourceId` string, required: The ID of the first person.
    - `person2` object, required: The second spouse (will become person2 in the relationship). See <a href="https://developers.familysearch.org/main/docs/json-schema#resourcereference" target="_blank">ResourceReference Schema (JSON)</a>
      - `resourceId` string, required: The ID of the second person.

## Response `204`

The setting of spouse order was successful.

## Other responses

- `400`: The id is invalid, the given spouses are not currently in the relationship, or the persons are currently in traditional order.
- `403`: The relationship is restricted.
- `404`: The requested relationship is not found.
- `410`: The requested relationship has been deleted or merged.
- `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)
