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

# Create workspace

> Creates a new workspace and returns a default API key.
No authentication required — call this once to bootstrap your account.




## OpenAPI

````yaml /openapi.yaml post /api/v1/workspaces
openapi: 3.0.3
info:
  title: Torpedo API
  version: '1.0'
  description: |
    Torpedo is a transactional email API built for developers.
    Send emails from your own verified domain with a single HTTP call.
  contact:
    email: support@torpedo.co.mz
  termsOfService: https://torpedo.co.mz/terms
servers:
  - url: https://api.torpedo.co.mz
    description: Production
security:
  - ApiKeyAuth: []
paths:
  /api/v1/workspaces:
    post:
      tags:
        - Workspaces
      summary: Create workspace
      description: |
        Creates a new workspace and returns a default API key.
        No authentication required — call this once to bootstrap your account.
      operationId: createWorkspace
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 100
                  example: Acme Corp
            example:
              name: Acme Corp
      responses:
        '201':
          description: Workspace created
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      workspaceId:
                        type: string
                        format: uuid
                      workspaceName:
                        type: string
                      apiKey:
                        allOf:
                          - $ref: '#/components/schemas/ApiKey'
                          - type: object
                            properties:
                              key:
                                type: string
                                description: >-
                                  Plain key — returned once only. Store it
                                  securely.
                                example: tor_abc123xyz...
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security: []
components:
  schemas:
    ApiKey:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
          example: Production
        domainId:
          type: string
          format: uuid
          nullable: true
        createdAt:
          type: string
          format: date-time
        lastUsedAt:
          type: string
          format: date-time
          nullable: true
    Error:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              message:
                type: string
                example: Domain not verified
              field:
                type: string
                example: from
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: |
        Prefix `tor_` followed by a base64url-encoded random key.
        Obtain one from `POST /api/v1/workspaces` or `POST /api/v1/auth/keys`.

````