# Organizations

## Create Organization

**post** `/v1/organizations`

Create a new organization

### Body Parameters

- `name: string`

  Organization name.

- `billing_email: optional string`

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

### Returns

- `Organization object { id, billing_email, created_at, 9 more }`

  Organization response.

  - `id: string`

    Organization ID.

  - `billing_email: string`

    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 of 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`

    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`

    Stripe customer ID.

  - `type: OrganizationType`

    Organization type.

    - `"personal"`

    - `"company"`

  - `updated_at: string`

    When the Organization was updated.

  - `auth_id: optional string`

    Authentication provider organization ID.

### Example

```http
curl https://api.nirvanalabs.io/v1/organizations \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \
    -d '{
          "name": "My Organization",
          "billing_email": "billing@example.com"
        }'
```

#### 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

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

Get details about an Organization

### Path Parameters

- `organization_id: string`

### Returns

- `Organization object { id, billing_email, created_at, 9 more }`

  Organization response.

  - `id: string`

    Organization ID.

  - `billing_email: string`

    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 of 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`

    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`

    Stripe customer ID.

  - `type: OrganizationType`

    Organization type.

    - `"personal"`

    - `"company"`

  - `updated_at: string`

    When the Organization was updated.

  - `auth_id: optional string`

    Authentication provider organization ID.

### Example

```http
curl https://api.nirvanalabs.io/v1/organizations/$ORGANIZATION_ID \
    -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"
```

#### 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

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

Update an existing organization

### Path Parameters

- `organization_id: string`

### Body Parameters

- `billing_email: optional string`

  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: optional string`

  Organization name.

### Returns

- `Organization object { id, billing_email, created_at, 9 more }`

  Organization response.

  - `id: string`

    Organization ID.

  - `billing_email: string`

    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 of 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`

    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`

    Stripe customer ID.

  - `type: OrganizationType`

    Organization type.

    - `"personal"`

    - `"company"`

  - `updated_at: string`

    When the Organization was updated.

  - `auth_id: optional string`

    Authentication provider organization ID.

### Example

```http
curl https://api.nirvanalabs.io/v1/organizations/$ORGANIZATION_ID \
    -X PATCH \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \
    -d '{
          "billing_email": "billing@example.com",
          "name": "My Updated Organization"
        }'
```

#### 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

**get** `/v1/organizations`

List organizations

### Query Parameters

- `cursor: optional string`

  Pagination cursor returned by a previous request

- `limit: optional number`

  Maximum number of items to return

### Returns

- `OrganizationList object { items, pagination }`

  - `items: array of Organization`

    - `id: string`

      Organization ID.

    - `billing_email: string`

      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 of 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`

      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`

      Stripe customer ID.

    - `type: OrganizationType`

      Organization type.

      - `"personal"`

      - `"company"`

    - `updated_at: string`

      When the Organization was updated.

    - `auth_id: optional string`

      Authentication provider organization ID.

  - `pagination: Pagination`

    Pagination response details.

    - `next_cursor: string`

    - `previous_cursor: string`

    - `total_count: number`

### Example

```http
curl https://api.nirvanalabs.io/v1/organizations \
    -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"
```

#### 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

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

Leave an Organization

### Path Parameters

- `organization_id: string`

### Example

```http
curl https://api.nirvanalabs.io/v1/organizations/$ORGANIZATION_ID/leave \
    -X POST \
    -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"
```

## Domain Types

### Organization

- `Organization object { id, billing_email, created_at, 9 more }`

  Organization response.

  - `id: string`

    Organization ID.

  - `billing_email: string`

    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 of 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`

    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`

    Stripe customer ID.

  - `type: OrganizationType`

    Organization type.

    - `"personal"`

    - `"company"`

  - `updated_at: string`

    When the Organization was updated.

  - `auth_id: optional string`

    Authentication provider organization ID.

### Organization Domain

- `OrganizationDomain object { id, domain, verified }`

  Organization domain details.

  - `id: string`

    Domain ID.

  - `domain: string`

    Domain name.

  - `verified: boolean`

    Whether the domain has been verified.

### Organization List

- `OrganizationList object { items, pagination }`

  - `items: array of Organization`

    - `id: string`

      Organization ID.

    - `billing_email: string`

      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 of 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`

      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`

      Stripe customer ID.

    - `type: OrganizationType`

      Organization type.

      - `"personal"`

      - `"company"`

    - `updated_at: string`

      When the Organization was updated.

    - `auth_id: optional string`

      Authentication provider organization ID.

  - `pagination: Pagination`

    Pagination response details.

    - `next_cursor: string`

    - `previous_cursor: string`

    - `total_count: number`

### Organization Services

- `OrganizationServices object { cloud, jit_provisioning, scim, 2 more }`

  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" or "company"`

  Organization type.

  - `"personal"`

  - `"company"`

# Memberships

## Get Organization Membership

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

Get details about an organization membership

### Path Parameters

- `organization_id: string`

- `membership_id: string`

### Returns

- `OrganizationMembership object { id, created_at, organization_id, 3 more }`

  Organization membership details.

  - `id: string`

    Membership ID.

  - `created_at: string`

    When the membership was created.

  - `organization_id: string`

    Organization ID.

  - `role: "owner" or "member"`

    Role of the user in the organization.

    - `"owner"`

    - `"member"`

  - `updated_at: string`

    When the membership was updated.

  - `user_id: string`

    User ID.

### Example

```http
curl https://api.nirvanalabs.io/v1/organizations/$ORGANIZATION_ID/memberships/$MEMBERSHIP_ID \
    -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"
```

#### 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

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

List all memberships for an organization

### Path Parameters

- `organization_id: string`

### Query Parameters

- `cursor: optional string`

  Pagination cursor returned by a previous request

- `limit: optional number`

  Maximum number of items to return

### Returns

- `OrganizationMembershipList object { items, pagination }`

  - `items: array of OrganizationMembership`

    - `id: string`

      Membership ID.

    - `created_at: string`

      When the membership was created.

    - `organization_id: string`

      Organization ID.

    - `role: "owner" or "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`

    - `previous_cursor: string`

    - `total_count: number`

### Example

```http
curl https://api.nirvanalabs.io/v1/organizations/$ORGANIZATION_ID/memberships \
    -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"
```

#### 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 object { id, created_at, organization_id, 3 more }`

  Organization membership details.

  - `id: string`

    Membership ID.

  - `created_at: string`

    When the membership was created.

  - `organization_id: string`

    Organization ID.

  - `role: "owner" or "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 object { items, pagination }`

  - `items: array of OrganizationMembership`

    - `id: string`

      Membership ID.

    - `created_at: string`

      When the membership was created.

    - `organization_id: string`

      Organization ID.

    - `role: "owner" or "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`

    - `previous_cursor: string`

    - `total_count: number`

# Address

## Create Organization Address

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

Create the address for an organization

### Path Parameters

- `organization_id: string`

### Body Parameters

- `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: optional string`

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

- `state: optional string`

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

- `tax_id: optional string`

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

- `tax_id_type: optional string`

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

### Returns

- `OrganizationAddress object { id, city, country, 9 more }`

  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`

    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`

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

  - `tax_id: string`

    Tax identification number. Null when not provided.

  - `tax_id_type: string`

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

  - `updated_at: string`

    When the address was updated.

### Example

```http
curl https://api.nirvanalabs.io/v1/organizations/$ORGANIZATION_ID/address \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \
    -d '{
          "city": "San Francisco",
          "country": "US",
          "line1": "123 Main St",
          "postal_code": "94105",
          "line2": "Suite 400",
          "state": "CA",
          "tax_id": "EU372000000",
          "tax_id_type": "eu_vat"
        }'
```

#### 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

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

Get the address for an organization

### Path Parameters

- `organization_id: string`

### Returns

- `OrganizationAddress object { id, city, country, 9 more }`

  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`

    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`

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

  - `tax_id: string`

    Tax identification number. Null when not provided.

  - `tax_id_type: string`

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

  - `updated_at: string`

    When the address was updated.

### Example

```http
curl https://api.nirvanalabs.io/v1/organizations/$ORGANIZATION_ID/address \
    -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"
```

#### 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

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

Update the address for an organization

### Path Parameters

- `organization_id: string`

### Body Parameters

- `city: optional string`

  City or locality.

- `country: optional string`

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

- `line1: optional string`

  First line of the street address.

- `line2: optional string`

  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: optional string`

  Postal or ZIP code.

- `state: optional string`

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

- `tax_id: optional string`

  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: optional string`

  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 object { id, city, country, 9 more }`

  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`

    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`

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

  - `tax_id: string`

    Tax identification number. Null when not provided.

  - `tax_id_type: string`

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

  - `updated_at: string`

    When the address was updated.

### Example

```http
curl https://api.nirvanalabs.io/v1/organizations/$ORGANIZATION_ID/address \
    -X PATCH \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \
    -d '{
          "city": "San Francisco",
          "country": "US",
          "line1": "123 Main St",
          "line2": "Suite 400",
          "postal_code": "94105",
          "state": "CA",
          "tax_id": "EU372000000",
          "tax_id_type": "eu_vat"
        }'
```

#### 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 object { id, city, country, 9 more }`

  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`

    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`

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

  - `tax_id: string`

    Tax identification number. Null when not provided.

  - `tax_id_type: string`

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

  - `updated_at: string`

    When the address was updated.
