Skip to content

Instantly share code, notes, and snippets.

@dimasmds
Created June 9, 2025 02:10
Show Gist options
  • Select an option

  • Save dimasmds/693763ac1533fa6731e63be1975d5449 to your computer and use it in GitHub Desktop.

Select an option

Save dimasmds/693763ac1533fa6731e63be1975d5449 to your computer and use it in GitHub Desktop.
Notes API V2 Documentation (Alternative)

Dicoding Notes API (No Authentication)

API untuk menyimpan catatan publik secara online. Digunakan untuk latihan kelas Dicoding Academy.

Endpoint

https://notes-api.dicoding.dev/v2

Notes

Create Note

  • URL
    • /notes
  • Method
    • POST
  • Request Body
    • title as string
    • body as string
  • Response
    {
      "status": "success",
      "message": "Note created",
      "data": {
          "id": "notes-_O6A6TJcCYUWO7t4",
          "title": "Hello, Notes!",
          "body": "My new notes.",
          "archived": false,
          "createdAt": "2022-07-28T10:12:12.396Z"
      }
    }

Get Notes (non-archived)

  • URL
    • /notes
  • Method
    • GET
  • Response
    {
      "status": "success",
      "message": "Notes retrieved",
      "data": [
          {
              "id": "notes-jT-jjsyz61J8XKiI",
              "title": "Welcome to Notes, Dimas!",
              "body": "Welcome to Notes! This is your first note. You can archive it, delete it, or create new ones.",
              "createdAt": "2022-07-28T10:03:12.594Z",
              "archived": false
          }
      ]
    }

Get Archived Notes

  • URL
    • /notes/archived
  • Method
    • GET
  • Response
    {
      "status": "success",
      "message": "Notes retrieved",
      "data": [
          {
              "id": "notes-jT-jjsyz61J8XKiI",
              "title": "Welcome to Notes, Dimas!",
              "body": "Welcome to Notes! This is your first note. You can archive it, delete it, or create new ones.",
              "createdAt": "2022-07-28T10:03:12.594Z",
              "archived": true
          }
      ]
    }

Get Single Note

  • URL
    • /notes/{note_id}
  • Method
    • GET
  • Response
    {
      "status": "success",
      "message": "Note retrieved",
      "data": {
          "id": "notes-jT-jjsyz61J8XKiI",
          "title": "Welcome to Notes, Dimas!",
          "body": "Welcome to Notes! This is your first note. You can archive it, delete it, or create new ones.",
          "createdAt": "2022-07-28T10:03:12.594Z",
          "archived": false
      }
    }

Archive Note

  • URL
    • /notes/{note_id}/archive
  • Method
    • POST
  • Response
    {
      "status": "success",
      "message": "Note archived"
    }

Unarchive Note

  • URL
    • /notes/{note_id}/unarchive
  • Method
    • POST
  • Response
    {
      "status": "success",
      "message": "Note unarchived"
    }

Delete Note

  • URL
    • /notes/{note_id}
  • Method
    • DELETE
  • Response
    {
      "status": "success",
      "message": "Note deleted"
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment