Get the workspace custom prompt
GET
/api/workspaces/{workspaceId}/custom-prompt
const url = 'http://localhost:8080/api/workspaces/example/custom-prompt';const options = {method: 'GET', headers: {cookie: 'auth_session=<auth_session>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url http://localhost:8080/api/workspaces/example/custom-prompt \ --cookie auth_session=<auth_session>Returns the workspace’s custom agent prompt, falling back to the default template when unset.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”workspaceId
required
string
Responses
Section titled “Responses”Custom prompt content.
Media typeapplication/json
object
success
required
boolean
content
required
string
selfDirective
string
Example
{ "success": true}Invalid workspace ID
Media typeapplication/json
object
success
boolean
error
required
string
Example
{ "error": "Human-readable error message"}Workspace not found
Media typeapplication/json
object
success
boolean
error
required
string
Example
{ "error": "Human-readable error message"}Failed to read custom prompt
Media typeapplication/json
object
success
boolean
error
required
string
Example
{ "error": "Human-readable error message"}