Body
This is the source body object
-
The name of the source
-
The collections to which this source belongs to
-
The content of the source
POST /sources/write
curl \
-X POST https://api.hansei.app/public/v1/sources/write \
-H "X-API-KEY: $API_KEY" \
-H "Content-Type: application/json" \
-d '{"value":{"name":"Employee Handbook","collections":["col_X1p7UscyehUFc6O4","col_HIjpFiRemkbpHgUn"],"content":"Employee Handbook v1. Every employee should read this handbook..."}}'
Request example
{
"value": {
"name": "Employee Handbook",
"collections": [
"col_X1p7UscyehUFc6O4",
"col_HIjpFiRemkbpHgUn"
],
"content": "Employee Handbook v1. Every employee should read this handbook..."
}
}
Request examples
{
"name": "string",
"collections": [
"string"
],
"content": "string"
}
Response examples (200)
{
"value": {
"id": "src_4uPeOYWyQ01C8Epg",
"name": "Employee Onboarding",
"collections": [
{
"id": "col_X1p7UscyehUFc6O4",
"name": "Employee Onboarding"
},
{
"id": "col_HIjpFiRemkbpHgUn",
"name": "Customer Support"
},
"{...}",
"{...}"
],
"status": "pending",
"created_at": 1697386660315
}
}
Response examples (200)
{
"id": "src_4uPeOYWyQ01C8Epg",
"name": "Employee Onboarding",
"collections": [
{
"id": "col_X1p7UscyehUFc6O4",
"name": "Employee Onboarding"
}
],
"status": "pending",
"created_at": 1697386660315
}
Response examples (400)
{
"code": "string",
"message": "string"
}
Response examples (400)
{
"code": "string",
"message": "string"
}
Response examples (402)
{
"code": "string",
"message": "string"
}
Response examples (402)
{
"code": "string",
"message": "string"
}