Update Invite Code
PUT/api/admin/portal/invite-codes/:inviteCode
Replace an invite code's settings. Takes the same body as Create Invite Code (send every field you want to keep). A blank code keeps the current code. max_uses cannot be set below the uses the code already has. Changes apply to future sign-ups only: accounts already created with the code are not changed.
customers:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Body fields
code(string, optional, 4-40 characters): letters, numbers and dashes. It is trimmed and uppercased, and spaces become-. Blank or omitted generates a randomXXXX-XXXXcode (no 0, O, 1, I or L). Must not match any other code, archived ones included.name(string, required, max 255): internal label.target(required):new_accountorexisting_customer.customer_id(integer): required whentargetisexisting_customer; a non-archived customer.joiner_role(optional):buyer(default),approverorviewer. Used only forexisting_customercodes.product_pricing_tier_id,payment_term_id,default_sales_rep_id,store_id(integer, optional, nullable): what anew_accountcode provisions;store_idmust be a non-archived store.credit_limit(number >= 0, optional, nullable).portal_catalog_ids(array of catalog ids, optional, nullable).allowed_email_domains(array of up to 50 domains, optional): e.g.acme.comor@acme.com. Stored lowercase without@.approval_mode(optional):instant(default) orreview.expires_on(Y-m-d, optional, nullable): the code works until the end of this day in the tenant's timezone.max_uses(integer >= 1, optional, nullable): null = unlimited.welcome_message(string, optional, max 280): shown to the buyer when the code is accepted.is_active(boolean, optional, default true).
For an existing_customer code the provisioning fields (product_pricing_tier_id, payment_term_id, credit_limit, portal_catalog_ids, default_sales_rep_id, store_id) are ignored and stored empty. For a new_account code, customer_id and joiner_role are ignored.
Request
Responses
- 200
- 401
- 403
- 404
- 422
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Not found — no record with the given identifier (or the route does not exist). Verify the ID before retrying.
Unprocessable Entity
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.