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

# Reject a pending draft

> Requires the `write` scope and a `member` (or higher) key role.



## OpenAPI

````yaml /swagger/v1/openapi.yaml post /v1/messages/{id}/reject
openapi: 3.0.1
info:
  title: SentinelAR API
  version: v1
  description: >-
    Read and act on customers, invoices, recoveries, messages and fees.
    Authenticate with an API key from Settings → API Keys as a bearer token.
servers:
  - url: https://api.sentinelar.app
    description: Production
  - url: '{scheme}://{host}/api'
    description: Local
    variables:
      scheme:
        default: http
        enum:
          - http
          - https
      host:
        default: localhost:3000
security:
  - bearer_auth: []
paths:
  /v1/messages/{id}/reject:
    parameters:
      - name: id
        in: path
        schema:
          type: string
          format: uuid
        required: true
    post:
      tags:
        - Messages
      summary: Reject a pending draft
      description: Requires the `write` scope and a `member` (or higher) key role.
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                reject_reason:
                  type: string
                  enum:
                    - wrong_tone
                    - wrong_facts
                    - bad_timing
                    - too_aggressive
                    - other
                reject_note:
                  type: string
                  maxLength: 280
              required:
                - reject_reason
      responses:
        '200':
          description: draft rejected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/message'
        '422':
          description: reject reason missing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
components:
  schemas:
    message:
      type: object
      properties:
        id:
          type: string
          format: uuid
        object:
          type: string
          enum:
            - message
        recovery:
          type: string
          format: uuid
        direction:
          type: string
          enum:
            - from_customer
            - to_customer
        status:
          type: string
          nullable: true
          enum:
            - awaiting_review
            - approved
            - rejected
            - sent
            - withdrawn
            - null
        subject:
          type: string
          nullable: true
        body:
          type: string
          nullable: true
        proposal:
          type: object
          nullable: true
          properties:
            type:
              type: string
              enum:
                - payment_request
                - extension
                - discount
                - payment_plan
                - handoff
                - close
            days:
              type: integer
            percent:
              type: integer
            installments:
              type: integer
          required:
            - type
          additionalProperties: false
        sent_at:
          type: string
          format: date-time
          nullable: true
        created_at:
          type: string
          format: date-time
      required:
        - id
        - object
        - recovery
        - direction
      additionalProperties: false
    error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
          required:
            - code
            - message
      required:
        - error
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer
      bearerFormat: snl_<32 hex>

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.