Skip to main content

Testing the Learnster API with Postman

Learn how to import the Learnster API Swagger definition into Postman and start testing API endpoints in minutes.

Written by Liam Basham
Updated today

Postman is a popular tool for exploring and testing APIs. You can quickly get started with the Learnster Public API by importing our Swagger (OpenAPI) definition directly into Postman β€” no manual setup required! πŸš€


Prerequisites

Before you begin, make sure you have the following:

  • Postman installed on your computer

  • Access to your Learnster instance URL (e.g. yourcompany.learnster.com)

  • A valid API key β€” you can generate one in Studio β†’ Settings β†’ Integrations β†’ API Keys


Importing the Learnster API into Postman

The fastest way to get started is to import the Swagger definition. This will automatically create a full Postman collection with all available API endpoints.

  1. Open Postman and go to File β†’ Import

  2. Paste the following URL into the import field:
    ​

    ​https://{yourURL}.learnster.com/api/public/v1/swagger/?format=openapi


    ​(Replace {yourURL} with your actual Learnster instance URL, e.g. yourcompany)
    ​

  3. Make sure the Postman Collection checkbox is selected

  4. Click Import

That's it! Postman will generate a complete collection with all the Learnster Public API endpoints, neatly organized and ready to use. πŸŽ‰


Configuring authentication

Once the collection is imported, you'll need to set up authentication so your requests are authorized:

  1. Click on the imported collection name in the sidebar

  2. Go to the Authorization tab

  3. Set the type to OAuth 2.0

  4. Create a new access token
    ​

  5. When the token choose the following settings:

    1. "Add auth data to" as "Request Headers"

    2. "Header Prefix" as "Bearer"
      ​

All requests within the collection will now inherit this authentication automatically.


Making your first request

With authentication configured, you're ready to test the API:

  1. Expand the imported collection in the Postman sidebar

  2. Select any endpoint, for example GET /users

  3. Update the base URL variable if needed to match your instance (e.g. https://yourcompany.learnster.com. Should not be needed if you imported swagger with correct URL)

  4. Click Send

You should see the API response in the lower panel. If you receive a 200 OK status, everything is working correctly! βœ…


Tips for working with the Learnster API in Postman

  • Use environment variables β€” Set up a Postman environment with variables like base_url and api_key to easily switch between different Learnster instances (e.g. staging vs. production)

  • Check the Swagger UI β€” You can also explore the API documentation directly in your browser at https://{yourURL}.learnster.com/api/public/v1/swagger/

  • Pagination β€” Many list endpoints return paginated results. Look for limit and offset query parameters to navigate through large datasets

ℹ️ The Learnster Public API is available for customers on all plans. You will need an API key to authenticate - Only super-admins can create them.


Need more help? 🀝

Here are some resources to help you along the way:

πŸ“– Documentation

πŸ’¬ Talk to us

  • AI Support (Fin) β€” Open the chat in Learnster Studio and ask our AI assistant. Fin is trained on our API documentation and can answer many technical questions instantly.

  • "Real" support β€” Need a human? You can reach our support team in the same chat from Learnster Studio. Just ask to speak to a person and we'll be happy to help!

πŸ€– Use AI to accelerate your work

You can also use ChatGPT, Claude, or your AI tool of choice to help with your integration. Point it at these sources for the best results:

Feed it the Swagger spec and your question, and it can help you build requests, debug responses, and write integration code.

πŸ’‘ Pro tip: If you use Claude, it can even connect directly to your Postman workspace and test API calls for you!

Did this answer your question?