Toggle feature flag on task prompt
PATCH
/api/v1/task-prompts/{id}/features/{featureId}
const url = 'https://example.com/api/v1/task-prompts/example/features/example';const options = { method: 'PATCH', headers: {'Content-Type': 'application/json'}, body: '{"detected":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://example.com/api/v1/task-prompts/example/features/example \ --header 'Content-Type: application/json' \ --data '{ "detected": true }'Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” id
required
string
featureId
required
string
Request Body
Section titled “Request Body ” Media type application/json
object
detected
required
boolean
Responses
Section titled “ Responses ”Success
Media type application/json
object
_id
required
string
keyId
required
string
type
string
text
string
contentBlobUrl
string
features
Array<object>
object
featureId
required
string
detected
required
boolean
evaluated
required
boolean
featuresExtractedAt
string | null format: date-time
createdAt
required
string | null format: date-time
deletedAt
string | null format: date-time
projectId
required
string
Invalid detected value
Task prompt or feature not found