This endpoint does not apply your payload during the request: it stores it and
creates an import that applies it in the background. The response gives you
the import_id of that import, and the number of items your request contained.
A 200 therefore means the import was created, not the payload was applied.
To know how it went, fetch the import with the
Fetch import route until its
status is finished, then read its error flag:
error: false — every item of your payload has been upserted.
error: true — read title in data_tables_details[].error to know what
happened. ValidationError means the payload was refused and nothing was
upserted, description listing the invalid items. PartialFailure means part
of it was applied: description counts the items that reported an issue, and
parsing_error_details names the skipped ones — the most recent 100 — each
with its line_number, row and details.
Imports of a company run one after the other, so an import can stay scheduled
for a while when another one is already running.A 400 is still returned during the request itself, for a malformed body or a
payload above the limit — in that case no import is created.
A payload above the limit of 200 has to be split across several calls, and each
call would otherwise create its own import — all queued behind one another.Pass debounce, a number of seconds, to hold the import open: every call to
the same endpoint made during that window joins the same import instead of
queuing a new one, and they all return the same import_id. The window is
opened by the first call, and a later call joins it without pushing its start
further.Each payload keeps its own validation. A refused payload upserts nothing, but
the payloads merged beside it are still applied — the import then reports the
reason of every refusal in data_tables_details[].error.Only calls to the same endpoint are merged: users, manager attributions and
group attributions always get their own import. This is deliberate, since
attributions need the users they reference to exist already — send your users
first, wait for their import to finish, then send the attributions.
Transaction: If one group attribution is not parsable, none of the
attributions of your call are upserted and the import finishes in error. You
have to fix your payload and send it to us again. And if the import finishes
without error, it means that every group attribution you sent us have been
upserted. This all-or-nothing applies to the payload of your own call: when
several calls share an import through debounce, a refused payload does not
prevent the others from being applied
Conflict Rule and upsert: Be careful, each user can only have one group by
dimension for a given period. Given new attributions dates will override
conflicting dates already present in Qobra.
Also, if you send a payload with two groups attributions for the same user over
the same period the import is refused.
Limit: you can’t update more than 200 group attributions at a time.
Error behavior: In case of any error, your group attributions wont be upserted
Optional (minimum: 0): debounce is the number of seconds we wait before starting the import. Every call to this endpoint made during that window joins the same import instead of queuing a new one, and they all return the same import_id. Use it when a payload above the limit of 200 has to be split across several calls. Only calls to this same endpoint are merged: users, manager attributions and group attributions always get their own import.
Body
application/json
The body contains the user data necessary to create a new user in Qobra
The upsert is performed as a background import: the response identifies the import you just created, not the upserted objects. Fetch the import to know how it went.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Qobra public API documentation","description":"Reference and guides for integrating with Qobra: inbound/outbound data integrations, the v1 and v2 public REST API, and the MCP server for AI agents.","colors":{"primary":"#460629","light":"#FBF5DF","dark":"#460629"},"logo":{"light":"https://mintcdn.com/qobra/BOwfuCXh9Zd24PEc/logo/dark.svg?fit=max\u0026auto=format\u0026n=BOwfuCXh9Zd24PEc\u0026q=85\u0026s=89cd1b29990b669fb3daa20d2e46c52f","dark":"https://mintcdn.com/qobra/BOwfuCXh9Zd24PEc/logo/white.svg?fit=max\u0026auto=format\u0026n=BOwfuCXh9Zd24PEc\u0026q=85\u0026s=b7fa948d600e3558dc1307d622a4c7e2"},"favicon":"https://mintcdn.com/qobra/4g7tQyP7wYl6AlCt/favicon.svg?fit=max\u0026auto=format\u0026n=4g7tQyP7wYl6AlCt\u0026q=85\u0026s=8bd0cfde4ff59d84d6892e4bbdc66cf8","api":{"openapi":["api_reference/v1/openapi.json","api_reference/v2/openapi.json","mcp_documentation/openapi.json"]},"background":{"color":{"light":"#FFFFFF","dark":"#00161F"}},"navbar":{"links":[{"href":"https://app.qobra.co/auth","label":"Application"},{"href":"mailto:support@qobra.co","label":"Support"}],"primary":{"type":"button","label":"Book a demo!","href":"https://www.qobra.co/book-a-call"}},"footer":{"socials":{"github":"https://github.com/qobra-co","linkedin":"https://www.linkedin.com/company/qobra-co"}},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Help center","icon":"hands-holding-heart","href":"https://help.qobra.co/en/"},{"anchor":"Blog","icon":"newspaper","href":"https://www.qobra.co/blog"},{"anchor":"Security","icon":"shield-check","href":"https://trust.qobra.co/"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"qobra","hasAudioNarration":false,"actualSubdomain":"qobra","customDomains":["docs.qobra.co"],"gitSource":{"type":"github","owner":"qobra-co","repo":"public-api-doc","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ad9e0cb9679105657d4d9d3","collectionId":"fc39573c-79e9-49cf-bc77-a3fd4750aa8e","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ad9e0cb9679105657d4d9d3"},"feedback":{"thumbs":true,"issues":false},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ad9e0cb9679105657d4d9d3","clientVersion":"0.0.3964","searchFilterCounts":[{"language":"default","tag":"MCP server","count":69},{"language":"default","tag":"Qobra MCP server","count":69},{"language":"default","tag":"Tools","count":67},{"language":"default","tag":"Documentation","count":37},{"language":"default","tag":"Public API Documentation","count":19},{"language":"default","tag":"Integrations","count":16},{"language":"default","tag":"Inbound data integrations","count":15},{"language":"default","tag":"Endpoints","count":10},{"language":"default","tag":"Data tables","count":8},{"language":"default","tag":"CRMs","count":7}]},"assistantConfig":{"enableStarterQuestions":false},"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":"editor-v7-file-tree","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":"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":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","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":"per-site-search-delta","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":"editor-private-page-search","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":"editor-nav-generations","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":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","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":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","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}],"isAtlas":false,"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api_reference/v1/endpoints/users/upsert_bulk_user_group","slug":"/api_reference/v1/endpoints/users/upsert_bulk_user_group","pageMetadata":{"openapi":"put /v1/users/groups/bulk","version":"v1","title":"Upsert group attributions bulk","description":"Upsert group attributions in bulk.","href":"/api_reference/v1/endpoints/users/upsert_bulk_user_group"},"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: \"Upsert group attributions in bulk.\"\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`,em:`em`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`asynchronous-upsert`,children:`Asynchronous upsert`}),`\n`,_jsxs(_components.p,{children:[`This endpoint does not apply your payload during the request: it stores it and\ncreates an `,_jsx(_components.strong,{children:`import`}),` that applies it in the background. The response gives you\nthe `,_jsx(_components.code,{children:`import_id`}),` of that import, and the number of items your request contained.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,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:`4`,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:` \"import_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"QfejsQZ6mpOVHT5Tt1SdNLPZ\"`}),_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:` \"objects_imported\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`A `,_jsx(_components.code,{children:`200`}),` therefore means `,_jsx(_components.em,{children:`the import was created`}),`, not `,_jsx(_components.em,{children:`the payload was applied`}),`.\nTo know how it went, fetch the import with the\n`,_jsx(_components.a,{href:`/api_reference/v1/endpoints/imports/fetch_import`,children:`Fetch import route`}),` until its\n`,_jsx(_components.code,{children:`status`}),` is `,_jsx(_components.code,{children:`finished`}),`, then read its `,_jsx(_components.code,{children:`error`}),` flag:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`error: false`}),` — every item of your payload has been upserted.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`error: true`}),` — read `,_jsx(_components.code,{children:`title`}),` in `,_jsx(_components.code,{children:`data_tables_details[].error`}),` to know what\nhappened. `,_jsx(_components.code,{children:`ValidationError`}),` means the payload was refused and `,_jsx(_components.strong,{children:`nothing`}),` was\nupserted, `,_jsx(_components.code,{children:`description`}),` listing the invalid items. `,_jsx(_components.code,{children:`PartialFailure`}),` means part\nof it was applied: `,_jsx(_components.code,{children:`description`}),` counts the items that reported an issue, and\n`,_jsx(_components.code,{children:`parsing_error_details`}),` names the skipped ones — the most recent 100 — each\nwith its `,_jsx(_components.code,{children:`line_number`}),`, `,_jsx(_components.code,{children:`row`}),` and `,_jsx(_components.code,{children:`details`}),`.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Imports of a company run one after the other, so an import can stay `,_jsx(_components.code,{children:`scheduled`}),`\nfor a while when another one is already running.`]}),`\n`,_jsxs(_components.p,{children:[`A `,_jsx(_components.code,{children:`400`}),` is still returned during the request itself, for a malformed body or a\npayload above the limit — in that case no import is created.`]}),`\n`,_jsxs(Heading,{level:`2`,id:`merging-successive-calls-with-debounce`,children:[`Merging successive calls with `,_jsx(_components.code,{children:`debounce`})]}),`\n`,_jsx(_components.p,{children:`A payload above the limit of 200 has to be split across several calls, and each\ncall would otherwise create its own import — all queued behind one another.`}),`\n`,_jsxs(_components.p,{children:[`Pass `,_jsx(_components.code,{children:`debounce`}),`, a number of seconds, to hold the import open: every call to\n`,_jsx(_components.strong,{children:`the same endpoint`}),` made during that window joins the same import instead of\nqueuing a new one, and they all return the same `,_jsx(_components.code,{children:`import_id`}),`. The window is\nopened by the first call, and a later call joins it without pushing its start\nfurther.`]}),`\n`,_jsxs(_components.p,{children:[`Each payload keeps its own validation. A refused payload upserts nothing, but\nthe payloads merged beside it are still applied — the import then reports the\nreason of every refusal in `,_jsx(_components.code,{children:`data_tables_details[].error`}),`.`]}),`\n`,_jsx(_components.p,{children:`Only calls to the same endpoint are merged: users, manager attributions and\ngroup attributions always get their own import. This is deliberate, since\nattributions need the users they reference to exist already — send your users\nfirst, wait for their import to finish, then send the attributions.`}),`\n`,_jsx(Heading,{level:`2`,id:`behavior`,children:`Behavior`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Transaction`}),`: If one group attribution is not parsable, none of the\nattributions of your call are upserted and the import finishes in error. You\nhave to fix your payload and send it to us again. And if the import finishes\nwithout error, it means that every group attribution you sent us have been\nupserted. This all-or-nothing applies to the payload of your own call: when\nseveral calls share an import through `,_jsx(_components.code,{children:`debounce`}),`, a refused payload does not\nprevent the others from being applied`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Conflict Rule and upsert`}),`: Be careful, each user can only have one group by\ndimension for a given period. Given new attributions dates will override\nconflicting dates already present in Qobra.\nAlso, if you send a payload with two groups attributions for the same user over\nthe same period the import is refused.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Limit`}),`: you can’t update more than 200 group attributions at a time.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Error behavior`}),`: In case of any error, your group attributions wont be upserted`]}),`\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":{"openapi":"put /v1/users/groups/bulk","version":"v1","title":"Upsert group attributions bulk","description":"Upsert group attributions in bulk.","href":"/api_reference/v1/endpoints/users/upsert_bulk_user_group"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Asynchronous upsert","slug":"asynchronous-upsert","depth":2,"children":[]},{"title":"Merging successive calls with debounce","slug":"merging-successive-calls-with-debounce","depth":2,"children":[]},{"title":"Behavior","slug":"behavior","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"parameters":["667f4b77-b71d-40dd-a985-dabcd870f7f2"],"tags":["public_api","v1","users"],"summary":"Upsert group attributions bulk","description":"Upsert group attributions in bulk.","operationId":"PUT_/v1/users/groups/bulk","security":["194cc852-d344-4173-b988-850b4263c3ae"],"responses":{"200":"87d8d353-71f7-4484-89dd-3da0dbb0ef65","400":"a6478528-8883-47bb-976d-7cd5b266af06"},"requestBody":"e9e03af3-14e1-40c6-8a06-f22ae702b79e","method":"put","type":"path","servers":["4c4bb5da-d2a6-46b9-85cb-f3b7db976fc4"],"path":"/v1/users/groups/bulk","baseUrlOptions":["https://api.qobra.co"],"title":"Upsert group attributions bulk","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"667f4b77-b71d-40dd-a985-dabcd870f7f2":{"name":"debounce","in":"query","description":"Optional (minimum: 0): debounce is the number of seconds we wait before starting the import. Every call to this endpoint made during that window joins the same import instead of queuing a new one, and they all return the same import_id. Use it when a payload above the limit of 200 has to be split across several calls. Only calls to this same endpoint are merged: users, manager attributions and group attributions always get their own import.","schema":{"title":"Debounce","default":0,"type":"integer","isRequired":false,"description":"Optional (minimum: 0): debounce is the number of seconds we wait before starting the import. Every call to this endpoint made during that window joins the same import instead of queuing a new one, and they all return the same import_id. Use it when a payload above the limit of 200 has to be split across several calls. Only calls to this same endpoint are merged: users, manager attributions and group attributions always get their own import.","uniqueKey":"","typeLabel":"integer"},"required":false}},"requestBody":{"description":"The body contains the user data necessary to create a new user in Qobra","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"title":"Data","type":"array","items":{"type":"object","properties":{"user":{"title":"User","type":"string","format":"email","description":"Unique identifier of the user to be attributed","isRequired":true,"uniqueKey":"data.items.[INDEX].user","typeLabel":"string\u003cemail>"},"group_dimension":{"title":"Group Dimension","type":"string","description":"Api key of the group dimension","isRequired":true,"uniqueKey":"data.items.[INDEX].group_dimension","typeLabel":"string"},"group":{"title":"Group","type":"string","description":"Api key of the group","isRequired":true,"uniqueKey":"data.items.[INDEX].group","typeLabel":"string"},"start_date":{"title":"Start Date","type":"string","description":"Date of the start of the group attribution, in YYYY-MM format. Will default to the start of the month of your api call","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","example":"2023-01","uniqueKey":"data.items.[INDEX].start_date","typeLabel":"string"},"end_date":{"title":"End Date","type":"string","description":"Date of the end of the group attribution, in YYYY-MM format. Not providing it will create an indeterminate attribution","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","example":"2023-10","uniqueKey":"data.items.[INDEX].end_date","typeLabel":"string"}},"required":["user","group_dimension","group"],"title":"GroupAttributionPutBodyModel","uniqueKey":"data.items.[INDEX]","typeLabel":"GroupAttributionPutBodyModel · object"},"isRequired":true,"uniqueKey":"data","typeLabel":"GroupAttributionPutBodyModel · object[]"}},"required":["data"],"title":"PutManyInputModel[GroupAttributionPutBodyModel]","uniqueKey":"","typeLabel":"PutManyInputModel[GroupAttributionPutBodyModel] · object"},"examples":{"group-bulk-body":{"title":"group-bulk-body","value":{"data":[{"user":"user-1@company.com","group_dimension":"country","group":"france","start_date":"2023-01","end_date":"2023-10"},{"user":"user-2@company.com","group_dimension":"country","group":"spain"},"..."]}}},"exampleType":"examples"}},"required":true,"exampleType":"examples"},"responses":{"87d8d353-71f7-4484-89dd-3da0dbb0ef65":{"description":"Import created","content":{"application/json":{"schema":{"type":"object","description":"The upsert is performed as a background import: the response identifies the import you just created, not the upserted objects. Fetch the import to know how it went.","properties":{"import_id":{"title":"Import Id","type":"string","format":"ObjectId","description":"unique identifier of the import you created","isRequired":true,"uniqueKey":"import_id","typeLabel":"string\u003cObjectId>"},"objects_imported":{"title":"Objects Imported","type":"integer","description":"number of items your request contained","isRequired":true,"uniqueKey":"objects_imported","typeLabel":"integer"}},"required":["import_id","objects_imported"],"title":"UsersImportModelResponse","uniqueKey":"","typeLabel":"UsersImportModelResponse · object"},"examples":{"group-bulk-import-created":{"title":"group-bulk-import-created","value":{"import_id":"QfejsQZ6mpOVHT5Tt1SdNLPZ","objects_imported":2}}},"exampleType":"examples"}},"exampleType":"examples"},"a6478528-8883-47bb-976d-7cd5b266af06":{"description":"ClientError operation","content":{"application/json":{"schema":{"type":"object","description":"Returned when the request itself is refused, before any import is created. Errors found while validating the payload are reported on the import instead.","properties":{"count":{"description":"Errors count","type":"integer","isRequired":true,"uniqueKey":"count","typeLabel":"integer"},"errors":{"description":"Array of errors","type":"array","items":{"type":"object","properties":{"error":{"description":"Error type","type":"string","isRequired":true,"uniqueKey":"errors.items.[INDEX].error","typeLabel":"string"},"resource":{"description":"Resource the error is about","type":"string","isRequired":true,"uniqueKey":"errors.items.[INDEX].resource","typeLabel":"string"},"description":{"description":"Error description","type":"string","isRequired":true,"uniqueKey":"errors.items.[INDEX].description","typeLabel":"string"}},"required":["error","resource","description"],"title":"BulkUpsertClientErrorModel","uniqueKey":"errors.items.[INDEX]","typeLabel":"BulkUpsertClientErrorModel · object"},"isRequired":true,"uniqueKey":"errors","typeLabel":"BulkUpsertClientErrorModel · object[]"}},"required":["count","errors"],"title":"BulkUpsertClientErrorModelResponse","uniqueKey":"","typeLabel":"BulkUpsertClientErrorModelResponse · object"},"examples":{"group-bulk-errors":{"title":"group-bulk-errors","value":{"count":1,"errors":[{"error":"ValidationError","resource":"data","description":"Too many users, at most 200 can be sent per call"}]}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"194cc852-d344-4173-b988-850b4263c3ae":{"api_key":{"type":"apiKey","name":"X-API-Key","in":"header","scopes":[]}}},"servers":{"4c4bb5da-d2a6-46b9-85cb-f3b7db976fc4":{"url":"https://api.qobra.co","description":"API"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","name":"X-API-Key","in":"header","scopes":[]},"schema":{"title":"X-API-Key","type":"string","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"api_key","name":"X-API-Key"}],"title":"api_key"}]},"originalFileLocation":"api_reference/v1/openapi.json"},"subdomain":"qobra","siteName":"Qobra public API documentation","title":"Upsert group attributions bulk - Qobra public API documentation","navMaps":{"firstHrefInVersion":{"v1":{"href":"/api_reference/v1/endpoints/users/upsert_bulk_user_group","matchLevel":0},"v2":{"href":"/api_reference/v2/introduction","matchLevel":2}},"firstHrefInLanguage":{}},"lastModified":"2026-10-01T08:25:13.446Z","originalFileLocation":"api_reference/v1/endpoints/users/upsert_bulk_user_group.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=\"Upsert group attributions in bulk.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Qobra public API documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/qobra/LfZGqJYgKlEETanR/_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/qobra/LfZGqJYgKlEETanR/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/qobra/LfZGqJYgKlEETanR/_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/qobra/LfZGqJYgKlEETanR/_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/qobra/LfZGqJYgKlEETanR/_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/qobra/LfZGqJYgKlEETanR/_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/qobra/LfZGqJYgKlEETanR/_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/qobra/LfZGqJYgKlEETanR/_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/qobra/LfZGqJYgKlEETanR/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Upsert group attributions bulk - Qobra public API documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Upsert group attributions in bulk.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Qobra public API documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.qobra.co/api_reference/v1/endpoints/users/upsert_bulk_user_group\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://qobra.mintlify.app/_mintlify/api/og/v2?division=Group+attributions\u0026amp;title=Upsert+group+attributions+bulk\u0026amp;description=Upsert+group+attributions+in+bulk.\u0026amp;theme=3f6043674a55ff34ed6fbc78\u0026amp;signature=9359f14a96d47a4fc0f9180da2d0de6da6b6bdc0cb425b5a505abfccd70b7342\">\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=\"Upsert group attributions bulk - Qobra public API documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Upsert group attributions in bulk.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://qobra.mintlify.app/_mintlify/api/og/v2?division=Group+attributions\u0026amp;title=Upsert+group+attributions+bulk\u0026amp;description=Upsert+group+attributions+in+bulk.\u0026amp;theme=3f6043674a55ff34ed6fbc78\u0026amp;signature=9359f14a96d47a4fc0f9180da2d0de6da6b6bdc0cb425b5a505abfccd70b7342\">\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/qobra/LfZGqJYgKlEETanR/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Qobra public API documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#460629\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.qobra.co/api_reference/v1/endpoints/users/upsert_bulk_user_group\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api_reference/v1/endpoints/users/upsert_bulk_user_group.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.qobra.co/#organization\",\"name\":\"Qobra public API documentation\",\"url\":\"https://docs.qobra.co\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/qobra/BOwfuCXh9Zd24PEc/logo/dark.svg?fit=max\u0026auto=format\u0026n=BOwfuCXh9Zd24PEc\u0026q=85\u0026s=89cd1b29990b669fb3daa20d2e46c52f\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.qobra.co#website\",\"name\":\"Qobra public API documentation\",\"url\":\"https://docs.qobra.co\",\"publisher\":{\"@id\":\"https://docs.qobra.co/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.qobra.co/api_reference/v1/endpoints/users/upsert_bulk_user_group#webpage\",\"url\":\"https://docs.qobra.co/api_reference/v1/endpoints/users/upsert_bulk_user_group\",\"name\":\"Upsert group attributions bulk\",\"description\":\"Upsert group attributions in bulk.\",\"dateModified\":\"2026-10-01T08:25:13.446Z\",\"isPartOf\":{\"@id\":\"https://docs.qobra.co#website\"},\"breadcrumb\":{\"@id\":\"https://docs.qobra.co/api_reference/v1/endpoints/users/upsert_bulk_user_group#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.qobra.co/api_reference/v1/endpoints/users/upsert_bulk_user_group#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Public API Documentation\",\"item\":\"https://docs.qobra.co/api_reference/v1/introduction\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Endpoints\",\"item\":\"https://docs.qobra.co/api_reference/v1/endpoints/users/fetch_users\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"User management\",\"item\":\"https://docs.qobra.co/api_reference/v1/endpoints/users/fetch_users\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Upsert group attributions bulk\",\"item\":\"https://docs.qobra.co/api_reference/v1/endpoints/users/upsert_bulk_user_group\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.qobra.co/api_reference/v1/endpoints/users/upsert_bulk_user_group#apireference\",\"headline\":\"Upsert group attributions bulk\",\"name\":\"Upsert group attributions bulk\",\"description\":\"Upsert group attributions in bulk.\",\"url\":\"https://docs.qobra.co/api_reference/v1/endpoints/users/upsert_bulk_user_group\",\"mainEntityOfPage\":{\"@id\":\"https://docs.qobra.co/api_reference/v1/endpoints/users/upsert_bulk_user_group#webpage\"},\"dateModified\":\"2026-10-01T08:25:13.446Z\",\"publisher\":{\"@id\":\"https://docs.qobra.co/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.qobra.co#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Qobra public API documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Qobra public API documentation","nav":{"global":{"anchors":[{"anchor":"Help center","icon":"hands-holding-heart","href":"https://help.qobra.co/en/"},{"anchor":"Blog","icon":"newspaper","href":"https://www.qobra.co/blog"},{"anchor":"Security","icon":"shield-check","href":"https://trust.qobra.co/"}]},"versions":[{"version":"v1","anchors":[{"anchor":"Documentation","icon":"book-open","groups":[{"group":"Inbound data integrations","pages":[{"title":"Introduction","href":"/integration_documentation/introductions/inbound_integration"},{"group":"Integrations","pages":[{"group":"CRMs","pages":[{"title":null,"href":"/integration_documentation/crms/salesforce"},{"title":null,"href":"/integration_documentation/crms/hubspot"},{"title":null,"href":"/integration_documentation/crms/pipedrive"},{"title":"Microsoft Dynamics","href":"/integration_documentation/crms/microsoft_dynamics"},{"title":null,"href":"/integration_documentation/crms/zoho"},{"title":null,"href":"/integration_documentation/crms/odoo"},{"title":null,"href":"/integration_documentation/crms/attio"}]},{"group":"Databases","pages":[{"title":"snowflake","href":"/integration_documentation/databases/snowflake"},{"title":null,"href":"/integration_documentation/databases/bigquery"},{"title":"PostgreSQL","href":"/integration_documentation/databases/postgresql"}]},{"group":"ERP","pages":[{"title":"NetSuite","href":"/integration_documentation/erp/netsuite"}]},{"group":"Files","pages":[{"title":null,"href":"/integration_documentation/files/s3"},{"title":"SFTP","href":"/integration_documentation/files/sftp"}]},{"group":"HRIS","pages":[{"title":"HRIS Connector","href":"/integration_documentation/hris/hris_connector"}]}]}]},{"group":"Outbound data integrations","pages":[{"title":"Introduction","href":"/integration_documentation/introductions/outbound_integration"},{"group":"Integrations","pages":[{"title":null,"href":"/integration_documentation/webhook/webhook"}]}]},{"group":"Public API Documentation","pages":[{"title":"Introduction","href":"/api_reference/v1/introduction"},{"title":"Migration guide v1 → v2","href":"/api_reference/v2/migration_guide"},{"group":"Endpoints","pages":[{"group":"User management","pages":[{"openapi":"get /v1/users","version":"v1","title":"Fetch users","href":"/api_reference/v1/endpoints/users/fetch_users"},{"openapi":"put /v1/users/bulk","version":"v1","title":"Upsert users bulk","href":"/api_reference/v1/endpoints/users/upsert_bulk_user"},{"openapi":"delete /v1/users/archive/bulk","version":"v1","title":"Archive users bulk","description":"Archive users in bulk.","href":"/api_reference/v1/endpoints/users/archive_users"},{"group":"Group attributions","pages":[{"openapi":"put /v1/users/groups/bulk","version":"v1","title":"Upsert group attributions bulk","href":"/api_reference/v1/endpoints/users/upsert_bulk_user_group"}]},{"group":"Manager attributions","pages":[{"openapi":"put /v1/users/managers/bulk","version":"v1","title":"Upsert manager attributions bulk","description":"Upsert managers relationships in bulk.","href":"/api_reference/v1/endpoints/users/upsert_bulk_user_manager"}]}]},{"group":"Data table","pages":[{"openapi":"get /v1/tables/{data_table_key}/records","version":"v1","title":"Fetch records","href":"/api_reference/v1/endpoints/data_tables/fetch_records_data"},{"openapi":"post /v1/tables/{data_table_key}/records/bulk","version":"v1","title":"Upsert records bulk","href":"/api_reference/v1/endpoints/data_tables/ingest_records"}]},{"group":"Imports","pages":[{"openapi":"get /v1/imports/{import_id}","version":"v1","title":"Fetch import","href":"/api_reference/v1/endpoints/imports/fetch_import"}]},{"group":"Reporting","pages":[{"openapi":"get /v1/reporting","version":"v1","deprecated":true,"title":"Fetch statement reporting data","href":"/api_reference/v1/endpoints/reporting/fetch_statement_reporting_data"},{"openapi":"get /v1/reporting/{data_table_id}/records","version":"v1","deprecated":true,"title":"Fetch record reporting data","href":"/api_reference/v1/endpoints/reporting/fetch_record_reporting_data"}]}]}]},{"group":"Authentication","pages":[{"title":"SSO","href":"/authentication_documentation/sso/sso_documentation"}]}]},{"anchor":"MCP server","icon":"plug","pages":[{"title":"MCP server","href":"/mcp_documentation/introduction"}]}]},{"version":"v2","pages":[{"title":"v2","href":"/api_reference/v2/introduction"}]}]},"title":"Upsert group attributions bulk - Qobra public API documentation","buildId":"dpl_HcHmUS6i3UwswnTHJUEdcTtwfdTQ","deploymentId":"dpl_HcHmUS6i3UwswnTHJUEdcTtwfdTQ","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-BRm_l__d.js","utils-f1l1Oc-G.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-BlhqDhJO.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-DHCB7rsC.js","snippetPresets-CYXLx6Hv.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-B78P2dEq.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-C4YLPVAh.js","shallow-vlLnTDkQ.js","getApiPlaygroundDisplay-D_98hhvf.js","CodeSnippet-DtnZHGqq.js","CodeSnippets-CLFb8KJt.js","Page-kQh739Uz.js","getPastedJson-Cq-zlbnU.js","icon-sN3t983t.js","MethodPill-P_YQ2s09.js","DuplicateIcon-BVzyNsGJ.js","createIcon-B3jqgqC6.js","DynamicMarkdown-Crwq6WG_.js","SectionHeading-C7pGS2Bb.js","axios-vUo_bRtp.js","Markdown-BuPH8yuW.js","clsx-CCOYKgaU.js","lib--scc4DXi.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-BnkC_6oA.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-BM4S31-f.js"]}