{ "error": "event too large", "at": ["/batch/0"] }
Send up to 100 identify and track items in one request; the JavaScript SDK sends every call this way. A batch is taken whole or not at all: one refused item refuses the request, and nothing of it is stored.
An item that names a userId needs the Maqetin-Identity-Token header in required mode, the default, unless you send the batch with a secret key. See Identity verification.
Limits
What
Limit
Items
1 to 100
Body
512 KiB
One item as stored
900,000 bytes. Over it, the whole request is a 413, with at naming the item.
Rate
Each item counts against the key’s rate: a batch of 100 counts 100 events. See Rate limits.
Headers
string
required
Bearer mq_live_…, your public key, or Bearer mq_sec_…, a secret key with the events:write scope. A secret key without that scope is a 401.
string
A token your server signed for the person the batch names. One token covers the request, so every item with a userId must name the token’s sub. A batch sent with a secret key needs no token. See Identity token.
Body
Any top-level field that is not listed here is a 400.
object[]
required
1 to 100 items. Each has a type and follows the rules of that call.
{ "error": "event too large", "at": ["/batch/0"] }
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Maqetin Docs","description":"Documentation for Maqetin: send events from your product and message your users when they act or stall.","colors":{"primary":"#17171A","light":"#FFCB2E","dark":"#17171A"},"logo":{"light":"https://mintcdn.com/maqetin/r_6ywoDe-dLwZMPE/logo/light.svg?fit=max\u0026auto=format\u0026n=r_6ywoDe-dLwZMPE\u0026q=85\u0026s=166440aae0e00301cf052794b22b0be2","dark":"https://mintcdn.com/maqetin/r_6ywoDe-dLwZMPE/logo/dark.svg?fit=max\u0026auto=format\u0026n=r_6ywoDe-dLwZMPE\u0026q=85\u0026s=bbb529902c48812a52b66fce4918f737"},"favicon":"https://mintcdn.com/maqetin/r_6ywoDe-dLwZMPE/favicon.svg?fit=max\u0026auto=format\u0026n=r_6ywoDe-dLwZMPE\u0026q=85\u0026s=b57c24b3e6534dec12078245d6269856","api":{"playground":{"display":"simple"}},"background":{"color":{"light":"#F2F2EC","dark":"#17171A"}},"navbar":{"links":[{"href":"mailto:support@maqetin.com","label":"Support"},{"href":"https://github.com/Maqetin/maqetin-js","type":"github"}]},"footer":{"socials":{"github":"https://github.com/Maqetin"}},"seo":{"metatags":{"og:site_name":"Maqetin Docs"}},"fonts":{"family":"Familjen Grotesk"},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Website","icon":"globe","href":"https://maqetin.com"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"maqetin","hasAudioNarration":false,"actualSubdomain":"maqetin","customDomains":["docs.maqetin.com"],"gitSource":{"type":"github","owner":"maqetin","repo":"maqetin-docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":"","_id":"6b11786f5a390cdfc61d202b"},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6b118855514e7ad9e6d4b13a","clientVersion":"0.0.4428","searchFilterCounts":[{"language":"default","tag":"Guides","count":18},{"language":"default","tag":"API reference","count":7},{"language":"default","tag":"Messaging","count":7},{"language":"default","tag":"Data","count":5},{"language":"default","tag":"SDKs","count":5},{"language":"default","tag":"Get started","count":4},{"language":"default","tag":"Workspace","count":4},{"language":"default","tag":"Events","count":3},{"language":"default","tag":"JavaScript","count":3},{"language":"default","tag":"Messages and contacts","count":2}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"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":true},"customCss":[{"filePath":"style.css","content":":root{--signal: #ffcb2e;--on-signal: #17171a}::selection{background:var(--signal);color:var(--on-signal)}#navigation-items a[aria-current=\"page\"]{background:var(--signal);color:var(--on-signal)}#navbar a.nav-tabs-item[data-active=\"true\"]>div.absolute{height:3px;background:var(--signal)}#table-of-contents a[data-active=\"true\"]{color:inherit;font-weight:600;text-decoration:underline;text-decoration-color:var(--signal);text-decoration-thickness:2px;text-underline-offset:4px}[data-component-part=\"step-indicator\"]{background:var(--signal);color:var(--on-signal)}#content-area p a:not([data-component-part]),#content-area li a:not([data-component-part]){text-decoration-color:var(--signal);text-decoration-thickness:2px;text-underline-offset:3px}#content-area p a:not([data-component-part]):hover,#content-area li a:not([data-component-part]):hover{background:var(--signal);color:var(--on-signal)}.callout[data-callout-type=\"note\"],.callout[data-callout-type=\"info\"],.callout[data-callout-type=\"tip\"],.callout[data-callout-type=\"check\"]{background:rgb(23 23 26 / 0.04);border-color:rgb(23 23 26 / 0.12);box-shadow:inset 4px 0 0 var(--signal)}.callout[data-callout-type=\"note\"] svg,.callout[data-callout-type=\"info\"] svg,.callout[data-callout-type=\"tip\"] svg,.callout[data-callout-type=\"check\"] svg,.callout[data-callout-type=\"note\"] [data-component-part=\"callout-content\"],.callout[data-callout-type=\"info\"] [data-component-part=\"callout-content\"],.callout[data-callout-type=\"tip\"] [data-component-part=\"callout-content\"],.callout[data-callout-type=\"check\"] [data-component-part=\"callout-content\"]{color:#17171a}html.dark .callout[data-callout-type=\"note\"],html.dark .callout[data-callout-type=\"info\"],html.dark .callout[data-callout-type=\"tip\"],html.dark .callout[data-callout-type=\"check\"]{background:rgb(242 242 236 / 0.06);border-color:rgb(242 242 236 / 0.14)}html.dark .callout[data-callout-type=\"note\"] svg,html.dark .callout[data-callout-type=\"info\"] svg,html.dark .callout[data-callout-type=\"tip\"] svg,html.dark .callout[data-callout-type=\"check\"] svg,html.dark .callout[data-callout-type=\"note\"] [data-component-part=\"callout-content\"],html.dark .callout[data-callout-type=\"info\"] [data-component-part=\"callout-content\"],html.dark .callout[data-callout-type=\"tip\"] [data-component-part=\"callout-content\"],html.dark .callout[data-callout-type=\"check\"] [data-component-part=\"callout-content\"]{color:#f2f2ec}"}]}
{"page":{"pagePath":"api-reference/batch","slug":"/api-reference/batch","pageMetadata":{"title":"Batch","description":"Send 1 to 100 identify and track calls in one request.","api":"POST https://in.maqetin.com/v1/batch","authMethod":"bearer","href":"/api-reference/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: \"Send 1 to 100 identify and track calls in one request.\"\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`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{Expandable,Heading,Note,ParamField,ResponseField,Table}=_components;if(!Expandable)_missingMdxReference(`Expandable`,true);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:[`Send up to 100 `,_jsx(_components.code,{children:`identify`}),` and `,_jsx(_components.code,{children:`track`}),` items in one request; the JavaScript SDK sends every call this way. A batch is taken whole or not at all: one refused item refuses the request, and nothing of it is stored.`]}),`\n`,_jsxs(Note,{children:[`An item that names a `,_jsx(_components.code,{children:`userId`}),` needs the `,_jsx(_components.code,{children:`Maqetin-Identity-Token`}),` header in `,_jsx(_components.code,{children:`required`}),` mode, the default, unless you send the batch with a secret key. See `,_jsx(_components.a,{href:`/data/identity-verification`,children:`Identity verification`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`limits`,children:`Limits`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`What`}),_jsx(_components.th,{children:`Limit`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Items`}),_jsx(_components.td,{children:`1 to 100`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Body`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`512 KiB`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`One item as stored`}),_jsxs(_components.td,{children:[`900,000 bytes. Over it, the whole request is a `,_jsx(_components.code,{children:`413`}),`, with `,_jsx(_components.code,{children:`at`}),` naming the item.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Rate`}),_jsxs(_components.td,{children:[`Each item counts against the key’s rate: a batch of 100 counts 100 events. See `,_jsx(_components.a,{href:`/api-reference/introduction#rate-limits`,children:`Rate limits`}),`.`]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`headers`,children:`Headers`}),`\n`,_jsxs(ParamField,{header:`Authorization`,type:`string`,required:true,id:`param-authorization`,children:[_jsx(_components.code,{children:`Bearer mq_live_…`}),`, your public key, or `,_jsx(_components.code,{children:`Bearer mq_sec_…`}),`, a secret key with the `,_jsx(_components.code,{children:`events:write`}),` scope. A secret key without that scope is a `,_jsx(_components.code,{children:`401`}),`.`]}),`\n`,_jsxs(ParamField,{header:`Maqetin-Identity-Token`,type:`string`,id:`param-maqetin-identity-token`,children:[`A token your server signed for the person the batch names. One token covers the request, so every item with a `,_jsx(_components.code,{children:`userId`}),` must name the token’s `,_jsx(_components.code,{children:`sub`}),`. A batch sent with a secret key needs no token. See `,_jsx(_components.a,{href:`/api-reference/introduction#identity-token`,children:`Identity token`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`body`,children:`Body`}),`\n`,_jsxs(_components.p,{children:[`Any top-level field that is not listed here is a `,_jsx(_components.code,{children:`400`}),`.`]}),`\n`,_jsxs(ParamField,{body:`batch`,type:`object[]`,required:true,id:`param-batch`,children:[_jsxs(_components.p,{children:[`1 to 100 items. Each has a `,_jsx(_components.code,{children:`type`}),` and follows the rules of that call.`]}),_jsxs(Expandable,{title:`an identify item`,children:[_jsxs(ParamField,{body:`type`,type:`string`,required:true,id:`param-type`,children:[_jsx(_components.code,{children:`identify`}),`.`]}),_jsx(ParamField,{body:`userId`,type:`string`,required:true,id:`param-user-id`,children:`Your own id for the person, 1 to 256 characters.`}),_jsxs(ParamField,{body:`traits`,type:`object`,required:true,id:`param-traits`,children:[`The traits, as in `,_jsx(_components.a,{href:`/api-reference/identify`,children:`Identify`}),`.`]}),_jsxs(ParamField,{body:`channel`,type:`string`,required:true,id:`param-channel`,children:[_jsx(_components.code,{children:`web`}),`, `,_jsx(_components.code,{children:`ios`}),`, `,_jsx(_components.code,{children:`android`}),`, `,_jsx(_components.code,{children:`node`}),`, `,_jsx(_components.code,{children:`python`}),`, `,_jsx(_components.code,{children:`go`}),` or `,_jsx(_components.code,{children:`rest`}),`.`]}),_jsxs(_components.p,{children:[`Optional: `,_jsx(_components.code,{children:`anonymousId`}),`, `,_jsx(_components.code,{children:`messageId`}),`, `,_jsx(_components.code,{children:`timestamp`}),`, `,_jsx(_components.code,{children:`sessionId`}),`, `,_jsx(_components.code,{children:`sdkVersion`}),` and `,_jsx(_components.code,{children:`context`}),`, as in `,_jsx(_components.a,{href:`/api-reference/identify`,children:`Identify`}),`.`]})]}),_jsxs(Expandable,{title:`a track item`,children:[_jsxs(ParamField,{body:`type`,type:`string`,required:true,id:`param-type-1`,children:[_jsx(_components.code,{children:`track`}),`.`]}),_jsx(ParamField,{body:`event`,type:`string`,required:true,id:`param-event`,children:`The name of the event, at least 1 character.`}),_jsxs(ParamField,{body:`channel`,type:`string`,required:true,id:`param-channel-1`,children:[_jsx(_components.code,{children:`web`}),`, `,_jsx(_components.code,{children:`ios`}),`, `,_jsx(_components.code,{children:`android`}),`, `,_jsx(_components.code,{children:`node`}),`, `,_jsx(_components.code,{children:`python`}),`, `,_jsx(_components.code,{children:`go`}),` or `,_jsx(_components.code,{children:`rest`}),`.`]}),_jsxs(ParamField,{body:`userId`,type:`string`,id:`param-user-id-1`,children:[`1 to 256 characters. An item needs a `,_jsx(_components.code,{children:`userId`}),`, an `,_jsx(_components.code,{children:`anonymousId`}),` or both.`]}),_jsx(ParamField,{body:`anonymousId`,type:`string`,id:`param-anonymous-id`,children:`1 to 256 characters.`}),_jsxs(_components.p,{children:[`Optional: `,_jsx(_components.code,{children:`properties`}),`, `,_jsx(_components.code,{children:`messageId`}),`, `,_jsx(_components.code,{children:`timestamp`}),`, `,_jsx(_components.code,{children:`sessionId`}),`, `,_jsx(_components.code,{children:`sdkVersion`}),` and `,_jsx(_components.code,{children:`context`}),`, as in `,_jsx(_components.a,{href:`/api-reference/track`,children:`Track`}),`.`]})]})]}),`\n`,_jsxs(ParamField,{body:`sentAt`,type:`string`,id:`param-sent-at`,children:[`When your client sent the request, as an ISO 8601 date-time. Send it once, on the batch: an item cannot carry its own `,_jsx(_components.code,{children:`sentAt`}),`. See `,_jsx(_components.a,{href:`/api-reference/introduction#event-time`,children:`Event time`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(ResponseField,{name:`accepted`,type:`number`,required:true,id:`param-accepted`,children:`The number of events taken: every item of the batch.`}),`\n`,_jsxs(_components.p,{children:[`A `,_jsx(_components.code,{children:`202`}),` means the batch is stored. A refusal has `,_jsx(_components.code,{children:`error`}),` and, for a body problem, `,_jsx(_components.code,{children:`at`}),`, which points into the batch, such as `,_jsx(_components.code,{children:`/batch`}),` or `,_jsx(_components.code,{children:`/batch/2`}),`. See `,_jsx(_components.a,{href:`/api-reference/errors#event-routes`,children:`Errors`}),`.`]})]})}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":"Batch","description":"Send 1 to 100 identify and track calls in one request.","api":"POST https://in.maqetin.com/v1/batch","authMethod":"bearer","href":"/api-reference/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`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Expandable,Heading,Note,ParamField,RequestExample,ResponseExample,ResponseField,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,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:[`Send up to 100 `,_jsx(_components.code,{children:`identify`}),` and `,_jsx(_components.code,{children:`track`}),` items in one request; the JavaScript SDK sends every call this way. A batch is taken whole or not at all: one refused item refuses the request, and nothing of it is stored.`]}),`\n`,_jsxs(Note,{children:[`An item that names a `,_jsx(_components.code,{children:`userId`}),` needs the `,_jsx(_components.code,{children:`Maqetin-Identity-Token`}),` header in `,_jsx(_components.code,{children:`required`}),` mode, the default, unless you send the batch with a secret key. See `,_jsx(_components.a,{href:`/data/identity-verification`,children:`Identity verification`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`limits`,children:`Limits`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`What`}),_jsx(_components.th,{children:`Limit`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Items`}),_jsx(_components.td,{children:`1 to 100`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Body`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`512 KiB`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`One item as stored`}),_jsxs(_components.td,{children:[`900,000 bytes. Over it, the whole request is a `,_jsx(_components.code,{children:`413`}),`, with `,_jsx(_components.code,{children:`at`}),` naming the item.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Rate`}),_jsxs(_components.td,{children:[`Each item counts against the key’s rate: a batch of 100 counts 100 events. See `,_jsx(_components.a,{href:`/api-reference/introduction#rate-limits`,children:`Rate limits`}),`.`]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`headers`,children:`Headers`}),`\n`,_jsxs(ParamField,{header:`Authorization`,type:`string`,required:true,id:`param-authorization`,children:[_jsx(_components.code,{children:`Bearer mq_live_…`}),`, your public key, or `,_jsx(_components.code,{children:`Bearer mq_sec_…`}),`, a secret key with the `,_jsx(_components.code,{children:`events:write`}),` scope. A secret key without that scope is a `,_jsx(_components.code,{children:`401`}),`.`]}),`\n`,_jsxs(ParamField,{header:`Maqetin-Identity-Token`,type:`string`,id:`param-maqetin-identity-token`,children:[`A token your server signed for the person the batch names. One token covers the request, so every item with a `,_jsx(_components.code,{children:`userId`}),` must name the token’s `,_jsx(_components.code,{children:`sub`}),`. A batch sent with a secret key needs no token. See `,_jsx(_components.a,{href:`/api-reference/introduction#identity-token`,children:`Identity token`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`body`,children:`Body`}),`\n`,_jsxs(_components.p,{children:[`Any top-level field that is not listed here is a `,_jsx(_components.code,{children:`400`}),`.`]}),`\n`,_jsxs(ParamField,{body:`batch`,type:`object[]`,required:true,id:`param-batch`,children:[_jsxs(_components.p,{children:[`1 to 100 items. Each has a `,_jsx(_components.code,{children:`type`}),` and follows the rules of that call.`]}),_jsxs(Expandable,{title:`an identify item`,children:[_jsxs(ParamField,{body:`type`,type:`string`,required:true,id:`param-type`,children:[_jsx(_components.code,{children:`identify`}),`.`]}),_jsx(ParamField,{body:`userId`,type:`string`,required:true,id:`param-user-id`,children:`Your own id for the person, 1 to 256 characters.`}),_jsxs(ParamField,{body:`traits`,type:`object`,required:true,id:`param-traits`,children:[`The traits, as in `,_jsx(_components.a,{href:`/api-reference/identify`,children:`Identify`}),`.`]}),_jsxs(ParamField,{body:`channel`,type:`string`,required:true,id:`param-channel`,children:[_jsx(_components.code,{children:`web`}),`, `,_jsx(_components.code,{children:`ios`}),`, `,_jsx(_components.code,{children:`android`}),`, `,_jsx(_components.code,{children:`node`}),`, `,_jsx(_components.code,{children:`python`}),`, `,_jsx(_components.code,{children:`go`}),` or `,_jsx(_components.code,{children:`rest`}),`.`]}),_jsxs(_components.p,{children:[`Optional: `,_jsx(_components.code,{children:`anonymousId`}),`, `,_jsx(_components.code,{children:`messageId`}),`, `,_jsx(_components.code,{children:`timestamp`}),`, `,_jsx(_components.code,{children:`sessionId`}),`, `,_jsx(_components.code,{children:`sdkVersion`}),` and `,_jsx(_components.code,{children:`context`}),`, as in `,_jsx(_components.a,{href:`/api-reference/identify`,children:`Identify`}),`.`]})]}),_jsxs(Expandable,{title:`a track item`,children:[_jsxs(ParamField,{body:`type`,type:`string`,required:true,id:`param-type-1`,children:[_jsx(_components.code,{children:`track`}),`.`]}),_jsx(ParamField,{body:`event`,type:`string`,required:true,id:`param-event`,children:`The name of the event, at least 1 character.`}),_jsxs(ParamField,{body:`channel`,type:`string`,required:true,id:`param-channel-1`,children:[_jsx(_components.code,{children:`web`}),`, `,_jsx(_components.code,{children:`ios`}),`, `,_jsx(_components.code,{children:`android`}),`, `,_jsx(_components.code,{children:`node`}),`, `,_jsx(_components.code,{children:`python`}),`, `,_jsx(_components.code,{children:`go`}),` or `,_jsx(_components.code,{children:`rest`}),`.`]}),_jsxs(ParamField,{body:`userId`,type:`string`,id:`param-user-id-1`,children:[`1 to 256 characters. An item needs a `,_jsx(_components.code,{children:`userId`}),`, an `,_jsx(_components.code,{children:`anonymousId`}),` or both.`]}),_jsx(ParamField,{body:`anonymousId`,type:`string`,id:`param-anonymous-id`,children:`1 to 256 characters.`}),_jsxs(_components.p,{children:[`Optional: `,_jsx(_components.code,{children:`properties`}),`, `,_jsx(_components.code,{children:`messageId`}),`, `,_jsx(_components.code,{children:`timestamp`}),`, `,_jsx(_components.code,{children:`sessionId`}),`, `,_jsx(_components.code,{children:`sdkVersion`}),` and `,_jsx(_components.code,{children:`context`}),`, as in `,_jsx(_components.a,{href:`/api-reference/track`,children:`Track`}),`.`]})]})]}),`\n`,_jsxs(ParamField,{body:`sentAt`,type:`string`,id:`param-sent-at`,children:[`When your client sent the request, as an ISO 8601 date-time. Send it once, on the batch: an item cannot carry its own `,_jsx(_components.code,{children:`sentAt`}),`. See `,_jsx(_components.a,{href:`/api-reference/introduction#event-time`,children:`Event time`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(ResponseField,{name:`accepted`,type:`number`,required:true,id:`param-accepted`,children:`The number of events taken: every item of the batch.`}),`\n`,_jsxs(_components.p,{children:[`A `,_jsx(_components.code,{children:`202`}),` means the batch is stored. A refusal has `,_jsx(_components.code,{children:`error`}),` and, for a body problem, `,_jsx(_components.code,{children:`at`}),`, which points into the batch, such as `,_jsx(_components.code,{children:`/batch`}),` or `,_jsx(_components.code,{children:`/batch/2`}),`. See `,_jsx(_components.a,{href:`/api-reference/errors#event-routes`,children:`Errors`}),`.`]}),`\n`,_jsx(RequestExample,{children:_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`27`,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:`27`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://in.maqetin.com/v1/batch`}),_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:` 'Authorization: Bearer mq_live_…'`}),_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:` \"batch\": [`})}),`\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:` \"type\": \"identify\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"userId\": \"user_123\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"traits\": { \"email\": \"ada@example.com\", \"plan\": \"pro\" },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"channel\": \"rest\"`})}),`\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:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"type\": \"track\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"userId\": \"user_123\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"event\": \"order.completed\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"properties\": { \"orderId\": \"ord_1002\", \"total\": 12 },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"channel\": \"rest\"`})}),`\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:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"type\": \"track\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"anonymousId\": \"anon_456\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"event\": \"plan.viewed\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"properties\": { \"path\": \"/pricing\" },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"channel\": \"web\"`})}),`\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:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`}'`})}),`\n`]})})})}),`\n`,_jsxs(ResponseExample,{children:[_jsx(CodeBlock,{filename:`202`,numberOfLines:`1`,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:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{ `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"accepted\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`400`,numberOfLines:`1`,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:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{ `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"invalid payload\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"/batch\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] }`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`413`,numberOfLines:`1`,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:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{ `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"event too large\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"/batch/0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] }`})]}),`\n`]})})})]})]})}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":"Batch","description":"Send 1 to 100 identify and track calls in one request.","api":"POST https://in.maqetin.com/v1/batch","authMethod":"bearer","href":"/api-reference/batch"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Limits","slug":"limits","depth":2,"children":[]},{"title":"Headers","slug":"headers","depth":2,"children":[]},{"title":"Body","slug":"body","depth":2,"children":[]},{"title":"Response","slug":"response","depth":2,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"cURL","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=\"27\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> https://in.maqetin.com/v1/batch\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\"> 'Authorization: Bearer mq_live_…'\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\"> \"batch\": [\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\"> \"type\": \"identify\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"userId\": \"user_123\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"traits\": { \"email\": \"ada@example.com\", \"plan\": \"pro\" },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"channel\": \"rest\"\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\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"type\": \"track\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"userId\": \"user_123\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"event\": \"order.completed\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"properties\": { \"orderId\": \"ord_1002\", \"total\": 12 },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"channel\": \"rest\"\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\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"type\": \"track\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"anonymousId\": \"anon_456\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"event\": \"plan.viewed\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"properties\": { \"path\": \"/pricing\" },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"channel\": \"web\"\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\"> ]\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","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=\"1\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{ \u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\">\"accepted\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">3\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"400","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=\"1\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{ \u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\">\"error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"invalid payload\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\">\"at\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"/batch\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">] }\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"413","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=\"1\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{ \u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\">\"error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"event too large\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\">\"at\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"/batch/0\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">] }\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"Batch","path":"/v1/batch","servers":[{"url":"https://in.maqetin.com"}],"method":"post","request":{"security":[{"title":"Bearer Auth","parameters":{"header":{"Authorization":{"type":"http","scheme":"bearer","description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token."}},"query":{},"cookie":{}}}],"parameters":{"query":{},"header":{"Authorization":{"schema":[{"type":"string","description":"`Bearer mq_live_…` , your public key, or `Bearer mq_sec_…` , a secret key with the `events:write` scope. A secret key without that scope is a `401` .","required":true}]},"Maqetin-Identity-Token":{"schema":[{"type":"string","description":"A token your server signed for the person the batch names. One token covers the request, so every item with a `userId` must name the token’s `sub` . A batch sent with a secret key needs no token. See Identity token ."}]}},"cookie":{},"path":{}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"batch":[{"type":"array","items":[{"type":"object","properties":{"type":[{"type":"string","description":"`track` .","required":true}],"userId":[{"type":"string","description":"1 to 256 characters. An item needs a `userId` , an `anonymousId` or both."}],"traits":[{"type":"object","properties":{},"description":"The traits, as in Identify .","required":true}],"channel":[{"type":"string","description":"`web` , `ios` , `android` , `node` , `python` , `go` or `rest` .","required":true}],"event":[{"type":"string","description":"The name of the event, at least 1 character.","required":true}],"anonymousId":[{"type":"string","description":"1 to 256 characters."}]}}],"description":"1 to 100 items. Each has a `type` and follows the rules of that call.","required":true}],"sentAt":[{"type":"string","description":"When your client sent the request, as an ISO 8601 date-time. Send it once, on the batch: an item cannot carry its own `sentAt` . See Event time ."}]}}],"examples":{"example":{"value":{"batch":[{"type":"\u003cstring>","userId":"\u003cstring>","traits":{},"channel":"\u003cstring>","event":"\u003cstring>","anonymousId":"\u003cstring>"}],"sentAt":"\u003cstring>"}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"accepted":[{"type":"number","description":"The number of events taken: every item of the batch.","required":true}]}}],"examples":{"example":{"value":{"accepted":123}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"maqetin","siteName":"Maqetin Docs","title":"Batch - Maqetin Docs","relatedPagesConfig":{"enabled":true,"limit":5,"mode":"automatic"},"contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-12-03T15:18:49.136Z","originalFileLocation":"api-reference/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=\"Send 1 to 100 identify and track calls in one request.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Maqetin Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/maqetin/Qg-ESbPt-GMgO1Uj/_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/maqetin/Qg-ESbPt-GMgO1Uj/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/maqetin/Qg-ESbPt-GMgO1Uj/_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/maqetin/Qg-ESbPt-GMgO1Uj/_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/maqetin/Qg-ESbPt-GMgO1Uj/_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/maqetin/Qg-ESbPt-GMgO1Uj/_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/maqetin/Qg-ESbPt-GMgO1Uj/_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/maqetin/Qg-ESbPt-GMgO1Uj/_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/maqetin/Qg-ESbPt-GMgO1Uj/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Batch - Maqetin Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Send 1 to 100 identify and track calls in one request.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Maqetin Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.maqetin.com/api-reference/batch\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://maqetin.mintlify.site/_mintlify/api/og/v2?division=Events\u0026amp;title=Batch\u0026amp;description=Send+1+to+100+identify+and+track+calls+in+one+request.\u0026amp;theme=6d4b50211848149bb0cb7554\u0026amp;signature=5272a8248072200739303d5623d74b9b522ea9cf34da549df75195b995dbd090\">\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=\"Batch - Maqetin Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Send 1 to 100 identify and track calls in one request.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://maqetin.mintlify.site/_mintlify/api/og/v2?division=Events\u0026amp;title=Batch\u0026amp;description=Send+1+to+100+identify+and+track+calls+in+one+request.\u0026amp;theme=6d4b50211848149bb0cb7554\u0026amp;signature=5272a8248072200739303d5623d74b9b522ea9cf34da549df75195b995dbd090\">\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/maqetin/Qg-ESbPt-GMgO1Uj/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Maqetin Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#17171A\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.maqetin.com/api-reference/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/batch.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.maqetin.com/#organization\",\"name\":\"Maqetin Docs\",\"url\":\"https://docs.maqetin.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/maqetin/r_6ywoDe-dLwZMPE/logo/light.svg?fit=max\u0026auto=format\u0026n=r_6ywoDe-dLwZMPE\u0026q=85\u0026s=166440aae0e00301cf052794b22b0be2\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.maqetin.com#website\",\"name\":\"Maqetin Docs\",\"url\":\"https://docs.maqetin.com\",\"publisher\":{\"@id\":\"https://docs.maqetin.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.maqetin.com/api-reference/batch#webpage\",\"url\":\"https://docs.maqetin.com/api-reference/batch\",\"name\":\"Batch\",\"description\":\"Send 1 to 100 identify and track calls in one request.\",\"dateModified\":\"2026-12-03T15:18:49.136Z\",\"isPartOf\":{\"@id\":\"https://docs.maqetin.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.maqetin.com/api-reference/batch#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.maqetin.com/api-reference/batch#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Events\",\"item\":\"https://docs.maqetin.com/api-reference/identify\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Batch\",\"item\":\"https://docs.maqetin.com/api-reference/batch\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.maqetin.com/api-reference/batch#apireference\",\"headline\":\"Batch\",\"name\":\"Batch\",\"description\":\"Send 1 to 100 identify and track calls in one request.\",\"url\":\"https://docs.maqetin.com/api-reference/batch\",\"mainEntityOfPage\":{\"@id\":\"https://docs.maqetin.com/api-reference/batch#webpage\"},\"dateModified\":\"2026-12-03T15:18:49.136Z\",\"publisher\":{\"@id\":\"https://docs.maqetin.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.maqetin.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Maqetin Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Maqetin Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/batch.md","siteName":"Maqetin Docs","nav":{"global":{"anchors":[{"anchor":"Website","icon":"globe","href":"https://maqetin.com"}]},"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":""}]},{"tab":"SDKs","pages":[{"title":"SDKs","href":"/sdk/overview"}]},{"tab":"API reference","groups":[{"group":"Get started","pages":[{"title":"API reference","sidebarTitle":"Introduction","href":"/api-reference/introduction"},{"title":"Errors","href":"/api-reference/errors"}]},{"group":"Events","pages":[{"title":"Identify","api":"POST https://in.maqetin.com/v1/identify","href":"/api-reference/identify"},{"title":"Track","description":"Record one event that a person or an anonymous visitor did.","api":"POST https://in.maqetin.com/v1/track","href":"/api-reference/track"},{"title":"Batch","api":"POST https://in.maqetin.com/v1/batch","href":"/api-reference/batch"}]},{"group":"Messages and contacts","pages":[{"title":"Send a message","description":"Queue one transactional email from your server with a secret key.","api":"POST https://api.maqetin.com/v1/public/messages","href":"/api-reference/send-message"},{"title":"Contacts","href":"/api-reference/contacts"}]}]}]},"basePath":"","title":"Batch - Maqetin Docs","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"]}