Skip to main content

Create SDK through API

You can generate SDKs in any language of your choice for your API definition file using APIMatic's CodeGen API. This can be done either on files on your system (external), or API specifications imported into APIMatic as an API entity.

note

These endpoints require basic authentication. Make sure you have authenticated client credentials before calling these endpoints.

Generate SDKs via External Files

APIMatic allows you to generate SDKs by importing your API specification file. You can either upload this file from your system or share the URL where the specification file is hosted. There are two different API endpoints for these two methods. Let's look at them in detail.

Endpoint to generate SDK via file

This endpoint executes code generation by specifying the path of your API specification file.

  • Go to the Generate SDK via File endpoint.

    Generate SDK via File

  • Under API Code Playground -> inputtedFile, click on Choose File.

  • Select your API specification file and click on Open.

  • Select the desired code template from the template dropdown menu.

  • Click on TRY IT OUT to generate an SDK through APIMatic API.

Endpoint to generate SDK via URL

This endpoint executes code generation by specifying the URL of your API specification file.

  • Go to the Generate SDK via URL endpoint.

    Generate SDK via URL

  • Under API Code Playground -> url, enter the URL where your API specification file is hosted.

  • Select the desired code template from the template dropdown menu.

  • When done, click on the TRY IT OUT button to generate SDK of your API.

Download SDK

To download your generated SDK:

  • Go to the Download SDK endpoint.

    Download SDK

  • Enter the codeGenID under API Code Playground section. This codeGenId is the ID you received as a response of the generate endpoint.

  • When done, click on the TRY IT OUT button to get your SDK as a zip file.

Generate SDKs via Imported APIs

This endpoint generates SDK against a specific API using the API Entity Identifier.

  • Go to the Generate SDK endpoint.

    Generate SDK

  • Enter the unique API version identifier in the apiEntityId parameter.

  • Select the required platform template from the Template dropdown menu.

  • When done, click on the TRY IT OUT button to generate your SDK.

Download SDK

To download this generated SDK, you can use the Download SDK endpoint.

  • Go to the Download SDK endpoint.

    Download SDK

  • Enter the unique API entity identifier in the apiEntityId parameter.

  • Enter the unique code generation identifier in the codeGenId. This Id was sent as a response when you called the Generate SDK endpoint

  • Click on the TRY IT OUT button to get a zip file of your SDK.