Skip to main content
POST
Creates a batch from an upload or from inline items. The batch starts as validating while its input is read. Poll Get a Batch until its status is ended or failed. A failed batch says why in failure. Batches run detection and verification on Anchor 3.0 (anchor_3_0) against your managed rule packs. They don’t rewrite, and they can’t run custom rules or trained adapters yet. A batch expires 24 hours after it’s created. For the whole flow, see Audit Historical Messages. Needs a full-access API key.
This is how you start an audit. There’s no separate audit endpoint. Every batch gets an audit report, the workbook and PDF (see report_status on Get a Batch), when it ends, and appears under Audits in Command. Set metadata.name to name it there.

Request Body

Send exactly one of upload_id or items.
string
The upload_id from Create a Batch Upload URL, after the file is uploaded. Files can be up to 256 MB.
array
The messages inline, each in the same shape as a file line (custom_id, content, optional metadata). For batches that fit in one request, about 5 MB. Invalid items return 400 invalid_items with each item’s index.
object
Which rules to check, as on Enforce Content: rulepacks, rules, imports or managed_only. Resolved once and applied to every message. Leave it out to check your active managed rule packs.
boolean
default:"false"
When true, lines that break a per-line rule (invalid JSON, a bad or duplicate custom_id, empty or oversized content, invalid metadata) are dropped and counted in skipped_items, instead of failing the batch. For duplicate IDs, the first line is kept. Skipped lines aren’t billed. The batch still fails if no line is usable or the file itself is invalid.
object
Your own data about the batch, at most 16 KB, returned unchanged by Get a Batch. Set name to label the batch in Command.
string
default:"anchor_3_0"
Only anchor_3_0.

Response

string
The batch’s ID, batch_ followed by 32 hex characters.
string
Always validating on creation.
string
When the batch was created.
string
24 hours after created_at. Messages not checked by then end as expired and aren’t billed.
object
The request to poll for status.

Errors

No batch is created for these. A batch can also be accepted and then fail while its file is read. See When a batch fails.