---
title: "Create an account relationship"
method: POST
path: "/accounts/{account_id}/relationship"
tags: ["accounts"]
---

# Create an account relationship

`POST /accounts/{account_id}/relationship`

Creates a parent or partner relationship for the account in the URL.

**Rate limit:** 20 requests per minute

## Path parameters

- `account_id` string, required

## Request body

- CreateAccountRelationshipRequest
  - `related_object_id` string, required — The ID of the related parent or partner account.
  - `relationship_type` string, required — The relationship type. Must be "parent_account" or "partner_account".

## Response `200`

- CreateAccountRelationshipResponseBody
  - `data` AccountRelationship
    - `child_account_id` string — The ID of the account on the child or client side of the relationship.
    - `created_at` string — The creation time of the relationship.
    - `id` string — The ID of the relationship.
    - `parent_account_id` string — The ID of the account on the parent or partner side of the relationship.
    - `related_object_id` string — The ID of the related parent or partner account.
    - `relationship_type` string — The relationship type. One of "parent_account" or "partner_account".
    - `updated_at` string — The time the relationship was last updated.
  - `request_id` string — The request ID for tracking.

## Other responses

- `400` — The request was invalid or could not be completed.
- `404`
- `500` — An unexpected internal error occurred.

---

[API](https://skmtc.net/usepylon/apis/pylon-api.md) · [All operations](https://skmtc.net/usepylon/apis/pylon-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/usepylon/pylon-api/versions/7b6ea6af992a/schema)
