Base URLs
There are two dedicated URLs for working with UX Toolkit: a sandbox URL and a base URL.HTML
Generate UX Toolkit OAuth access token
Action:POSTEndpoint:
/oauth/token
Use this endpoint to generate your UX Toolkit OAuth access token. For details, see UX Toolkit Getting Started.
Request header
| Fields | Description |
|---|---|
| DPoP string Required | A valid Demonstrating Proof of Possession (DPoP) JSON Web Token (JWT). Allowable Values: Valid DPoP proof JWT |
Request body
| Fields | Description |
|---|---|
| grant_type string Required | Type of OAuth 2.0 grant. Must be set to client_credentials.Allowable Values: client_credentials |
| client_assertion_type string Required | Indicates the type of JWT-based client assertion for authentication. Must be set to urn:ietf:params:oauth:client-assertion-type:jwt-bearer.Allowable Values: urn:ietf:params:oauth:client-assertion-type:jwt-bearer |
| client_assertion string Required | Signed JWT that asserts the client’s identity. For more information, see Create your client assertion token. Allowable Values: Valid client assertion |
| user_token string Required | Unique identifier of the user account holder. Allowable Values: Existing user token 1-36 chars |
| audience string Required | Intended audience of the returned access token. This value should match the base URL of the UX Toolkit API. Allowable Values: <a href="https://ux-toolkit-api-sandbox.marqeta.com">https://ux-toolkit-api-sandbox.marqeta.com</a>, <a href="https://ux-toolkit-api.marqeta.com">https://ux-toolkit-api.marqeta.com</a> |
Sample request body
JSON
Response body
| Fields | Description |
|---|---|
| access_token string Returned | DPoP-bound JWT that must be passed back to UX Toolkit client via your Customer Authentication API. Allowable Values: Valid access token |
| expires_in number Returned | Number of seconds for which the returned access_token will remain valid.Allowable Values: Any integer |
| token_type string Returned | Identifies the token type. For DPoP flows, this value is always DPoP.Allowable Values: DPoP |
Sample response body
JSON
Generate UX Toolkit authentication token
Action:POSTEndpoint:
/auth/login
Warning
This endpoint has been deprecated. Refer to the Authentication workflow section of UX Toolkit Getting Started for details on how to authenticate with OAuth 2.0.
This endpoint has been deprecated. Refer to the Authentication workflow section of UX Toolkit Getting Started for details on how to authenticate with OAuth 2.0.
Request body
| Fields | Description |
|---|---|
| user_token string Required | Unique identifier of the user account holder. Allowable Values: 1–36 chars Existing user token |
Sample request body
JSON
Response body
| Fields | Description |
|---|---|
| program_short_code string Returned | Program short code on the Marqeta platform. Allowable Values: Existing program short code |
| token string Returned | Token string to be passed to the UX Toolkit’s bootstrap() method.Allowable Values: Authentication token |
Sample response body
JSON
Upload theme object
Action:POSTEndpoint:
/theme
Use this endpoint to upload your theme as a JSON object.
Once you have finalized your application’s theme using the Studio environment, you can upload it to Marqeta for use with your card product. For details, see UX Toolkit Getting Started.
Request body
| Fields | Description |
|---|---|
| theme object Optional | Collection of the configurable values that have been defined to create a customized look-and-feel for a card product. NOTE: Each card product in your card program can have its own theme. Allowable Values: JSON object |
| theme_name string Optional | Descriptive name used to identify this theme. NOTE: The theme name you choose must be unique across your card program. If you do not supply a value, the theme will be named default.Allowable Values: 1–32 chars |
Sample request body
JSON
Sample response body
There is no response for a call made to thePOST /theme endpoint, other than a 201 Successfully uploaded a theme message.
JSON
Upload card art
Action:POSTEndpoint:
/cardproducts/cardart
Use this endpoint to upload card art for a specific program. Send the request as a multi-part form data request.
Your card art images are displayed in the Studio environment and in your application. For details, see UX Toolkit Getting Started.
Request body
| Fields | Description |
|---|---|
| card_product_token string Required | Unique identifier of the card product. Allowable Values: 1–36 chars Existing card product token. |
| program_short_code string Returned | Program short code on the Marqeta platform. Allowable Values: Existing program short code |
| asset_type string Required | Type of card asset. Allowable Values: front, back, thumbnail |
| file string Required | Specifies a card art image in PNG format. Allowable Values: Portable network graphics file ( *.PNG) |
Sample request body
MIME
Sample response body
There is no response for a call made to thePOST /cardproducts/cardart endpoint, other than a 201 Successfully uploaded card art message.
JSON
Upload custom translation files
Action:POSTEndpoint:
/translations
ImportantBefore uploading your translation files using the /translations endpoint, ensure that they are linguistically accurate and representative of the user experience.
translations object so that they will appear in the target language in the customer-facing UI. UX Toolkit uses key and value pairs to render the translations used in web components. Each key is an identifier used to reference a specific piece of content in a web component, while the value is the translated text string that replaces that key on the customer-facing UI. See the sample request body that follows for an example.
For a full list of keys, contact your Marqeta onboarding specialist.
See also the Using custom translation files section in the UX Toolkit Getting Started guide.
Request body
| Fields | Description |
|---|---|
| program_short_code string Required | Program short code on the Marqeta platform. Allowable Values: Existing program short code |
| language_code string Required | Language code associated to translations. Allowable Values: bg-BG, ca-ES, cs-CZ, de-DE, el-GR, en-GB, en-US, es-ES, et-EE, fr-CA, fr-FR, hr-HR, hu-HU, it-IT, lt-LT, nl-NL, pl-PL, pt-BR, pt-PT, ro-RO, ru-RU, sk-SK, sl-SI, sv-SE |
| translations object Required | Object that contains a list of key/value pairs for translations. For a full list of keys, contact your Marqeta onboarding specialist. Allowable Values: Valid JSON object |
Sample request body
JSON
Sample response body
The only response for a call made to the/translations endpoint is 201 Successfully uploaded a translation.
JSON