> ## Documentation Index
> Fetch the complete documentation index at: https://help.hoopai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Associations Overview

> Define relationship types and manage record-level associations between objects in the HoopAI Platform REST API.

The Associations API lets you define typed relationships between objects in the HoopAI Platform — such as contact-to-contact or contact-to-custom-object — and manage the individual record-level relations that connect specific records. Use it to build rich data models where entities across your account are meaningfully linked and queryable together.

## Base URL

```
https://services.leadconnectorhq.com
```

## Authentication

Every request must include a bearer token in the `Authorization` header and the API version in the `Version` header.

```http theme={null}
Authorization: Bearer <access_token>
Version: 2021-07-28
```

Use an access token generated for a **Account** user type, or a Private Integration Token scoped to the account.

## OAuth scopes

| Scope                            | Access                                             |
| -------------------------------- | -------------------------------------------------- |
| `associations.readonly`          | Read association type definitions                  |
| `associations.write`             | Create, update, and delete association definitions |
| `associations/relation.readonly` | Read record-level relations                        |
| `associations/relation.write`    | Create and delete record-level relations           |

## Quick start

Get all association definitions for an account:

```bash theme={null}
curl -X GET "https://services.leadconnectorhq.com/associations/?locationId=clF1LD04GTUKN3b3XuOj&skip=0&limit=100" \
  -H "Authorization: Bearer <access_token>" \
  -H "Version: 2021-07-28"
```

## Endpoints

| Method   | Path                                   | Description                                    |
| -------- | -------------------------------------- | ---------------------------------------------- |
| `GET`    | `/associations/`                       | Get all associations for an account / location |
| `POST`   | `/associations/`                       | Create Association                             |
| `GET`    | `/associations/{associationId}`        | Get association by ID                          |
| `PUT`    | `/associations/{associationId}`        | Update Association By Id                       |
| `DELETE` | `/associations/{associationId}`        | Delete Association                             |
| `GET`    | `/associations/key/{key_name}`         | Get association key by key name                |
| `GET`    | `/associations/objectKey/{objectKey}`  | Get association by object keys                 |
| `POST`   | `/associations/relations`              | Create Relation for your associated entities   |
| `GET`    | `/associations/relations/{recordId}`   | Get all relations By record Id                 |
| `DELETE` | `/associations/relations/{relationId}` | Delete Relation                                |

## Related

* [Objects API overview](/api-reference/objects/overview) — define custom object schemas that participate in associations
* [Custom Fields API overview](/api-reference/custom-fields/overview) — add structured fields to the objects you associate
* [OAuth 2.0 overview](/api-reference/oauth/overview) — obtain and refresh access tokens
