API REFERENCE
Get Organizations
On this page
/api/organizationsRetrieve all organizations that the authenticated account belongs to. Pass account_id to retrieve organizations for a specific account the API key has access to.
Authentication
x-api-key in header
bearerAuth bearer
Request
curl --request GET \
--url 'https://api.recoupable.dev/api/organizations' \
--header 'x-api-key: YOUR_API_KEY'Replace the YOUR_ placeholders with your values. Required query parameters are included; optional parameters are listed below.
Try it
Fill in the fields, send the request from your browser, and read the live response. The curl below updates as you type.
Kept in this browser tab only and cleared when it closes.
curl --request GET \
--url 'https://recoup-api.vercel.app/api/organizations'Parameters
Query parameters
account_idstringFilter to a specific account. Only applicable when the authenticated account has access to multiple accounts via organization membership.
Responses
200Organizations retrieved successfully+
application/json
statusstring · enumrequiredStatus of the request
Values: "success"
organizationsarray<Organization>requiredList of organizations the account belongs to
Item properties for organizations
idstringUUID of the membership record
format: uuid
organization_idstringUUID of the organization account
format: uuid
organization_namestringDisplay name of the organization
organization_imagestringnullableOrganization logo/image URL
400Bad request - invalid query parameters+
application/json
statusstring · enumrequiredStatus of the request
Values: "error"
messagestringrequiredError message describing what went wrong
401Unauthorized - invalid or missing API key+
application/json
errorintegerrequiredformat: int32
messagestringrequired403Forbidden - account_id is not a member of the organization or account tried to filter by an account_id they don't have access to+
application/json
errorintegerrequiredformat: int32
messagestringrequiredFull specification
Download the OpenAPI file for complete schemas, constraints, and examples.
Download accounts.jsonView operation source
{
"description": "Retrieve all organizations that the authenticated account belongs to. Pass account_id to retrieve organizations for a specific account the API key has access to.",
"security": [
{
"apiKeyAuth": []
},
{
"bearerAuth": []
}
],
"parameters": [
{
"name": "account_id",
"in": "query",
"description": "Filter to a specific account. Only applicable when the authenticated account has access to multiple accounts via organization membership.",
"required": false,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"responses": {
"200": {
"description": "Organizations retrieved successfully",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetOrganizationsResponse"
}
}
}
},
"400": {
"description": "Bad request - invalid query parameters",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/OrganizationsErrorResponse"
}
}
}
},
"401": {
"description": "Unauthorized - invalid or missing API key",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden - account_id is not a member of the organization or account tried to filter by an account_id they don't have access to",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}