5 minute read

August 3, 2019


The fundamental purpose of the Core API is to issue payment cards and customize card behavior. It uses objects to represent various concepts. For example, a payment card is represented by a card object and a card holder is represented by a user object. You create, update, or retrieve a new object by making a call to the appropriate API endpoint.

The Core API is RESTful, meaning that it uses HTTP verbs (POST, PUT, GET) to perform functions on objects. Specifically, POST is used to create an object, PUT to update an object, and GET to retrieve an object. For example, to create a new user object you would send a POST request to /users. POST and PUT requests usually require data to be passed in the message body to define the attributes of the object being created or updated. This data must be in JSON format.

Ready to start building? The Core API Quick Start includes a hands-on tutorial that helps you create the basic Marqeta platform resources.

Understanding API objects

The Core API uses objects to represent concepts for issuing payments cards and customizing card behavior. First-class objects are generally the most important objects on the Marqeta platform and occupy the first node in an endpoint URL. Some examples of first-class objects include:

  • card – represents a payment card (physical or virtual) for conducting transactions.

  • user – represents a person who uses a payment card.

  • gpaorder – used to load funds into an account.

  • fundingsource – represents the source from which a gpaorder draws funds.

To see how the fundamental API objects interrelate, refer to the Summary of Resources.

Accessing the shared sandbox environment

The Marqeta platform provides a shared sandbox environment that allows you to explore the capabilities of the Core API. The base URL for the shared sandbox is:

Is this helpful?

This is a shared, public environment. Do not populate it with sensitive data. For more information about exploring the shared sandbox, see Core API Quick Start.

Listing endpoints

You can retrieve a list of the available API endpoints by sending a GET request to the /swagger.json endpoint, for example:

Is this helpful?

The response lists the endpoints you are authorized to access based on the credentials you provide in your request.

Using interactive widgets

Marqeta’s developer documentation includes interactive widgets that you can use to explore and test the Core API directly from your browser. After logging in to your account, you can use these interactive widgets:

  • Some pages include inline widgets for submitting API requests to specific endpoints. For example, Core API Quick Start provides a step-by-step tutorial for configuring a card and simulating a transaction with the Core API.

  • The API Explorer shows all available endpoints and operations in the Core API, grouped by object.

To use an interactive widget:

  1. Log in or sign up for an account.

  2. Go to a page with the interactive widget that you want to use.

  3. Click the widget to expand it.

  4. Click Try it out. The parameters and the example value in the Request Body field become editable.

  5. Enter the desired parameters and request body details, and click Execute. The widget submits a request to the shared sandbox and shows the cURL and the response.

Swagger UI widgets

Is this helpful?

Accessing production environments

Each Marqeta customer who enters into an agreement to receive Marqeta’s services will access the API and operate within an individually tailored production environment called a program.

To access the API in production, you use the unique base URL for your program. Be sure to update any tests or code samples with the correct base URL. For example:


Have any feedback on this page?

If you feel we can do anything better, please let our team know.

We strive for the best possible developer experience.