---
source_url: https://www.pubnub.com/docs/sdks/rest-api/data-sync-relationship-introduction
title: DataSync (Relationship) introduction
---

# DataSync (Relationship) introduction

> For AI agents: documentation index at https://www.pubnub.com/llms-full.txt

Relationships connect two entities. Every relationship belongs to a relationship class that defines which entity classes it may join and with what cardinality.

Use these endpoints to create, read, update, and delete relationships of any class you have defined.

**Note:** For more information, refer to the [DataSync data model](https://www.pubnub.com/docs/data-storage/structured-data/data-model.md).

### Authorization

Access Manager must be enabled on the keyset, and every DataSync request must carry exactly one credential: either an Access Manager token in `auth`, or a request `signature`. There is no anonymous access.

Supplying neither fails with `401` (`DS-0203`, UNAUTHENTICATED). Supplying both fails with `403` (`DS-0201`, ACCESS_DENIED), as does calling DataSync on a keyset without Access Manager enabled.

Refer to [DataSync access control](https://www.pubnub.com/docs/data-storage/structured-data/access-control.md).
