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

# CreateOrganizationAPI creates a new top-level organization owned by the caller,
for `erdo org


> create\`. Org creation otherwise lives only on the internal session surface, which the external-surface gate keeps off-limits to API keys. This wrapper exposes the capability the web UI already grants every authenticated non-guest user, so it widens nothing: the caller becomes owner, guests are denied (in-handler and by the deny-guest tag), and scoped API keys are denied here and by the scoped-key middleware's hard denylist.




## OpenAPI

````yaml /api/openapi.json post /v1/organizations
openapi: 3.0.0
info:
  title: Erdo API
  description: >-
    Erdo's REST API: query and write datasets, run agents, manage threads,
    integrations, pages, evals, workstreams, experiments, and bounded outreach.
    Authenticate with a Bearer API key (erdo_api_...) or scoped token
    (erdo_token_...).
  version: '2026-11-21'
servers:
  - url: https://api.erdo.ai
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/organizations:
    post:
      summary: >
        CreateOrganizationAPI creates a new top-level organization owned by the
        caller,

        for `erdo org
      description: >
        create\`. Org creation otherwise lives only on the internal session
        surface, which the external-surface gate keeps off-limits to API keys.
        This wrapper exposes the capability the web UI already grants every
        authenticated non-guest user, so it widens nothing: the caller becomes
        owner, guests are denied (in-handler and by the deny-guest tag), and
        scoped API keys are denied here and by the scoped-key middleware's hard
        denylist.
      operationId: POST:mcp.CreateOrganizationAPI
      requestBody:
        content:
          application/json:
            schema:
              properties:
                name:
                  type: string
                slug:
                  description: >
                    (the generator appends a numeric suffix on collision). A
                    provided slug that is already taken is rejected rather than
                    suffixed.
                  title: >
                    Slug is the desired org slug; omit to auto-generate one from
                    the name
                  type: string
                timezone:
                  description: >
                    schedule the org's default heartbeats at a sensible local
                    time. Empty is fine: provisioning falls back to UTC, and web
                    onboarding backfills the timezone later if the owner
                    completes it there.
                  title: >
                    Timezone is an optional IANA timezone (e.g. "Europe/London")
                    used to
                  type: string
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  slug:
                    type: string
                type: object
          description: Success response
        default:
          $ref: '#/components/responses/APIError'
components:
  responses:
    APIError:
      content:
        application/json:
          schema:
            externalDocs:
              url: https://pkg.go.dev/encore.dev/beta/errs#Error
            properties:
              code:
                description: Error code
                example: not_found
                externalDocs:
                  url: https://pkg.go.dev/encore.dev/beta/errs#ErrCode
                type: string
              details:
                description: Error details
                type: object
              message:
                description: Error message
                type: string
            title: APIError
            type: object
      description: Error response
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: An Erdo API key (erdo_api_...) or scoped token (erdo_token_...).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.