# Create a party relationship

To add a party to a module record, you can use the create relationship endpoint and specify the party ID as the relationshipTypeId.  For example, to associate contact record 200 to deal record 100 as party ID 1, you can use the following request:

{% code title="POST /v4/relationship" %}

```json
{
    "parentRecordId": 100,
    "parentCharTypeId": 4,
    "childRecordId": 200,
    "childCharTypeId": 2,
    "relationshipType":{
        "relationshipTypeId": 1
    }
}
```

{% endcode %}

Party IDs can be found via the UI under Configuration > Parties.

{% tabs %}
{% tab title="200 Relationship created successfully." %}

```json
1368592963 //Relationship ID
```

{% endtab %}

{% tab title="400 Invalid relationship type " %}

```
{
    "message": "Unable to create relationship. Relationship Type ID must be a valid Party ID."
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://api-docs.rightsline.com/relationships/create-a-party-relationship.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
