Skip to content

Upload skill reference file

POST
/api/v1/workspaces/{workspace_id}/skills/{skill_id}/references
curl --request POST \
--url https://example.com/%7B%7Bapp_url%7D/api/v1/workspaces/1/skills/1/references \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file=@file

Attaches a file to a skill, for agents with the skill to read. A skill can have up to 5 reference files of up to 5MB each.

workspace_id
required
integer

Workspace ID

skill_id
required
integer

Skill ID

Media typemultipart/form-data
object
file
required
string format: binary

Successful

Media typeapplication/json

A file attached to a skill, for agents with the skill to read.

object
id
required
integer
filename
required
string
content_type
required
string
byte_size
required
integer
created_at
required
string format: date-time
Example
{
"id": 12345,
"filename": "brand-guidelines.docx",
"content_type": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"byte_size": 48213
}

Unauthorized

Media typeapplication/json
object
message
required
string
code
string
Example
{
"message": "Record not found",
"code": "share_link_expired"
}

Forbidden

Media typeapplication/json
object
message
required
string
code
string
Example
{
"message": "Record not found",
"code": "share_link_expired"
}

Not Found

Media typeapplication/json
object
message
required
string
code
string
Example
{
"message": "Record not found",
"code": "share_link_expired"
}

Unprocessable Entity

Media typeapplication/json
object
message
required
string
errors
required
object
key
additional properties
Array<string>
Example
{
"errors": {
"username": [
"Username is required.",
"Username must be unique."
],
"email": [
"Invalid email format."
]
}
}