Skip to main content
The Organizations API allows you to create, manage, and organize hierarchical structures for your Cloudflare resources. Organizations are currently in Closed Beta.

Create organization

Create a new organization for a user.
const organization = await client.organizations.create({
  name: 'Acme Corporation',
  profile: {
    business_name: 'Acme Corp',
    business_email: '[email protected]',
    business_address: '123 Main St',
    business_phone: '+1-555-0100',
    external_metadata: '{}'
  }
});
name
string
required
The name of the organization
parent
object
Parent organization reference
profile
object
Organization profile information
id
string
Organization identifier
name
string
Organization name
create_time
string
ISO 8601 timestamp when the organization was created
meta
object
Organization metadata
parent
object
Parent organization details
profile
object
Organization profile information

Update organization

Modify an existing organization.
const organization = await client.organizations.update(
  'f1234567890abcdef1234567890abcde',
  {
    name: 'Acme Corporation Updated',
    profile: {
      business_name: 'Acme Corp',
      business_email: '[email protected]',
      business_address: '456 Market St',
      business_phone: '+1-555-0200',
      external_metadata: '{}'
    }
  }
);

List organizations

Retrieve a list of organizations a particular user has access to.
for await (const organization of client.organizations.list()) {
  console.log(organization.name);
}
id
string[]
Filter by organization IDs
name
object
Filter by organization name
containing
object
Filter by contained resources
parent
object
Filter by parent organization
page_size
number
Number of items to return (default: 10)
page_token
string
Pagination token from previous response

Get organization

Retrieve the details of a specific organization.
const organization = await client.organizations.get(
  'f1234567890abcdef1234567890abcde'
);

Delete organization

Delete an organization. The organization must be empty (no sub-organizations, accounts, members, or users).
const result = await client.organizations.delete(
  'f1234567890abcdef1234567890abcde'
);
id
string
ID of the deleted organization

Build docs developers (and LLMs) love