Get main organization
GET /v2/api-gateway/organizations/main
Returns the caller's top-level organization (parent_ is null).
Request
Authentication: your API key in the x-api-key header.
Example request
cURL
curl --request GET \
--url 'https://api.themooncard.com/v2/api-gateway/organizations/main' \
--header 'x-api-key: YOUR_API_KEY'Responses
200 Success
| Field | Type | Description |
|---|---|---|
id required | string | Organization id. |
name required | string | |
parent_ required | string, nullable | Parent organization, or null for a root organization. |
created_ required | string, nullable | |
updated_ required | string, nullable |
JSON
{
"id": "5c1e2d3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f",
"name": "Acme Inc.",
"parent_organization_id": null,
"created_at": "2026-07-14T11:03:20.000Z",
"updated_at": "2026-08-16T17:51:01.000Z"
}401 Error
Missing or invalid credentials, e.g. { "message": "Invalid API Key", "code": "UNAUTHORIZED" }.
The body is the standard error object: see Errors.
404 Error
The caller has no top-level organization (ORGANIZATION_).
The body is the standard error object: see Errors.
500 Error
Unexpected server error. Body is { message: "Internal server error", code: "INTERNAL_.
The body is the standard error object: see Errors.
Last updated June 5, 2026