Link products a customer can switch between. A product belongs to one group at a time: one in another group answers 409 with code product_already_grouped. An unknown product answers 400 with code reference_not_found. With an external_id the call is an upsert: it creates the group when the key is new (201) and updates the group that holds the key otherwise (200). Only the fields you send change, each with the meaning PATCH /v1/product-groups/{id} gives it; products, when sent, is the complete ordered member list. The request is compared with the stored group first, so a request that changes nothing answers unchanged and writes nothing, and retrying after a timeout is safe. The product group comes back with write_result. Send If-None-Match: * to create only.
API key for authentication. You can find your API key in the Creem dashboard under Settings > API Keys.
Headers
If-None-Match
string
Send * to create only: when a product group of the store already has the external_id, the call answers 412 (precondition_failed) and writes nothing. Only * is accepted on a request with an external_id (any other value answers 400); without one the header is ignored.
Query Parameters
dry_run
boolean
Send true to preview the write: the request runs as it would and is rolled back, so nothing is written. The answer is the one the real call would give: the same status (201 for a create) and errors, and the product group with write_result.dry_runtrue. The id of a product group a dry run would create is never stored: a GET of it answers 404. A product id or external_id that names no product of the store is a reference_not_found warning (path, key) instead of a 400: on a create that entry is left out of the answer, and on an update the stored members stay as they are. false or no parameter is a real call; any other value answers 400.
Body
application/json
name
string
The name of the product group, 3 to 255 characters. Required when creating a product group. On an existing group (by external_id) a different name renames it.
description
string | null
A description of the product group. On an existing group (by external_id), send null to clear it.
external_id
string
Your own key for this product group. Unique per store, case-sensitive; 1 to 255 characters: letters, digits, _, -, . and :. With a key the call is an upsert: it creates the group when the key is new (201) and updates the group that holds it otherwise (200). Send If-None-Match: * to create only.
Example:
"pro-plans"
products
object[]
The products of the group, in display order, each named by exactly one of id or external_id. Required when creating a product group, with at least one product. On an existing group (by external_id) it is the complete ordered member list: products it does not contain are removed, its order is the display order, and [] removes every member; omit it to leave the members unchanged. A product already in another group answers 409 with code product_already_grouped.
Maximum array length: 100
Option 1
Option 2
Show child attributes
upgrades_enabled
boolean
Whether customers can switch between the products of this group. Defaults to true on a create.
upgrade_behavior
enum<string> | null
How a switch between the products of this group is billed. On an existing group (by external_id), send null to clear it.
Available options:
proration-charge-immediately,
proration-charge,
proration-none
upsells_enabled
boolean
Whether the products of this group are offered as checkout upsells. Defaults to true on a create.
is_active
boolean
Whether the product group is active. Stored and returned; it does not yet stop upgrades or upsells. Defaults to true on a create.
Response
Only with an external_id: a product group of the store already had the key, and it was updated (write_result.resultupdated) or already matched the request (unchanged).
id
string
required
Unique identifier for the object.
mode
enum<string>
required
String representing the environment.
Available options:
test,
prod,
sandbox
object
string
required
String representing the object's type. Objects of the same type share the same value.
Example:
"product_group"
name
string
required
The name of the product group.
description
string | null
required
A description of the product group.
external_id
string | null
required
Your own key for this product group, or null when it has none.
products
object[]
required
The products in the group, in display order. A product is in one group at a time.
Show child attributes
upgrades_enabled
boolean
required
Whether customers can switch between the products of this group.
upgrade_behavior
enum<string> | null
required
How a switch between the products is billed, or null for the default.
Available options:
proration-charge-immediately,
proration-charge,
proration-none
upsells_enabled
boolean
required
Whether the products of this group are offered as checkout upsells.
is_active
boolean
required
Whether the product group is active. Stored and returned; it does not yet stop upgrades or upsells.
created_at
string<date-time>
required
Creation date of the product group.
Example:
"2023-01-01T00:00:00Z"
updated_at
string<date-time>
required
Last updated date of the product group.
Example:
"2023-01-01T00:00:00Z"
write_result
object
required
What this write did and should tell you.
Show child attributes
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Creem","colors":{"primary":"#FFBE98","light":"#FFBE98","dark":"#B09CFB"},"logo":{"light":"https://mintcdn.com/creem/-AIVGXbrCJu_8i70/logo/light.svg?fit=max\u0026auto=format\u0026n=-AIVGXbrCJu_8i70\u0026q=85\u0026s=686f06f43a3d7e4c0456e22de64c8bae","dark":"https://mintcdn.com/creem/-AIVGXbrCJu_8i70/logo/dark.svg?fit=max\u0026auto=format\u0026n=-AIVGXbrCJu_8i70\u0026q=85\u0026s=7c9135ca8b2365d6ec3728dc087f694d"},"favicon":"https://mintcdn.com/creem/-AIVGXbrCJu_8i70/favicon.svg?fit=max\u0026auto=format\u0026n=-AIVGXbrCJu_8i70\u0026q=85\u0026s=92df9cacbac6c8f17dbeb2d8b6befb93","navbar":{"links":[{"href":"https://creem.io/contact","label":"Support"},{"href":"https://docs.creem.io/llms.txt","label":"llms.txt"},{"href":"https://docs.creem.io/llms-full.txt","label":"llms-full.txt"}],"primary":{"type":"button","label":"Creem","href":"https://creem.io"}},"footer":{"socials":{"x":"https://x.com/creem_io","linkedin":"https://www.linkedin.com/company/creemio"}},"seo":{"metatags":{"twitter:site":"@creem_io","og:site_name":"Creem Documentation","keywords":"merchant of record, payment api, saas billing, subscription management, global payments, MoR, affiliate program, affiliate marketing, referral program"},"indexing":"all"},"integrations":{"posthog":{"apiKey":"phc_placeholder_gabriel_will_provide","apiHost":"https://us.posthog.com"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity"],"display":"header"},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Community","icon":"discord","href":"https://discord.gg/q3GKZs92Av"},{"anchor":"Blog","icon":"newspaper","href":"https://creem.io/blog"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"creem","hasAudioNarration":false,"actualSubdomain":"creem","customDomains":["docs.creem.io"],"gitSource":{"type":"github","owner":"armitage-labs","repo":"creem","deployBranch":"main","contentDirectory":"packages/docs","isPrivate":false,"mountPath":"","label":""},"entitlements":{},"buildId":"6b088b3491ec34b505a10a57","clientVersion":"0.0.4340","searchFilterCounts":[{"language":"default","tag":"Documentation","count":106},{"language":"default","tag":"API Reference","count":78},{"language":"default","tag":"Features","count":45},{"language":"default","tag":"Code","count":22},{"language":"default","tag":"Customer Credits","count":19},{"language":"default","tag":"SDKs","count":19},{"language":"default","tag":"Guides","count":18},{"language":"default","tag":"Get Started","count":12},{"language":"default","tag":"Meters","count":9},{"language":"default","tag":"AI","count":8}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[],"starterQuestions":[],"googleFontsInlined":false},"customCss":[{"filePath":"styles.css","content":"#topbar-cta-button{color:#000000}"}]}
{"page":{"pagePath":"api-reference/endpoint/create-product-group","slug":"/api-reference/endpoint/create-product-group","pageMetadata":{"title":"Create a product group","description":"Link products a customer can switch between. A product belongs to one group at a time: one in another group answers `409` with code `product_already_grouped`. An unknown product answers `400` with code `reference_not_found`. With an `external_id` the call is an upsert: it creates the group when the key is new (`201`) and updates the group that holds the key otherwise (`200`). Only the fields you send change, each with the meaning `PATCH /v1/product-groups/{id}` gives it; `products`, when sent, is the complete ordered member list. The request is compared with the stored group first, so a request that changes nothing answers `unchanged` and writes nothing, and retrying after a timeout is safe. The product group comes back with `write_result`. Send `If-None-Match: *` to create only.","openapi":"post /v1/product-groups","href":"/api-reference/endpoint/create-product-group"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_components.p, {\n children: [\"Link products a customer can switch between. A product belongs to one group at a time: one in another group answers \", _jsx(_components.code, {\n children: \"409\"\n }), \" with code \", _jsx(_components.code, {\n children: \"product_already_grouped\"\n }), \". An unknown product answers \", _jsx(_components.code, {\n children: \"400\"\n }), \" with code \", _jsx(_components.code, {\n children: \"reference_not_found\"\n }), \". With an \", _jsx(_components.code, {\n children: \"external_id\"\n }), \" the call is an upsert: it creates the group when the key is new (\", _jsx(_components.code, {\n children: \"201\"\n }), \") and updates the group that holds the key otherwise (\", _jsx(_components.code, {\n children: \"200\"\n }), \"). Only the fields you send change, each with the meaning \", _jsx(_components.code, {\n children: \"PATCH /v1/product-groups/{id}\"\n }), \" gives it; \", _jsx(_components.code, {\n children: \"products\"\n }), \", when sent, is the complete ordered member list. The request is compared with the stored group first, so a request that changes nothing answers \", _jsx(_components.code, {\n children: \"unchanged\"\n }), \" and writes nothing, and retrying after a timeout is safe. The product group comes back with \", _jsx(_components.code, {\n children: \"write_result\"\n }), \". Send \", _jsx(_components.code, {\n children: \"If-None-Match: *\"\n }), \" to create only.\"]\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}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create a product group","description":"Link products a customer can switch between. A product belongs to one group at a time: one in another group answers `409` with code `product_already_grouped`. An unknown product answers `400` with code `reference_not_found`. With an `external_id` the call is an upsert: it creates the group when the key is new (`201`) and updates the group that holds the key otherwise (`200`). Only the fields you send change, each with the meaning `PATCH /v1/product-groups/{id}` gives it; `products`, when sent, is the complete ordered member list. The request is compared with the stored group first, so a request that changes nothing answers `unchanged` and writes nothing, and retrying after a timeout is safe. The product group comes back with `write_result`. Send `If-None-Match: *` to create only.","openapi":"post /v1/product-groups","href":"/api-reference/endpoint/create-product-group"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/_mintlify/custom/creem/ff82c2fd59431fcd/scripts/generate-api-docs.js"],"openApiReferenceData":{"operation":{"operationId":"createProductGroup","x-speakeasy-name-override":"create","summary":"Create a product group","description":"Link products a customer can switch between. A product belongs to one group at a time: one in another group answers `409` with code `product_already_grouped`. An unknown product answers `400` with code `reference_not_found`. With an `external_id` the call is an upsert: it creates the group when the key is new (`201`) and updates the group that holds the key otherwise (`200`). Only the fields you send change, each with the meaning `PATCH /v1/product-groups/{id}` gives it; `products`, when sent, is the complete ordered member list. The request is compared with the stored group first, so a request that changes nothing answers `unchanged` and writes nothing, and retrying after a timeout is safe. The product group comes back with `write_result`. Send `If-None-Match: *` to create only.","parameters":["7d63703c-3fe4-4a29-854d-7802108d9810","48c237f4-a769-44b4-b92b-e562fa7a036c"],"requestBody":"18cbb53e-39f5-4daf-8662-b533f1ad2546","responses":{"200":"a1ffc0eb-c3ae-458e-ab64-76d206f86555","201":"6ff5d215-7d7b-44c0-8ba9-5d358a6e8bde","400":"a428002f-6e34-47cb-a2f3-a42e290ca9d1","401":"c9a800cd-f06a-4e94-8cf0-48078955dd28","404":"807e6123-a14d-424c-ab72-51e053f7449f","409":"ade93138-a65f-48a7-be35-97ddfde627a4","412":"fa4bfbe7-85e7-4575-a581-b633862aa24a","422":"57987b4b-133c-47e1-9574-107e3b81790f","503":"c0fd2068-68a2-4952-9aee-40db73eea37e"},"tags":["Product Groups"],"security":["9bc6b640-a688-46f9-9646-108317fea51c"],"method":"post","type":"path","servers":["31665feb-482b-4353-8ac5-f6916acb7a8f","6c07f73e-92c3-48a8-87dd-e830da7c99ad"],"path":"/v1/product-groups","baseUrlOptions":["https://api.creem.io","https://test-api.creem.io"],"title":"Create a product group","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"7d63703c-3fe4-4a29-854d-7802108d9810":{"name":"If-None-Match","required":false,"in":"header","description":"Send `*` to create only: when a product group of the store already has the `external_id`, the call answers `412` (`precondition_failed`) and writes nothing. Only `*` is accepted on a request with an `external_id` (any other value answers `400`); without one the header is ignored.","schema":{"type":"string","isRequired":false,"description":"Send `*` to create only: when a product group of the store already has the `external_id`, the call answers `412` (`precondition_failed`) and writes nothing. Only `*` is accepted on a request with an `external_id` (any other value answers `400`); without one the header is ignored.","uniqueKey":"","typeLabel":"string"}},"48c237f4-a769-44b4-b92b-e562fa7a036c":{"name":"dry_run","required":false,"in":"query","description":"Send `true` to preview the write: the request runs as it would and is rolled back, so nothing is written. The answer is the one the real call would give: the same status (`201` for a create) and errors, and the product group with `write_result.dry_run` `true`. The id of a product group a dry run would create is never stored: a `GET` of it answers `404`. A product `id` or `external_id` that names no product of the store is a `reference_not_found` warning (`path`, `key`) instead of a `400`: on a create that entry is left out of the answer, and on an update the stored members stay as they are. `false` or no parameter is a real call; any other value answers `400`.","schema":{"type":"boolean","isRequired":false,"description":"Send `true` to preview the write: the request runs as it would and is rolled back, so nothing is written. The answer is the one the real call would give: the same status (`201` for a create) and errors, and the product group with `write_result.dry_run` `true`. The id of a product group a dry run would create is never stored: a `GET` of it answers `404`. A product `id` or `external_id` that names no product of the store is a `reference_not_found` warning (`path`, `key`) instead of a `400`: on a create that entry is left out of the answer, and on an update the stored members stay as they are. `false` or no parameter is a real call; any other value answers `400`.","uniqueKey":"","typeLabel":"boolean"}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The name of the product group, 3 to 255 characters. Required when creating a product group. On an existing group (by `external_id`) a different name renames it.","uniqueKey":"name","typeLabel":"string"},"description":{"oneOf":[{"type":"string","description":"A description of the product group. On an existing group (by `external_id`), send `null` to clear it.","uniqueKey":"description.oneOf.0","typeLabel":"string"},{"type":"null","description":"A description of the product group. On an existing group (by `external_id`), send `null` to clear it.","uniqueKey":"description.oneOf.1","typeLabel":"null"}],"uniqueKey":"description","typeLabel":"string | null"},"external_id":{"type":"string","description":"Your own key for this product group. Unique per store, case-sensitive; 1 to 255 characters: letters, digits, `_`, `-`, `.` and `:`. With a key the call is an upsert: it creates the group when the key is new (`201`) and updates the group that holds it otherwise (`200`). Send `If-None-Match: *` to create only.","example":"pro-plans","uniqueKey":"external_id","typeLabel":"string"},"products":{"type":"array","description":"The products of the group, in display order, each named by exactly one of `id` or `external_id`. Required when creating a product group, with at least one product. On an existing group (by `external_id`) it is the complete ordered member list: products it does not contain are removed, its order is the display order, and `[]` removes every member; omit it to leave the members unchanged. A product already in another group answers `409` with code `product_already_grouped`.","items":{"oneOf":[{"type":"object","required":["id"],"properties":{"id":{"type":"string","description":"The product ID.","example":"prod_4dGTkmBdnTnU9vV3KZ2Hcz","isRequired":true,"uniqueKey":"products.items.[INDEX].oneOf.0.id","typeLabel":"string"}},"uniqueKey":"products.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","required":["external_id"],"properties":{"external_id":{"type":"string","description":"The product's `external_id`.","example":"pro-monthly","isRequired":true,"uniqueKey":"products.items.[INDEX].oneOf.1.external_id","typeLabel":"string"}},"uniqueKey":"products.items.[INDEX].oneOf.1","typeLabel":"object"}],"uniqueKey":"products.items.[INDEX]","typeLabel":"object"},"maxItems":100,"uniqueKey":"products","typeLabel":"object[]"},"upgrades_enabled":{"type":"boolean","description":"Whether customers can switch between the products of this group. Defaults to `true` on a create.","uniqueKey":"upgrades_enabled","typeLabel":"boolean"},"upgrade_behavior":{"oneOf":[{"type":"string","description":"How a switch between the products of this group is billed. On an existing group (by `external_id`), send `null` to clear it.","enum":["proration-charge-immediately","proration-charge","proration-none"],"uniqueKey":"upgrade_behavior.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","description":"How a switch between the products of this group is billed. On an existing group (by `external_id`), send `null` to clear it.","enum":["proration-charge-immediately","proration-charge","proration-none"],"uniqueKey":"upgrade_behavior.oneOf.1","typeLabel":"null"}],"uniqueKey":"upgrade_behavior","typeLabel":"enum\u003cstring> | null"},"upsells_enabled":{"type":"boolean","description":"Whether the products of this group are offered as checkout upsells. Defaults to `true` on a create.","uniqueKey":"upsells_enabled","typeLabel":"boolean"},"is_active":{"type":"boolean","description":"Whether the product group is active. Stored and returned; it does not yet stop upgrades or upsells. Defaults to `true` on a create.","uniqueKey":"is_active","typeLabel":"boolean"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"name":"\u003cstring>","description":"\u003cstring>","external_id":"pro-plans","products":[{"id":"prod_4dGTkmBdnTnU9vV3KZ2Hcz"}],"upgrades_enabled":true,"upsells_enabled":true,"is_active":true}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"a1ffc0eb-c3ae-458e-ab64-76d206f86555":{"description":"Only with an `external_id`: a product group of the store already had the key, and it was updated (`write_result.result` `updated`) or already matched the request (`unchanged`).","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the object.","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"mode":{"type":"string","description":"String representing the environment.","enum":["test","prod","sandbox"],"isRequired":true,"uniqueKey":"mode","typeLabel":"enum\u003cstring>"},"object":{"type":"string","description":"String representing the object's type. Objects of the same type share the same value.","example":"product_group","isRequired":true,"uniqueKey":"object","typeLabel":"string"},"name":{"type":"string","description":"The name of the product group.","isRequired":true,"uniqueKey":"name","typeLabel":"string"},"description":{"oneOf":[{"type":"string","description":"A description of the product group.","isRequired":true,"uniqueKey":"description.oneOf.0","typeLabel":"string"},{"type":"null","description":"A description of the product group.","isRequired":true,"uniqueKey":"description.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"description","typeLabel":"string | null"},"external_id":{"oneOf":[{"type":"string","description":"Your own key for this product group, or `null` when it has none.","isRequired":true,"uniqueKey":"external_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Your own key for this product group, or `null` when it has none.","isRequired":true,"uniqueKey":"external_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"external_id","typeLabel":"string | null"},"products":{"description":"The products in the group, in display order. A product is in one group at a time.","type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The id of the product.","isRequired":true,"uniqueKey":"products.items.[INDEX].id","typeLabel":"string"},"external_id":{"oneOf":[{"type":"string","description":"Your own key for the product, or `null` when it has none.","isRequired":true,"uniqueKey":"products.items.[INDEX].external_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Your own key for the product, or `null` when it has none.","isRequired":true,"uniqueKey":"products.items.[INDEX].external_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"products.items.[INDEX].external_id","typeLabel":"string | null"}},"required":["id","external_id"],"uniqueKey":"products.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"products","typeLabel":"object[]"},"upgrades_enabled":{"type":"boolean","description":"Whether customers can switch between the products of this group.","isRequired":true,"uniqueKey":"upgrades_enabled","typeLabel":"boolean"},"upgrade_behavior":{"oneOf":[{"type":"string","description":"How a switch between the products is billed, or `null` for the default.","enum":["proration-charge-immediately","proration-charge","proration-none"],"isRequired":true,"uniqueKey":"upgrade_behavior.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","description":"How a switch between the products is billed, or `null` for the default.","enum":["proration-charge-immediately","proration-charge","proration-none"],"isRequired":true,"uniqueKey":"upgrade_behavior.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"upgrade_behavior","typeLabel":"enum\u003cstring> | null"},"upsells_enabled":{"type":"boolean","description":"Whether the products of this group are offered as checkout upsells.","isRequired":true,"uniqueKey":"upsells_enabled","typeLabel":"boolean"},"is_active":{"type":"boolean","description":"Whether the product group is active. Stored and returned; it does not yet stop upgrades or upsells.","isRequired":true,"uniqueKey":"is_active","typeLabel":"boolean"},"created_at":{"format":"date-time","type":"string","description":"Creation date of the product group.","example":"2023-01-01T00:00:00Z","isRequired":true,"uniqueKey":"created_at","typeLabel":"string\u003cdate-time>"},"updated_at":{"format":"date-time","type":"string","description":"Last updated date of the product group.","example":"2023-01-01T00:00:00Z","isRequired":true,"uniqueKey":"updated_at","typeLabel":"string\u003cdate-time>"},"write_result":{"type":"object","description":"What this write did and should tell you.","required":["result","dry_run","changes","warnings"],"properties":{"result":{"type":"string","description":"What the write did. Known values: `created`, `updated`, `unchanged` (the product group already was what the request asked for; nothing was written). More values can be added, so treat a value you do not know like `updated`.","example":"updated","isRequired":true,"uniqueKey":"write_result.result","typeLabel":"string"},"dry_run":{"type":"boolean","description":"`true` when the request was sent with `dry_run=true`: nothing was written, and the id of a product group the write would have created is never stored. `false` on a real write. Stop unless it is `true` when you meant a dry run.","example":false,"isRequired":true,"uniqueKey":"write_result.dry_run","typeLabel":"boolean"},"changes":{"description":"What changed, field by field. Empty on a create and on `unchanged`.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The field that changed, by its request name: `name`, `description`, `is_active`, `upgrades_enabled`, `upsells_enabled`, `upgrade_behavior`, `external_id` or `products`. A member change is one `products` entry whose `from` and `to` are the ordered lists of product ids, because the order is part of the value.","example":"products","isRequired":true,"uniqueKey":"write_result.changes.items.[INDEX].path","typeLabel":"string"},"from":{"oneOf":[{"type":"string","description":"The value before the write: the field as a read returns it; for `products`, the ordered product ids.","example":["prod_monthly","prod_yearly"],"isRequired":true,"uniqueKey":"write_result.changes.items.[INDEX].from.oneOf.0","typeLabel":"string"},{"type":"number","description":"The value before the write: the field as a read returns it; for `products`, the ordered product ids.","example":["prod_monthly","prod_yearly"],"isRequired":true,"uniqueKey":"write_result.changes.items.[INDEX].from.oneOf.1","typeLabel":"number"},{"type":"boolean","description":"The value before the write: the field as a read returns it; for `products`, the ordered product ids.","example":["prod_monthly","prod_yearly"],"isRequired":true,"uniqueKey":"write_result.changes.items.[INDEX].from.oneOf.2","typeLabel":"boolean"},{"type":"array","items":{"oneOf":[{}],"uniqueKey":"write_result.changes.items.[INDEX].from.oneOf.3.items.[INDEX]","typeLabel":"any"},"description":"The value before the write: the field as a read returns it; for `products`, the ordered product ids.","example":["prod_monthly","prod_yearly"],"isRequired":true,"uniqueKey":"write_result.changes.items.[INDEX].from.oneOf.3","typeLabel":"any[]"},{"type":"object","description":"The value before the write: the field as a read returns it; for `products`, the ordered product ids.","example":["prod_monthly","prod_yearly"],"additionalProperties":true,"isRequired":true,"uniqueKey":"write_result.changes.items.[INDEX].from.oneOf.4","typeLabel":"object"},{"type":"null","isRequired":true,"uniqueKey":"write_result.changes.items.[INDEX].from.oneOf.5","typeLabel":"null"}],"isRequired":true,"uniqueKey":"write_result.changes.items.[INDEX].from","typeLabel":"string | number | boolean | any[] | object | null"},"to":{"oneOf":[{"type":"string","description":"The value after the write: the field as a read returns it; for `products`, the ordered product ids.","example":["prod_yearly","prod_monthly"],"isRequired":true,"uniqueKey":"write_result.changes.items.[INDEX].to.oneOf.0","typeLabel":"string"},{"type":"number","description":"The value after the write: the field as a read returns it; for `products`, the ordered product ids.","example":["prod_yearly","prod_monthly"],"isRequired":true,"uniqueKey":"write_result.changes.items.[INDEX].to.oneOf.1","typeLabel":"number"},{"type":"boolean","description":"The value after the write: the field as a read returns it; for `products`, the ordered product ids.","example":["prod_yearly","prod_monthly"],"isRequired":true,"uniqueKey":"write_result.changes.items.[INDEX].to.oneOf.2","typeLabel":"boolean"},{"type":"array","items":{"oneOf":[{}],"uniqueKey":"write_result.changes.items.[INDEX].to.oneOf.3.items.[INDEX]","typeLabel":"any"},"description":"The value after the write: the field as a read returns it; for `products`, the ordered product ids.","example":["prod_yearly","prod_monthly"],"isRequired":true,"uniqueKey":"write_result.changes.items.[INDEX].to.oneOf.3","typeLabel":"any[]"},{"type":"object","description":"The value after the write: the field as a read returns it; for `products`, the ordered product ids.","example":["prod_yearly","prod_monthly"],"additionalProperties":true,"isRequired":true,"uniqueKey":"write_result.changes.items.[INDEX].to.oneOf.4","typeLabel":"object"},{"type":"null","isRequired":true,"uniqueKey":"write_result.changes.items.[INDEX].to.oneOf.5","typeLabel":"null"}],"isRequired":true,"uniqueKey":"write_result.changes.items.[INDEX].to","typeLabel":"string | number | boolean | any[] | object | null"}},"required":["path","from","to"],"uniqueKey":"write_result.changes.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"write_result.changes","typeLabel":"object[]"},"warnings":{"description":"Things to know about this write. The write went through. Empty when there is nothing to report.","type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"What the warning is about. Known values: `reference_not_found` (a dry run only: the product key or id in `key`, sent in `path`, names no product of the store; the real call answers `400` `reference_not_found`. On a create the entry is left out of the group the dry run returns; on an update the stored members stay as they are). More values can be added, so ignore a code you do not know.","example":"reference_not_found","isRequired":true,"uniqueKey":"write_result.warnings.items.[INDEX].code","typeLabel":"string"},"path":{"type":"string","description":"The entry the warning is about, for example `products[1].external_id`.","isRequired":true,"uniqueKey":"write_result.warnings.items.[INDEX].path","typeLabel":"string"},"key":{"type":"string","description":"The key the warning is about. On `reference_not_found`, the id or key that names nothing.","uniqueKey":"write_result.warnings.items.[INDEX].key","typeLabel":"string"}},"required":["code","path"],"uniqueKey":"write_result.warnings.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"write_result.warnings","typeLabel":"object[]"}},"isRequired":true,"uniqueKey":"write_result","typeLabel":"object"}},"required":["id","mode","object","name","description","external_id","products","upgrades_enabled","upgrade_behavior","upsells_enabled","is_active","created_at","updated_at","write_result"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":"\u003cstring>","mode":"test","object":"product_group","name":"\u003cstring>","description":"\u003cstring>","external_id":"\u003cstring>","products":[{"id":"\u003cstring>","external_id":"\u003cstring>"}],"upgrades_enabled":true,"upgrade_behavior":"proration-charge-immediately","upsells_enabled":true,"is_active":true,"created_at":"2023-01-01T00:00:00Z","updated_at":"2023-01-01T00:00:00Z","write_result":{"result":"updated","dry_run":false,"changes":[{"path":"products","from":["prod_monthly","prod_yearly"],"to":["prod_yearly","prod_monthly"]}],"warnings":[{"code":"reference_not_found","path":"\u003cstring>","key":"\u003cstring>"}]}}}},"exampleType":"generated"}},"exampleType":"generated"},"6ff5d215-7d7b-44c0-8ba9-5d358a6e8bde":{"description":"The created product group (also by a dry run, which stores nothing)","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the object.","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"mode":{"type":"string","description":"String representing the environment.","enum":["test","prod","sandbox"],"isRequired":true,"uniqueKey":"mode","typeLabel":"enum\u003cstring>"},"object":{"type":"string","description":"String representing the object's type. Objects of the same type share the same value.","example":"product_group","isRequired":true,"uniqueKey":"object","typeLabel":"string"},"name":{"type":"string","description":"The name of the product group.","isRequired":true,"uniqueKey":"name","typeLabel":"string"},"description":{"oneOf":[{"type":"string","description":"A description of the product group.","isRequired":true,"uniqueKey":"description.oneOf.0","typeLabel":"string"},{"type":"null","description":"A description of the product group.","isRequired":true,"uniqueKey":"description.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"description","typeLabel":"string | null"},"external_id":{"oneOf":[{"type":"string","description":"Your own key for this product group, or `null` when it has none.","isRequired":true,"uniqueKey":"external_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Your own key for this product group, or `null` when it has none.","isRequired":true,"uniqueKey":"external_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"external_id","typeLabel":"string | null"},"products":{"description":"The products in the group, in display order. A product is in one group at a time.","type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The id of the product.","isRequired":true,"uniqueKey":"products.items.[INDEX].id","typeLabel":"string"},"external_id":{"oneOf":[{"type":"string","description":"Your own key for the product, or `null` when it has none.","isRequired":true,"uniqueKey":"products.items.[INDEX].external_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Your own key for the product, or `null` when it has none.","isRequired":true,"uniqueKey":"products.items.[INDEX].external_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"products.items.[INDEX].external_id","typeLabel":"string | null"}},"required":["id","external_id"],"uniqueKey":"products.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"products","typeLabel":"object[]"},"upgrades_enabled":{"type":"boolean","description":"Whether customers can switch between the products of this group.","isRequired":true,"uniqueKey":"upgrades_enabled","typeLabel":"boolean"},"upgrade_behavior":{"oneOf":[{"type":"string","description":"How a switch between the products is billed, or `null` for the default.","enum":["proration-charge-immediately","proration-charge","proration-none"],"isRequired":true,"uniqueKey":"upgrade_behavior.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","description":"How a switch between the products is billed, or `null` for the default.","enum":["proration-charge-immediately","proration-charge","proration-none"],"isRequired":true,"uniqueKey":"upgrade_behavior.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"upgrade_behavior","typeLabel":"enum\u003cstring> | null"},"upsells_enabled":{"type":"boolean","description":"Whether the products of this group are offered as checkout upsells.","isRequired":true,"uniqueKey":"upsells_enabled","typeLabel":"boolean"},"is_active":{"type":"boolean","description":"Whether the product group is active. Stored and returned; it does not yet stop upgrades or upsells.","isRequired":true,"uniqueKey":"is_active","typeLabel":"boolean"},"created_at":{"format":"date-time","type":"string","description":"Creation date of the product group.","example":"2023-01-01T00:00:00Z","isRequired":true,"uniqueKey":"created_at","typeLabel":"string\u003cdate-time>"},"updated_at":{"format":"date-time","type":"string","description":"Last updated date of the product group.","example":"2023-01-01T00:00:00Z","isRequired":true,"uniqueKey":"updated_at","typeLabel":"string\u003cdate-time>"},"write_result":{"type":"object","description":"What this write did and should tell you.","required":["result","dry_run","changes","warnings"],"properties":{"result":{"type":"string","description":"What the write did. Known values: `created`, `updated`, `unchanged` (the product group already was what the request asked for; nothing was written). More values can be added, so treat a value you do not know like `updated`.","example":"updated","isRequired":true,"uniqueKey":"write_result.result","typeLabel":"string"},"dry_run":{"type":"boolean","description":"`true` when the request was sent with `dry_run=true`: nothing was written, and the id of a product group the write would have created is never stored. `false` on a real write. Stop unless it is `true` when you meant a dry run.","example":false,"isRequired":true,"uniqueKey":"write_result.dry_run","typeLabel":"boolean"},"changes":{"description":"What changed, field by field. Empty on a create and on `unchanged`.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The field that changed, by its request name: `name`, `description`, `is_active`, `upgrades_enabled`, `upsells_enabled`, `upgrade_behavior`, `external_id` or `products`. A member change is one `products` entry whose `from` and `to` are the ordered lists of product ids, because the order is part of the value.","example":"products","isRequired":true,"uniqueKey":"write_result.changes.items.[INDEX].path","typeLabel":"string"},"from":{"oneOf":[{"type":"string","description":"The value before the write: the field as a read returns it; for `products`, the ordered product ids.","example":["prod_monthly","prod_yearly"],"isRequired":true,"uniqueKey":"write_result.changes.items.[INDEX].from.oneOf.0","typeLabel":"string"},{"type":"number","description":"The value before the write: the field as a read returns it; for `products`, the ordered product ids.","example":["prod_monthly","prod_yearly"],"isRequired":true,"uniqueKey":"write_result.changes.items.[INDEX].from.oneOf.1","typeLabel":"number"},{"type":"boolean","description":"The value before the write: the field as a read returns it; for `products`, the ordered product ids.","example":["prod_monthly","prod_yearly"],"isRequired":true,"uniqueKey":"write_result.changes.items.[INDEX].from.oneOf.2","typeLabel":"boolean"},{"type":"array","items":{"oneOf":[{}],"uniqueKey":"write_result.changes.items.[INDEX].from.oneOf.3.items.[INDEX]","typeLabel":"any"},"description":"The value before the write: the field as a read returns it; for `products`, the ordered product ids.","example":["prod_monthly","prod_yearly"],"isRequired":true,"uniqueKey":"write_result.changes.items.[INDEX].from.oneOf.3","typeLabel":"any[]"},{"type":"object","description":"The value before the write: the field as a read returns it; for `products`, the ordered product ids.","example":["prod_monthly","prod_yearly"],"additionalProperties":true,"isRequired":true,"uniqueKey":"write_result.changes.items.[INDEX].from.oneOf.4","typeLabel":"object"},{"type":"null","isRequired":true,"uniqueKey":"write_result.changes.items.[INDEX].from.oneOf.5","typeLabel":"null"}],"isRequired":true,"uniqueKey":"write_result.changes.items.[INDEX].from","typeLabel":"string | number | boolean | any[] | object | null"},"to":{"oneOf":[{"type":"string","description":"The value after the write: the field as a read returns it; for `products`, the ordered product ids.","example":["prod_yearly","prod_monthly"],"isRequired":true,"uniqueKey":"write_result.changes.items.[INDEX].to.oneOf.0","typeLabel":"string"},{"type":"number","description":"The value after the write: the field as a read returns it; for `products`, the ordered product ids.","example":["prod_yearly","prod_monthly"],"isRequired":true,"uniqueKey":"write_result.changes.items.[INDEX].to.oneOf.1","typeLabel":"number"},{"type":"boolean","description":"The value after the write: the field as a read returns it; for `products`, the ordered product ids.","example":["prod_yearly","prod_monthly"],"isRequired":true,"uniqueKey":"write_result.changes.items.[INDEX].to.oneOf.2","typeLabel":"boolean"},{"type":"array","items":{"oneOf":[{}],"uniqueKey":"write_result.changes.items.[INDEX].to.oneOf.3.items.[INDEX]","typeLabel":"any"},"description":"The value after the write: the field as a read returns it; for `products`, the ordered product ids.","example":["prod_yearly","prod_monthly"],"isRequired":true,"uniqueKey":"write_result.changes.items.[INDEX].to.oneOf.3","typeLabel":"any[]"},{"type":"object","description":"The value after the write: the field as a read returns it; for `products`, the ordered product ids.","example":["prod_yearly","prod_monthly"],"additionalProperties":true,"isRequired":true,"uniqueKey":"write_result.changes.items.[INDEX].to.oneOf.4","typeLabel":"object"},{"type":"null","isRequired":true,"uniqueKey":"write_result.changes.items.[INDEX].to.oneOf.5","typeLabel":"null"}],"isRequired":true,"uniqueKey":"write_result.changes.items.[INDEX].to","typeLabel":"string | number | boolean | any[] | object | null"}},"required":["path","from","to"],"uniqueKey":"write_result.changes.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"write_result.changes","typeLabel":"object[]"},"warnings":{"description":"Things to know about this write. The write went through. Empty when there is nothing to report.","type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"What the warning is about. Known values: `reference_not_found` (a dry run only: the product key or id in `key`, sent in `path`, names no product of the store; the real call answers `400` `reference_not_found`. On a create the entry is left out of the group the dry run returns; on an update the stored members stay as they are). More values can be added, so ignore a code you do not know.","example":"reference_not_found","isRequired":true,"uniqueKey":"write_result.warnings.items.[INDEX].code","typeLabel":"string"},"path":{"type":"string","description":"The entry the warning is about, for example `products[1].external_id`.","isRequired":true,"uniqueKey":"write_result.warnings.items.[INDEX].path","typeLabel":"string"},"key":{"type":"string","description":"The key the warning is about. On `reference_not_found`, the id or key that names nothing.","uniqueKey":"write_result.warnings.items.[INDEX].key","typeLabel":"string"}},"required":["code","path"],"uniqueKey":"write_result.warnings.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"write_result.warnings","typeLabel":"object[]"}},"isRequired":true,"uniqueKey":"write_result","typeLabel":"object"}},"required":["id","mode","object","name","description","external_id","products","upgrades_enabled","upgrade_behavior","upsells_enabled","is_active","created_at","updated_at","write_result"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":"\u003cstring>","mode":"test","object":"product_group","name":"\u003cstring>","description":"\u003cstring>","external_id":"\u003cstring>","products":[{"id":"\u003cstring>","external_id":"\u003cstring>"}],"upgrades_enabled":true,"upgrade_behavior":"proration-charge-immediately","upsells_enabled":true,"is_active":true,"created_at":"2023-01-01T00:00:00Z","updated_at":"2023-01-01T00:00:00Z","write_result":{"result":"updated","dry_run":false,"changes":[{"path":"products","from":["prod_monthly","prod_yearly"],"to":["prod_yearly","prod_monthly"]}],"warnings":[{"code":"reference_not_found","path":"\u003cstring>","key":"\u003cstring>"}]}}}},"exampleType":"generated"}},"exampleType":"generated"},"a428002f-6e34-47cb-a2f3-a42e290ca9d1":{"description":"Bad Request - Invalid input parameters","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"c9a800cd-f06a-4e94-8cf0-48078955dd28":{"description":"Unauthorized - Invalid or missing API key","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"807e6123-a14d-424c-ab72-51e053f7449f":{"description":"Not Found - Resource does not exist","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"ade93138-a65f-48a7-be35-97ddfde627a4":{"description":"A product is already in another group (`product_already_grouped`). A key a group of the store holds is an update, not a conflict","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"fa4bfbe7-85e7-4575-a581-b633862aa24a":{"description":"Precondition failed (code `precondition_failed`): `If-None-Match: *` was sent and a product group of the store already has this `external_id`. `details.product_group_id` names it. Nothing is written.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"57987b4b-133c-47e1-9574-107e3b81790f":{"description":"A product of the group grants AI generation credits (`generation_credits_bundle_unavailable`). Nothing is changed.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"c0fd2068-68a2-4952-9aee-40db73eea37e":{"description":"Another request is changing this store's product groups (`product_groups_busy`); retry after `Retry-After`","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}}},"security":{"9bc6b640-a688-46f9-9646-108317fea51c":{"ApiKey":{"type":"apiKey","in":"header","name":"x-api-key","description":"API key for authentication. You can find your API key in the Creem dashboard under Settings > API Keys.","scopes":[],"schemeName":"ApiKey"}}},"servers":{"31665feb-482b-4353-8ac5-f6916acb7a8f":{"url":"https://api.creem.io","description":"Production — live API for processing real transactions and data.","x-speakeasy-server-id":"prod"},"6c07f73e-92c3-48a8-87dd-e830da7c99ad":{"url":"https://test-api.creem.io","description":"Test — sandbox API for development and testing with no real charges.","x-speakeasy-server-id":"test"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"x-api-key","description":"API key for authentication. You can find your API key in the Creem dashboard under Settings > API Keys.","scopes":[],"schemeName":"ApiKey"},"schema":{"title":"x-api-key","type":"string","description":"API key for authentication. You can find your API key in the Creem dashboard under Settings > API Keys.","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"ApiKey","name":"x-api-key"}],"title":"ApiKey"}]},"originalFileLocation":"api-reference/openapi.json"},"subdomain":"creem","siteName":"Creem","title":"Create a product group - Creem","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-26T18:21:07.748Z","originalFileLocation":"api-reference/endpoint/create-product-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=\"Link products a customer can switch between. A product belongs to one group at a time: one in another group answers 409 with code product_already_grouped. An unknown product answers 400 with code reference_not_found. With an external_id the call is an upsert: it creates the group when the key is new (201) and updates the group that holds the key otherwise (200). Only the fields you send change, each with the meaning PATCH /v1/product-groups/{id} gives it; products, when sent, is the complete ordered member list. The request is compared with the stored group first, so a request that changes nothing answers unchanged and writes nothing, and retrying after a timeout is safe. The product group comes back with write_result. Send If-None-Match: * to create only.\">\u003cmeta data-mint-head name=\"keywords\" content=\"merchant of record, payment api, saas billing, subscription management, global payments, MoR, affiliate program, affiliate marketing, referral program\">\u003cmeta data-mint-head name=\"application-name\" content=\"Creem\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/creem/nizlPYWnvgrMkN5E/_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/creem/nizlPYWnvgrMkN5E/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/creem/nizlPYWnvgrMkN5E/_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/creem/nizlPYWnvgrMkN5E/_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/creem/nizlPYWnvgrMkN5E/_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/creem/nizlPYWnvgrMkN5E/_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/creem/nizlPYWnvgrMkN5E/_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/creem/nizlPYWnvgrMkN5E/_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/creem/nizlPYWnvgrMkN5E/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create a product group - Creem\">\u003cmeta data-mint-head property=\"og:description\" content=\"Link products a customer can switch between. A product belongs to one group at a time: one in another group answers 409 with code product_already_grouped. An unknown product answers 400 with code reference_not_found. With an external_id the call is an upsert: it creates the group when the key is new (201) and updates the group that holds the key otherwise (200). Only the fields you send change, each with the meaning PATCH /v1/product-groups/{id} gives it; products, when sent, is the complete ordered member list. The request is compared with the stored group first, so a request that changes nothing answers unchanged and writes nothing, and retrying after a timeout is safe. The product group comes back with write_result. Send If-None-Match: * to create only.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Creem Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.creem.io/api-reference/endpoint/create-product-group\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://creem.mintlify.site/_mintlify/api/og/v2?division=Product+Groups\u0026amp;title=Create+a+product+group\u0026amp;description=Link+products+a+customer+can+switch+between.+A+product+belongs+to+one+group+at+a+time%3A+one+in+another+group+answers+%60409%60+with+code+%60product_already_grouped%60.+A\u0026amp;theme=19d74014ebb4a0780d75c372\u0026amp;signature=f36514c3bede71ef5cd104f892671c98e7bd3aaf0e853e6477c4148c883359f9\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create a product group - Creem\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Link products a customer can switch between. A product belongs to one group at a time: one in another group answers 409 with code product_already_grouped. An unknown product answers 400 with code reference_not_found. With an external_id the call is an upsert: it creates the group when the key is new (201) and updates the group that holds the key otherwise (200). Only the fields you send change, each with the meaning PATCH /v1/product-groups/{id} gives it; products, when sent, is the complete ordered member list. The request is compared with the stored group first, so a request that changes nothing answers unchanged and writes nothing, and retrying after a timeout is safe. The product group comes back with write_result. Send If-None-Match: * to create only.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://creem.mintlify.site/_mintlify/api/og/v2?division=Product+Groups\u0026amp;title=Create+a+product+group\u0026amp;description=Link+products+a+customer+can+switch+between.+A+product+belongs+to+one+group+at+a+time%3A+one+in+another+group+answers+%60409%60+with+code+%60product_already_grouped%60.+A\u0026amp;theme=19d74014ebb4a0780d75c372\u0026amp;signature=f36514c3bede71ef5cd104f892671c98e7bd3aaf0e853e6477c4148c883359f9\">\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/creem/nizlPYWnvgrMkN5E/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Creem\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#FFBE98\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.creem.io/api-reference/endpoint/create-product-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/endpoint/create-product-group.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.creem.io/#organization\",\"name\":\"Creem\",\"url\":\"https://docs.creem.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/creem/-AIVGXbrCJu_8i70/logo/light.svg?fit=max\u0026auto=format\u0026n=-AIVGXbrCJu_8i70\u0026q=85\u0026s=686f06f43a3d7e4c0456e22de64c8bae\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.creem.io#website\",\"name\":\"Creem\",\"url\":\"https://docs.creem.io\",\"publisher\":{\"@id\":\"https://docs.creem.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.creem.io/api-reference/endpoint/create-product-group#webpage\",\"url\":\"https://docs.creem.io/api-reference/endpoint/create-product-group\",\"name\":\"Create a product group\",\"description\":\"Link products a customer can switch between. A product belongs to one group at a time: one in another group answers 409 with code product_already_grouped. An unknown product answers 400 with code reference_not_found. With an external_id the call is an upsert: it creates the group when the key is new (201) and updates the group that holds the key otherwise (200). Only the fields you send change, each with the meaning PATCH /v1/product-groups/{id} gives it; products, when sent, is the complete ordered member list. The request is compared with the stored group first, so a request that changes nothing answers unchanged and writes nothing, and retrying after a timeout is safe. The product group comes back with write_result. Send If-None-Match: * to create only.\",\"dateModified\":\"2026-11-26T18:21:07.748Z\",\"isPartOf\":{\"@id\":\"https://docs.creem.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.creem.io/api-reference/endpoint/create-product-group#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.creem.io/api-reference/endpoint/create-product-group#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Creem\",\"item\":\"https://docs.creem.io\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create a product group\",\"item\":\"https://docs.creem.io/api-reference/endpoint/create-product-group\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.creem.io/api-reference/endpoint/create-product-group#apireference\",\"headline\":\"Create a product group\",\"name\":\"Create a product group\",\"description\":\"Link products a customer can switch between. A product belongs to one group at a time: one in another group answers 409 with code product_already_grouped. An unknown product answers 400 with code reference_not_found. With an external_id the call is an upsert: it creates the group when the key is new (201) and updates the group that holds the key otherwise (200). Only the fields you send change, each with the meaning PATCH /v1/product-groups/{id} gives it; products, when sent, is the complete ordered member list. The request is compared with the stored group first, so a request that changes nothing answers unchanged and writes nothing, and retrying after a timeout is safe. The product group comes back with write_result. Send If-None-Match: * to create only.\",\"url\":\"https://docs.creem.io/api-reference/endpoint/create-product-group\",\"mainEntityOfPage\":{\"@id\":\"https://docs.creem.io/api-reference/endpoint/create-product-group#webpage\"},\"dateModified\":\"2026-11-26T18:21:07.748Z\",\"publisher\":{\"@id\":\"https://docs.creem.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.creem.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Creem\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Creem\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/endpoint/create-product-group.md","siteName":"Creem","nav":{"global":{"anchors":[{"anchor":"Community","icon":"discord","href":"https://discord.gg/q3GKZs92Av"},{"anchor":"Blog","icon":"newspaper","href":"https://creem.io/blog"}]},"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":""}]},{"tab":"Guides","pages":[{"title":"Guides","href":"/guides/introduction"}]},{"tab":"API Reference","groups":[{"group":"API Documentation","icon":"book","pages":[{"title":"Introduction","href":"/api-reference/introduction"},{"title":"Error Handling","href":"/api-reference/error-codes"}]},{"group":"Checkout","icon":"shopping-cart","pages":[{"title":"Creates a new checkout session","openapi":"post /v1/checkouts","href":"/api-reference/endpoint/create-checkout"},{"title":"Retrieve a checkout session","openapi":"get /v1/checkouts","href":"/api-reference/endpoint/get-checkout"}]},{"group":"Product","icon":"box","pages":[{"title":"Creates a product, or updates the one with the same external_id","openapi":"post /v1/products","href":"/api-reference/endpoint/create-product"},{"title":"Get a product by ID","openapi":"get /v1/products/{id}","href":"/api-reference/endpoint/get-product"},{"title":"List all products","openapi":"get /v1/products/search","href":"/api-reference/endpoint/search-products"},{"title":"Update a product","openapi":"patch /v1/products/{id}","href":"/api-reference/endpoint/update-product"},{"title":"Archive a product","openapi":"delete /v1/products/{id}","href":"/api-reference/endpoint/archive-product"},{"title":"List the price versions of a product","description":"List every price version of a product, newest first, with how many running subscriptions sit on each. A price change creates a new version; running subscriptions stay on the version they bought. Archived products can be read too.","openapi":"get /v1/products/{id}/prices","href":"/api-reference/endpoint/list-product-prices"}]},{"group":"Product Groups","icon":"layer-group","pages":[{"title":"Create a product group","openapi":"post /v1/product-groups","href":"/api-reference/endpoint/create-product-group"},{"title":"List product groups","description":"List your product groups, newest first, as a cursor page. Filter by your own `external_id`.","openapi":"get /v1/product-groups","href":"/api-reference/endpoint/list-product-groups"},{"title":"Retrieve a product group","openapi":"get /v1/product-groups/{id}","href":"/api-reference/endpoint/get-product-group"},{"title":"Update a product group","openapi":"patch /v1/product-groups/{id}","href":"/api-reference/endpoint/update-product-group"},{"title":"Delete a product group","openapi":"delete /v1/product-groups/{id}","href":"/api-reference/endpoint/delete-product-group"},{"title":"Add a product to a product group","openapi":"post /v1/product-groups/{id}/products","href":"/api-reference/endpoint/add-product-to-product-group"},{"title":"Remove a product from a product group","openapi":"delete /v1/product-groups/{id}/products/{product_id}","href":"/api-reference/endpoint/remove-product-from-product-group"}]},{"group":"Catalog","icon":"list-check","pages":[{"title":"Validate a batch of catalog writes together, without writing anything","openapi":"post /v1/catalog/validate","href":"/api-reference/endpoint/validate-catalog"},{"title":"Promote the test catalog to live (meters and products)","openapi":"post /v1/catalog/promote","href":"/api-reference/endpoint/promote-catalog"}]},{"group":"Files","icon":"file","pages":[{"title":"Upload a file","openapi":"post /v1/files","href":"/api-reference/endpoint/create-file-upload"},{"title":"Confirm an uploaded file","openapi":"post /v1/files/{id}/confirm","href":"/api-reference/endpoint/confirm-file-upload"}]},{"group":"Customer","icon":"users","pages":[{"title":"Retrieve a customer","openapi":"get /v1/customers","href":"/api-reference/endpoint/get-customer"},{"title":"Update a customer","openapi":"patch /v1/customers","href":"/api-reference/endpoint/update-customer"},{"title":"List all customers","openapi":"get /v1/customers/list","href":"/api-reference/endpoint/list-customers"},{"title":"Generate Customer Links","openapi":"post /v1/customers/billing","href":"/api-reference/endpoint/create-customer-billing"}]},{"group":"Transactions","icon":"receipt","pages":[{"title":"Get a transaction by ID","openapi":"get /v1/transactions","href":"/api-reference/endpoint/get-transaction"},{"title":"List all transactions","openapi":"get /v1/transactions/search","href":"/api-reference/endpoint/get-transactions"},{"title":"Refund a payment","openapi":"post /v1/refunds","href":"/api-reference/endpoint/refund-payment"}]},{"group":"Affiliate","icon":"users","pages":[{"title":"List all affiliates","openapi":"get /v1/affiliates","href":"/api-reference/endpoint/list-affiliates"},{"title":"Retrieve an affiliate","openapi":"get /v1/affiliates/{id}","href":"/api-reference/endpoint/retrieve-affiliate"},{"title":"List affiliate commissions","openapi":"get /v1/affiliates/{id}/commissions","href":"/api-reference/endpoint/list-affiliate-commissions"},{"title":"Create an affiliate invitation","openapi":"post /v1/affiliates/invites","href":"/api-reference/endpoint/create-affiliate-invite"},{"title":"List affiliate invitations","openapi":"get /v1/affiliates/invites","href":"/api-reference/endpoint/list-affiliate-invites"}]},{"group":"License","icon":"key","pages":[{"title":"Validates a license key or instance","openapi":"post /v1/licenses/validate","href":"/api-reference/endpoint/validate-license"},{"title":"Activates a license key","openapi":"post /v1/licenses/activate","href":"/api-reference/endpoint/activate-license"},{"title":"Deactivate a license key instance","openapi":"post /v1/licenses/deactivate","href":"/api-reference/endpoint/deactivate-license"},{"title":"List license instances","openapi":"get /v1/licenses/{id}/instances","href":"/api-reference/endpoint/list-license-instances"}]},{"group":"Discount Code","icon":"tag","pages":[{"title":"Creates a discount, or updates the one with the same external_id","openapi":"post /v1/discounts","href":"/api-reference/endpoint/create-discount-code"},{"title":"Update a discount","openapi":"patch /v1/discounts/{id}","href":"/api-reference/endpoint/update-discount-code"},{"title":"Delete a discount","openapi":"delete /v1/discounts/{id}/delete","href":"/api-reference/endpoint/delete-discount-code"},{"title":"Retrieve discount","openapi":"get /v1/discounts","href":"/api-reference/endpoint/get-discount-code"},{"title":"Search discounts","openapi":"get /v1/discounts/search","href":"/api-reference/endpoint/search-discounts"}]},{"group":"Subscription","icon":"repeat","pages":[{"title":"Retrieve a subscription","openapi":"get /v1/subscriptions","href":"/api-reference/endpoint/get-subscription"},{"title":"List all subscriptions","openapi":"get /v1/subscriptions/search","href":"/api-reference/endpoint/search-subscriptions"},{"title":"Update a subscription","openapi":"post /v1/subscriptions/{id}","href":"/api-reference/endpoint/update-subscription"},{"title":"Upgrade a subscription to a different product","openapi":"post /v1/subscriptions/{id}/upgrade","href":"/api-reference/endpoint/upgrade-subscription"},{"title":"Pause a subscription","openapi":"post /v1/subscriptions/{id}/pause","href":"/api-reference/endpoint/pause-subscription"},{"title":"Resume a subscription","openapi":"post /v1/subscriptions/{id}/resume","href":"/api-reference/endpoint/resume-subscription"},{"title":"Cancel a subscription","openapi":"post /v1/subscriptions/{id}/cancel","href":"/api-reference/endpoint/cancel-subscription"}]},{"group":"Splits","icon":"arrows-split-up-and-left","pages":[{"title":"Create a split","openapi":"post /v1/splits","href":"/api-reference/endpoint/create-split"},{"title":"List all splits","openapi":"get /v1/splits","href":"/api-reference/endpoint/list-splits"},{"title":"Retrieve a split","openapi":"get /v1/splits/{id}","href":"/api-reference/endpoint/retrieve-split"},{"title":"Delete a split","openapi":"delete /v1/splits/{id}","href":"/api-reference/endpoint/delete-split"}]},{"group":"Stats","icon":"chart-line","pages":[{"title":"Get store metrics summary","openapi":"get /v1/stats/summary","href":"/api-reference/endpoint/get-stats-summary"}]},{"group":"Customer Credits","icon":"coins","pages":[{"title":"Create a customer credits account","openapi":"post /v1/customer-credits/accounts","href":"/api-reference/endpoint/create-credits-account"},{"title":"List customer credits accounts","openapi":"get /v1/customer-credits/accounts","href":"/api-reference/endpoint/list-credits-accounts"},{"title":"Retrieve a customer credits account","openapi":"get /v1/customer-credits/accounts/{id}","href":"/api-reference/endpoint/get-credits-account"},{"title":"Get account balance","openapi":"get /v1/customer-credits/accounts/{id}/balance","href":"/api-reference/endpoint/get-credits-account-balance"},{"title":"List account entries","openapi":"get /v1/customer-credits/accounts/{id}/entries","href":"/api-reference/endpoint/list-credits-entries"},{"title":"Credit an account","openapi":"post /v1/customer-credits/accounts/{id}/credit","href":"/api-reference/endpoint/credit-account"},{"title":"Debit an account","openapi":"post /v1/customer-credits/accounts/{id}/debit","href":"/api-reference/endpoint/debit-account"},{"title":"Reverse a transaction","openapi":"post /v1/customer-credits/accounts/{id}/reverse","href":"/api-reference/endpoint/reverse-credits-transaction"},{"title":"Freeze an account","openapi":"post /v1/customer-credits/accounts/{id}/freeze","href":"/api-reference/endpoint/freeze-credits-account"},{"title":"Unfreeze an account","openapi":"post /v1/customer-credits/accounts/{id}/unfreeze","href":"/api-reference/endpoint/unfreeze-credits-account"},{"title":"Close an account","openapi":"post /v1/customer-credits/accounts/{id}/close","href":"/api-reference/endpoint/close-credits-account"},{"title":"Post a transaction","openapi":"post /v1/customer-credits/transactions","href":"/api-reference/endpoint/post-credits-transaction"},{"title":"Retrieve a transaction","openapi":"get /v1/customer-credits/transactions/{id}","href":"/api-reference/endpoint/get-credits-transaction"},{"title":"Reverse a transaction","openapi":"post /v1/customer-credits/transactions/{id}/reverse","href":"/api-reference/endpoint/reverse-credits-transaction-by-id"},{"title":"List transactions by reference","openapi":"get /v1/customer-credits/transactions","href":"/api-reference/endpoint/list-credits-transactions"}]},{"group":"Moderation","icon":"shield-check","pages":[{"title":"Screen a prompt","openapi":"post /v1/moderation/prompt","href":"/api-reference/endpoint/screen-prompt"}]},{"group":"Webhooks","icon":"webhook","pages":[{"title":"List webhook endpoints","openapi":"get /v1/webhooks","href":"/api-reference/endpoint/list-webhooks"},{"title":"Create a webhook endpoint","openapi":"post /v1/webhooks","href":"/api-reference/endpoint/create-webhook"},{"title":"Retrieve a webhook endpoint","openapi":"get /v1/webhooks/{id}","href":"/api-reference/endpoint/get-webhook"},{"title":"Update a webhook endpoint","openapi":"patch /v1/webhooks/{id}","href":"/api-reference/endpoint/update-webhook"},{"title":"Delete a webhook endpoint","openapi":"delete /v1/webhooks/{id}","href":"/api-reference/endpoint/delete-webhook"},{"title":"Retrieve a webhook signing secret","openapi":"get /v1/webhooks/{id}/secret","href":"/api-reference/endpoint/get-webhook-secret"},{"title":"List pending events for a CLI webhook endpoint","openapi":"get /v1/webhooks/{id}/events/pending","href":"/api-reference/endpoint/list-pending-webhook-events"},{"title":"Acknowledge a CLI webhook event","openapi":"post /v1/webhooks/{id}/events/{event_id}/ack","href":"/api-reference/endpoint/acknowledge-webhook-event"}]}]}]},"basePath":"","title":"Create a product group - Creem","deploymentId":"dpl_EtLmMeZHkKGqAjV1DiX4ZXCriDj3","buildId":"dpl_EtLmMeZHkKGqAjV1DiX4ZXCriDj3","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CWRF67qg.js","snippetPresets-BR8BoZAC.js","utils-D5WEoDBM.js","style-to-object-BY3JEAdk.js","utils-B79vXYXV.js","v4-DIgz8zy6.js","addUniqueKeysToSchema-C59iNs-S.js","conditional-requirements-CFM0id0Q.js","cloneDeep-455jK_K_.js","_Uint8Array-BEecbuUl.js","isObject-FP1Yky1u.js","ApiExamples-CFRHL52q.js","usePlaygroundInputsStore-Caip2xMX.js","shallow-BS-qcxmX.js","isEqual-CEpbaqh9.js","CodeSnippets-B-R0FAqw.js","CodeSnippet-Bkkti1IB.js","use-playground-group-access-BLvLSz8w.js","Page-UFatEFaf.js","api-description-markdown-Cny85OC3.js","DynamicMarkdown-Czhs88Hc.js","SectionHeading-B08KBUKT.js","MethodPill-D8OvWg5y.js","getPastedJson-tB5m0_yh.js","Check2Icon-CeP__a4S.js","axios-CsQoIw0U.js","Markdown-LI7DSqeK.js","AssistantPageLink-bYxdsqKl.js","dist-DXTH2WLA.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}