Skip to content

Get Organizations

Retrieve all organizations that an account belongs to. Used for organization selector dropdowns and access control.

Endpoint

GET https://api.recoupable.com/api/organizations

Parameters

NameTypeRequiredDescription
accountIdstringYesThe unique identifier of the account

Request Examples

cURL
curl -X GET "https://api.recoupable.com/api/organizations?accountId=123e4567-e89b-12d3-a456-426614174000" \
  -H "Content-Type: application/json"

Response Format

{
  "status": "success",
  "organizations": [
    {
      "id": "row-uuid-1",
      "organization_id": "org-account-uuid-1",
      "organization_name": "Rostrum Records",
      "organization_image": "https://example.com/rostrum-logo.jpg"
    },
    {
      "id": "row-uuid-2",
      "organization_id": "org-account-uuid-2",
      "organization_name": "Fat Beats",
      "organization_image": "https://example.com/fatbeats-logo.jpg"
    }
  ]
}
{
  "status": "success",
  "organizations": []
}

Response Properties

PropertyTypeDescription
statusstringStatus of the request ("success" or "error")
organizationsarrayList of organizations the account belongs to
organizations[].idstringUUID of the membership record
organizations[].organization_idstringUUID of the organization account
organizations[].organization_namestringDisplay name of the organization
organizations[].organization_imagestring | nullOrganization logo/image URL
messagestringError message (only present if status is "error")

Use Cases

  • Organization Selector: Display dropdown of account's organizations in the UI
  • Context Switching: Allow accounts to switch between personal and organization contexts
  • Access Control: Verify account membership before showing organization data