> For the complete documentation index, see [llms.txt](https://docs.ai.neevcloud.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ai.neevcloud.com/api-reference/tenant/organizations.md).

# Organizations

Organization management endpoints

## Get user organizations

> Retrieve all organizations for the current user

```json
{"openapi":"3.0.3","info":{"title":"Tenant API","version":"0.1.0"},"tags":[{"name":"Organizations","description":"Organization management endpoints"}],"servers":[{"url":"https://api.ai.neevcloud.com/tenant","description":"Consolidated public API gateway"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"Use the **`access_token`** from `POST /api/v1/auth/login` (same credentials as the console). In **Authorize**, paste **only that token** — do not prepend `Bearer`, and do not use inference keys (`sk-nc-*`) here. The same token authenticates this API and AI Models / AI Runtime.\n"}},"schemas":{"OrganizationListResponse":{"type":"object","description":"Response containing a paginated list of organizations","properties":{"data":{"type":"array","description":"Array of organization objects","items":{"$ref":"#/components/schemas/OrganizationResponse"}}}},"OrganizationResponse":{"type":"object","description":"Response payload containing organization details","properties":{"id":{"type":"string","description":"Unique identifier for the organization","readOnly":true},"name":{"type":"string","description":"Name of the organization","minLength":1,"maxLength":100},"description":{"type":"string","description":"Organization's description (if provided)"},"referral_code":{"type":"string","description":"Referral code for the organization"},"status":{"$ref":"#/components/schemas/ResourceState"}}},"ResourceState":{"type":"string","description":"The lifecycle state of a resource (user/organization/project)","enum":["active","suspended","archived","inactive"],"default":"active"},"ErrorResponse":{"type":"object","description":"Standard error response containing an error message","required":["code","message"],"properties":{"code":{"type":"string","description":"A short, machine-readable error code."},"message":{"type":"string","description":"A descriptive error message."}}}}},"paths":{"/api/v1/orgs":{"get":{"operationId":"listUserOrganizations","summary":"Get user organizations","description":"Retrieve all organizations for the current user","tags":["Organizations"],"responses":{"200":{"description":"Organizations retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationListResponse"}}}},"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Insufficient permissions to list organizations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No organizations found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error occurred while retrieving organizations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## Get organization

> Retrieve organization by ID

```json
{"openapi":"3.0.3","info":{"title":"Tenant API","version":"0.1.0"},"tags":[{"name":"Organizations","description":"Organization management endpoints"}],"servers":[{"url":"https://api.ai.neevcloud.com/tenant","description":"Consolidated public API gateway"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"Use the **`access_token`** from `POST /api/v1/auth/login` (same credentials as the console). In **Authorize**, paste **only that token** — do not prepend `Bearer`, and do not use inference keys (`sk-nc-*`) here. The same token authenticates this API and AI Models / AI Runtime.\n"}},"schemas":{"OrganizationResponse":{"type":"object","description":"Response payload containing organization details","properties":{"id":{"type":"string","description":"Unique identifier for the organization","readOnly":true},"name":{"type":"string","description":"Name of the organization","minLength":1,"maxLength":100},"description":{"type":"string","description":"Organization's description (if provided)"},"referral_code":{"type":"string","description":"Referral code for the organization"},"status":{"$ref":"#/components/schemas/ResourceState"}}},"ResourceState":{"type":"string","description":"The lifecycle state of a resource (user/organization/project)","enum":["active","suspended","archived","inactive"],"default":"active"},"ErrorResponse":{"type":"object","description":"Standard error response containing an error message","required":["code","message"],"properties":{"code":{"type":"string","description":"A short, machine-readable error code."},"message":{"type":"string","description":"A descriptive error message."}}}}},"paths":{"/api/v1/orgs/{org_id}":{"get":{"operationId":"getOrganization","summary":"Get organization","description":"Retrieve organization by ID","tags":["Organizations"],"parameters":[{"name":"org_id","description":"Organization ID","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Organization retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationResponse"}}}},"400":{"description":"Invalid organization ID format.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Insufficient permissions to view organization details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization not found with the provided ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error occurred while retrieving organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## Update organization

> Update organization name and description (admin/owner only)

```json
{"openapi":"3.0.3","info":{"title":"Tenant API","version":"0.1.0"},"tags":[{"name":"Organizations","description":"Organization management endpoints"}],"servers":[{"url":"https://api.ai.neevcloud.com/tenant","description":"Consolidated public API gateway"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"Use the **`access_token`** from `POST /api/v1/auth/login` (same credentials as the console). In **Authorize**, paste **only that token** — do not prepend `Bearer`, and do not use inference keys (`sk-nc-*`) here. The same token authenticates this API and AI Models / AI Runtime.\n"}},"schemas":{"OrganizationUpdateRequest":{"type":"object","description":"Request payload for updating an organization. Both name and description are optional; at least one must be provided. Name can be omitted when only updating description. When name is provided it cannot be empty.","properties":{"name":{"type":"string","description":"Updated name of the organization (1-100 characters). If omitted, the existing name is preserved.","minLength":1,"maxLength":100},"description":{"type":"string","description":"Updated description of the organization. If omitted, the existing description is preserved. If provided as an empty string, the description will be cleared."}}},"OrganizationResponse":{"type":"object","description":"Response payload containing organization details","properties":{"id":{"type":"string","description":"Unique identifier for the organization","readOnly":true},"name":{"type":"string","description":"Name of the organization","minLength":1,"maxLength":100},"description":{"type":"string","description":"Organization's description (if provided)"},"referral_code":{"type":"string","description":"Referral code for the organization"},"status":{"$ref":"#/components/schemas/ResourceState"}}},"ResourceState":{"type":"string","description":"The lifecycle state of a resource (user/organization/project)","enum":["active","suspended","archived","inactive"],"default":"active"},"ErrorResponse":{"type":"object","description":"Standard error response containing an error message","required":["code","message"],"properties":{"code":{"type":"string","description":"A short, machine-readable error code."},"message":{"type":"string","description":"A descriptive error message."}}}}},"paths":{"/api/v1/orgs/{org_id}":{"patch":{"operationId":"updateOrganization","summary":"Update organization","description":"Update organization name and description (admin/owner only)","tags":["Organizations"],"parameters":[{"name":"org_id","description":"Organization ID","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationUpdateRequest"}}}},"responses":{"200":{"description":"Organization updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationResponse"}}}},"400":{"description":"Invalid organization ID or request body. At least one of name or description must be provided; both cannot be empty. When name is provided it cannot be empty.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid authentication token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Insufficient permissions to update organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error occurred while updating organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.ai.neevcloud.com/api-reference/tenant/organizations.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
