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

# Create Note

> Create a new note

## Overview

Creates a new note with the specified title and content.

## Request Body

<ParamField body="title" type="string" required>
  Note title
</ParamField>

<ParamField body="body" type="string" required>
  Note content
</ParamField>

## Response

<ResponseField name="note" type="object">
  The created note object
</ResponseField>

<ResponseField name="status" type="string">
  Request status (`success`)
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://app.drime.cloud/api/v1/notes/create \
    -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
      "title": "My New Note",
      "body": "This is the content of my note..."
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://app.drime.cloud/api/v1/notes/create', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      title: 'My New Note',
      body: 'This is the content of my note...'
    })
  });

  const { note } = await response.json();
  console.log(`Note created: ${note.id}`);
  ```

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

  response = requests.post(
      'https://app.drime.cloud/api/v1/notes/create',
      headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'},
      json={
          'title': 'My New Note',
          'body': 'This is the content of my note...'
      }
  )

  note = response.json()['note']
  print(f'Note created: {note["id"]}')
  ```
</RequestExample>

<ResponseExample>
  ```json 201 - Created theme={null}
  {
    "status": "success",
    "note": {
      "id": 3,
      "title": "My New Note",
      "body": "This is the content of my note...",
      "created_at": "2024-01-20T10:00:00.000000Z",
      "updated_at": "2024-01-20T10:00:00.000000Z"
    }
  }
  ```

  ```json 422 - Validation Error theme={null}
  {
    "status": "error",
    "message": "The given data was invalid.",
    "errors": {
      "title": "The title field is required."
    }
  }
  ```
</ResponseExample>
