Importing an API Source
Import an OpenAPI spec to create an API Source
To create an API store, you first connect your APIs to API.market. When a user calls API.market, the platform calls your API using the API Source you define and its configuration.
π― Overview
The API Source is the OpenAPI specification that connects your APIs to API.market. API.market acts as an API gateway, making your API available through a unified platform.
π Prerequisites
Before you begin, you will need:
β An OpenAPI specification file (YAML or JSON) β Your API's base URL β Authentication details (if required)
β οΈ Don't have an OpenAPI spec yet? You can create one using ChatGPT. Follow our guide: Create OpenAPI spec using ChatGPT
π Step-by-step guide
Step 1 β Open "OpenAPI Specs"
Go to the Seller Console and select your organization from the dropdown. Then click "Manage APIs" in the left sidebar and select "OpenAPI Specs".

Step 2 β Import the OpenAPI YAML or JSON file
Upload or drag and drop your OpenAPI specification file. You should see the paths imported from the file.

Step 3 β Configure custom headers
Next, add any custom headers that should be included in every API request to your backend.
Enter a JSON object in the text area.
Format:
{"Header-Name": "header-value"}Example:

Step 4 β Configure base path URL
Set the base URL for all API requests. This is the root address API.market will call.
The field may be pre-filled if a
serversentry was detected in your OpenAPI spec.Review or enter your API's base URL.
Format:
https://api.example.com/v1This URL is used as the base for every API request.
Example:

Step 5 β Configure authentication
Choose how API.market authenticates with your backend when it forwards a request. You have five options.
Option 1 β No authentication
Select the "None" tab.
No authentication is used when making API requests.

Option 2 β API Key
Select the "API Key" tab.
Enter the Header Name (e.g.
X-API-Key,Authorization).Enter the API Key Value (masked for security).
The API key is sent in the specified header with each request.
Example β Header Name: X-API-Key Β· API Key Value: your-secret-api-key

Option 3 β Bearer Token
Select the "Bearer Token" tab.
Enter your bearer token (masked for security).
The token is sent in the
Authorizationheader asBearer <token>.
Example β Token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

Option 4 β Basic Auth
Select the "Basic Auth" tab.
Enter your Username and Password (masked for security).
Credentials are base64 encoded and sent in the
Authorizationheader.
Example β Username: myuser Β· Password: mypassword

Option 5 β Query Parameter
Select the "Query Param" tab.
Enter the Parameter Key (e.g.
api_key,token).Enter the Parameter Value (masked for security).
The parameter is added to the query string of each request.
Example β Param Key: api_key Β· Param Value: your-api-key-value

π Security: Your backend credentials are stored securely and never shown to your customers. Customers authenticate with API.market using their own key.
Step 6 β Review summary and create
Review all your configuration before creating the API Source. The summary shows:
API Source Name β the detected or entered name
API Version β the detected version
Base URL β the configured base URL
Custom Headers β the JSON object of custom headers
Authentication β the selected method and configuration
Endpoints β the list of all detected endpoints

Review checklist:
β API name and version are correct
β Base URL is correct
β Custom headers are properly formatted
β Authentication is configured correctly
β All expected endpoints are listed
Then click "Create API Source". Your API Source is created and you are taken back to the API Sources list, where you should see it appear.
π Success! Your API Source is ready to use when creating products.
β What's next?
After importing your API Source, you can:
Create products β use your API Source to create API products
Configure pricing plans β set up pricing for your endpoints
Test your APIs β use the API Playground to test your endpoints
View analytics β monitor usage and performance
π οΈ Troubleshooting
"No endpoints found"
Check that your OpenAPI spec has a paths object with at least one endpoint defined.
"Invalid JSON/YAML" Validate your OpenAPI spec with an online tool such as Swagger Editor.
"Base URL not detected"
Make sure your spec includes a servers array with at least one URL, or enter it manually in Step 5.
"Authentication not working" Verify your credentials are correct, check that the header name matches what your API expects, and confirm the authentication type matches your API's requirements.
π‘ Best practices
Validate your OpenAPI spec β use tools like Swagger Editor before importing.
Test authentication β after creating your source, test it with a sample request.
Use descriptive names β pick clear API Source names you can identify later.
Document custom headers β keep track of what headers you use and why.
Version your APIs β use semantic versioning (e.g.
1.0.0,2.1.3).
Next β What Is an API Product
Last updated