RecoupGet a free auditFree audit

API REFERENCE

List Organization Domains

On this page
GET/api/organizations/domains

List 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
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 for this request
curl --request GET \
  --url 'https://recoup-api.vercel.app/api/organizations/domains'

Parameters

Query parameters

organization_idstringrequired

The account ID of the organization

Responses

200Domains retrieved successfully

application/json

statusstring · enumrequired

Status of the request

Values: "success"

domainsarray<OrganizationDomain>required

Domains mapped to the organization

Item properties for domains
idstringrequired

UUID of the domain mapping record

format: uuid

domainstringrequired

The email domain (lowercase, no @)

organization_idstringrequired

The account ID of the organization

format: uuid

created_atstring

When the mapping was created

format: date-time

400Bad request - invalid or missing parameters

application/json

statusstring · enumrequired

Status of the request

Values: "error"

errorstringrequired

Error message describing what went wrong

401Unauthorized - missing or invalid authentication

application/json

statusstring · enumrequired

Status of the request

Values: "error"

errorstringrequired

Error message describing what went wrong

403Forbidden - caller is not a member of the organization

application/json

statusstring · enumrequired

Status of the request

Values: "error"

errorstringrequired

Error message describing what went wrong

Full specification

Download the OpenAPI file for complete schemas, constraints, and examples.

Download accounts.json
View operation source
json
{
  "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"
          }
        }
      }
    }
  }
}