<!-- llms.txt: https://workos.com/llms.txt -->

# Organization

An Organization is a top-level resource in WorkOS. Each Connection, Directory, and Audit Trail Event belongs to an Organization. An Organization will usually represent one of your customers. There is no limit to the number of organizations you can create in WorkOS.

## Create an Organization

Creates a new organization in the current environment.

You can include one or more domains to associate with the organization, but you should [verify the ownership](https://workos.com/docs/authkit/domain-verification) of every domain before setting its state to `verified`.

:::code-group

```bash language="curl" title="Request" tab="1"
curl --request POST \
  --url "https://api.workos.com/organizations" \
  --header "Authorization: Bearer sk_example_123456789" \
  --header "Content-Type: application/json" \
  -d @- <<'BODY'
    {
        "name": "Foo Corp",
        "domain_data": [
            {
                "domain": "foo-corp.com",
                "state": "pending"
            }
        ],
        "external_id": "2fe01467-f7ea-4dd2-8b79-c2b4f56d0191",
        "metadata": {
            "tier": "diamond"
        }
    }
BODY
```

```js language="js" title="Request" tab="1"
import { WorkOS } from '@workos-inc/node';

const workos = new WorkOS('sk_example_123456789');

const organization = await workos.organizations.createOrganization({
  name: 'Foo Corp',
  domainData: [
    {
      domain: 'foo-corp.com',
      state: 'pending',
    },
  ],
  externalId: '2fe01467-f7ea-4dd2-8b79-c2b4f56d0191',
  metadata: {
    tier: 'diamond',
  },
});
```

```rb language="ruby" title="Request" tab="1"
require "workos"

WorkOS.configure do |config|
  config.api_key = "sk_example_123456789"
end

WorkOS.client.organizations.create_organization(name: "Foo Corp")
```

```py language="python" title="Request" tab="1"
from workos import WorkOSClient

client = WorkOSClient(api_key="sk_example_123456789", client_id="client_123456789")

client.organizations.create_organization(name="Foo Corp")
```

```go language="go" title="Request" tab="1"
package main

import (
	"context"

	"github.com/workos/workos-go/v10"
)

func main() {
	client := workos.NewClient("sk_example_123456789")

	_, err := client.Organizations().Create(context.Background(), &workos.OrganizationsCreateParams{
		Name: "Foo Corp",
	})
	if err != nil {
		panic(err)
	}
}
```

```php language="php" title="Request" tab="1"
<?php

use WorkOS\WorkOS;

$workos = new WorkOS(
    apiKey: "sk_example_123456789",
    clientId: "client_123456789",
);

$workos->organizations()->createOrganization(name: "Foo Corp");
```

```java language="java" title="Request" tab="1"
import com.workos.WorkOS;
import com.workos.organizations.OrganizationsApi.CreateOrganizationOptions;

WorkOS workos = new WorkOS("sk_example_123456789");

CreateOrganizationOptions options =
    CreateOrganizationOptions.builder().name("Foo Corp").build();

workos.organizations.createOrganization(options);
```

```cs language="dotnet" title="Request" tab="1"
using WorkOS;

var client = new WorkOSClient(new WorkOSOptions {
    ApiKey = "sk_example_123456789",
    ClientId = "client_123456789",
});

await client.Organizations.CreateAsync(new OrganizationsCreateOptions {
    Name = "Foo Corp",
});
```

```rust language="rust" title="Request" tab="1"
use workos::Client;
use workos::organizations::CreateOrganizationParams;

#[tokio::main]
async fn main() -> Result<(), workos::Error> {
    let client = Client::builder()
        .api_key("sk_example_123456789")
        .client_id("client_123456789")
        .build();

    let _result = client
        .organizations()
        .create_organization(
            CreateOrganizationParams {
                name: "Foo Corp".into(),
                ..Default::default()
            }
        )
        .await?;

    Ok(())
}
```

```json language="json" title="Response" tab="2"
{
  "object": "organization",
  "name": "Foo Corp",
  "domains": [
    {
      "object": "organization_domain",
      "id": "org_domain_01EHZNVPK2QXHMVWCEDQEKY69A",
      "organization_id": "org_01HE8GSH8FQPASKSY27THRKRBP",
      "domain": "foo-corp.com",
      "state": "pending",
      "verification_prefix": "superapp-domain-verification-z3kjny",
      "verification_token": "m5Oztg3jdK4NJLgs8uIlIprMw",
      "verification_strategy": "dns",
      "created_at": "2026-01-15T12:00:00.000Z",
      "updated_at": "2026-01-15T12:00:00.000Z"
    }
  ],
  "metadata": {
    "tier": "diamond"
  },
  "stripe_customer_id": "cus_R9qWAGMQ6nGE7V",
  "created_at": "2026-01-15T12:00:00.000Z",
  "updated_at": "2026-01-15T12:00:00.000Z",
  "allow_profiles_outside_organization": false,
  "id": "org_01EHWNCE74X7JSDV0X3SZ3KJNY",
  "external_id": "ext_12345"
}
```

:::

## Delete an Organization

Permanently deletes an organization in the current environment. It cannot be undone.

:::code-group{title="Request"}

```bash language="curl"
curl --request DELETE \
  --url https://api.workos.com/organizations/org_01EHZNVPK3SFK441A1RGBFSHRT \
  --header "Authorization: Bearer sk_example_123456789"
```

```js language="js"
import { WorkOS } from '@workos-inc/node';

const workos = new WorkOS('sk_example_123456789');

await workos.organizations.deleteOrganization('org_01EHZNVPK3SFK441A1RGBFSHRT');
```

```rb language="ruby"
require "workos"

WorkOS.configure do |config|
  config.api_key = "sk_example_123456789"
end

WorkOS.client.organizations.delete_organization(id: "org_01EHZNVPK3SFK441A1RGBFSHRT")
```

```py language="python"
from workos import WorkOSClient

client = WorkOSClient(api_key="sk_example_123456789", client_id="client_123456789")

client.organizations.delete_organization(id_="org_01EHZNVPK3SFK441A1RGBFSHRT")
```

```go language="go"
package main

import (
	"context"

	"github.com/workos/workos-go/v10"
)

func main() {
	client := workos.NewClient("sk_example_123456789")

	_, err := client.Organizations().Delete(context.Background(), "org_01EHZNVPK3SFK441A1RGBFSHRT")
	if err != nil {
		panic(err)
	}
}
```

```php language="php"
<?php

use WorkOS\WorkOS;

$workos = new WorkOS(
    apiKey: "sk_example_123456789",
    clientId: "client_123456789",
);

$workos
    ->organizations()
    ->deleteOrganization(id: "org_01EHZNVPK3SFK441A1RGBFSHRT");
```

```java language="java"
import com.workos.WorkOS;

WorkOS workos = new WorkOS("sk_example_123456789");

workos.organizations.deleteOrganization("org_01EHZNVPK3SFK441A1RGBFSHRT");
```

```cs language="dotnet"
using WorkOS;

var client = new WorkOSClient(new WorkOSOptions {
    ApiKey = "sk_example_123456789",
    ClientId = "client_123456789",
});

await client.Organizations.DeleteAsync("org_01EHZNVPK3SFK441A1RGBFSHRT");
```

```rust language="rust"
use workos::Client;

#[tokio::main]
async fn main() -> Result<(), workos::Error> {
    let client = Client::builder()
        .api_key("sk_example_123456789")
        .client_id("client_123456789")
        .build();

    let _result = client
        .organizations()
        .delete_organization("org_01EHZNVPK3SFK441A1RGBFSHRT")
        .await?;

    Ok(())
}
```

:::

## Get an Organization by External ID

Get the details of an existing organization by an [external identifier](https://workos.com/docs/authkit/metadata/external-identifiers).

:::code-group

```bash language="curl" title="Request" tab="1"
curl "https://api.workos.com/organizations/external_id/2fe01467-f7ea-4dd2-8b79-c2b4f56d0191" \
  --header "Authorization: Bearer sk_example_123456789"
```

```js language="js" title="Request" tab="1"
import { WorkOS } from '@workos-inc/node';

const workos = new WorkOS('sk_example_123456789');

const organization = await workos.organizations.getOrganizationByExternalId(
  '2fe01467-f7ea-4dd2-8b79-c2b4f56d0191',
);
```

```rb language="ruby" title="Request" tab="1"
require "workos"

WorkOS.configure do |config|
  config.api_key = "sk_example_123456789"
end

WorkOS.client.organizations.get_organization_by_external_id(external_id: "2fe01467-f7ea-4dd2-8b79-c2b4f56d0191")
```

```py language="python" title="Request" tab="1"
from workos import WorkOSClient

client = WorkOSClient(api_key="sk_example_123456789", client_id="client_123456789")

client.organizations.get_organization_by_external_id(
    external_id="2fe01467-f7ea-4dd2-8b79-c2b4f56d0191"
)
```

```go language="go" title="Request" tab="1"
package main

import (
	"context"

	"github.com/workos/workos-go/v10"
)

func main() {
	client := workos.NewClient("sk_example_123456789")

	_, err := client.Organizations().GetByExternalID(context.Background(), "2fe01467-f7ea-4dd2-8b79-c2b4f56d0191")
	if err != nil {
		panic(err)
	}
}
```

```php language="php" title="Request" tab="1"
<?php

use WorkOS\WorkOS;

$workos = new WorkOS(
    apiKey: "sk_example_123456789",
    clientId: "client_123456789",
);

$workos
    ->organizations()
    ->getOrganizationByExternalId(
        externalId: "2fe01467-f7ea-4dd2-8b79-c2b4f56d0191",
    );
```

```java language="java" title="Request" tab="1"
import com.workos.WorkOS;

WorkOS workos = new WorkOS("sk_example_123456789");

workos.organizations.getOrganizationByExternalId("2fe01467-f7ea-4dd2-8b79-c2b4f56d0191");
```

```cs language="dotnet" title="Request" tab="1"
using WorkOS;

var client = new WorkOSClient(new WorkOSOptions {
    ApiKey = "sk_example_123456789",
    ClientId = "client_123456789",
});

await client.Organizations.GetByExternalIdAsync("2fe01467-f7ea-4dd2-8b79-c2b4f56d0191");
```

```rust language="rust" title="Request" tab="1"
use workos::Client;

#[tokio::main]
async fn main() -> Result<(), workos::Error> {
    let client = Client::builder()
        .api_key("sk_example_123456789")
        .client_id("client_123456789")
        .build();

    let _result = client
        .organizations()
        .get_organization_by_external_id("2fe01467-f7ea-4dd2-8b79-c2b4f56d0191")
        .await?;

    Ok(())
}
```

```json language="json" title="Response" tab="2"
{
  "object": "organization",
  "id": "org_01EHWNCE74X7JSDV0X3SZ3KJNY",
  "name": "Acme Inc.",
  "domains": [
    {
      "object": "organization_domain",
      "id": "org_domain_01EHZNVPK2QXHMVWCEDQEKY69A",
      "organization_id": "org_01HE8GSH8FQPASKSY27THRKRBP",
      "domain": "foo-corp.com",
      "state": "pending",
      "verification_prefix": "superapp-domain-verification-z3kjny",
      "verification_token": "m5Oztg3jdK4NJLgs8uIlIprMw",
      "verification_strategy": "dns",
      "created_at": "2026-01-15T12:00:00.000Z",
      "updated_at": "2026-01-15T12:00:00.000Z"
    }
  ],
  "metadata": {
    "tier": "diamond"
  },
  "external_id": "2fe01467-f7ea-4dd2-8b79-c2b4f56d0191",
  "stripe_customer_id": "cus_R9qWAGMQ6nGE7V",
  "created_at": "2026-01-15T12:00:00.000Z",
  "updated_at": "2026-01-15T12:00:00.000Z"
}
```

:::

## Get an Organization

Get the details of an existing organization.

:::code-group

```bash language="curl" title="Request" tab="1"
curl "https://api.workos.com/organizations/org_01EHZNVPK3SFK441A1RGBFSHRT" \
  --header "Authorization: Bearer sk_example_123456789"
```

```js language="js" title="Request" tab="1"
import { WorkOS } from '@workos-inc/node';

const workos = new WorkOS('sk_example_123456789');

const organization = await workos.organizations.getOrganization(
  'org_01EHZNVPK3SFK441A1RGBFSHRT',
);
```

```rb language="ruby" title="Request" tab="1"
require "workos"

WorkOS.configure do |config|
  config.api_key = "sk_example_123456789"
end

WorkOS.client.organizations.get_organization(id: "org_01EHZNVPK3SFK441A1RGBFSHRT")
```

```py language="python" title="Request" tab="1"
from workos import WorkOSClient

client = WorkOSClient(api_key="sk_example_123456789", client_id="client_123456789")

client.organizations.get_organization(id_="org_01EHZNVPK3SFK441A1RGBFSHRT")
```

```go language="go" title="Request" tab="1"
package main

import (
	"context"

	"github.com/workos/workos-go/v10"
)

func main() {
	client := workos.NewClient("sk_example_123456789")

	_, err := client.Organizations().Get(context.Background(), "org_01EHZNVPK3SFK441A1RGBFSHRT")
	if err != nil {
		panic(err)
	}
}
```

```php language="php" title="Request" tab="1"
<?php

use WorkOS\WorkOS;

$workos = new WorkOS(
    apiKey: "sk_example_123456789",
    clientId: "client_123456789",
);

$workos->organizations()->getOrganization(id: "org_01EHZNVPK3SFK441A1RGBFSHRT");
```

```java language="java" title="Request" tab="1"
import com.workos.WorkOS;

WorkOS workos = new WorkOS("sk_example_123456789");

workos.organizations.getOrganization("org_01EHZNVPK3SFK441A1RGBFSHRT");
```

```cs language="dotnet" title="Request" tab="1"
using WorkOS;

var client = new WorkOSClient(new WorkOSOptions {
    ApiKey = "sk_example_123456789",
    ClientId = "client_123456789",
});

await client.Organizations.GetAsync("org_01EHZNVPK3SFK441A1RGBFSHRT");
```

```rust language="rust" title="Request" tab="1"
use workos::Client;

#[tokio::main]
async fn main() -> Result<(), workos::Error> {
    let client = Client::builder()
        .api_key("sk_example_123456789")
        .client_id("client_123456789")
        .build();

    let _result = client
        .organizations()
        .get_organization("org_01EHZNVPK3SFK441A1RGBFSHRT")
        .await?;

    Ok(())
}
```

```json language="json" title="Response" tab="2"
{
  "object": "organization",
  "id": "org_01EHWNCE74X7JSDV0X3SZ3KJNY",
  "name": "Acme Inc.",
  "domains": [
    {
      "object": "organization_domain",
      "id": "org_domain_01EHZNVPK2QXHMVWCEDQEKY69A",
      "organization_id": "org_01HE8GSH8FQPASKSY27THRKRBP",
      "domain": "foo-corp.com",
      "state": "pending",
      "verification_prefix": "superapp-domain-verification-z3kjny",
      "verification_token": "m5Oztg3jdK4NJLgs8uIlIprMw",
      "verification_strategy": "dns",
      "created_at": "2026-01-15T12:00:00.000Z",
      "updated_at": "2026-01-15T12:00:00.000Z"
    }
  ],
  "metadata": {
    "tier": "diamond"
  },
  "external_id": "2fe01467-f7ea-4dd2-8b79-c2b4f56d0191",
  "stripe_customer_id": "cus_R9qWAGMQ6nGE7V",
  "created_at": "2026-01-15T12:00:00.000Z",
  "updated_at": "2026-01-15T12:00:00.000Z"
}
```

:::

## List Organizations

Get a list of all of your existing organizations matching the criteria specified.

:::code-group

```bash language="curl" title="Request" tab="1"
curl "https://api.workos.com/organizations" \
  --header "Authorization: Bearer sk_example_123456789"
```

```js language="js" title="Request" tab="1"
import { WorkOS } from '@workos-inc/node';

const workos = new WorkOS('sk_example_123456789');

const organizations = await workos.organizations.listOrganizations({
  domains: ['foo-corp.com'],
});

console.log(organizations.data);
```

```rb language="ruby" title="Request" tab="1"
require "workos"

WorkOS.configure do |config|
  config.api_key = "sk_example_123456789"
end

WorkOS.client.organizations.list_organizations
```

```py language="python" title="Request" tab="1"
from workos import WorkOSClient

client = WorkOSClient(api_key="sk_example_123456789", client_id="client_123456789")

client.organizations.list_organizations()
```

```go language="go" title="Request" tab="1"
package main

import (
	"context"

	"github.com/workos/workos-go/v10"
)

func main() {
	client := workos.NewClient("sk_example_123456789")

	_, err := client.Organizations().List(context.Background())
	if err != nil {
		panic(err)
	}
}
```

```php language="php" title="Request" tab="1"
<?php

use WorkOS\WorkOS;

$workos = new WorkOS(
    apiKey: "sk_example_123456789",
    clientId: "client_123456789",
);

$workos->organizations()->listOrganizations();
```

```java language="java" title="Request" tab="1"
import com.workos.WorkOS;

WorkOS workos = new WorkOS("sk_example_123456789");

workos.organizations.listOrganizations();
```

```cs language="dotnet" title="Request" tab="1"
using WorkOS;

var client = new WorkOSClient(new WorkOSOptions {
    ApiKey = "sk_example_123456789",
    ClientId = "client_123456789",
});

await client.Organizations.ListAsync();
```

```rust language="rust" title="Request" tab="1"
use workos::Client;

#[tokio::main]
async fn main() -> Result<(), workos::Error> {
    let client = Client::builder()
        .api_key("sk_example_123456789")
        .client_id("client_123456789")
        .build();

    let _result = client
        .organizations()
        .list_organizations()
        .await?;

    Ok(())
}
```

```json language="json" title="Response" tab="2"
{
  "object": "list",
  "data": [
    {
      "object": "organization",
      "id": "org_01EHWNCE74X7JSDV0X3SZ3KJNY",
      "name": "Acme Inc.",
      "domains": [
        {
          "object": "organization_domain",
          "id": "org_domain_01EHZNVPK2QXHMVWCEDQEKY69A",
          "organization_id": "org_01HE8GSH8FQPASKSY27THRKRBP",
          "domain": "foo-corp.com",
          "state": "pending",
          "verification_prefix": "superapp-domain-verification-z3kjny",
          "verification_token": "m5Oztg3jdK4NJLgs8uIlIprMw",
          "verification_strategy": "dns",
          "created_at": "2026-01-15T12:00:00.000Z",
          "updated_at": "2026-01-15T12:00:00.000Z"
        }
      ],
      "metadata": {
        "tier": "diamond"
      },
      "external_id": "2fe01467-f7ea-4dd2-8b79-c2b4f56d0191",
      "stripe_customer_id": "cus_R9qWAGMQ6nGE7V",
      "created_at": "2026-01-15T12:00:00.000Z",
      "updated_at": "2026-01-15T12:00:00.000Z"
    }
  ],
  "list_metadata": {
    "before": "org_01HXYZ123456789ABCDEFGHIJ",
    "after": "org_01HXYZ987654321KJIHGFEDCBA"
  }
}
```

:::

## Update an Organization

Updates an organization in the current environment.

You can include one or more domains to associate with the organization, but you should [verify the ownership](https://workos.com/docs/authkit/domain-verification) of every domain before setting its state to `verified`.

:::code-group

```bash language="curl" title="Request" tab="1"
curl --request PUT \
  --url "https://api.workos.com/organizations/org_01EHZNVPK3SFK441A1RGBFSHRT" \
  --header "Authorization: Bearer sk_example_123456789" \
  --header "Content-Type: application/json" \
  -d @- <<'BODY'
    {
        "name": "Foo Corp",
        "allow_profiles_outside_organization": false,
        "domain_data": [
            {
                "domain": "foo-corp.com",
                "state": "verified"
            }
        ],
        "stripe_customer_id": "cus_R9qWAGMQ6nGE7V",
        "metadata": {
            "tier": "diamond"
        },
        "external_id": "2fe01467-f7ea-4dd2-8b79-c2b4f56d0191"
    }
BODY
```

```js language="js" title="Request" tab="1"
import { WorkOS } from '@workos-inc/node';

const workos = new WorkOS('sk_example_123456789');

const organization = await workos.organizations.updateOrganization({
  organization: 'org_01EHZNVPK3SFK441A1RGBFSHRT',
  name: 'Foo Corp',
  domainData: [
    {
      domain: 'foo-corp.com',
      state: 'verified',
    },
  ],
  externalId: '2fe01467-f7ea-4dd2-8b79-c2b4f56d0191',
  metadata: {
    tier: 'diamond',
  },
  stripeCustomerId: 'cus_R9qWAGMQ6nGE7V',
});
```

```rb language="ruby" title="Request" tab="1"
require "workos"

WorkOS.configure do |config|
  config.api_key = "sk_example_123456789"
end

WorkOS.client.organizations.update_organization(id: "org_01EHZNVPK3SFK441A1RGBFSHRT")
```

```py language="python" title="Request" tab="1"
from workos import WorkOSClient

client = WorkOSClient(api_key="sk_example_123456789", client_id="client_123456789")

client.organizations.update_organization(id_="org_01EHZNVPK3SFK441A1RGBFSHRT")
```

```go language="go" title="Request" tab="1"
package main

import (
	"context"

	"github.com/workos/workos-go/v10"
)

func main() {
	client := workos.NewClient("sk_example_123456789")

	_, err := client.Organizations().Update(context.Background(), "org_01EHZNVPK3SFK441A1RGBFSHRT")
	if err != nil {
		panic(err)
	}
}
```

```php language="php" title="Request" tab="1"
<?php

use WorkOS\WorkOS;

$workos = new WorkOS(
    apiKey: "sk_example_123456789",
    clientId: "client_123456789",
);

$workos
    ->organizations()
    ->updateOrganization(id: "org_01EHZNVPK3SFK441A1RGBFSHRT");
```

```java language="java" title="Request" tab="1"
import com.workos.WorkOS;

WorkOS workos = new WorkOS("sk_example_123456789");

workos.organizations.updateOrganization("org_01EHZNVPK3SFK441A1RGBFSHRT");
```

```cs language="dotnet" title="Request" tab="1"
using WorkOS;

var client = new WorkOSClient(new WorkOSOptions {
    ApiKey = "sk_example_123456789",
    ClientId = "client_123456789",
});

await client.Organizations.UpdateAsync("org_01EHZNVPK3SFK441A1RGBFSHRT");
```

```rust language="rust" title="Request" tab="1"
use workos::Client;

#[tokio::main]
async fn main() -> Result<(), workos::Error> {
    let client = Client::builder()
        .api_key("sk_example_123456789")
        .client_id("client_123456789")
        .build();

    let _result = client
        .organizations()
        .update_organization("org_01EHZNVPK3SFK441A1RGBFSHRT")
        .await?;

    Ok(())
}
```

```json language="json" title="Response" tab="2"
{
  "object": "organization",
  "name": "Foo Corp",
  "domains": [
    {
      "object": "organization_domain",
      "id": "org_domain_01EHZNVPK2QXHMVWCEDQEKY69A",
      "organization_id": "org_01HE8GSH8FQPASKSY27THRKRBP",
      "domain": "foo-corp.com",
      "state": "pending",
      "verification_prefix": "superapp-domain-verification-z3kjny",
      "verification_token": "m5Oztg3jdK4NJLgs8uIlIprMw",
      "verification_strategy": "dns",
      "created_at": "2026-01-15T12:00:00.000Z",
      "updated_at": "2026-01-15T12:00:00.000Z"
    }
  ],
  "metadata": {
    "tier": "diamond"
  },
  "stripe_customer_id": "cus_R9qWAGMQ6nGE7V",
  "created_at": "2026-01-15T12:00:00.000Z",
  "updated_at": "2026-01-15T12:00:00.000Z",
  "allow_profiles_outside_organization": false,
  "id": "org_01EHZNVPK3SFK441A1RGBFSHRT",
  "external_id": "2fe01467-f7ea-4dd2-8b79-c2b4f56d0191"
}
```

:::

### organization

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | "organization" | Yes | Distinguishes the Organization object. |
| `id` | string | Yes | Unique identifier of the Organization. |
| `name` | string | Yes | A descriptive name for the Organization. This field does not need to be unique. |
| `domains` | object[] | Yes | List of [Organization Domains](/reference/domain-verification). |
| `metadata` | object | Yes | Object containing [metadata](/authkit/metadata) key/value pairs associated with the Organization. |
| `external_id` | string | No | The external ID of the Organization. |
| `stripe_customer_id` | string | No | The Stripe customer ID associated with this organization. |
| `created_at` | string | Yes | The timestamp when the Organization was last created. |
| `updated_at` | string | Yes | The timestamp when the Organization was last updated. |
| `allow_profiles_outside_organization` | boolean | No | Whether the Organization allows profiles outside of its managed domains. |

### POST /organizations

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | Yes | The name of the organization. |
| `allow_profiles_outside_organization` | boolean | No | Whether the organization allows profiles from outside the organization to sign in. |
| `domains` | string[] | No | The domains associated with the organization. Deprecated in favor of `domain_data`. |
| `domain_data` | object[] | No | The domains associated with the organization, including verification state. |
| `metadata` | object | No | Object containing [metadata](/authkit/metadata) key/value pairs associated with the Organization. |
| `external_id` | string | No | An external identifier for the Organization. |

#### Returns

| Field | Type | Description |
| --- | --- | --- |
| `organization` | object | Distinguishes the Organization object. |

### DELETE /organizations/{id}

#### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | Unique identifier of the Organization. |

### GET /organizations/external_id/{external_id}

#### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `external_id` | string | Yes | The external ID of the Organization. |

#### Returns

| Field | Type | Description |
| --- | --- | --- |
| `organization` | object | Distinguishes the Organization object. |

### GET /organizations/{id}

#### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | Unique identifier of the Organization. |

#### Returns

| Field | Type | Description |
| --- | --- | --- |
| `organization` | object | Distinguishes the Organization object. |

### GET /organizations

#### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `before` | string | No | An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `before="obj_123"` to fetch a new batch of objects before `"obj_123"`. |
| `after` | string | No | An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `after="obj_123"` to fetch a new batch of objects after `"obj_123"`. |
| `limit` | integer | No | Upper limit on the number of objects to return, between `1` and `100`. Defaults to `10`. |
| `order` | "normal" \| "desc" \| "asc" | No | Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to `normal`. |
| `domains` | string[] | No | The domains of an Organization. Any Organization with a matching domain will be returned. |
| `search` | string | No | Searchable text for an Organization. Matches against the organization name. |

### PUT /organizations/{id}

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | No | The name of the organization. |
| `allow_profiles_outside_organization` | boolean | No | Whether the organization allows profiles from outside the organization to sign in. |
| `domains` | string[] | No | The domains associated with the organization. Deprecated in favor of `domain_data`. |
| `domain_data` | object[] | No | The domains associated with the organization, including verification state. |
| `stripe_customer_id` | string | No | The Stripe customer ID associated with the organization. |
| `metadata` | object | No | Object containing [metadata](/authkit/metadata) key/value pairs associated with the Organization. |
| `external_id` | string | No | An external identifier for the Organization. |

#### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | Unique identifier of the Organization. |

#### Returns

| Field | Type | Description |
| --- | --- | --- |
| `organization` | object | Distinguishes the Organization object. |