Skip to content

Create



POST /api/v1/notes_v2/create

Overview

Create a new version note.

Body Parameters

Parameter Type Required Description
title string Y Note title
Allow empty: False
content string Y Markdown content
Allow empty: False
tags array Tag list
Allow empty: False
tagKV json Key-value tags
Allow empty: False
isPublic int Whether public, 1 for public, 0 for private, default 1
Allow empty: False
extend json Studio business extension field
Allow empty: False

Parameter Details

Use this API to create a new version note. The request body must at least include title and content, optionally include tags, tagKV, isPublic, and extend.

  • Do not pass the note storage path, nor noteUUID; read noteUUID from the response after successful creation.
  • isPublic defaults to public note if not passed; pass 0 for a private note.
  • After successful creation, use the noteUUID from the response for subsequent retrieval, modification, and deletion.
  • The etag in the response can be used as ifMatch for the first edit or deletion.

Request Example

curl 'https://openapi.guance.com/api/v1/notes_v2/create' \
-H 'DF-API-KEY: <DF-API-KEY>' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-raw '{"title":"A","content":"# A","tags":["ops"],"tagKV":{"host":"127.0.0.1"}}'

Response

{
    "code": 200,
    "content": {
        "noteUUID": "nbnote_xxx",
        "title": "A",
        "tags": [
            "ops"
        ],
        "tagKV": {
            "host": "127.0.0.1"
        },
        "isPublic": 1,
        "createdSource": "manual",
        "etag": "etag_xxx",
        "version": 1
    },
    "errorCode": "",
    "message": "",
    "success": true,
    "traceId": "TRACE-XXXX"
}

Feedback

Is this page helpful? ×