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
Authorizationstring
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
id
Task ID
Request
This endpoint expects an object.
completed_by
User ID of the person who created this annotation
ground_truth
This annotation is a Ground Truth
lead_time
How much time it took to annotate the task (in seconds)
project
Project ID for this annotation
result
Labeling result in JSON format. Read more about the format in [the Label Studio documentation.](https://labelstud.io/guide/task_format)
task
Corresponding task for this annotation
updated_by
Last user who updated this annotation
was_cancelled
User skipped the task
Response
Created annotation
created_ago
Time delta from creation time
created_at
Creation time
created_username
Username string
id
state
updated_at
Last updated time
bulk_created
Annotation was created in bulk mode
completed_by
draft_created_at
Draft creation time
ground_truth
This annotation is a Ground Truth (ground_truth)
import_id
Original annotation ID that was at the import step or NULL if this annotation wasn't imported
last_action
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_by
User who created the last annotation history item
lead_time
How much time it took to annotate the task
parent_annotation
Points to the parent annotation from which this annotation was created
parent_prediction
Points to the prediction from which this annotation was created
project
Project ID for this annotation
result
List of annotation results for the task
task
Corresponding task for this annotation
updated_by
Last user who updated this annotation
was_cancelled
User skipped the task