Skip to content

Rename, toggle Show, or reorder a resource

PATCH
/agents/{id}/resources/{documentId}
curl --request PATCH \
--url https://api.somebodyai.co/api/v1/agents/example/resources/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "showable": true, "order": 1, "display": { "mode": "talk", "closeButton": true, "fill": true, "placement": "auto", "title": "example", "description": "example", "access": "agent", "download": true } }'
id
required
string
/^[a-fA-F0-9]{24}$/
documentId
required
string
/^[a-fA-F0-9]{24}$/
Media typeapplication/json
object
name
string
>= 1 characters
showable
boolean
order
integer
display
object
mode

Talk: agent keeps speaking and may close it; reference: stays until the user closes it; gate: agent pauses until the user presses Continue

string
Allowed values: talk reference gate
closeButton
boolean
fill
boolean
placement
string
Allowed values: auto stage card page
title
string
description
string
access

Who can open it when showable. agent: only the agent shows it; user: in the user's materials folder from the start; afterShown: joins the folder once the agent has shown it

string
Allowed values: agent user afterShown
download

The user may download a copy. Never applies to web links.

boolean

Updated

Media typeapplication/json
object
id
required
string
name
required
string
kind
required
string
Allowed values: pdf docx markdown text image video link
mimeType
required
string
size
required
number
status
required
string
Allowed values: processing ready failed
summary
required
string
tokenEstimate
required
number
error
required
string | null
createdAt
required
string
documentId
required
string
showable
required
boolean
order
required
number
display
required
object
mode
required

Talk: agent keeps speaking and may close it; reference: stays until the user closes it; gate: agent pauses until the user presses Continue

string
Allowed values: talk reference gate
closeButton
required
boolean
fill
required
boolean
placement
required
string
Allowed values: auto stage card page
title
string
description
string
access
required

Who can open it when showable. agent: only the agent shows it; user: in the user's materials folder from the start; afterShown: joins the folder once the agent has shown it

string
Allowed values: agent user afterShown
download
required

The user may download a copy. Never applies to web links.

boolean
Example
{
"kind": "pdf",
"status": "processing",
"display": {
"mode": "talk",
"placement": "auto",
"access": "agent"
}
}

Bad request - validation failed

Media typeapplication/json
object
error
required
string
details
Array<string>
Example
{
"error": "Resource not found",
"details": [
"Field is required"
]
}

Unauthorized - missing or invalid auth

Media typeapplication/json
object
error
required
string
details
Array<string>
Example
{
"error": "Resource not found",
"details": [
"Field is required"
]
}

Resource not found

Media typeapplication/json
object
error
required
string
details
Array<string>
Example
{
"error": "Resource not found",
"details": [
"Field is required"
]
}