Update Store configuration
Replace the Store settings for the community that owns your API key, from its title and banner to its embeddable widget.
- Method
- PUT
- Path
https://api.returning.ai / v1/ stores - Permission
- store
- Retries
- No Idempotency-Key; the same body is safe to repeat
When to use this
- Rename the Store or change its description.
- Switch the Store on or off, or show a custom coin name and icon.
- Allow your website's domain to embed the Store widget, or move the widget from testing to live.
Authentication#
- Header
Authorization: Bearer <API_KEY>- Permission
- storeShown in the dashboard as “Store”
Send a Community API key with the store permission. The key decides the community, so you can only change your own Store and never send a community ID. Keep the key on your server.
Behaviour#
This is a full replace. isEnabled, title, description, cover, currency and widget are all required, with every field inside them, so a request that sends only a new title is rejected. Read the settings with Get Store configuration, change the fields you need, and send the rest back unchanged.
A new title or description clears the automatically generated translations of that text, because they no longer match; translations your team entered by hand are kept. Translations, the widget ID and the widget's access key can't be changed here.
Request#
Headers#
Body#
Send booleans as JSON true or false; "true" is rejected. Image and link URLs must use HTTPS, or be an empty string. widgetID is rejected if you send it back from a read; other fields this endpoint doesn't take, such as i18n, _id and the timestamps, are ignored.
true switches the Store on. When true, title can't be empty.RuleJSON boolean
Egtrue
RuleUp to 32 chars; required when isEnabled is true
Eg"Trading Rewards Store"
Eg"<p>Redeem your coins for trading credits and gifts.</p>"
Eg{"isEnabled": false, "light": "", "dark": ""}
true shows the banner. Needs at least one image.RuleJSON boolean
Egfalse
RuleHTTPS URL or empty string
RuleHTTPS URL or empty string
Eg{ ... }
true shows the custom coin name and icons. Needs name.RuleJSON boolean
Egtrue
Coins. Send an empty string for none.RuleUp to 32 chars; required when isEnabled is true
Eg"Coins"
RuleHTTPS URL or empty string
Eg"https://cdn.example.com/store/coin-light.png"
RuleHTTPS URL or empty string
Eg"https://cdn.example.com/store/coin-dark.png"
Eg{ ... }
true switches the widget on. When true, both theme names are required.RuleJSON boolean
Egtrue
https:// or a path.RuleHostnames such as example.com
Eg["example.com"]
live for every trader, development for the test users and roles only.Rulelive or development
Eg"live"
development mode. Send [] for none.Eg[]
development mode. Send [] for none.Eg[]
Eg{"mode": "dynamic", "width": 400, "height": 400}
dynamic fills the space available; fixed uses width and height.Ruledynamic or fixed
Eg"dynamic"
RuleNumber, 0 or more
Eg400
RuleNumber, 0 or more
Eg400
Eg{ ... }
Eg{"name": "white-smoke", "palette": {}}
white-smoke. Required when the widget is on.Eg"white-smoke"
{} for none.Eg{}
Eg{"name": "black-beauty", "palette": {}}
black-beauty. Required when the widget is on.Eg"black-beauty"
{} for none.Eg{}
true makes the widget use your community's theme instead of these.Egfalse
Eg{"isEnabled": false, "text": "", "link": ""}
true shows the button.Egfalse
RuleHTTPS URL or empty string
[] for none.Eg[]
Eg"email"
email.Eg"email"
Eg"Email"
Ruledefault or custom
Eg"default"
data-email.Eg"data-email"
curl --request PUT \
--url https://api.returning.ai/v1/stores \
--header 'Authorization: Bearer <API_KEY>' \
--header 'Content-Type: application/json' \
--data '{
"isEnabled": true,
"title": "Trading Rewards Store",
"description": "<p>Redeem your coins for trading credits and gifts.</p>",
"cover": {
"isEnabled": false,
"light": "",
"dark": ""
},
"currency": {
"isEnabled": true,
"name": "Coins",
"light": "https://cdn.example.com/store/coin-light.png",
"dark": "https://cdn.example.com/store/coin-dark.png"
},
"widget": {
"isEnabled": true,
"allowedDomains": ["example.com"],
"accessMode": "live",
"testUsers": [],
"testRoles": [],
"size": {
"mode": "dynamic",
"width": 400,
"height": 400
},
"appearance": {
"light": {
"name": "white-smoke",
"palette": {}
},
"dark": {
"name": "black-beauty",
"palette": {}
},
"useCommunityTheme": false
},
"callToAction": {
"isEnabled": false,
"text": "",
"link": ""
},
"userIdentifierFields": []
}
}'
Response#
A 200 returns the Store settings after the change in data, in the same shape as Get Store configuration. Branch on the HTTP status and meta.code, never on message.
Eg{ ... }
Rulesuccess
Eg200
RuleSTORE_CONFIGURATION_UPDATED
Eg"Update store config success."
Eg{ ... }
Eg"66f000000000000000000901"
Eg"66f000000000000000000010"
true when the Store is switched on.Egtrue
Eg"Trading Rewards Store"
Eg"<p>Redeem your coins for trading credits and gifts.</p>"
Eg{"isEnabled": false, "light": "", "dark": ""}
Egfalse
Eg{ ... }
Egtrue
Eg"Coins"
Eg"https://cdn.example.com/store/coin-light.png"
Eg"https://cdn.example.com/store/coin-dark.png"
RuleNullable
Eg{ ... }
Egtrue
Eg["example.com"]
Ruledevelopment, live
Eg"live"
Eg[]
Eg[]
Eg{"mode": "dynamic", "width": 400, "height": 400}
Ruledynamic, fixed
Eg"dynamic"
Eg400
Eg400
Eg{ ... }
Eg{"name": "white-smoke", "palette": {}}
Eg"white-smoke"
Eg{}
Eg{"name": "black-beauty", "palette": {}}
Eg"black-beauty"
Eg{}
Egfalse
Eg{"isEnabled": false, "text": "", "link": ""}
Egfalse
Eg[]
Eg"email"
Eg"email"
Eg"Email"
Ruledefault, custom
Eg"default"
Eg"data-email"
RuleDate-time
Eg"2026-09-01T08:30:00.000Z"
RuleDate-time
Eg"2026-09-27T10:15:00.000Z"
Eg0
Eg{ ... }
Egfalse
Eg[]
Eg"th"
Eg"ร้านค้ารางวัล"
Eg"Thai"
Egtrue
Eg"3f786850e387550fdab836ed7e6dc881de23001b"
Eg[]
Eg"th"
Eg"ร้านค้ารางวัล"
Eg"Thai"
Egtrue
Eg"3f786850e387550fdab836ed7e6dc881de23001b"
Eg"Use a concise rewards-store tone."
Eg["ReturningAI", "VIP"]
RuleDate-time
Eg"2026-09-01T08:30:00.000Z"
RuleDate-time
Eg"2026-09-27T10:15:00.000Z"
Eg0
{
"meta": {
"status": "success",
"statusCode": 200,
"code": "STORE_CONFIGURATION_UPDATED"
},
"message": "Update store config success.",
"data": {
"_id": "66f000000000000000000901",
"communityID": "66f000000000000000000010",
"isEnabled": true,
"title": "Trading Rewards Store",
"description": "<p>Redeem your coins for trading credits and gifts.</p>",
"cover": {
"isEnabled": false,
"light": "",
"dark": ""
},
"currency": {
"isEnabled": true,
"name": "Coins",
"light": "https://cdn.example.com/store/coin-light.png" ,
"dark": "https://cdn.example.com/store/coin-dark.png"
},
"widgetID": "66f000000000000000000902",
"i18n": {
"isTranslationEnabled": false,
"titleTranslations": [],
"descriptionTranslations": []
},
"widget": {
"isEnabled": true,
"allowedDomains": ["example.com"],
"accessMode": "live",
"testUsers": [],
"testRoles": [],
"size": {
"mode": "dynamic",
"width": 400,
"height": 400
},
"appearance": {
"light": {
"name": "white-smoke",
"palette": {}
},
"dark": {
"name": "black-beauty",
"palette": {}
},
"useCommunityTheme": false
},
"callToAction": {
"isEnabled": false,
"text": "",
"link": ""
},
"userIdentifierFields": [],
"createdAt": "2026-09-01T08:30:00.000Z",
"updatedAt": "2026-09-27T10:15:00.000Z",
"__v": 0
},
"createdAt": "2026-09-01T08:30:00.000Z",
"updatedAt": "2026-09-27T10:15:00.000Z",
"__v": 0
}
}
Errors#
Every error carries its code in meta.code, with the reason in detail keyed by setting name. The message on a 400 varies, so don't read it.
Fix the request04
VALIDATION_FAILEDFix the requestdetail names each one, for example widget must be an object, title must be shorter than or equal to 32 characters, Image URL must be an HTTPS URL or an empty string., Domain must be a valid hostname such as example.com. or widgetID is response-only and cannot be updated.AUTH_API_KEY_REQUIREDFix the requestAuthorization: Bearer <API_KEY>.AUTH_API_KEY_INVALIDFix the requestAUTH_PERMISSION_REQUIREDFix the requeststore. Add the permission in Settings > Integration > API Keys.Retry with backoff03
STORE_DEPENDENCY_UNAVAILABLERetry with backoffINTERNAL_ERRORRetry with backoffAUTH_API_KEY_VALIDATION_FAILEDRetry with backoff{
"meta": {
"status": "error",
"statusCode": 400,
"code": "VALIDATION_FAILED"
},
"message": "Validation failed",
"detail": {
"title": "Store title is required when store is enabled."
},
"solution": "Please check the request and try again"
}