> ## 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.

# One-shot agent workspace signup

> Creates a workspace, founding owner, and `pvk_` org API key in one request. Optionally initializes a prepaid wallet Stripe Checkout or wire top-up.



## OpenAPI

````yaml https://app.sotroai.com/openapi.json post /api/v1/agent/signup
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/agent/signup:
    post:
      tags:
        - Agent Signup & Access
      summary: One-shot agent workspace signup
      description: >-
        Creates a workspace, founding owner, and `pvk_` org API key in one
        request. Optionally initializes a prepaid wallet Stripe Checkout or wire
        top-up.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentSignupRequest'
      responses:
        '201':
          description: Workspace and credentials provisioned
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      org:
                        type: object
                      member:
                        type: object
                      credentials:
                        type: object
                        properties:
                          apiKey:
                            type: string
                            nullable: true
                          memberToken:
                            type: string
                      wallet:
                        $ref: '#/components/schemas/WalletSummary'
                      payment:
                        type: object
                        nullable: true
                      mcp:
                        type: object
                      nextSteps:
                        type: array
                        items:
                          type: string
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  schemas:
    AgentSignupRequest:
      type: object
      required:
        - name
        - email
      properties:
        name:
          type: string
          description: Workspace or organization name
          example: Acme Engineering
        email:
          type: string
          format: email
          description: Founding owner email (alias adminEmail also accepted)
          example: agent@acme.com
        agentName:
          type: string
          description: Friendly label for the default org API key
          example: acme-ops-agent
        keyName:
          type: string
          description: Explicit name for the initial pvk_ API key
        keyRole:
          type: string
          enum:
            - admin
            - member
          default: admin
        initialTopUpCents:
          type: integer
          minimum: 50000
          description: >-
            Optional prepaid wallet top-up in USD cents to create a Checkout URL
            immediately
        paymentMethod:
          type: string
          enum:
            - ach
            - card
            - wire
            - invoice
          default: ach
        successUrl:
          type: string
          format: uri
        cancelUrl:
          type: string
          format: uri
    WalletSummary:
      type: object
      properties:
        orgId:
          type: string
          format: uuid
        balanceMicroUsd:
          type: integer
        balanceUsd:
          type: number
        hardCutoffMicroUsd:
          type: integer
        clearingFeeBps:
          type: integer
        lifetimeFundedMicroUsd:
          type: integer
        lifetimeSpentMicroUsd:
          type: integer
        lifetimeFeeMicroUsd:
          type: integer
    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'
  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'

````

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