curl --request POST \
--url http://localhost:8000/api/v1/knowledge-items/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "<string>",
"company_id": 123
}
'{
"text": "<string>",
"id": 123,
"company": {
"id": 123,
"name": "<string>"
},
"date_added": "2023-11-07T05:31:56Z",
"date_updated": "2023-11-07T05:31:56Z"
}Create a knowledge item.
Args: knowledge_item (KnowledgeItemCreateSchema): The knowledge item to create admin_user (User): The current user
Returns: KnowledgeItemSchema: The created knowledge item
curl --request POST \
--url http://localhost:8000/api/v1/knowledge-items/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "<string>",
"company_id": 123
}
'{
"text": "<string>",
"id": 123,
"company": {
"id": 123,
"name": "<string>"
},
"date_added": "2023-11-07T05:31:56Z",
"date_updated": "2023-11-07T05:31:56Z"
}The access token received from the authorization server in the OAuth 2.0 flow.
Successful Response
The schema for a knowledge item.