API REFERENCE
List Organization Domains
On this page
/api/organizations/domainsList the email domains mapped to an organization. Accounts that sign up with an email at a mapped domain automatically join the organization.
Authentication
x-api-key in header
bearerAuth bearer
Request
curl --request GET \
--url 'https://api.recoupable.dev/api/organizations/domains?organization_id=YOUR_ORGANIZATION_ID' \
--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/domains'Parameters
Query parameters
organization_idstringrequiredThe account ID of the organization
Responses
200Domains retrieved successfully+
application/json
statusstring · enumrequiredStatus of the request
Values: "success"
domainsarray<OrganizationDomain>requiredDomains mapped to the organization
Item properties for domains
idstringrequiredUUID of the domain mapping record
format: uuid
domainstringrequiredThe email domain (lowercase, no @)
organization_idstringrequiredThe account ID of the organization
format: uuid
created_atstringWhen the mapping was created
format: date-time
400Bad request - invalid or missing parameters+
application/json
statusstring · enumrequiredStatus of the request
Values: "error"
errorstringrequiredError message describing what went wrong
401Unauthorized - missing or invalid authentication+
application/json
statusstring · enumrequiredStatus of the request
Values: "error"
errorstringrequiredError message describing what went wrong
403Forbidden - caller is not a member of the organization+
application/json
statusstring · enumrequiredStatus of the request
Values: "error"
errorstringrequiredError message describing what went wrong
Full specification
Download the OpenAPI file for complete schemas, constraints, and examples.
Download accounts.jsonView operation source
{
"description": "List the email domains mapped to an organization. Accounts that sign up with an email at a mapped domain automatically join the organization.",
"security": [
{
"apiKeyAuth": []
},
{
"bearerAuth": []
}
],
"parameters": [
{
"name": "organization_id",
"in": "query",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
},
"description": "The account ID of the organization"
}
],
"responses": {
"200": {
"description": "Domains retrieved successfully",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetOrganizationDomainsResponse"
}
}
}
},
"400": {
"description": "Bad request - invalid or missing parameters",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorEnvelope"
}
}
}
},
"401": {
"description": "Unauthorized - missing or invalid authentication",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorEnvelope"
}
}
}
},
"403": {
"description": "Forbidden - caller is not a member of the organization",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorEnvelope"
}
}
}
}
}
}