> ## 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.

# Create Memo

> Create a new memo with optional recipients and workflow approvals

## Endpoint

```
POST /memos
```

## Description

Create a new memo and assign it to optional recipients. The memo enters a pending state and follows the configured approval workflow based on the memo type.

## Authentication

Requires Bearer token authentication. Accessible by:

* Employee
* Manager
* HR Manager
* Super Admin

## Request Body

<ParamField body="memoType" type="string" required>
  Type of memo. Must be one of:

  * `request` - Request memo requiring approval
  * `disciplinary` - Disciplinary action memo
  * `announcement` - Company-wide announcement
  * `general` - General purpose memo
</ParamField>

<ParamField body="title" type="string" required>
  Memo title (max 255 characters)
</ParamField>

<ParamField body="content" type="string" required>
  Full memo content
</ParamField>

<ParamField body="referenceNumber" type="string">
  Optional reference number for tracking (max 100 characters)
</ParamField>

<ParamField body="priority" type="string">
  Memo priority level. Must be one of:

  * `low`
  * `normal` (default)
  * `high`
  * `urgent`
</ParamField>

<ParamField body="recipientIds" type="array">
  Array of employee UUIDs who should receive this memo
</ParamField>

## Response

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

<ResponseField name="data" type="object">
  The created memo object

  <Expandable title="Memo Object">
    <ResponseField name="id" type="string">
      Unique memo identifier (UUID)
    </ResponseField>

    <ResponseField name="companyId" type="string">
      Company UUID
    </ResponseField>

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

    <ResponseField name="memoType" type="string">
      Type of memo (request, disciplinary, announcement, general)
    </ResponseField>

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

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

    <ResponseField name="referenceNumber" type="string">
      Reference number for tracking
    </ResponseField>

    <ResponseField name="status" type="string">
      Current memo status (draft, pending, approved, rejected, archived)
    </ResponseField>

    <ResponseField name="currentStep" type="integer">
      Current approval workflow step
    </ResponseField>

    <ResponseField name="priority" type="string">
      Priority level (low, normal, high, urgent)
    </ResponseField>

    <ResponseField name="createdAt" type="string">
      ISO 8601 timestamp of creation
    </ResponseField>

    <ResponseField name="updatedAt" type="string">
      ISO 8601 timestamp of last update
    </ResponseField>
  </Expandable>
</ResponseField>

## Example Request

```json theme={null}
{
  "memoType": "request",
  "title": "Request for Additional Resources",
  "content": "We require additional development resources for the Q2 project to meet the deadline.",
  "referenceNumber": "REQ-2024-001",
  "priority": "high",
  "recipientIds": [
    "550e8400-e29b-41d4-a716-446655440001",
    "550e8400-e29b-41d4-a716-446655440002"
  ]
}
```

## Example Response

```json theme={null}
{
  "success": true,
  "data": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "companyId": "550e8400-e29b-41d4-a716-446655440000",
    "employeeId": "660e8400-e29b-41d4-a716-446655440000",
    "memoType": "request",
    "title": "Request for Additional Resources",
    "content": "We require additional development resources for the Q2 project to meet the deadline.",
    "referenceNumber": "REQ-2024-001",
    "status": "pending",
    "currentStep": 1,
    "priority": "high",
    "createdAt": "2024-03-03T10:30:00Z",
    "updatedAt": "2024-03-03T10:30:00Z"
  }
}
```

## Status Codes

<ResponseField name="201" type="Created">
  Memo created successfully
</ResponseField>

<ResponseField name="400" type="Bad Request">
  Invalid request body or validation error
</ResponseField>

<ResponseField name="401" type="Unauthorized">
  Missing or invalid authentication token
</ResponseField>

<ResponseField name="500" type="Internal Server Error">
  Server error occurred
</ResponseField>

## Workflow Behavior

<Note>
  When a memo is created with `memoType` set to `request`, it automatically enters the approval workflow configured for the company. The memo starts at step 1 with status `pending`.
</Note>

<Info>
  Recipients specified in `recipientIds` will be notified of the memo and can mark it as read. This is separate from the approval workflow.
</Info>
