# Organizations

## Create Organization

`client.organizations.create(OrganizationCreateParamsbody, RequestOptionsoptions?): Organization`

**post** `/v1/organizations`

Create a new organization

### Parameters

- `body: OrganizationCreateParams`

  - `name: string`

    Organization name.

  - `billing_email?: string`

    Optional billing email. When omitted, the oldest owner's email is used.

### Returns

- `Organization`

  Organization response.

  - `id: string`

    Organization ID.

  - `billing_email: string | null`

    Billing email. Null when no custom billing email is set (reverts to the oldest owner's email).

  - `created_at: string`

    When the Organization was created.

  - `domains: Array<OrganizationDomain>`

    Domains associated with the organization.

    - `id: string`

      Domain ID.

    - `domain: string`

      Domain name.

    - `verified: boolean`

      Whether the domain has been verified.

  - `metronome_customer_id: string | null`

    Metronome customer ID.

  - `name: string`

    Organization name.

  - `personal: boolean`

    Whether the organization is a personal Organization.

  - `services: OrganizationServices`

    Services that the Organization has access to.

    - `cloud: boolean`

      Whether cloud services are enabled for the organization.

    - `jit_provisioning: boolean`

      Whether just-in-time provisioning is enabled for the organization.

    - `scim: boolean`

      Whether SCIM provisioning is enabled for the organization.

    - `siem: boolean`

      Whether SIEM integration is enabled for the organization.

    - `sso: boolean`

      Whether single sign-on is enabled for the organization.

  - `stripe_customer_id: string | null`

    Stripe customer ID.

  - `type: OrganizationType`

    Organization type.

    - `"personal"`

    - `"company"`

  - `updated_at: string`

    When the Organization was updated.

  - `auth_id?: string`

    Authentication provider organization ID.

### Example

```typescript
import NirvanaLabs from '@nirvana-labs/nirvana';

const client = new NirvanaLabs({
  apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted
});

const organization = await client.organizations.create({ name: 'My Organization' });

console.log(organization.id);
```

#### Response

```json
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "billing_email": "billing@example.com",
  "created_at": "2025-01-01T00:00:00Z",
  "domains": [
    {
      "id": "456e7890-e89b-12d3-a456-426614174000",
      "domain": "example.com",
      "verified": true
    }
  ],
  "metronome_customer_id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "My Organization",
  "personal": false,
  "services": {
    "cloud": true,
    "jit_provisioning": true,
    "scim": false,
    "siem": false,
    "sso": false
  },
  "stripe_customer_id": "cus_1234567890",
  "type": "company",
  "updated_at": "2025-01-01T00:00:00Z",
  "auth_id": "org_01H8GQBX3Z"
}
```

## Get Organization Details

`client.organizations.get(stringorganizationID, RequestOptionsoptions?): Organization`

**get** `/v1/organizations/{organization_id}`

Get details about an Organization

### Parameters

- `organizationID: string`

### Returns

- `Organization`

  Organization response.

  - `id: string`

    Organization ID.

  - `billing_email: string | null`

    Billing email. Null when no custom billing email is set (reverts to the oldest owner's email).

  - `created_at: string`

    When the Organization was created.

  - `domains: Array<OrganizationDomain>`

    Domains associated with the organization.

    - `id: string`

      Domain ID.

    - `domain: string`

      Domain name.

    - `verified: boolean`

      Whether the domain has been verified.

  - `metronome_customer_id: string | null`

    Metronome customer ID.

  - `name: string`

    Organization name.

  - `personal: boolean`

    Whether the organization is a personal Organization.

  - `services: OrganizationServices`

    Services that the Organization has access to.

    - `cloud: boolean`

      Whether cloud services are enabled for the organization.

    - `jit_provisioning: boolean`

      Whether just-in-time provisioning is enabled for the organization.

    - `scim: boolean`

      Whether SCIM provisioning is enabled for the organization.

    - `siem: boolean`

      Whether SIEM integration is enabled for the organization.

    - `sso: boolean`

      Whether single sign-on is enabled for the organization.

  - `stripe_customer_id: string | null`

    Stripe customer ID.

  - `type: OrganizationType`

    Organization type.

    - `"personal"`

    - `"company"`

  - `updated_at: string`

    When the Organization was updated.

  - `auth_id?: string`

    Authentication provider organization ID.

### Example

```typescript
import NirvanaLabs from '@nirvana-labs/nirvana';

const client = new NirvanaLabs({
  apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted
});

const organization = await client.organizations.get('organization_id');

console.log(organization.id);
```

#### Response

```json
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "billing_email": "billing@example.com",
  "created_at": "2025-01-01T00:00:00Z",
  "domains": [
    {
      "id": "456e7890-e89b-12d3-a456-426614174000",
      "domain": "example.com",
      "verified": true
    }
  ],
  "metronome_customer_id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "My Organization",
  "personal": false,
  "services": {
    "cloud": true,
    "jit_provisioning": true,
    "scim": false,
    "siem": false,
    "sso": false
  },
  "stripe_customer_id": "cus_1234567890",
  "type": "company",
  "updated_at": "2025-01-01T00:00:00Z",
  "auth_id": "org_01H8GQBX3Z"
}
```

## Update Organization

`client.organizations.update(stringorganizationID, OrganizationUpdateParamsbody, RequestOptionsoptions?): Organization`

**patch** `/v1/organizations/{organization_id}`

Update an existing organization

### Parameters

- `organizationID: string`

- `body: OrganizationUpdateParams`

  - `billing_email?: string | null`

    Billing email. Omit to leave unchanged, send null to clear (reverts to the
    oldest owner's email), or send a value to set it.

  - `name?: string`

    Organization name.

### Returns

- `Organization`

  Organization response.

  - `id: string`

    Organization ID.

  - `billing_email: string | null`

    Billing email. Null when no custom billing email is set (reverts to the oldest owner's email).

  - `created_at: string`

    When the Organization was created.

  - `domains: Array<OrganizationDomain>`

    Domains associated with the organization.

    - `id: string`

      Domain ID.

    - `domain: string`

      Domain name.

    - `verified: boolean`

      Whether the domain has been verified.

  - `metronome_customer_id: string | null`

    Metronome customer ID.

  - `name: string`

    Organization name.

  - `personal: boolean`

    Whether the organization is a personal Organization.

  - `services: OrganizationServices`

    Services that the Organization has access to.

    - `cloud: boolean`

      Whether cloud services are enabled for the organization.

    - `jit_provisioning: boolean`

      Whether just-in-time provisioning is enabled for the organization.

    - `scim: boolean`

      Whether SCIM provisioning is enabled for the organization.

    - `siem: boolean`

      Whether SIEM integration is enabled for the organization.

    - `sso: boolean`

      Whether single sign-on is enabled for the organization.

  - `stripe_customer_id: string | null`

    Stripe customer ID.

  - `type: OrganizationType`

    Organization type.

    - `"personal"`

    - `"company"`

  - `updated_at: string`

    When the Organization was updated.

  - `auth_id?: string`

    Authentication provider organization ID.

### Example

```typescript
import NirvanaLabs from '@nirvana-labs/nirvana';

const client = new NirvanaLabs({
  apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted
});

const organization = await client.organizations.update('organization_id');

console.log(organization.id);
```

#### Response

```json
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "billing_email": "billing@example.com",
  "created_at": "2025-01-01T00:00:00Z",
  "domains": [
    {
      "id": "456e7890-e89b-12d3-a456-426614174000",
      "domain": "example.com",
      "verified": true
    }
  ],
  "metronome_customer_id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "My Organization",
  "personal": false,
  "services": {
    "cloud": true,
    "jit_provisioning": true,
    "scim": false,
    "siem": false,
    "sso": false
  },
  "stripe_customer_id": "cus_1234567890",
  "type": "company",
  "updated_at": "2025-01-01T00:00:00Z",
  "auth_id": "org_01H8GQBX3Z"
}
```

## List Organizations

`client.organizations.list(OrganizationListParamsquery?, RequestOptionsoptions?): Cursor<Organization>`

**get** `/v1/organizations`

List organizations

### Parameters

- `query: OrganizationListParams`

  - `cursor?: string`

    Pagination cursor returned by a previous request

  - `limit?: number`

    Maximum number of items to return

### Returns

- `Organization`

  Organization response.

  - `id: string`

    Organization ID.

  - `billing_email: string | null`

    Billing email. Null when no custom billing email is set (reverts to the oldest owner's email).

  - `created_at: string`

    When the Organization was created.

  - `domains: Array<OrganizationDomain>`

    Domains associated with the organization.

    - `id: string`

      Domain ID.

    - `domain: string`

      Domain name.

    - `verified: boolean`

      Whether the domain has been verified.

  - `metronome_customer_id: string | null`

    Metronome customer ID.

  - `name: string`

    Organization name.

  - `personal: boolean`

    Whether the organization is a personal Organization.

  - `services: OrganizationServices`

    Services that the Organization has access to.

    - `cloud: boolean`

      Whether cloud services are enabled for the organization.

    - `jit_provisioning: boolean`

      Whether just-in-time provisioning is enabled for the organization.

    - `scim: boolean`

      Whether SCIM provisioning is enabled for the organization.

    - `siem: boolean`

      Whether SIEM integration is enabled for the organization.

    - `sso: boolean`

      Whether single sign-on is enabled for the organization.

  - `stripe_customer_id: string | null`

    Stripe customer ID.

  - `type: OrganizationType`

    Organization type.

    - `"personal"`

    - `"company"`

  - `updated_at: string`

    When the Organization was updated.

  - `auth_id?: string`

    Authentication provider organization ID.

### Example

```typescript
import NirvanaLabs from '@nirvana-labs/nirvana';

const client = new NirvanaLabs({
  apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted
});

// Automatically fetches more pages as needed.
for await (const organization of client.organizations.list()) {
  console.log(organization.id);
}
```

#### Response

```json
{
  "items": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "billing_email": "billing@example.com",
      "created_at": "2025-01-01T00:00:00Z",
      "domains": [
        {
          "id": "456e7890-e89b-12d3-a456-426614174000",
          "domain": "example.com",
          "verified": true
        }
      ],
      "metronome_customer_id": "123e4567-e89b-12d3-a456-426614174000",
      "name": "My Organization",
      "personal": false,
      "services": {
        "cloud": true,
        "jit_provisioning": true,
        "scim": false,
        "siem": false,
        "sso": false
      },
      "stripe_customer_id": "cus_1234567890",
      "type": "company",
      "updated_at": "2025-01-01T00:00:00Z",
      "auth_id": "org_01H8GQBX3Z"
    }
  ],
  "pagination": {
    "next_cursor": "RhwniMT4B74siYZcPF8TnCdGI1l9rpPvg",
    "previous_cursor": "ARhwnmi1hA7wEbHbMjdYQlOB_ZusP4fYvw",
    "total_count": 125
  }
}
```

## Leave Organization

`client.organizations.leave(stringorganizationID, RequestOptionsoptions?): void`

**post** `/v1/organizations/{organization_id}/leave`

Leave an Organization

### Parameters

- `organizationID: string`

### Example

```typescript
import NirvanaLabs from '@nirvana-labs/nirvana';

const client = new NirvanaLabs({
  apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted
});

await client.organizations.leave('organization_id');
```

## Domain Types

### Organization

- `Organization`

  Organization response.

  - `id: string`

    Organization ID.

  - `billing_email: string | null`

    Billing email. Null when no custom billing email is set (reverts to the oldest owner's email).

  - `created_at: string`

    When the Organization was created.

  - `domains: Array<OrganizationDomain>`

    Domains associated with the organization.

    - `id: string`

      Domain ID.

    - `domain: string`

      Domain name.

    - `verified: boolean`

      Whether the domain has been verified.

  - `metronome_customer_id: string | null`

    Metronome customer ID.

  - `name: string`

    Organization name.

  - `personal: boolean`

    Whether the organization is a personal Organization.

  - `services: OrganizationServices`

    Services that the Organization has access to.

    - `cloud: boolean`

      Whether cloud services are enabled for the organization.

    - `jit_provisioning: boolean`

      Whether just-in-time provisioning is enabled for the organization.

    - `scim: boolean`

      Whether SCIM provisioning is enabled for the organization.

    - `siem: boolean`

      Whether SIEM integration is enabled for the organization.

    - `sso: boolean`

      Whether single sign-on is enabled for the organization.

  - `stripe_customer_id: string | null`

    Stripe customer ID.

  - `type: OrganizationType`

    Organization type.

    - `"personal"`

    - `"company"`

  - `updated_at: string`

    When the Organization was updated.

  - `auth_id?: string`

    Authentication provider organization ID.

### Organization Domain

- `OrganizationDomain`

  Organization domain details.

  - `id: string`

    Domain ID.

  - `domain: string`

    Domain name.

  - `verified: boolean`

    Whether the domain has been verified.

### Organization List

- `OrganizationList`

  - `items: Array<Organization>`

    - `id: string`

      Organization ID.

    - `billing_email: string | null`

      Billing email. Null when no custom billing email is set (reverts to the oldest owner's email).

    - `created_at: string`

      When the Organization was created.

    - `domains: Array<OrganizationDomain>`

      Domains associated with the organization.

      - `id: string`

        Domain ID.

      - `domain: string`

        Domain name.

      - `verified: boolean`

        Whether the domain has been verified.

    - `metronome_customer_id: string | null`

      Metronome customer ID.

    - `name: string`

      Organization name.

    - `personal: boolean`

      Whether the organization is a personal Organization.

    - `services: OrganizationServices`

      Services that the Organization has access to.

      - `cloud: boolean`

        Whether cloud services are enabled for the organization.

      - `jit_provisioning: boolean`

        Whether just-in-time provisioning is enabled for the organization.

      - `scim: boolean`

        Whether SCIM provisioning is enabled for the organization.

      - `siem: boolean`

        Whether SIEM integration is enabled for the organization.

      - `sso: boolean`

        Whether single sign-on is enabled for the organization.

    - `stripe_customer_id: string | null`

      Stripe customer ID.

    - `type: OrganizationType`

      Organization type.

      - `"personal"`

      - `"company"`

    - `updated_at: string`

      When the Organization was updated.

    - `auth_id?: string`

      Authentication provider organization ID.

  - `pagination: Pagination`

    Pagination response details.

    - `next_cursor: string | null`

    - `previous_cursor: string | null`

    - `total_count: number`

### Organization Services

- `OrganizationServices`

  Services that the Organization has access to.

  - `cloud: boolean`

    Whether cloud services are enabled for the organization.

  - `jit_provisioning: boolean`

    Whether just-in-time provisioning is enabled for the organization.

  - `scim: boolean`

    Whether SCIM provisioning is enabled for the organization.

  - `siem: boolean`

    Whether SIEM integration is enabled for the organization.

  - `sso: boolean`

    Whether single sign-on is enabled for the organization.

### Organization Type

- `OrganizationType = "personal" | "company"`

  Organization type.

  - `"personal"`

  - `"company"`

# Memberships

## Get Organization Membership

`client.organizations.memberships.get(stringmembershipID, MembershipGetParamsparams, RequestOptionsoptions?): OrganizationMembership`

**get** `/v1/organizations/{organization_id}/memberships/{membership_id}`

Get details about an organization membership

### Parameters

- `membershipID: string`

- `params: MembershipGetParams`

  - `organization_id: string`

    Organization ID

### Returns

- `OrganizationMembership`

  Organization membership details.

  - `id: string`

    Membership ID.

  - `created_at: string`

    When the membership was created.

  - `organization_id: string`

    Organization ID.

  - `role: "owner" | "member"`

    Role of the user in the organization.

    - `"owner"`

    - `"member"`

  - `updated_at: string`

    When the membership was updated.

  - `user_id: string`

    User ID.

### Example

```typescript
import NirvanaLabs from '@nirvana-labs/nirvana';

const client = new NirvanaLabs({
  apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted
});

const organizationMembership = await client.organizations.memberships.get('membership_id', {
  organization_id: 'organization_id',
});

console.log(organizationMembership.id);
```

#### Response

```json
{
  "id": "987e6543-e89b-12d3-a456-426614174000",
  "created_at": "2025-01-01T00:00:00Z",
  "organization_id": "123e4567-e89b-12d3-a456-426614174000",
  "role": "owner",
  "updated_at": "2025-01-01T00:00:00Z",
  "user_id": "user_01H8GQBX3Z"
}
```

## List Organization Memberships

`client.organizations.memberships.list(stringorganizationID, MembershipListParamsquery?, RequestOptionsoptions?): Cursor<OrganizationMembership>`

**get** `/v1/organizations/{organization_id}/memberships`

List all memberships for an organization

### Parameters

- `organizationID: string`

- `query: MembershipListParams`

  - `cursor?: string`

    Pagination cursor returned by a previous request

  - `limit?: number`

    Maximum number of items to return

### Returns

- `OrganizationMembership`

  Organization membership details.

  - `id: string`

    Membership ID.

  - `created_at: string`

    When the membership was created.

  - `organization_id: string`

    Organization ID.

  - `role: "owner" | "member"`

    Role of the user in the organization.

    - `"owner"`

    - `"member"`

  - `updated_at: string`

    When the membership was updated.

  - `user_id: string`

    User ID.

### Example

```typescript
import NirvanaLabs from '@nirvana-labs/nirvana';

const client = new NirvanaLabs({
  apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted
});

// Automatically fetches more pages as needed.
for await (const organizationMembership of client.organizations.memberships.list(
  'organization_id',
)) {
  console.log(organizationMembership.id);
}
```

#### Response

```json
{
  "items": [
    {
      "id": "987e6543-e89b-12d3-a456-426614174000",
      "created_at": "2025-01-01T00:00:00Z",
      "organization_id": "123e4567-e89b-12d3-a456-426614174000",
      "role": "owner",
      "updated_at": "2025-01-01T00:00:00Z",
      "user_id": "user_01H8GQBX3Z"
    }
  ],
  "pagination": {
    "next_cursor": "RhwniMT4B74siYZcPF8TnCdGI1l9rpPvg",
    "previous_cursor": "ARhwnmi1hA7wEbHbMjdYQlOB_ZusP4fYvw",
    "total_count": 125
  }
}
```

## Domain Types

### Organization Membership

- `OrganizationMembership`

  Organization membership details.

  - `id: string`

    Membership ID.

  - `created_at: string`

    When the membership was created.

  - `organization_id: string`

    Organization ID.

  - `role: "owner" | "member"`

    Role of the user in the organization.

    - `"owner"`

    - `"member"`

  - `updated_at: string`

    When the membership was updated.

  - `user_id: string`

    User ID.

### Organization Membership List

- `OrganizationMembershipList`

  - `items: Array<OrganizationMembership>`

    - `id: string`

      Membership ID.

    - `created_at: string`

      When the membership was created.

    - `organization_id: string`

      Organization ID.

    - `role: "owner" | "member"`

      Role of the user in the organization.

      - `"owner"`

      - `"member"`

    - `updated_at: string`

      When the membership was updated.

    - `user_id: string`

      User ID.

  - `pagination: Pagination`

    Pagination response details.

    - `next_cursor: string | null`

    - `previous_cursor: string | null`

    - `total_count: number`

# Address

## Create Organization Address

`client.organizations.address.create(stringorganizationID, AddressCreateParamsbody, RequestOptionsoptions?): OrganizationAddress`

**post** `/v1/organizations/{organization_id}/address`

Create the address for an organization

### Parameters

- `organizationID: string`

- `body: AddressCreateParams`

  - `city: string`

    City or locality.

  - `country: string`

    Two-letter ISO 3166-1 alpha-2 country code.

  - `line1: string`

    First line of the street address.

  - `postal_code: string`

    Postal or ZIP code.

  - `line2?: string`

    Second line of the street address (suite, unit, building).

  - `state?: string`

    State, province, or region. Required by some tax jurisdictions (e.g. US, CA).

  - `tax_id?: string`

    Tax identification number (e.g. VAT, EIN, ABN). Optional.

  - `tax_id_type?: string`

    Type of the tax identification number (e.g. eu_vat, us_ein, gb_vat, au_abn). Optional.

### Returns

- `OrganizationAddress`

  Organization address details.

  - `id: string`

    Address ID.

  - `city: string`

    City or locality.

  - `country: string`

    Two-letter ISO 3166-1 alpha-2 country code.

  - `created_at: string`

    When the address was created.

  - `line1: string`

    First line of the street address.

  - `line2: string | null`

    Second line of the street address. Null when not provided.

  - `organization_id: string`

    Organization ID the address belongs to.

  - `postal_code: string`

    Postal or ZIP code.

  - `state: string | null`

    State, province, or region. Null when not provided.

  - `tax_id: string | null`

    Tax identification number. Null when not provided.

  - `tax_id_type: string | null`

    Type of the tax identification number. Null when not provided.

  - `updated_at: string`

    When the address was updated.

### Example

```typescript
import NirvanaLabs from '@nirvana-labs/nirvana';

const client = new NirvanaLabs({
  apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted
});

const organizationAddress = await client.organizations.address.create('organization_id', {
  city: 'San Francisco',
  country: 'US',
  line1: '123 Main St',
  postal_code: '94105',
});

console.log(organizationAddress.id);
```

#### Response

```json
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "city": "San Francisco",
  "country": "US",
  "created_at": "2025-01-01T00:00:00Z",
  "line1": "123 Main St",
  "line2": "Suite 400",
  "organization_id": "123e4567-e89b-12d3-a456-426614174000",
  "postal_code": "94105",
  "state": "CA",
  "tax_id": "EU372000000",
  "tax_id_type": "eu_vat",
  "updated_at": "2025-01-01T00:00:00Z"
}
```

## Get Organization Address

`client.organizations.address.get(stringorganizationID, RequestOptionsoptions?): OrganizationAddress`

**get** `/v1/organizations/{organization_id}/address`

Get the address for an organization

### Parameters

- `organizationID: string`

### Returns

- `OrganizationAddress`

  Organization address details.

  - `id: string`

    Address ID.

  - `city: string`

    City or locality.

  - `country: string`

    Two-letter ISO 3166-1 alpha-2 country code.

  - `created_at: string`

    When the address was created.

  - `line1: string`

    First line of the street address.

  - `line2: string | null`

    Second line of the street address. Null when not provided.

  - `organization_id: string`

    Organization ID the address belongs to.

  - `postal_code: string`

    Postal or ZIP code.

  - `state: string | null`

    State, province, or region. Null when not provided.

  - `tax_id: string | null`

    Tax identification number. Null when not provided.

  - `tax_id_type: string | null`

    Type of the tax identification number. Null when not provided.

  - `updated_at: string`

    When the address was updated.

### Example

```typescript
import NirvanaLabs from '@nirvana-labs/nirvana';

const client = new NirvanaLabs({
  apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted
});

const organizationAddress = await client.organizations.address.get('organization_id');

console.log(organizationAddress.id);
```

#### Response

```json
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "city": "San Francisco",
  "country": "US",
  "created_at": "2025-01-01T00:00:00Z",
  "line1": "123 Main St",
  "line2": "Suite 400",
  "organization_id": "123e4567-e89b-12d3-a456-426614174000",
  "postal_code": "94105",
  "state": "CA",
  "tax_id": "EU372000000",
  "tax_id_type": "eu_vat",
  "updated_at": "2025-01-01T00:00:00Z"
}
```

## Update Organization Address

`client.organizations.address.update(stringorganizationID, AddressUpdateParamsbody, RequestOptionsoptions?): OrganizationAddress`

**patch** `/v1/organizations/{organization_id}/address`

Update the address for an organization

### Parameters

- `organizationID: string`

- `body: AddressUpdateParams`

  - `city?: string`

    City or locality.

  - `country?: string`

    Two-letter ISO 3166-1 alpha-2 country code.

  - `line1?: string`

    First line of the street address.

  - `line2?: string | null`

    Second line of the street address (suite, unit, building). Omit to leave
    unchanged, send null to clear, or send a value to set it.

  - `postal_code?: string`

    Postal or ZIP code.

  - `state?: string | null`

    State, province, or region. Omit to leave unchanged, send null to clear,
    or send a value to set it.

  - `tax_id?: string | null`

    Tax identification number (e.g. VAT, EIN, ABN). Omit to leave unchanged,
    send null to clear, or send a value to set it.

  - `tax_id_type?: string | null`

    Type of the tax identification number (e.g. eu_vat, us_ein, gb_vat, au_abn).
    Omit to leave unchanged, send null to clear, or send a value to set it.

### Returns

- `OrganizationAddress`

  Organization address details.

  - `id: string`

    Address ID.

  - `city: string`

    City or locality.

  - `country: string`

    Two-letter ISO 3166-1 alpha-2 country code.

  - `created_at: string`

    When the address was created.

  - `line1: string`

    First line of the street address.

  - `line2: string | null`

    Second line of the street address. Null when not provided.

  - `organization_id: string`

    Organization ID the address belongs to.

  - `postal_code: string`

    Postal or ZIP code.

  - `state: string | null`

    State, province, or region. Null when not provided.

  - `tax_id: string | null`

    Tax identification number. Null when not provided.

  - `tax_id_type: string | null`

    Type of the tax identification number. Null when not provided.

  - `updated_at: string`

    When the address was updated.

### Example

```typescript
import NirvanaLabs from '@nirvana-labs/nirvana';

const client = new NirvanaLabs({
  apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted
});

const organizationAddress = await client.organizations.address.update('organization_id');

console.log(organizationAddress.id);
```

#### Response

```json
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "city": "San Francisco",
  "country": "US",
  "created_at": "2025-01-01T00:00:00Z",
  "line1": "123 Main St",
  "line2": "Suite 400",
  "organization_id": "123e4567-e89b-12d3-a456-426614174000",
  "postal_code": "94105",
  "state": "CA",
  "tax_id": "EU372000000",
  "tax_id_type": "eu_vat",
  "updated_at": "2025-01-01T00:00:00Z"
}
```

## Domain Types

### Organization Address

- `OrganizationAddress`

  Organization address details.

  - `id: string`

    Address ID.

  - `city: string`

    City or locality.

  - `country: string`

    Two-letter ISO 3166-1 alpha-2 country code.

  - `created_at: string`

    When the address was created.

  - `line1: string`

    First line of the street address.

  - `line2: string | null`

    Second line of the street address. Null when not provided.

  - `organization_id: string`

    Organization ID the address belongs to.

  - `postal_code: string`

    Postal or ZIP code.

  - `state: string | null`

    State, province, or region. Null when not provided.

  - `tax_id: string | null`

    Tax identification number. Null when not provided.

  - `tax_id_type: string | null`

    Type of the tax identification number. Null when not provided.

  - `updated_at: string`

    When the address was updated.
