# List memberships

`GET https://api.cademi.com.br/api/v3/automations/diamond/{diamond_id}/memberships`

Operation ID: `diamonds.memberships.list` · API v3

Returns the leads in a Diamond, paginated by cursor. The collection can be filtered by user, stage, and last update time.

Credentials scoped to specific users only see the memberships of those users.

Required permissions: `diamonds.read`.

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `diamond_id` | path | string | yes |  |
| `limit` | query | integer | no |  |
| `cursor` | query | string | no |  |
| `sort` | query | string, one of `id`, `-id` | no |  |
| `user_id` | query | string | no |  |
| `stage_id` | query | string | no |  |
| `updated_after` | query | string (date-time) | no |  |

## Responses

### 200

Returns a page of memberships.

Body: `data`: array of Membership.

Fields of Membership:

| Field | Type | Required | Description |
|---|---|---|---|
| `created_at` | string (date-time) | yes |  |
| `diamond_id` | string | yes | Public ID of the Diamond, with the dmd_ prefix. |
| `enrollment_id` | string or null | yes | Public ID of the enrollment that grants access to the Diamond's internal delivery, with the enr_ prefix. |
| `id` | string | yes | Public ID, with the mbr_ prefix. |
| `last_run` | object or null | yes |  |
| `object` | string, one of `membership` | yes |  |
| `pending` | object | yes |  |
| `progress` | object | yes |  |
| `revision` | string | yes |  |
| `stage_id` | string | yes | Current stage of the lead. |
| `stage_position` | integer | yes |  |
| `updated_at` | string (date-time) | yes |  |
| `user_id` | string | yes | Public ID of the user, with the usr_ prefix. |

### 400

The cursor is invalid or the request contains an unsupported query parameter.

Body: Error.

### 401

The credential is missing, malformed, expired, or revoked.

Body: Error.

### 403

The current credentials do not have the permission required by this operation.

Body: Error.

### 404

The Diamond was not found or is not accessible with the current credentials.

Body: Error.

### 409

Diamond automations are not enabled for the current account.

Body: Error.

### 422

The request body or query parameters failed validation.

Body: ValidationFailed.

Full schema: https://cademi.dev/openapi/v3.json
