Adding an API

You can easily add an API to the Mashape Platform and for other developers to consume it.

Here's a quick overview of what you need to do to create an API

  • Give it a name 1
  • Define Endpoints and Parameters 2
  • (Optional) Group endpoints 3
  • Define API details 4
  • Test Endpoint(s) 5

Adding APIs Fig. 1 Adding an API

Name Your API

Within the Administration Panel of your API (more of this in the "API Admin" section) You need to carefully choose an API name as this will represent you in the marketplace (in case you set the API public) You don't have to use the word API, it's obvious you're listing one!

Define API Details

Once you have created your API, you will be able to access its admin panel.

From here you can set up:

  • Your API base URL: That's the base of your API on the web (example: https://api.yourdomain.com/)
  • Hidden transformation parameters: To be sent to the base URL by the proxy and non-public to the end user
  • API Details: You need to specify a name, description, and logo for your API before going public. This will be useful to find your API in the marketplace.

Group Endpoints

Back in the Documentation tab, before specifying endpoints of your API, it is good practice to add grouping for your endpoints.

Define Endpoints and Parameters

Once you start adding one endpoint (name, route etc) and its associated parameters, Mashape will build the documentation of your API so that developers can understand how to use your API.

Authentication

Don't forget to add Authentication to your APIs or developers will not be able to consume it. Mashape supports most forms of API authentication, including OAuth2

PRO-TIPS

  • Add meaningful descriptions and examples
  • You can switch to Developer Mode to test your endpoints

Test Endpoint(s)

Easily switch to Developer mode so you can test your API as a consumer would! Don't forget to make sure everything works or you might be faced with support tickets in your API Issues section ;)