Create annotation

Add annotations to a task like an annotator does. The content of the result field depends on your labeling configuration. For example, send the following data as part of your POST request to send an empty annotation with the ID of the user who completed the task: ```json { "result": {}, "was_cancelled": true, "ground_truth": true, "lead_time": 0, "task": 0 "completed_by": 123 } ```

Authentication

AuthorizationToken
The token (or API key) must be passed as a request header. You can find your user token on the User Account page in Label Studio. Example: <br><pre><code class="language-bash">curl https://label-studio-host/api/projects -H "Authorization: Token [your-token]"</code></pre>

Path parameters

idintegerRequired
Task ID

Request

This endpoint expects an object.
completed_byintegerOptional
User ID of the person who created this annotation
ground_truthbooleanOptional
This annotation is a Ground Truth
lead_timedoubleOptional

How much time it took to annotate the task (in seconds)

projectintegerOptional
Project ID for this annotation
resultlist of objectsOptional
Labeling result in JSON format. Read more about the format in [the Label Studio documentation.](https://labelstud.io/guide/task_format)
taskintegerOptional
Corresponding task for this annotation
updated_byintegerOptional
Last user who updated this annotation
was_cancelledbooleanOptional
User skipped the task

Response

Created annotation
created_agostringRead-onlyDefaults to
Time delta from creation time
created_atdatetimeRead-only
Creation time
created_usernamestringRead-onlyDefaults to
Username string
idintegerRead-only
statestringRead-only
updated_atdatetimeRead-only
Last updated time
bulk_createdboolean or null
Annotation was created in bulk mode
completed_byinteger
draft_created_atdatetime or null
Draft creation time
ground_truthboolean

This annotation is a Ground Truth (ground_truth)

import_idlong or null-9223372036854776000-9223372036854776000
Original annotation ID that was at the import step or NULL if this annotation wasn't imported
last_actionenum or null
Action which was performed in the last annotation history item * `prediction` - Created from prediction * `propagated_annotation` - Created from another annotation * `imported` - Imported * `submitted` - Submitted * `updated` - Updated * `skipped` - Skipped * `accepted` - Accepted * `rejected` - Rejected * `fixed_and_accepted` - Fixed and accepted * `deleted_review` - Deleted review
last_created_byinteger or null
User who created the last annotation history item
lead_timedouble or null
How much time it took to annotate the task
parent_annotationinteger or null
Points to the parent annotation from which this annotation was created
parent_predictioninteger or null
Points to the prediction from which this annotation was created
projectinteger or null
Project ID for this annotation
resultlist of objects
List of annotation results for the task
taskinteger or null
Corresponding task for this annotation
updated_byinteger or null
Last user who updated this annotation
was_cancelledboolean
User skipped the task