# Add New Note

`POST /api/notes`



- **Group:** Notes
- **Since:** v3.0.0
- **Authentication:** `authtoken` header, created under Setup > API > API Management
- **HTML version:** /apiguide/notes/post-note/

## Headers

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `authtoken` | String | **required** | Authentication token, generated from admin area |

## Parameters

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `rel_type` | String | **required** | Entity type the note attaches to (12 supported types). |
| `rel_id` | Number | **required** | The related record id. |
| `description` | String | **required** | Note text. |

## Example request

```bash
curl -X POST "https://yoursite.com/api/notes" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "rel_type": "...", "rel_id": "...", "description": "..." }'
```

## Success response

### Success-Response:

```json
HTTP/1.1 200 OK
{
    "status": true,
    "message": "Note added successfully",
    "record_id": 143
}
```

## Error responses

### Validation-Error:

```json
HTTP/1.1 422 Unprocessable Entity
{
    "status": false,
    "error": "validation_failed",
    "message": "Note validation failed",
    "errors": {
        "rel_type": "rel_type must be one of: customer, lead, contract, ticket, invoice, estimate, credit_note, staff, expense, proposal, project, task",
        "description": "The description field is required."
    }
}
```

---

Perfex CRM REST API by Themesic Interactive. Full reference: /apiguide/
