Create or find task prompt
POST
/api/v1/task-prompts
const url = 'https://example.com/api/v1/task-prompts?projectId=00000000-0000-0000-0000-000000000000';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"text":"example","type":"select"}'};
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/api/v1/task-prompts?projectId=00000000-0000-0000-0000-000000000000' \ --header 'Content-Type: application/json' \ --data '{ "text": "example", "type": "select" }'Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ” projectId
required
Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.
string
Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.
Request Body
Section titled “Request Body ” Media type application/json
object
text
required
string
type
string
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
Empty text string