Upload skill reference file
POST
/api/v1/workspaces/{workspace_id}/skills/{skill_id}/references
const url = 'https://example.com/%7B%7Bapp_url%7D/api/v1/workspaces/1/skills/1/references';const form = new FormData();form.append('file', 'file');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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=@fileAttaches 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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”workspace_id
required
integer
Workspace ID
skill_id
required
integer
Skill ID
Request Body
Section titled “Request Body”Media typemultipart/form-data
object
file
required
string format: binary
Responses
Section titled “ Responses ”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." ] }}