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

# Generate QR code (POST)

> Generate a QR code with full customization options via JSON body



## OpenAPI

````yaml https://raw.githubusercontent.com/prefeitura-rio/url_shortener/refs/heads/main/docs/openapi-v3.json post /qr
openapi: 3.0.0
info:
  description: A high-performance URL shortener service with metadata support and caching.
  title: URL Shortener API
  termsOfService: http://swagger.io/terms/
  contact:
    name: API Support
    url: http://www.swagger.io/support
    email: support@swagger.io
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: '1.0'
servers:
  - url: https://pref.rio/link/api
    description: Production
  - url: https://staging.app.dados.rio/link/api
    description: Staging
security: []
paths:
  /qr:
    post:
      tags:
        - qrcode
      summary: Generate QR code (POST)
      description: Generate a QR code with full customization options via JSON body
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/handlers.QRCodeRequest'
        description: QR code generation request
        required: true
      responses:
        '200':
          description: QR code image
          content:
            image/png:
              schema:
                type: string
                format: binary
            image/jpeg:
              schema:
                type: string
                format: binary
        '400':
          description: Bad Request
          content:
            image/png:
              schema:
                type: object
                additionalProperties:
                  type: string
            image/jpeg:
              schema:
                type: object
                additionalProperties:
                  type: string
        '500':
          description: Internal Server Error
          content:
            image/png:
              schema:
                type: object
                additionalProperties:
                  type: string
            image/jpeg:
              schema:
                type: object
                additionalProperties:
                  type: string
      security:
        - bearerAuth: []
components:
  schemas:
    handlers.QRCodeRequest:
      type: object
      required:
        - data
      properties:
        background_color:
          type: string
          example: '#FFFFFF'
        border_width:
          type: integer
          example: 2
        data:
          type: string
          example: https://example.com
        error_correction:
          type: string
          example: high
        foreground_color:
          type: string
          example: '#000000'
        format:
          type: string
          example: png
        include_logo:
          type: boolean
          example: true
        logo_color:
          type: string
          example: '#FF5733'
        logo_shape:
          type: string
          example: circle
        module_shape:
          type: string
          example: square
        size:
          type: integer
          example: 512
        transparent_background:
          type: boolean
          example: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````