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.
The scope needs custom rule text or a trained adapter, which batches can’t run, or resolves to no rules.
422
rule_severity_unavailable
A rule in scope has no severity set. error.ids lists them.
429
batch_quota_exceeded
You’re at your plan’s limit of running batches or messages in flight. error.limits and error.current show both. Wait for a batch to end, or cancel one.
A batch can also be accepted and then fail while its file is read. See When a batch fails.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"ZeroDrift Enforcement API","description":"ZeroDrift Enforcement API - Enforce regulations and policies on AI content and communications","colors":{"primary":"#16A34A","light":"#07C983","dark":"#15803D"},"logo":{"light":"https://mintcdn.com/zerodrift/EnMFM7yTopP4lGmD/logo/ZD_White_Transparent.png?fit=max\u0026auto=format\u0026n=EnMFM7yTopP4lGmD\u0026q=85\u0026s=8a3a1cfcd216c0a056b6a1cd0c50a332","dark":"https://mintcdn.com/zerodrift/EnMFM7yTopP4lGmD/logo/ZD_Black_Transparent.png?fit=max\u0026auto=format\u0026n=EnMFM7yTopP4lGmD\u0026q=85\u0026s=dd2ae5c915064ad7ebf1aa495eb2efce"},"favicon":"https://mintcdn.com/zerodrift/C1CP0SqlGtEDTLZM/favicon.svg?fit=max\u0026auto=format\u0026n=C1CP0SqlGtEDTLZM\u0026q=85\u0026s=3ffcd8394a2e8995fcc413d960e17117","api":{"examples":{"defaults":"required"},"mdx":{"auth":{"method":"key","name":"x-api-key"},"server":"https://api.zerodrift.ai"}},"navbar":{"links":[{"href":"mailto:support@zerodrift.ai","label":"Support"},{"href":"/changelog","label":"Changelog"}],"primary":{"type":"button","label":"Open Command","href":"https://app.zerodrift.ai"}},"footer":{},"seo":{"metatags":{"og:description":"ZeroDrift Enforcement API - Enforce regulations and policies on AI content and communications","slack-app-id":"A0CJQ2CUV8C"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":true},"navigation":{"global":{},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"zerodrift","hasAudioNarration":false,"actualSubdomain":"zerodrift","customDomains":["docs.zerodrift.com"],"gitSource":{"type":"github","owner":"zerodriftai","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":"","_id":"6b10d18d9ffae5051c40b6e4"},"entitlements":{},"buildId":"6b109bcaaadeeadfaafe13e2","clientVersion":"0.0.4428","searchFilterCounts":[{"language":"default","tag":"API reference","count":37},{"language":"default","tag":"Guides","count":26},{"language":"default","tag":"Plugins","count":15},{"language":"default","tag":"Batches","count":10},{"language":"default","tag":"Getting Started","count":10},{"language":"default","tag":"Rules","count":9},{"language":"default","tag":"Import a Policy","count":7},{"language":"default","tag":"Enforce and Audit Content","count":6},{"language":"default","tag":"Claude","count":5},{"language":"default","tag":"ChatGPT and Codex","count":5}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"auth-vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"api-reference/batches/create-batch","slug":"/api-reference/batches/create-batch","pageMetadata":{"title":"Create a Batch","description":"Check up to 100,000 messages in one job, from an uploaded file or inline items.","api":"POST /api/v3/batches","href":"/api-reference/batches/create-batch"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Check up to 100,000 messages in one job, from an uploaded file or inline items.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{Heading,Note,ParamField,ResponseField,Table}=_components;if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Creates a batch from an upload or from inline items. The batch starts as `,_jsx(_components.code,{children:`validating`}),` while its input is read. Poll `,_jsx(_components.a,{href:`/api-reference/batches/get-batch`,children:`Get a Batch`}),` until its `,_jsx(_components.code,{children:`status`}),` is `,_jsx(_components.code,{children:`ended`}),` or `,_jsx(_components.code,{children:`failed`}),`. A failed batch says why in `,_jsx(_components.code,{children:`failure`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Batches run detection and verification on Anchor 3.0 (`,_jsx(_components.code,{children:`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 `,_jsx(_components.a,{href:`/guides/audit-historical-messages`,children:`Audit Historical Messages`}),`. Needs a full-access API key.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`This is how you start an audit.`}),` There’s no separate audit endpoint. Every batch gets an audit report, the workbook and PDF (see `,_jsx(_components.code,{children:`report_status`}),` on `,_jsx(_components.a,{href:`/api-reference/batches/get-batch`,children:`Get a Batch`}),`), when it ends, and appears under `,_jsx(_components.strong,{children:`Audits`}),` in Command. Set `,_jsx(_components.code,{children:`metadata.name`}),` to name it there.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`request-body`,children:`Request Body`}),`\n`,_jsxs(_components.p,{children:[`Send exactly one of `,_jsx(_components.code,{children:`upload_id`}),` or `,_jsx(_components.code,{children:`items`}),`.`]}),`\n`,_jsx(ParamField,{body:`upload_id`,type:`string`,id:`param-upload-id`,children:_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`upload_id`}),` from `,_jsx(_components.a,{href:`/api-reference/batches/create-upload-url`,children:`Create a Batch Upload URL`}),`, after the file is uploaded. Files can be up to 256 MB.`]})}),`\n`,_jsx(ParamField,{body:`items`,type:`array`,id:`param-items`,children:_jsxs(_components.p,{children:[`The messages inline, each in the same shape as a file line (`,_jsx(_components.code,{children:`custom_id`}),`, `,_jsx(_components.code,{children:`content`}),`, optional `,_jsx(_components.code,{children:`metadata`}),`). For batches that fit in one request, about 5 MB. Invalid items return `,_jsx(_components.code,{children:`400 invalid_items`}),` with each item’s index.`]})}),`\n`,_jsx(ParamField,{body:`validation_scope`,type:`object`,id:`param-validation-scope`,children:_jsxs(_components.p,{children:[`Which rules to check, as on `,_jsx(_components.a,{href:`/api-reference/validate/validate-content`,children:`Enforce Content`}),`: `,_jsx(_components.code,{children:`rulepacks`}),`, `,_jsx(_components.code,{children:`rules`}),`, `,_jsx(_components.code,{children:`imports`}),` or `,_jsx(_components.code,{children:`managed_only`}),`. Resolved once and applied to every message. Leave it out to check your active managed rule packs.`]})}),`\n`,_jsx(ParamField,{body:`skip_problem_rows`,type:`boolean`,default:`false`,id:`param-skip-problem-rows`,children:_jsxs(_components.p,{children:[`When `,_jsx(_components.code,{children:`true`}),`, lines that break a per-line rule (invalid JSON, a bad or duplicate `,_jsx(_components.code,{children:`custom_id`}),`, empty or oversized `,_jsx(_components.code,{children:`content`}),`, invalid `,_jsx(_components.code,{children:`metadata`}),`) are dropped and counted in `,_jsx(_components.code,{children:`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.`]})}),`\n`,_jsx(ParamField,{body:`metadata`,type:`object`,id:`param-metadata`,children:_jsxs(_components.p,{children:[`Your own data about the batch, at most 16 KB, returned unchanged by `,_jsx(_components.a,{href:`/api-reference/batches/get-batch`,children:`Get a Batch`}),`. Set `,_jsx(_components.code,{children:`name`}),` to label the batch in Command.`]})}),`\n`,_jsx(ParamField,{body:`model_engine`,type:`string`,default:`anchor_3_0`,id:`param-model-engine`,children:_jsxs(_components.p,{children:[`Only `,_jsx(_components.code,{children:`anchor_3_0`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(ResponseField,{name:`batch_id`,type:`string`,id:`param-batch-id`,children:_jsxs(_components.p,{children:[`The batch’s ID, `,_jsx(_components.code,{children:`batch_`}),` followed by 32 hex characters.`]})}),`\n`,_jsx(ResponseField,{name:`status`,type:`string`,id:`param-status`,children:_jsxs(_components.p,{children:[`Always `,_jsx(_components.code,{children:`validating`}),` on creation.`]})}),`\n`,_jsx(ResponseField,{name:`created_at`,type:`string`,id:`param-created-at`,children:_jsx(_components.p,{children:`When the batch was created.`})}),`\n`,_jsx(ResponseField,{name:`expires_at`,type:`string`,id:`param-expires-at`,children:_jsxs(_components.p,{children:[`24 hours after `,_jsx(_components.code,{children:`created_at`}),`. Messages not checked by then end as `,_jsx(_components.code,{children:`expired`}),` and aren’t billed.`]})}),`\n`,_jsx(ResponseField,{name:`poll`,type:`object`,id:`param-poll`,children:_jsx(_components.p,{children:`The request to poll for status.`})}),`\n`,`\n`,`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsx(_components.p,{children:`No batch is created for these.`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Code`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`invalid_items`}),`, `,_jsx(_components.code,{children:`invalid_validation_scope`})]}),_jsx(_components.td,{children:`The body or scope is invalid.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`402`})}),_jsx(_components.td,{}),_jsx(_components.td,{children:`No credit left.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`404`})}),_jsx(_components.td,{}),_jsx(_components.td,{children:`No upload with this ID is yours.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`409`})}),_jsx(_components.td,{}),_jsx(_components.td,{children:`This upload has already been used for a batch.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`413`})}),_jsx(_components.td,{}),_jsx(_components.td,{children:`The upload is over 256 MB.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`422`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`batch_scope_unsupported`})}),_jsx(_components.td,{children:`The scope needs custom rule text or a trained adapter, which batches can’t run, or resolves to no rules.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`422`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`rule_severity_unavailable`})}),_jsxs(_components.td,{children:[`A rule in scope has no severity set. `,_jsx(_components.code,{children:`error.ids`}),` lists them.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`429`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`batch_quota_exceeded`})}),_jsxs(_components.td,{children:[`You’re at your plan’s limit of running batches or messages in flight. `,_jsx(_components.code,{children:`error.limits`}),` and `,_jsx(_components.code,{children:`error.current`}),` show both. Wait for a batch to end, or cancel one.`]})]})]})]}),`\n`,_jsxs(_components.p,{children:[`A batch can also be accepted and then fail while its file is read. See `,_jsx(_components.a,{href:`/guides/audit-historical-messages#when-a-batch-fails`,children:`When a batch fails`}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create a Batch","description":"Check up to 100,000 messages in one job, from an uploaded file or inline items.","api":"POST /api/v3/batches","href":"/api-reference/batches/create-batch"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,ParamField,RequestExample,ResponseExample,ResponseField,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Creates a batch from an upload or from inline items. The batch starts as `,_jsx(_components.code,{children:`validating`}),` while its input is read. Poll `,_jsx(_components.a,{href:`/api-reference/batches/get-batch`,children:`Get a Batch`}),` until its `,_jsx(_components.code,{children:`status`}),` is `,_jsx(_components.code,{children:`ended`}),` or `,_jsx(_components.code,{children:`failed`}),`. A failed batch says why in `,_jsx(_components.code,{children:`failure`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Batches run detection and verification on Anchor 3.0 (`,_jsx(_components.code,{children:`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 `,_jsx(_components.a,{href:`/guides/audit-historical-messages`,children:`Audit Historical Messages`}),`. Needs a full-access API key.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`This is how you start an audit.`}),` There’s no separate audit endpoint. Every batch gets an audit report, the workbook and PDF (see `,_jsx(_components.code,{children:`report_status`}),` on `,_jsx(_components.a,{href:`/api-reference/batches/get-batch`,children:`Get a Batch`}),`), when it ends, and appears under `,_jsx(_components.strong,{children:`Audits`}),` in Command. Set `,_jsx(_components.code,{children:`metadata.name`}),` to name it there.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`request-body`,children:`Request Body`}),`\n`,_jsxs(_components.p,{children:[`Send exactly one of `,_jsx(_components.code,{children:`upload_id`}),` or `,_jsx(_components.code,{children:`items`}),`.`]}),`\n`,_jsx(ParamField,{body:`upload_id`,type:`string`,id:`param-upload-id`,children:_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`upload_id`}),` from `,_jsx(_components.a,{href:`/api-reference/batches/create-upload-url`,children:`Create a Batch Upload URL`}),`, after the file is uploaded. Files can be up to 256 MB.`]})}),`\n`,_jsx(ParamField,{body:`items`,type:`array`,id:`param-items`,children:_jsxs(_components.p,{children:[`The messages inline, each in the same shape as a file line (`,_jsx(_components.code,{children:`custom_id`}),`, `,_jsx(_components.code,{children:`content`}),`, optional `,_jsx(_components.code,{children:`metadata`}),`). For batches that fit in one request, about 5 MB. Invalid items return `,_jsx(_components.code,{children:`400 invalid_items`}),` with each item’s index.`]})}),`\n`,_jsx(ParamField,{body:`validation_scope`,type:`object`,id:`param-validation-scope`,children:_jsxs(_components.p,{children:[`Which rules to check, as on `,_jsx(_components.a,{href:`/api-reference/validate/validate-content`,children:`Enforce Content`}),`: `,_jsx(_components.code,{children:`rulepacks`}),`, `,_jsx(_components.code,{children:`rules`}),`, `,_jsx(_components.code,{children:`imports`}),` or `,_jsx(_components.code,{children:`managed_only`}),`. Resolved once and applied to every message. Leave it out to check your active managed rule packs.`]})}),`\n`,_jsx(ParamField,{body:`skip_problem_rows`,type:`boolean`,default:`false`,id:`param-skip-problem-rows`,children:_jsxs(_components.p,{children:[`When `,_jsx(_components.code,{children:`true`}),`, lines that break a per-line rule (invalid JSON, a bad or duplicate `,_jsx(_components.code,{children:`custom_id`}),`, empty or oversized `,_jsx(_components.code,{children:`content`}),`, invalid `,_jsx(_components.code,{children:`metadata`}),`) are dropped and counted in `,_jsx(_components.code,{children:`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.`]})}),`\n`,_jsx(ParamField,{body:`metadata`,type:`object`,id:`param-metadata`,children:_jsxs(_components.p,{children:[`Your own data about the batch, at most 16 KB, returned unchanged by `,_jsx(_components.a,{href:`/api-reference/batches/get-batch`,children:`Get a Batch`}),`. Set `,_jsx(_components.code,{children:`name`}),` to label the batch in Command.`]})}),`\n`,_jsx(ParamField,{body:`model_engine`,type:`string`,default:`anchor_3_0`,id:`param-model-engine`,children:_jsxs(_components.p,{children:[`Only `,_jsx(_components.code,{children:`anchor_3_0`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(ResponseField,{name:`batch_id`,type:`string`,id:`param-batch-id`,children:_jsxs(_components.p,{children:[`The batch’s ID, `,_jsx(_components.code,{children:`batch_`}),` followed by 32 hex characters.`]})}),`\n`,_jsx(ResponseField,{name:`status`,type:`string`,id:`param-status`,children:_jsxs(_components.p,{children:[`Always `,_jsx(_components.code,{children:`validating`}),` on creation.`]})}),`\n`,_jsx(ResponseField,{name:`created_at`,type:`string`,id:`param-created-at`,children:_jsx(_components.p,{children:`When the batch was created.`})}),`\n`,_jsx(ResponseField,{name:`expires_at`,type:`string`,id:`param-expires-at`,children:_jsxs(_components.p,{children:[`24 hours after `,_jsx(_components.code,{children:`created_at`}),`. Messages not checked by then end as `,_jsx(_components.code,{children:`expired`}),` and aren’t billed.`]})}),`\n`,_jsx(ResponseField,{name:`poll`,type:`object`,id:`param-poll`,children:_jsx(_components.p,{children:`The request to poll for status.`})}),`\n`,_jsxs(RequestExample,{children:[_jsx(CodeBlock,{filename:`From an upload`,numberOfLines:`8`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.zerodrift.ai/api/v3/batches`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-api-key: YOUR_API_KEY\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"upload_id\": \"703c343c018b42ad88bdd56cc8175c0b\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"skip_problem_rows\": true,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"metadata\": { \"name\": \"Q4 outbound review\" }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Inline items`,numberOfLines:`11`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.zerodrift.ai/api/v3/batches`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-api-key: YOUR_API_KEY\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"items\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` { \"custom_id\": \"email-001\", \"content\": \"Hi Dana, attached is the agenda for Thursday.\" },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` { \"custom_id\": \"email-002\", \"content\": \"Returns of 12-14% are guaranteed.\" }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"validation_scope\": { \"rulepacks\": [\"finra-2210\"] },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"metadata\": { \"name\": \"Spot check\" }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})})]}),`\n`,_jsx(ResponseExample,{children:_jsx(CodeBlock,{filename:`202 Accepted`,numberOfLines:`11`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`11`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"api_version\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"v3\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"batch_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"batch_703c343c018b42ad88bdd56cc8175c0b\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"validating\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"created_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-12-02T19:46:37Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"expires_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-12-03T19:46:37Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"poll\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"method\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"GET\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"/api/v3/batches/batch_703c343c018b42ad88bdd56cc8175c0b\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsx(_components.p,{children:`No batch is created for these.`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Code`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`invalid_items`}),`, `,_jsx(_components.code,{children:`invalid_validation_scope`})]}),_jsx(_components.td,{children:`The body or scope is invalid.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`402`})}),_jsx(_components.td,{}),_jsx(_components.td,{children:`No credit left.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`404`})}),_jsx(_components.td,{}),_jsx(_components.td,{children:`No upload with this ID is yours.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`409`})}),_jsx(_components.td,{}),_jsx(_components.td,{children:`This upload has already been used for a batch.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`413`})}),_jsx(_components.td,{}),_jsx(_components.td,{children:`The upload is over 256 MB.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`422`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`batch_scope_unsupported`})}),_jsx(_components.td,{children:`The scope needs custom rule text or a trained adapter, which batches can’t run, or resolves to no rules.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`422`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`rule_severity_unavailable`})}),_jsxs(_components.td,{children:[`A rule in scope has no severity set. `,_jsx(_components.code,{children:`error.ids`}),` lists them.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`429`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`batch_quota_exceeded`})}),_jsxs(_components.td,{children:[`You’re at your plan’s limit of running batches or messages in flight. `,_jsx(_components.code,{children:`error.limits`}),` and `,_jsx(_components.code,{children:`error.current`}),` show both. Wait for a batch to end, or cancel one.`]})]})]})]}),`\n`,_jsxs(_components.p,{children:[`A batch can also be accepted and then fail while its file is read. See `,_jsx(_components.a,{href:`/guides/audit-historical-messages#when-a-batch-fails`,children:`When a batch fails`}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create a Batch","description":"Check up to 100,000 messages in one job, from an uploaded file or inline items.","api":"POST /api/v3/batches","href":"/api-reference/batches/create-batch"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Request Body","slug":"request-body","depth":2,"children":[]},{"title":"Response","slug":"response","depth":2,"children":[]},{"title":"Errors","slug":"errors","depth":2,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"From an upload","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"8\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -X\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> POST\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> https://api.zerodrift.ai/api/v3/batches\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"x-api-key: YOUR_API_KEY\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type: application/json\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -d\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"upload_id\": \"703c343c018b42ad88bdd56cc8175c0b\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"skip_problem_rows\": true,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"metadata\": { \"name\": \"Q4 outbound review\" }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Inline items","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"11\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -X\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> POST\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> https://api.zerodrift.ai/api/v3/batches\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"x-api-key: YOUR_API_KEY\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type: application/json\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -d\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"items\": [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> { \"custom_id\": \"email-001\", \"content\": \"Hi Dana, attached is the agenda for Thursday.\" },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> { \"custom_id\": \"email-002\", \"content\": \"Returns of 12-14% are guaranteed.\" }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> ],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"validation_scope\": { \"rulepacks\": [\"finra-2210\"] },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"metadata\": { \"name\": \"Spot check\" }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]},"response":{"type":"ResponseExample","children":[{"filename":"202 Accepted","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"11\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"api_version\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"v3\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"batch_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"batch_703c343c018b42ad88bdd56cc8175c0b\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"validating\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"created_at\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2026-12-02T19:46:37Z\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"expires_at\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2026-12-03T19:46:37Z\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"poll\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"method\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"GET\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"url\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"/api/v3/batches/batch_703c343c018b42ad88bdd56cc8175c0b\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"Create a Batch","path":"/api/v3/batches","servers":[{"url":"https://api.zerodrift.ai"}],"method":"post","request":{"security":[{"title":"API Key Auth","parameters":{"header":{"x-api-key":{"type":"apiKey"}},"query":{},"cookie":{}}}],"parameters":{"query":{},"header":{},"cookie":{},"path":{}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"upload_id":[{"type":"string","description":"The `upload_id` from Create a Batch Upload URL , after the file is uploaded. Files can be up to 256 MB."}],"items":[{"type":"array","items":[{"type":"object","properties":{}}],"description":"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."}],"validation_scope":[{"type":"object","properties":{},"description":"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."}],"skip_problem_rows":[{"type":"boolean","description":"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."}],"metadata":[{"type":"object","properties":{},"description":"Your own data about the batch, at most 16 KB, returned unchanged by Get a Batch . Set `name` to label the batch in Command."}],"model_engine":[{"type":"string","description":"Only `anchor_3_0` ."}]}}],"examples":{"example":{"value":{"upload_id":"\u003cstring>","items":[{}],"validation_scope":{},"skip_problem_rows":true,"metadata":{},"model_engine":"\u003cstring>"}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"batch_id":[{"type":"string","description":"The batch’s ID, `batch_` followed by 32 hex characters."}],"status":[{"type":"string","description":"Always `validating` on creation."}],"created_at":[{"type":"string","description":"When the batch was created."}],"expires_at":[{"type":"string","description":"24 hours after `created_at` . Messages not checked by then end as `expired` and aren’t billed."}],"poll":[{"type":"object","properties":{},"description":"The request to poll for status."}]}}],"examples":{"example":{"value":{"batch_id":"\u003cstring>","status":"\u003cstring>","created_at":"\u003cstring>","expires_at":"\u003cstring>","poll":{}}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"zerodrift","siteName":"ZeroDrift Enforcement API","title":"Create a Batch - ZeroDrift Enforcement API","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-12-02T22:29:36.339Z","originalFileLocation":"api-reference/batches/create-batch.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Check up to 100,000 messages in one job, from an uploaded file or inline items.\">\u003cmeta data-mint-head name=\"application-name\" content=\"ZeroDrift Enforcement API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/zerodrift/kLkBuz49Q8U_6srQ/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/zerodrift/kLkBuz49Q8U_6srQ/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/zerodrift/kLkBuz49Q8U_6srQ/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/zerodrift/kLkBuz49Q8U_6srQ/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/zerodrift/kLkBuz49Q8U_6srQ/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/zerodrift/kLkBuz49Q8U_6srQ/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/zerodrift/kLkBuz49Q8U_6srQ/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/zerodrift/kLkBuz49Q8U_6srQ/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/zerodrift/kLkBuz49Q8U_6srQ/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create a Batch - ZeroDrift Enforcement API\">\u003cmeta data-mint-head property=\"og:description\" content=\"ZeroDrift Enforcement API - Enforce regulations and policies on AI content and communications\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"ZeroDrift Enforcement API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.zerodrift.com/api-reference/batches/create-batch\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://zerodrift.mintlify.site/_mintlify/api/og/v2?division=Batches\u0026amp;title=Create+a+Batch\u0026amp;description=Check+up+to+100%2C000+messages+in+one+job%2C+from+an+uploaded+file+or+inline+items.\u0026amp;theme=4a77b3342bf61dc8ad6b1fee\u0026amp;signature=78b7028f2993b25eb8529e17e1eb10eb7339fba2e66f0ab90b2903dcfee3f7db\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create a Batch - ZeroDrift Enforcement API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"ZeroDrift Enforcement API - Enforce regulations and policies on AI content and communications\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://zerodrift.mintlify.site/_mintlify/api/og/v2?division=Batches\u0026amp;title=Create+a+Batch\u0026amp;description=Check+up+to+100%2C000+messages+in+one+job%2C+from+an+uploaded+file+or+inline+items.\u0026amp;theme=4a77b3342bf61dc8ad6b1fee\u0026amp;signature=78b7028f2993b25eb8529e17e1eb10eb7339fba2e66f0ab90b2903dcfee3f7db\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/zerodrift/kLkBuz49Q8U_6srQ/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"ZeroDrift Enforcement API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#16A34A\">\u003cmeta data-mint-head name=\"slack-app-id\" content=\"A0CJQ2CUV8C\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.zerodrift.com/api-reference/batches/create-batch\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/batches/create-batch.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.zerodrift.com/#organization\",\"name\":\"ZeroDrift Enforcement API\",\"url\":\"https://docs.zerodrift.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/zerodrift/EnMFM7yTopP4lGmD/logo/ZD_White_Transparent.png?fit=max\u0026auto=format\u0026n=EnMFM7yTopP4lGmD\u0026q=85\u0026s=8a3a1cfcd216c0a056b6a1cd0c50a332\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.zerodrift.com#website\",\"name\":\"ZeroDrift Enforcement API\",\"url\":\"https://docs.zerodrift.com\",\"publisher\":{\"@id\":\"https://docs.zerodrift.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.zerodrift.com/api-reference/batches/create-batch#webpage\",\"url\":\"https://docs.zerodrift.com/api-reference/batches/create-batch\",\"name\":\"Create a Batch\",\"description\":\"Check up to 100,000 messages in one job, from an uploaded file or inline items.\",\"dateModified\":\"2026-12-02T22:29:36.339Z\",\"isPartOf\":{\"@id\":\"https://docs.zerodrift.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.zerodrift.com/api-reference/batches/create-batch#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.zerodrift.com/api-reference/batches/create-batch#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Batches\",\"item\":\"https://docs.zerodrift.com/api-reference/batches/create-upload-url\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create a Batch\",\"item\":\"https://docs.zerodrift.com/api-reference/batches/create-batch\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.zerodrift.com/api-reference/batches/create-batch#apireference\",\"headline\":\"Create a Batch\",\"name\":\"Create a Batch\",\"description\":\"Check up to 100,000 messages in one job, from an uploaded file or inline items.\",\"url\":\"https://docs.zerodrift.com/api-reference/batches/create-batch\",\"mainEntityOfPage\":{\"@id\":\"https://docs.zerodrift.com/api-reference/batches/create-batch#webpage\"},\"dateModified\":\"2026-12-02T22:29:36.339Z\",\"publisher\":{\"@id\":\"https://docs.zerodrift.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.zerodrift.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"ZeroDrift Enforcement API\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"ZeroDrift Enforcement API\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/batches/create-batch.md","siteName":"ZeroDrift Enforcement API","nav":{"global":{},"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":""}]},{"tab":"Plugins","pages":[{"title":"Plugins","href":"/codex-plugin"}]},{"tab":"API reference","groups":[{"group":"Getting Started","pages":[{"title":"Introduction","href":"/api-reference/introduction"},{"title":"Errors","href":"/api-reference/errors"},{"title":"OpenAPI specification","href":"/api-reference/openapi"}]},{"group":"Enforce","pages":[{"title":"Enforce Content","api":"POST /api/v3/content/validate","href":"/api-reference/validate/validate-content"},{"title":"Get Verdict","api":"GET /api/v3/jobs/{job_id}","href":"/api-reference/validate/get-results"}]},{"group":"Redact","pages":[{"title":"Redact PII","api":"POST /api/v3/content/redact","href":"/api-reference/redact/redact-text"}]},{"group":"Batches","pages":[{"title":"Create a Batch Upload URL","api":"POST /api/v3/batches/uploads","href":"/api-reference/batches/create-upload-url"},{"title":"Check a Batch Upload","api":"POST /api/v3/batches/uploads/{upload_id}/inspect","href":"/api-reference/batches/check-upload"},{"title":"Get a Batch Upload Check","description":"Read the result of an upload check: line counts, sample rows and problem lines.","api":"GET /api/v3/batches/uploads/{upload_id}/inspect","href":"/api-reference/batches/get-upload-check"},{"title":"Create a Batch","api":"POST /api/v3/batches","href":"/api-reference/batches/create-batch"},{"title":"Get a Batch","description":"Follow a batch: status, counts by outcome and verdict, cost, and links to the results.","api":"GET /api/v3/batches/{batch_id}","href":"/api-reference/batches/get-batch"},{"title":"List Batches","api":"GET /api/v3/batches","href":"/api-reference/batches/list-batches"},{"title":"Get Batch Limits","api":"GET /api/v3/batches/limits","href":"/api-reference/batches/get-batch-limits"},{"title":"Cancel a Batch","api":"POST /api/v3/batches/{batch_id}/cancel","href":"/api-reference/batches/cancel-batch"},{"title":"Delete a Batch","api":"DELETE /api/v3/batches/{batch_id}","href":"/api-reference/batches/delete-batch"},{"title":"Download a Batch File","api":"GET /api/v3/batches/{batch_id}/files/{kind}","href":"/api-reference/batches/download-file"}]},{"group":"Import a Policy","pages":[{"title":"Import Policy","api":"POST /api/policies/import","href":"/api-reference/custom-policies/import-policy"},{"title":"Get Import Presigned URL","api":"POST /api/policies/import/presigned_url","href":"/api-reference/custom-policies/import-presigned-url"},{"title":"Start Import","api":"POST /api/policies/import/start","href":"/api-reference/custom-policies/start-import"},{"title":"List Policy Imports","api":"GET /api/policies/import","href":"/api-reference/custom-policies/list-imports"},{"title":"Get Import Details","api":"GET /api/policies/import/{import_id}","href":"/api-reference/custom-policies/get-import-details"},{"title":"Edit Imported Rule","api":"PATCH /api/policies/import/{import_id}/rules/{rule_id}","href":"/api-reference/custom-policies/edit-imported-rule"},{"title":"Activate Rules","api":"POST /api/policies/import/{import_id}/activate","href":"/api-reference/custom-policies/activate-rules"}]},{"group":"Rules","pages":[{"title":"List Rules","api":"GET /api/policies/rules","href":"/api-reference/custom-policies/list-rules"},{"title":"Create Custom Rule","api":"POST /api/policies/rules","href":"/api-reference/custom-policies/create-rule"},{"title":"Get Custom Rule","api":"GET /api/policies/rules/{rule_id}","href":"/api-reference/custom-policies/get-rule"},{"title":"Edit Custom Rule","api":"PATCH /api/policies/rules/{rule_id}","href":"/api-reference/custom-policies/edit-rule"},{"title":"Delete Custom Rule","api":"DELETE /api/policies/rules/{rule_id}","href":"/api-reference/custom-policies/delete-rule"},{"title":"Deactivate Rules","api":"POST /api/policies/rules/deactivate","href":"/api-reference/custom-policies/deactivate-rules"},{"title":"Reactivate Rules","api":"POST /api/policies/rules/activate","href":"/api-reference/custom-policies/reactivate-rules"},{"title":"Get Custom Rules Default","api":"GET /api/policies/custom-rules-enforcement","href":"/api-reference/custom-policies/get-custom-rules-enforcement"},{"title":"Set Custom Rules Default","api":"PUT /api/policies/custom-rules-enforcement","href":"/api-reference/custom-policies/set-custom-rules-enforcement"}]},{"group":"Rule Packs","pages":[{"title":"Rule Packs","api":"GET /api/rulepacks/","href":"/api-reference/rulepacks"}]},{"group":"Activity","pages":[{"title":"List Activity","api":"GET /api/activities","href":"/api-reference/activities/list-activities"},{"title":"Get Activity","api":"GET /api/activities/{activity_id}","href":"/api-reference/activities/get-activity"}]},{"group":"Training Studio","pages":[{"title":"Train Policy Adapter","api":"POST /api/policies/import/{import_id}/train","href":"/api-reference/training-studio/train-policy"},{"title":"Get Training Status","api":"GET /api/policies/import/{import_id}/train","href":"/api-reference/training-studio/get-training-status"}]}]}]},"basePath":"","title":"Create a Batch - ZeroDrift Enforcement API","deploymentId":"dpl_4dgnk6TA5fUgboKHTvWWyeqm3idh","buildId":"dpl_4dgnk6TA5fUgboKHTvWWyeqm3idh","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-5zXlUUV6.js","snippetPresets-D3m2eL-0.js","utils-u8TSWPiZ.js","style-to-object-BY3JEAdk.js","utils-D3TDKJCH.js","v4-DIgz8zy6.js","addTypeLabelsToSchema-Om0Y4Ijd.js","conditional-requirements-CFM0id0Q.js","cloneDeep-Cyl7LOol.js","_Uint8Array-BuOv0f5_.js","isObject-FP1Yky1u.js","ApiExamples-BnqLE2Kf.js","usePlaygroundInputsStore-DhQKVH9n.js","shallow-BOCfJNQU.js","isEqual-BrbSa25D.js","CodeSnippets-DUGBlB-S.js","CodeSnippet-CuGpPhIN.js","use-playground-group-access-DYZiRN3l.js","Page-DdEXfHxg.js","api-description-markdown-DDasI_tu.js","DynamicMarkdown-DoPsKgYC.js","SectionHeading-CKObOTcn.js","MethodPill-D_DqPuJw.js","getPastedJson-DWfa7n0M.js","Check2Icon-CEquKboc.js","axios-CsQoIw0U.js"]}