> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getgranite.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Org

> Create a new organization and add the user as a member



## OpenAPI

````yaml post /api/create_organization
openapi: 3.1.0
info:
  title: Axion Backend API
  description: Backend API for Axion platform with desktop automation capabilities
  version: 1.0.0
servers:
  - url: https://api.getgranite.ai
    description: Production server
  - url: http://localhost:8000
    description: Local development server
security: []
tags:
  - name: Authentication
    description: User authentication and session management
  - name: Organizations
    description: Organization management and membership
  - name: Health
    description: API health and status monitoring
  - name: Automations
    description: Automation planning and execution
  - name: MIG
    description: Managed Instance Group operations
  - name: Agent
    description: Agent execution and streaming
  - name: Onboarding
    description: Organization onboarding flow
  - name: Organization Automations
    description: Organization automation endpoint management
  - name: Organization Endpoints
    description: Public endpoints for organization automations
  - name: Analytics
    description: Analytics and reporting endpoints
paths:
  /api/create_organization:
    post:
      tags:
        - Authentication
        - Organizations
      summary: Create new organization
      description: Create a new organization and add the user as a member
      operationId: createOrganization
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOrganizationRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationActionResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CreateOrganizationRequest:
      properties:
        organization_name:
          type: string
          title: Organization Name
          description: Organization display name
        organization_slug:
          type: string
          title: Organization Slug
          description: URL-friendly organization identifier
      type: object
      required:
        - organization_name
        - organization_slug
      title: CreateOrganizationRequest
      description: Request model for creating a new organization
    OrganizationActionResponse:
      properties:
        status:
          type: string
          title: Status
          description: Action status
        message:
          type: string
          title: Message
          description: Status message
        user:
          $ref: '#/components/schemas/UserResponse'
          description: Updated user information
      type: object
      required:
        - status
        - message
        - user
      title: OrganizationActionResponse
      description: Response from organization actions
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    UserResponse:
      properties:
        member_id:
          type: string
          title: Member Id
          description: Unique member identifier
        email:
          type: string
          title: Email
          description: User email address
        organization:
          $ref: '#/components/schemas/OrganizationResponse'
          description: User's organization
      type: object
      required:
        - member_id
        - email
        - organization
      title: UserResponse
      description: User information with organization details
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    OrganizationResponse:
      properties:
        organization_id:
          type: string
          title: Organization Id
          description: Unique organization identifier
        organization_name:
          type: string
          title: Organization Name
          description: Organization display name
        organization_slug:
          type: string
          title: Organization Slug
          description: URL-friendly organization identifier
      type: object
      required:
        - organization_id
        - organization_name
        - organization_slug
      title: OrganizationResponse
      description: Organization information

````