# Retrieve an organization

## GET `/v1/orgs/{id}`

Select the active organization from the signed-in session. include=members adds its initial membership page. Organization names and organization membership are managed through the identity provider.

## Authentication

Use a person's Bearer access token or console session. See [Authentication](https://augenta.pages.dev/docs/authentication.md).

## Request example

```bash
curl --fail-with-body -X GET "https://api.augenta.ai/v1/orgs/$AUGENTA_ORG_ID" \
  -H "Authorization: Bearer $AUGENTA_ACCESS_TOKEN"
```

## Parameters

<a id="request-parameters-id"></a>

### `request.parameters.id`

`string` · required

path parameter.

Min length: `1`.

<a id="request-parameters-include"></a>

### `request.parameters.include`

`array<string>` · optional

query parameter.

Max items: `1`.
Allowed values: `"members"`.

## Response 200

Organization resource, optionally including membership.

Content-Type: `application/json`

```json
{
  "object": "organization",
  "id": "org_example",
  "name": "Example",
  "memberCount": 2,
  "role": "Owner"
}
```

<a id="response-200-object"></a>

### `response.200.object`

`string` · always present

The resource type. Always organization.

Allowed values: `"organization"`.

<a id="response-200-id"></a>

### `response.200.id`

`string` · always present

Augenta Organization ID used in resource routes.

Min length: `1`.

<a id="response-200-name"></a>

### `response.200.name`

`string` · always present

Organization display name.

<a id="response-200-role"></a>

### `response.200.role`

`string` · conditional

The signed-in person's organization role, when loaded.

<a id="response-200-workosorgid"></a>

### `response.200.workosOrgId`

`string` · conditional

External identity-provider reference, when present. Resource routes use id instead.

<a id="response-200-membercount"></a>

### `response.200.memberCount`

`integer | null` · always present

Full roster count, or null when the roster has not been read.

Minimum: `0`.

<a id="response-200-members"></a>

### `response.200.members`

`object` · conditional

Initial membership page, loaded by include=members on the detail read. Follow its nextPageUrl for more.

<a id="response-200-members-object"></a>

### `response.200.members.object`

`string` · always present

Allowed values: `"list"`.

<a id="response-200-members-url"></a>

### `response.200.members.url`

`string` · always present

<a id="response-200-members-data"></a>

### `response.200.members.data`

`array<value>` · always present

<a id="response-200-members-data-object"></a>

### `response.200.members.data.object`

`string` · always present

Allowed values: `"organization_member"`, `"workspace_member"`.

<a id="response-200-members-data-id"></a>

### `response.200.members.data.id`

`string` · always present

Min length: `1`.

<a id="response-200-members-data-userid"></a>

### `response.200.members.data.userId`

`string` · always present

Min length: `1`.

<a id="response-200-members-data-organization"></a>

### `response.200.members.data.organization`

`string` · always present

<a id="response-200-members-data-workspace"></a>

### `response.200.members.data.workspace`

`string` · conditional

<a id="response-200-members-data-name"></a>

### `response.200.members.data.name`

`string` · conditional

<a id="response-200-members-data-email"></a>

### `response.200.members.data.email`

`string` · conditional

<a id="response-200-members-data-role"></a>

### `response.200.members.data.role`

`string` · conditional

<a id="response-200-members-data-workspacerole"></a>

### `response.200.members.data.workspaceRole`

`string` · conditional

<a id="response-200-members-data-orgrole"></a>

### `response.200.members.data.orgRole`

`string` · conditional

<a id="response-200-members-data-via"></a>

### `response.200.members.data.via`

`string` · conditional

<a id="response-200-members-data-addedat"></a>

### `response.200.members.data.addedAt`

`string` · conditional

<a id="response-200-members-data-addedbyuserid"></a>

### `response.200.members.data.addedByUserId`

`string` · conditional

<a id="response-200-members-data-permissions"></a>

### `response.200.members.data.permissions`

`array<string>` · conditional

<a id="response-200-members-data-memberclass"></a>

### `response.200.members.data.memberClass`

`string` · conditional

<a id="response-200-members-data-hassignedin"></a>

### `response.200.members.data.hasSignedIn`

`boolean` · conditional

<a id="response-200-members-data-joinedat"></a>

### `response.200.members.data.joinedAt`

`string` · conditional

<a id="response-200-members-nextpageurl"></a>

### `response.200.members.nextPageUrl`

`string | null` · always present

## Response 400

Invalid parameters, unavailable resource, changed revision or insufficient human permissions. API keys cannot administer organizations or Workspaces.

Content-Type: `application/json`

<a id="response-400-error"></a>

### `response.400.error`

`object` · always present

<a id="response-400-error-code"></a>

### `response.400.error.code`

`string` · always present

Stable. The Errors page lists every code.

<a id="response-400-error-message"></a>

### `response.400.error.message`

`string` · always present

Human-readable. May change; don't parse it.

<a id="response-400-error-retryable"></a>

### `response.400.error.retryable`

`boolean` · always present

<a id="response-400-error-retryafterseconds"></a>

### `response.400.error.retryAfterSeconds`

`integer` · conditional

Capacity retry interval, also present as Retry-After before stream headers commit. SSE error events retain this field after HTTP 200 is committed.

Minimum: `1`.

<a id="response-400-error-billingurl"></a>

### `response.400.error.billingUrl`

`string` · conditional

Top-up action when error.code is insufficient_balance (HTTP 402).

<a id="response-400-requestid"></a>

### `response.400.requestId`

`string` · always present

The request's id, as in the `X-Request-Id` response header.

## Response 401

Invalid parameters, unavailable resource, changed revision or insufficient human permissions. API keys cannot administer organizations or Workspaces.

Content-Type: `application/json`

Response fields use the same schema as Response 400.

## Response 403

Invalid parameters, unavailable resource, changed revision or insufficient human permissions. API keys cannot administer organizations or Workspaces.

Content-Type: `application/json`

Response fields use the same schema as Response 400.

## Response 404

Invalid parameters, unavailable resource, changed revision or insufficient human permissions. API keys cannot administer organizations or Workspaces.

Content-Type: `application/json`

Response fields use the same schema as Response 400.

## Response 409

Invalid parameters, unavailable resource, changed revision or insufficient human permissions. API keys cannot administer organizations or Workspaces.

Content-Type: `application/json`

Response fields use the same schema as Response 400.

## Response 429

Invalid parameters, unavailable resource, changed revision or insufficient human permissions. API keys cannot administer organizations or Workspaces.

Content-Type: `application/json`

Response fields use the same schema as Response 400.

## Response 500

Invalid parameters, unavailable resource, changed revision or insufficient human permissions. API keys cannot administer organizations or Workspaces.

Content-Type: `application/json`

Response fields use the same schema as Response 400.

## Response 503

Invalid parameters, unavailable resource, changed revision or insufficient human permissions. API keys cannot administer organizations or Workspaces.

Content-Type: `application/json`

Response fields use the same schema as Response 400.
