POST /api/v1/theme endpoint.
If your question isn’t covered here, contact your Marqeta Account Manager.
For the full theming workflow, see Customizing UX Toolkit.
Does uploading a theme with the same name overwrite the existing theme?
Yes. A repeatPOST /api/v1/theme request with an existing theme_name replaces the stored theme in both sandbox and production.
The upload replaces the theme’s JSON in full; it doesn’t merge the new JSON with the old.
Keep the following in mind:
- Environments are separate: Sandbox and production each store their own themes. Uploading a theme to one environment doesn’t change the theme with the same name in the other.
- Reserved name: You can’t use
defaultas a theme name. The Marqeta platform rejects the request. Choose a different name for your custom theme. - Updates might not appear immediately: UX Toolkit saves themes after it loads them, so a page might continue to show the previous version after you overwrite a theme.
To load the latest version on a running page, call
window.marqeta.updateTheme()with{ force: true }. For details, see Switching themes after bootstrap.
Are there limits on theme JSON size, theme count, or request rate?
Yes. The request body is limited to 100 KB, and theme names are limited to 32 characters. The following table lists the limits that apply toPOST /api/v1/theme requests:
Is there an endpoint to read or delete a theme?
No. The Marqeta platform doesn’t provide an endpoint you can use to read or delete a theme. You can create a theme and overwrite it, but you can’t retrieve or remove a theme after you upload it. The platform also doesn’t keep a version history of your theme’s JSON. Keep a copy of every theme’s source JSON in your source control repository. To edit a theme, paste your saved JSON into Studio, make your changes, and upload the result under the same name to overwrite the existing theme.Can I get an access token that is limited to uploading themes?
Not currently. Uploading a theme requires an access token with thecustomer:all scope.
The Marqeta platform rejects tokens with a narrower scope.
Because customer:all isn’t specific to themes, it grants more access than theme upload alone.
If you need credentials limited to uploading themes, contact your Marqeta Account Manager to discuss your requirements.