Skip to content

Knowledge Management

Basics

  • Base URL: https://api.ticos.cn
  • Upsert: POST /knowledge
  • Delete: DELETE /knowledge/{id}
  • Auth: Authorization: Bearer <token>

1. Upsert knowledge (POST /knowledge)

Supports both application/json and multipart/form-data.

Request fields

  • id (optional): knowledge entry unique ID
  • title (optional): title
  • content (required): body content

JSON example

{
"id": "knowledge_idxxx",
"title": "Origami Crane and Coffee",
"content": "Summary: A weekday morning..."
}

Form example

curl --location --request POST 'https://api.ticos.cn/knowledge' \
--header 'Authorization: Bearer <API_KEY>' \
--form 'id="knowledge_idxxx"' \
--form 'title="Origami Crane and Coffee"' \
--form 'content="Summary: A weekday morning..."'

2. Delete knowledge (DELETE /knowledge/{id})

Example

curl --location --request DELETE 'https://api.ticos.cn/knowledge/knowledge_idxxx' \
--header 'Authorization: Bearer <API_KEY>'

Common status codes

  • 200 OK: success
  • 400 Bad Request: invalid request
  • 401 Unauthorized: authentication failed
  • 404 Not Found: ID not found
  • 500 Internal Server Error: server error