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

# Crear carta individual (single)

> Crea una carta única no asociada a campaña.
        
        **Comportamiento**:
        - Verifica y normaliza la dirección postal.
        - Cobra automáticamente los créditos.
        - Deja la carta lista para impresión con los diseños indicados.




## OpenAPI

````yaml api-reference/openapi.json post /single
openapi: 3.0.3
info:
  title: Manuscritten Public API
  version: 1.0.0
  description: |
    API pública de **Manuscritten** para crear cartas manuscritas y consultar
    recursos auxiliares (campañas automáticas, diseños, remitentes y firmas).
        

        **Notas clave**:
        - Autenticación mediante **API Key** en la cabecera `X-API-KEY`.
        - Los endpoints de creación **validan y normalizan** la dirección postal, y **cobran créditos** automáticamente.
        - Coste orientativo: **3 créditos** (España) y **5 créditos** (internacional).
servers:
  - url: https://app.manuscritten.com/api/public
    description: Producción
security:
  - ApiKeyAuth: []
tags:
  - name: Info
    description: Endpoints de consulta de recursos de la cuenta
  - name: Create
    description: Endpoints para crear cartas (campañas automáticas o individuales)
paths:
  /single:
    post:
      tags:
        - Create
      summary: Crear carta individual (single)
      description: |
        Crea una carta única no asociada a campaña.
                
                **Comportamiento**:
                - Verifica y normaliza la dirección postal.
                - Cobra automáticamente los créditos.
                - Deja la carta lista para impresión con los diseños indicados.
      operationId: createSingleCard
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSingleRequest'
            examples:
              ejemplo:
                value:
                  cardDesignId: c83a2a1a-12c3-4de5-92f7-cc40327b9912
                  envelopeDesignId: 1f86a2b9-6b7a-42c5-bb77-7c51a5edfe91
                  senderId: a8c9b331-0f1a-4f32-9e75-d4a24ce3b129
                  fontName: PremiumUltra23
                  message: Hola Alfredo, gracias por venir al evento.
                  name: Alfredo
                  surname: Villacastín
                  company: TechShow
                  address: C. de José María Lacarra de Miguel, 250
                  zip: '50008'
                  city: Zaragoza
                  province: ''
                  country: ES
      responses:
        '200':
          description: Creada
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateResponse'
              examples:
                ejemplo:
                  value:
                    success: true
                    cardId: f64e3bc1-72e9-4c0a-9dc7-34db5e9b45ad
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '429':
          $ref: '#/components/responses/RateLimit'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  schemas:
    CreateSingleRequest:
      type: object
      properties:
        cardDesignId:
          type: string
          format: uuid
        envelopeDesignId:
          type: string
          format: uuid
        senderId:
          type: string
          format: uuid
        fontName:
          type: string
          nullable: true
        message:
          type: string
          nullable: true
        name:
          type: string
        surname:
          type: string
        company:
          type: string
          nullable: true
        address:
          type: string
        zip:
          type: string
        city:
          type: string
        province:
          type: string
          nullable: true
        country:
          type: string
          description: Código ISO 3166-1 alfa-2 (ej. ES, FR, US)
          minLength: 2
          maxLength: 2
      required:
        - cardDesignId
        - envelopeDesignId
        - senderId
        - name
        - surname
        - address
        - zip
        - city
        - country
    CreateResponse:
      type: object
      properties:
        success:
          type: boolean
        cardId:
          type: string
          format: uuid
      required:
        - success
        - cardId
    Error:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
      required:
        - error
        - message
  responses:
    BadRequest:
      description: Petición inválida (validación, campos obligatorios, formatos).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            ejemplo:
              value:
                error: Bad Request
                message: Campo "address" es obligatorio
    Unauthorized:
      description: Falta o es inválida la API Key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            ejemplo:
              value:
                error: Unauthorized
                message: API key inválida o ausente
    PaymentRequired:
      description: Créditos insuficientes para crear la carta.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            ejemplo:
              value:
                error: Payment Required
                message: Créditos insuficientes
    RateLimit:
      description: Límite de peticiones excedido.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            ejemplo:
              value:
                error: Too Many Requests
                message: Has superado el límite de peticiones
    ServerError:
      description: Error interno del servidor.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            ejemplo:
              value:
                error: Internal Server Error
                message: Ha ocurrido un error inesperado
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
      description: API Key de Manuscritten.

````