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

# Create workspace

> Create a workspace to hold agents, phone numbers, and API keys.



## OpenAPI

````yaml api-reference/accounts/openapi.json POST /v1/workspaces
openapi: 3.0.3
info:
  title: Persistence Accounts and Workspaces API
  version: '1.0'
  description: Manage Persistence workspaces and their API keys.
servers:
  - url: https://api.persistence.dev
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Accounts and workspaces
    description: Workspace management and API key creation.
paths:
  /v1/workspaces:
    post:
      tags:
        - Accounts and workspaces
      summary: Create workspace
      description: Create a workspace.
      operationId: createWorkspace
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkspaceRequest'
        description: Create workspace request
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspaceResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    WorkspaceRequest:
      type: object
      properties:
        name:
          type: string
        scope:
          type: string
    WorkspaceResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Workspace'
        success:
          type: boolean
    Error:
      type: object
      properties:
        code:
          type: string
        error:
          type: string
    Workspace:
      type: object
      properties:
        id:
          type: string
        meta:
          type: object
          additionalProperties: {}
        name:
          type: string
        path:
          type: string
        scope:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key issued for your workspace.

````