Skip to main content
The annotationqueues client methods are currently in BETA. The API may change without notice. A one-time warning is emitted on first use.
An annotation queue collects records (dataset examples or spans) that human annotators label using configured annotation configs. The Get, Update, Delete, ListRecords, AddRecords, DeleteRecords, Annotate, and Assign methods accept either a queue name or an ID — when a name is passed, the parent Space (name or ID) is also required so the SDK can resolve the name to a unique ID. Record sources are built with annotationqueues.NewExampleRecordSource or annotationqueues.NewSpanRecordSource, which set the record-type discriminator on your behalf.

List Annotation Queues

List returns a paginated list of annotation queues. Space, when non-empty, accepts a space name or ID and restricts results to that space. Signature:
Usage Example:

Get an Annotation Queue

Get returns a single annotation queue, resolving by name or ID. Signature:
Usage Example:

Create an Annotation Queue

Create creates a new annotation queue, resolving the parent space by name or ID. AssignmentMethod is optional — when empty, the server applies its default (AssignmentMethodAll). Optional RecordSources (max 2) are added on creation; build entries with annotationqueues.NewExampleRecordSource or annotationqueues.NewSpanRecordSource. Signature:
Usage Example:

Update an Annotation Queue

Update updates an existing annotation queue, resolving by name or ID. Name, Instructions, AnnotatorEmails, and AnnotationConfigIDs are pointers — nil preserves the existing value. Signature:
Usage Example:

Delete an Annotation Queue

Delete removes an annotation queue, resolving by name or ID. It returns only an error. Signature:
Usage Example:

List Records

ListRecords returns a paginated list of records for an annotation queue, resolving the queue by name or ID. Signature:
Usage Example:

Add Records

AddRecords adds record sources to an annotation queue (resolved by name or ID) and returns the created records. Build entries with annotationqueues.NewExampleRecordSource or annotationqueues.NewSpanRecordSource; at most 2 record sources are allowed per request. Signature:
Usage Example:

Delete Records

DeleteRecords removes records from an annotation queue, resolving the queue by name or ID. RecordIDs are strict IDs. Signature:
Usage Example:

Annotate a Record

Annotate submits annotations for a record in an annotation queue, resolving the queue by name or ID. RecordID is a strict ID — no name resolution is performed. Signature:
Usage Example:

Assign Users to a Record

Assign assigns users to a record in an annotation queue, resolving the queue by name or ID. RecordID is a strict ID — no name resolution is performed. Signature:
Usage Example: