---
title: "Add relationship to a role"
method: POST
path: "/matters/{matterId}/roles/{roleId}/relationships"
tags: ["Relationships"]
---

# Add relationship to a role

`POST /matters/{matterId}/roles/{roleId}/relationships`

## Request

- Base URL: `https://api.smokeball.com`
- URL: `https://api.smokeball.com/matters/{matterId}/roles/{roleId}/relationships`
- Auth: API key in header `x-api-key` and API key in header `Authorization`

Appends a new relationship with an existing role in the specified matter.

## Path parameters

- `matterId` string, uuid, required
- `roleId` string, uuid, required

## Headers

- `Version` integer

## Request body

- RelationshipDto
  - `name` string, nullable: Name of the relationship.
  - `displayName` string, nullable: Display Name of the relationship.
  - `contactId` string, nullable: Unique identifier of the contact.
  - `representativeIds` string[], nullable: List of associated representative contact ids.
  - `isMatterItemRequired` boolean: Boolean flag indicating if a matter item is required.

## Response `202`

When request is accepted. Returns a hypermedia 'Link' object of the relationship to be created.

- Link
  - `id` string, nullable
  - `href` string, nullable
  - `relation` string, nullable
  - `method` string, nullable

## Other responses

- `400`: When an invalid relationship is provided for the specified role.
- `404`: When the specified matter or role does not exist.

---

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