Swagger IO

On this page you can find an online API console powered by the Swagger IO definition. It describes all the possible API method calls, their requests, responses, parameters and everything else you might want to know. You can use this to either test the API calls online with the 'Try it out!' button or just see how to implement them.

Each method also has a description to explain what the response means, what you can use the method for or any extra explanations on its use. If you use the 'Try it out!' button this will give a lot of extra information on the API call that was made, for instance the cURL command you can use to execute it yourself, the returned status code and more!


The first step to start developing your application using these API calls is to get the proper authorization header for your API calls. This access token can be retrieved from the token endpoint at https://api.toonapi.com/token. Retrieving the access token is also included in the code examples below, but for demonstration purposes the cURL command for this is given:

curl -X POST 
    -H "Content-Type: application/x-www-form-urlencoded" 
    -d "grant_type=password&username=<USERNAME>&password=<PASSWORD>&client_id=<CLIENT_ID>&client_secret=<CLIENT_SECRET>" 

You can use the username and password you received during the registration process. As Client_ID and Client_secret you can use the Key and Secret you receivede during the registration process.

After making this call you should get a Json object containing the access token. You can add this access token as a header in the following way:

curl -X GET -H "Authorization: Bearer <ACCESS_TOKEN>" 

The use of this access token is the same for this call and every other call you can make to the API. The previous call returns all the agreements that you are allowed to use using the given access token. You can have multiple agreements here, which means you can access multiple displays. You need to choose the correct one and declare this to be the display you want to make the API calls to. So copy one of the Json objects with an agreementId and send that to the API in a POST call to the same endpoint. 

From there on you are free to make any of the possible calls and enjoy the full functionality of the Toon® API.