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

# Reject Memo

> Reject a memo at the current workflow step

Reject a memo at its current workflow approval step. This stops the approval process and marks the memo as rejected, requiring the creator to either revise and resubmit or cancel the memo.

## Authentication

Requires authentication with Bearer token. Available to:

* **Manager**
* **HR Manager**
* **Super Admin**

<Warning>
  Only users with approval authority at the current workflow step can reject the memo. Rejecting a memo is a significant action that stops the approval workflow.
</Warning>

## Path Parameters

<ParamField path="id" type="string" required>
  The unique identifier of the memo (UUID format)

  **Example:** `"550e8400-e29b-41d4-a716-446655440000"`
</ParamField>

## Request Body

<ParamField body="comments" type="string">
  Optional rejection comments explaining the reason for rejection

  **Example:** `"Policy conflicts with existing HR guidelines. Please revise section 3."`
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  Indicates if the request was successful
</ResponseField>

<ResponseField name="data" type="object">
  The updated memo object with rejected status

  <Expandable title="Memo properties">
    <ResponseField name="id" type="string">
      Unique identifier for the memo
    </ResponseField>

    <ResponseField name="company_id" type="string">
      UUID of the company
    </ResponseField>

    <ResponseField name="created_by" type="string">
      UUID of the employee who created the memo
    </ResponseField>

    <ResponseField name="memo_type" type="string">
      Type of memo (e.g., "announcement", "policy", "notice")
    </ResponseField>

    <ResponseField name="title" type="string">
      Memo title
    </ResponseField>

    <ResponseField name="content" type="string">
      Full memo content
    </ResponseField>

    <ResponseField name="reference_number" type="string">
      Unique reference number for the memo
    </ResponseField>

    <ResponseField name="priority" type="string">
      Priority level: "low", "medium", or "high"
    </ResponseField>

    <ResponseField name="status" type="string">
      Current status (will be "rejected" after this call)
    </ResponseField>

    <ResponseField name="current_step" type="integer">
      Workflow step where rejection occurred
    </ResponseField>

    <ResponseField name="rejected_by" type="string">
      UUID of the employee who rejected the memo
    </ResponseField>

    <ResponseField name="rejected_at" type="string">
      Rejection timestamp
    </ResponseField>

    <ResponseField name="rejection_reason" type="string">
      Comments provided during rejection
    </ResponseField>

    <ResponseField name="created_at" type="string">
      ISO 8601 timestamp
    </ResponseField>

    <ResponseField name="updated_at" type="string">
      ISO 8601 timestamp
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.companyflow.com/memos/550e8400-e29b-41d4-a716-446655440000/reject \
    -H "Authorization: Bearer YOUR_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
      "comments": "Policy conflicts with existing HR guidelines. Please revise section 3."
    }'
  ```

  ```javascript JavaScript theme={null}
  const memoId = '550e8400-e29b-41d4-a716-446655440000';

  const response = await fetch(
    `https://api.companyflow.com/memos/${memoId}/reject`,
    {
      method: 'POST',
      headers: {
        'Authorization': 'Bearer YOUR_TOKEN',
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        comments: 'Policy conflicts with existing HR guidelines. Please revise section 3.'
      })
    }
  );

  const data = await response.json();
  ```

  ```python Python theme={null}
  import requests

  memo_id = '550e8400-e29b-41d4-a716-446655440000'
  url = f'https://api.companyflow.com/memos/{memo_id}/reject'
  headers = {
      'Authorization': 'Bearer YOUR_TOKEN',
      'Content-Type': 'application/json'
  }
  payload = {
      'comments': 'Policy conflicts with existing HR guidelines. Please revise section 3.'
  }

  response = requests.post(url, json=payload, headers=headers)
  data = response.json()
  ```
</RequestExample>

<ResponseExample>
  ```json 200 - Success theme={null}
  {
    "success": true,
    "data": {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "company_id": "123e4567-e89b-12d3-a456-426614174000",
      "created_by": "987e6543-e21b-12d3-a456-426614174000",
      "memo_type": "policy",
      "title": "Updated Remote Work Policy",
      "content": "Effective immediately, all employees are eligible for hybrid work arrangements...",
      "reference_number": "MEMO-2025-001",
      "priority": "high",
      "status": "rejected",
      "current_step": 1,
      "rejected_by": "abc12345-e89b-12d3-a456-426614174000",
      "rejected_at": "2025-03-03T15:30:00Z",
      "rejection_reason": "Policy conflicts with existing HR guidelines. Please revise section 3.",
      "created_at": "2025-03-03T10:00:00Z",
      "updated_at": "2025-03-03T15:30:00Z"
    }
  }
  ```

  ```json 400 - Bad Request (Invalid memo ID) theme={null}
  {
    "success": false,
    "message": "invalid memo id"
  }
  ```

  ```json 400 - Bad Request (Not authorized to reject) theme={null}
  {
    "success": false,
    "message": "you are not authorized to reject this memo at the current step"
  }
  ```

  ```json 401 - Unauthorized theme={null}
  {
    "success": false,
    "message": "unauthorized"
  }
  ```
</ResponseExample>

## What Happens After Rejection

<Steps>
  <Step title="Workflow Stops">
    The memo approval workflow is immediately halted
  </Step>

  <Step title="Creator Notified">
    The memo creator receives a notification with rejection details and comments
  </Step>

  <Step title="Status Updated">
    Memo status changes to `rejected` and is no longer in the approval queue
  </Step>

  <Step title="Next Actions">
    The creator can revise the memo based on feedback and create a new version, or cancel the memo entirely
  </Step>
</Steps>

## Best Practices

<Info>
  **Providing helpful feedback:**

  * Always include detailed comments explaining the reason for rejection
  * Reference specific sections or issues that need to be addressed
  * Suggest concrete improvements or alternatives
  * Be constructive to help the creator revise effectively
</Info>

<Tip>
  If the memo needs minor changes, consider communicating directly with the creator before rejecting. Rejection should be reserved for significant issues that require substantial revision.
</Tip>

## Authorization Rules

Similar to approval, rejection requires:

* The memo must be at a workflow step where you have approval authority
* Managers can reject memos from their department or direct reports
* HR Managers and Super Admins can reject any memo
* The memo must be in `pending` status (not already approved or rejected)

## Related Endpoints

* [Approve Memo](/api/memos/approve) - Approve a memo to move it forward
* [Get Memo](/api/memos/get) - View memo details and status
* [List Memos](/api/memos/list) - View memos with filtering
* [Mark as Read](/api/memos/read) - Mark memo as read
