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

# Send receipt

> Send a hosted receipt by email or SMS.



## OpenAPI

````yaml /api-reference/hosted-receipts-openapi.yaml post /receipts/{receiptId}/send
openapi: 3.1.0
info:
  title: OpenFiskal hosted receipts API
  version: 1.0.0
  license:
    name: Proprietary
  description: |
    OpenFiskal exposes a hosted receipts API for retrieving, rendering, and
    delivering completed receipts.

    Authentication uses the same server-to-server bearer token and
    `X-OpenFiskal-Merchant` scoping model as the core fiscalization API.
servers:
  - url: https://api.openfiskal.com/v1
    description: Production
  - url: https://sandbox.api.openfiskal.com/v1
    description: Sandbox
security: []
tags:
  - name: Receipts
    description: Retrieve, render, and deliver hosted receipts.
paths:
  /receipts/{receiptId}/send:
    parameters:
      - $ref: '#/components/parameters/MerchantHeader'
    post:
      tags:
        - Receipts
      summary: Send receipt
      description: Send a hosted receipt by email or SMS.
      parameters:
        - $ref: '#/components/parameters/ReceiptId'
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReceiptSendRequest'
      responses:
        '202':
          description: Receipt delivery accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReceiptDelivery'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/RateLimited'
      security:
        - BearerAuth: []
components:
  parameters:
    MerchantHeader:
      name: X-OpenFiskal-Merchant
      in: header
      required: true
      schema:
        type: string
    ReceiptId:
      name: receiptId
      in: path
      required: true
      schema:
        type: string
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: true
      schema:
        type: string
  schemas:
    ReceiptSendRequest:
      type: object
      additionalProperties: false
      properties:
        channel:
          type: string
          enum:
            - email
            - sms
        recipient:
          type: string
        locale:
          type:
            - string
            - 'null'
      required:
        - channel
        - recipient
    ReceiptDelivery:
      type: object
      additionalProperties: false
      properties:
        id:
          type: string
        receipt_id:
          type: string
        channel:
          type: string
          enum:
            - email
            - sms
        recipient:
          type: string
        status:
          type: string
          enum:
            - queued
            - sent
            - failed
        created_at:
          type: string
          format: date-time
      required:
        - id
        - receipt_id
        - channel
        - recipient
        - status
        - created_at
    Error:
      type: object
      additionalProperties: false
      properties:
        code:
          type: string
        message:
          type: string
        retryable:
          type: boolean
        request_id:
          type: string
        details:
          type: object
          additionalProperties: true
      required:
        - code
        - message
        - retryable
  responses:
    BadRequest:
      description: Request body or parameters were invalid.
      headers:
        X-Request-Id:
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Authentication is missing or invalid.
      headers:
        X-Request-Id:
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: The API key does not have access to the requested resource.
      headers:
        X-Request-Id:
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: The requested resource was not found.
      headers:
        X-Request-Id:
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    UnprocessableEntity:
      description: The payload was syntactically valid but could not be processed.
      headers:
        X-Request-Id:
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: The caller exceeded the allowed request rate.
      headers:
        X-Request-Id:
          schema:
            type: string
        Retry-After:
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key

````