Skip to main content
GET
https://api.bunship.com
/
api
/
v1
/
users
/
me
/
organizations
List Organizations
curl --request GET \
  --url https://api.bunship.com/api/v1/users/me/organizations \
  --header 'Authorization: Bearer <token>'
{
  "organizations": [
    {
      "id": "org_cld2abc123def456",
      "name": "Acme Corp",
      "slug": "acme-corp",
      "logoUrl": "https://cdn.bunship.com/logos/acme.png",
      "role": "owner",
      "membershipId": "mbr_abc123",
      "joinedAt": "2024-01-15T10:00:00Z"
    },
    {
      "id": "org_xyz789ghi012345",
      "name": "Widget Labs",
      "slug": "widget-labs",
      "logoUrl": null,
      "role": "member",
      "membershipId": "mbr_def456",
      "joinedAt": "2024-02-01T14:30:00Z"
    }
  ],
  "total": 2
}
Returns all organizations where the authenticated user has a membership, along with their role in each organization.

Auth

Requires a valid Bearer token.

Response

organizations
array
Array of organization membership objects.
total
number
Total number of organizations.
{
  "organizations": [
    {
      "id": "org_cld2abc123def456",
      "name": "Acme Corp",
      "slug": "acme-corp",
      "logoUrl": "https://cdn.bunship.com/logos/acme.png",
      "role": "owner",
      "membershipId": "mbr_abc123",
      "joinedAt": "2024-01-15T10:00:00Z"
    },
    {
      "id": "org_xyz789ghi012345",
      "name": "Widget Labs",
      "slug": "widget-labs",
      "logoUrl": null,
      "role": "member",
      "membershipId": "mbr_def456",
      "joinedAt": "2024-02-01T14:30:00Z"
    }
  ],
  "total": 2
}

Errors

StatusCodeDescription
401AUTHENTICATION_ERRORMissing or invalid Bearer token

Example

curl https://api.bunship.com/api/v1/users/me/organizations \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."