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

# Create Label Request Error

> Submit unrecoverable errors encountered when generating labels for merchants.

#### Required API key scope
- Label Requests (Write)




## OpenAPI

````yaml post /label-requests/{id}/errors
openapi: 3.1.0
info:
  title: Labels API
  description: API for managing label requests
  version: v1
servers:
  - url: https://api.loopreturns.com/api/v1
security: []
tags:
  - name: Label Requests
paths:
  /label-requests/{id}/errors:
    post:
      tags:
        - Label Requests
      summary: Create Label Request Error
      description: >
        Submit unrecoverable errors encountered when generating labels for
        merchants.


        #### Required API key scope

        - Label Requests (Write)
      operationId: create-label-request-error
      parameters:
        - in: path
          name: id
          schema:
            type: integer
            example: 67329889100573
          required: true
          description: The unique identifier for the label request, created by Loop.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateLabelRequestErrorRequest'
      responses:
        '202':
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LabelRequestErrorResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          $ref: '#/components/responses/Unprocessable'
      security:
        - oauth2:
            - label_requests:write
        - label-requests-write: []
components:
  schemas:
    CreateLabelRequestErrorRequest:
      type: object
      properties:
        reason:
          $ref: '#/components/schemas/ErrorReasonEnum'
          description: The reason code associated with the label request error.
        message:
          type:
            - string
            - 'null'
          maxLength: 500
          description: The message associated with the label request error.
          example: Failed to generate a label, the origin address is invalid
      required:
        - reason
    LabelRequestErrorResponse:
      type: object
      required:
        - reason
      properties:
        reason:
          $ref: '#/components/schemas/ErrorReasonEnum'
          description: The reason code associated with the label request error.
        message:
          type:
            - string
            - 'null'
          description: The message associated with the label request error.
          example: Failed to generate a label, the origin address is invalid
        created_at:
          $ref: '#/components/schemas/Date'
    ErrorReasonEnum:
      type: string
      description: The error reason.
      enum:
        - INSUFFICIENT_FUNDS
        - INVALID_ADDRESS
        - Other
      example: INVALID_ADDRESS
    Date:
      type: string
      description: The date the label was created.
      format: date-time
      example: '2023-04-25T13:25:00-05:00'
  responses:
    Unauthorized:
      description: The request could not be authorized.
      content:
        application/json:
          schema:
            type: object
            required:
              - errors
            properties:
              errors:
                type: string
                example: Unauthorized.
    Unprocessable:
      description: >
        Validation failed. Returned when the request body does not satisfy the
        endpoint's

        validation rules.
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                example: The status field is required.
              errors:
                type: object
                additionalProperties:
                  type: array
                  items:
                    type: string
                example:
                  status:
                    - The status field is required.
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://oauth.loopreturns.com/authorize
          tokenUrl: https://oauth.loopreturns.com/oauth/token
          scopes:
            labels:read: Read access to labels
            labels:write: Create and modify labels
            label_requests:read: Read access to label requests
            label_requests:write: Create and modify label requests
            returns: Access to returns operations
    label-requests-write:
      name: X-Authorization
      type: apiKey
      in: header
      description: 'API Scope: "Label Requests (write)"'
      x-scope: Label Requests (Write)

````