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

# Create a workspace and founding owner



## OpenAPI

````yaml https://app.sotroai.com/openapi.json post /api/v1/workspace/orgs
openapi: 3.0.3
info:
  title: Sotro API
  version: 1.0.0
  description: >
    Agent-first API and Model Context Protocol (MCP) server for Sotro.


    ## Quick Start for Agents

    1. Discover capabilities at `GET /.well-known/agent.json` or `GET
    /api/v1/agent/manifest`.

    2. Create a workspace and `pvk_` org API key in one call via `POST
    /api/v1/agent/signup`.

    3. Fund your prepaid token wallet via `POST /api/v1/agent/billing/quote` and
    `POST /api/v1/agent/billing/checkout` (ACH, card, wire, or invoice).

    4. Call REST endpoints with `Authorization: Bearer <token>` or `X-API-Key:
    <token>`, or connect MCP at `POST /mcp` (Streamable HTTP).


    ## Authentication

    Send a `pvk_` org API key or `pvt_` member token in either:

    - `Authorization: Bearer <token>`

    - `X-API-Key: <token>`


    Optionally scope multi-org member credentials with `X-Org-Id: <orgUuid>`.


    ## Consistent JSON Errors

    Every API and MCP error returns `application/json` with the `ErrorResponse`
    schema:

    `{ "error": { "code": "ERR_*", "message": "...", "details": {} }, "message":
    "..." }`.
  contact:
    name: Sotro Developers
    email: hello@sotroai.com
    url: https://sotroai.com/developers
servers:
  - url: https://app.sotroai.com
    description: Production
  - url: http://localhost:3000
    description: Local development
security: []
tags:
  - name: Discovery
    description: Machine-readable agent manifests, OpenAPI specs, and health probes
  - name: Agent Signup & Access
    description: One-shot agent onboarding, identity status, and API key lifecycle
  - name: Payment & Wallet
    description: >-
      Prepaid token wallet balance, quotes, Stripe Checkout (ACH/card),
      wire/invoice instructions, and ledger
  - name: Workspace
    description: Workspace creation, member identity, and organization API keys
  - name: Decisions & Auto-Continue
    description: Calibrated decisions API and external coding-agent auto-continue
  - name: Context & Provenance
    description: Organizational knowledge queries and source provenance
  - name: MCP
    description: Streamable HTTP Model Context Protocol server and OAuth discovery
paths:
  /api/v1/workspace/orgs:
    post:
      tags:
        - Workspace
      summary: Create a workspace and founding owner
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - adminEmail
              properties:
                name:
                  type: string
                adminEmail:
                  type: string
                  format: email
      responses:
        '201':
          description: Workspace created
          content:
            application/json:
              schema:
                type: object
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  responses:
    BadRequest:
      description: Validation or malformed JSON error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: Insufficient permissions or invite-only signup gate
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  schemas:
    ErrorResponse:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              example: ERR_VALIDATION
            message:
              type: string
              example: 'Missing required field: name'
            details:
              type: object
              additionalProperties: true
        message:
          type: string
          example: 'Missing required field: name'

````

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