Avnology ID
API ReferenceOrganizations

Create Organization

Create a new organization with name, registration mode, feature flags, and security policies.

Endpoint

POST /v1/organizations

Base URL: https://api-id.avnology.net

Authentication: API Key or OAuth token with admin:orgs:write scope

Request

curl -X POST https://api-id.avnology.net/v1/organizations \
  -H













Body

FieldTypeRequiredDescription
namestringYesURL-safe name (2--64 chars, lowercase alphanumeric + hyphens)
display_namestringNoHuman-readable name
slugstringNoURL slug for /org/{slug} login (immutable after creation)
registration_modestringNoopen, invite_only, sso_only, disabled (default: open)
feature_flagsobjectNoToggle auth methods per org
security_policiesobjectNoPassword, session, and MFA policies

Response

Success (201 Created)

Returns the created organization object. See Get Organization for the full schema.

Errors

StatusCodeDescription
400AVNOLOGY_AUTH_902Validation failed
409AVNOLOGY_AUTH_903Organization name or slug already exists

Code Examples

JavaScript (fetch)

async function createOrganization(apiKey, name, displayName) {
  return fetch('https://api-id.avnology.net/v1/organizations', {
    method: 'POST',
    headers: { 'Authorization': `Bearer ${apiKey}`, 'Content-Type': 'application/json' },


Python (httpx)

import httpx

def create_organization(api_key: str, name: str, display_name: str) -> dict:
    return httpx.post("https://api-id.avnology.net/v1/organizations",
        headers={"Authorization"

Go (net/http)

func createOrganization(ctx context.Context, apiKey, name, displayName string) (*Organization, error) {
	body, _ 









  • Get Organization -- retrieve the created organization
  • Add Member -- add members to the organization
  • SDK: client.admin.createOrganization({ name, displayName }) (TypeScript)