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

# DataSync (Membership) introduction

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

Memberships are a built-in DataSync relationship class connecting a user to a channel.

List operations require either `user_id` or `channel_id`, so a membership is always read from one side or the other.

**Note:** For more information, refer to [Users, channels, and memberships](https://www.pubnub.com/docs/data-storage/structured-data/built-in-types.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).
