---
title: "List business memberships"
method: GET
path: "/organization-roles"
tags: ["Organization Roles"]
---

# List business memberships

`GET /organization-roles`

## Request

- Base URL: `https://api.purplegrain.com/api/v1`
- URL: `https://api.purplegrain.com/api/v1/organization-roles`
- Auth: none declared

The signed-in user's own memberships. `user_id` must be that user
(`fetchCurrentUser`); any other value is 403. There is no filter by
business. With `include=organization`, each row is a business they
belong to and the permission on it (`owner`, `manager`, and the rest).
A business's properties are `listFarms` with that business's id; they
are not in the personal property list.

## Query parameters

- `user_id` string
- `page` integer
- `per_page` integer
- `include` string

## Response `200`

Successful. When the `include` query parameter is used, the response may contain an `included` array (JSON:API) or inlined related resources (application/json).

- OrganizationRolesIndexResponseAttributes
  - `data` OrganizationRoleModelAttributes[]
    - `id` string
    - `type` string
    - `status` 'pending' | 'accepted' | 'declined'
    - `permission` 'owner' | 'admin' | 'manager' | 'contractor' | 'viewer'
    - `invited_email` string, nullable
    - `invited_mobile` string, nullable
    - `invited` boolean
    - `inviter_name` string: Display name of the inviter (the organization owner).
    - `updated_at` string, date-time
    - `created_at` string, date-time
    - `organization` object: Inlined when include=organization
    - `user` object: Inlined when include=user
  - `meta` PaginationMeta
    - `current_page` number
    - `next_page` number, nullable
    - `prev_page` number, nullable

---

[API](https://skmtc.dev/purplegrain/apis/purple-grain-api.md) · [All operations](https://skmtc.dev/purplegrain/apis/purple-grain-api/llms.txt) · [OpenAPI document](https://skmtc.dev/purplegrain/apis/purple-grain-api/revisions/4bedbc1c784c?raw)
