---
title: "Create a relationship"
method: POST
path: "/api/v2/relationships"
tags: ["Relationships"]
---

# Create a relationship

`POST /api/v2/relationships`

## Request

- Base URL: `https://yournation.nationbuilder.com`
- URL: `https://yournation.nationbuilder.com/api/v2/relationships`
- Auth: HTTP bearer

Creates a relationship from given data. Valid relationship types are affiliate-affiliate, alum-school, assistant-assisted, board_member-organization, candidate-committee, chapter-parent, child-parent, consultant-organization, employee-employer, family_partner-family_partner, friend-friend, member-organization, mentee-mentor, partner-partner, primary_contact-organization, relative-relative, representative-constituent, resident-organization, sibling-sibling, spouse-spouse, student-school, student-teacher, subordinate-manager, subsidiary-parent, treasurer-committee. first_signup_id
      corresponds with the ID of the signup on the first role listed, and second_signup_id corresponds
      with the ID of the signup on the second role listed in the relationship type.

## Request body

- RelationshipCreateRequest: The JSON:API top-level document shape for create requests, whose data member carries the new resource's type and attributes.
  - `data` object, required
    - `type` 'relationships', required: The JSON:API resource type of the resource being created.
    - `attributes` RelationshipReadWriteAttributes: The attributes of a relationship that can be both read and written.
      - `first_signup_id` string: The first signup listed in the relationship.
      - `relationship_type` 'affiliate-affiliate' | 'alum-school' | 'assistant-assisted' | 'board_member-organization' | 'candidate-committee' | 'chapter-parent' | 'child-parent' | 'consultant-organization' | 'employee-employer' | 'family_partner-family_partner' | 'friend-friend' | 'member-organization' | 'mentee-mentor' | 'partner-partner' | 'primary_contact-organization' | 'relative-relative' | 'representative-constituent' | 'resident-organization' | 'sibling-sibling' | 'spouse-spouse' | 'student-school' | 'student-teacher' | 'subordinate-manager' | 'subsidiary-parent' | 'treasurer-committee': Describes the relationship as first_signup-second_signup.
      - `second_signup_id` string: The second signup listed in the relationship.
      - `title` string, nullable: Optional description to provide to the relationship.

## Response `201`

The newly created relationship.

- RelationshipShowResponse: The JSON:API top-level document shape for responses returning a single resource under the data member.
  - `data` object, required: A JSON:API resource identifier object, the type/id pair that uniquely identifies a single resource.
    - `id` string, required: Unique identifier of the resource.
    - `type` 'relationships', required: The JSON:API resource type.
    - `attributes` object: The read-only attributes of a relationship.
      - `first_signup_id` string: The first signup listed in the relationship.
      - `relationship_type` 'affiliate-affiliate' | 'alum-school' | 'assistant-assisted' | 'board_member-organization' | 'candidate-committee' | 'chapter-parent' | 'child-parent' | 'consultant-organization' | 'employee-employer' | 'family_partner-family_partner' | 'friend-friend' | 'member-organization' | 'mentee-mentor' | 'partner-partner' | 'primary_contact-organization' | 'relative-relative' | 'representative-constituent' | 'resident-organization' | 'sibling-sibling' | 'spouse-spouse' | 'student-school' | 'student-teacher' | 'subordinate-manager' | 'subsidiary-parent' | 'treasurer-committee': Describes the relationship as first_signup-second_signup.
      - `second_signup_id` string: The second signup listed in the relationship.
      - `title` string, nullable: Optional description to provide to the relationship.
      - `created_at` string, date-time
      - `updated_at` string, date-time
  - `included` Resource[]: Sideloaded resources requested via the include query parameter. Each entry is a full resource object whose shape is documented under its own resource type.
    - `id` string, required: Unique identifier of the resource.
    - `type` string, required: The JSON:API resource type.
    - `attributes` object: The attributes of the resource, as documented for its resource type.
    - `relationships` object: References from this resource to other resources in the document.
  - `meta` object: Non-standard information about the document. Empty unless the endpoint has metadata to convey.

## Other responses

- `400`: The request body or query parameters are invalid, such as an unknown attribute, filter, filter operator, sort field, or sideload.
- `401`: The access token is missing, expired, or not authorized to access this resource.
- `422`: Model validations failed for the resource being created or updated. Unlike this API's other errors, validation failures are returned as a JSON:API errors document locating each invalid field.
- `429`: The access token has exceeded its request quota for the current rate-limit window.

## Changes

- **2026-11-05** `d5c88ca497ac`: 4 breaking, 1 warning, 7 info
  - added `#/components/schemas/create_request_document, subschema #2` to the request body `allOf` list
  - the request's body type changed from `object` to no type
  - the response's body type changed from `object` to no type for status `201`
  - removed the required property `data` from the response with the `201` status
  - …8 more

[Operation history](https://skmtc.dev/nationbuilder/apis/nationbuilder-v2-api/changes/api/v2/relationships/post.md)

---

[API](https://skmtc.dev/nationbuilder/apis/nationbuilder-v2-api.md) - [All operations](https://skmtc.dev/nationbuilder/apis/nationbuilder-v2-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nationbuilder/apis/nationbuilder-v2-api/revisions/d5c88ca497ac?raw)
