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.
bulk_createdboolean or nullOptional
Annotation was created in bulk mode
completed_byintegerOptional
draft_created_atdatetime or nullOptional
Draft creation time
ground_truthbooleanOptional

This annotation is a Ground Truth (ground_truth)

import_idlong or nullOptional-9223372036854776000-9223372036854776000
Original annotation ID that was at the import step or NULL if this annotation wasn't imported
last_actionenum or nullOptional

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 nullOptional
User who created the last annotation history item
lead_timedouble or nullOptional
How much time it took to annotate the task
parent_annotationinteger or nullOptional
Points to the parent annotation from which this annotation was created
parent_predictioninteger or nullOptional
Points to the prediction from which this annotation was created
projectinteger or nullOptional
Project ID for this annotation
resultlist of objectsOptional
List of annotation results for the task
taskinteger or nullOptional
Corresponding task for this annotation
unique_idstringOptional>=1 character
updated_byinteger or nullOptional
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 nullOptional
Annotation was created in bulk mode
completed_byintegerOptional
draft_created_atdatetime or nullOptional
Draft creation time
ground_truthbooleanOptional

This annotation is a Ground Truth (ground_truth)

import_idlong or nullOptional-9223372036854776000-9223372036854776000
Original annotation ID that was at the import step or NULL if this annotation wasn't imported
last_actionenum or nullOptional

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 nullOptional
User who created the last annotation history item
lead_timedouble or nullOptional
How much time it took to annotate the task
parent_annotationinteger or nullOptional
Points to the parent annotation from which this annotation was created
parent_predictioninteger or nullOptional
Points to the prediction from which this annotation was created
projectinteger or nullOptional
Project ID for this annotation
resultlist of objectsOptional
List of annotation results for the task
taskinteger or nullOptional
Corresponding task for this annotation
updated_byinteger or nullOptional
Last user who updated this annotation
was_cancelledbooleanOptional
User skipped the task