One thing on our minds, even before we launched, has been a way for Gimlet to work with other software. We’ve always wanted to make it easy for you to bring data in and out of Gimlet — it’s your data, after all. In the programming world, this feature is called an API, or “Application Programming Interface,” and it’s a way to let people write their own programs for adding and retrieving data. However, we’ve always had other, higher priorities than building it. That is, until now

We’re very excited to announce that as of today, Gimlet has an official API! Technical details are online, and we have documentation and examples in PHP and Ruby available for you to check out.

How Do I Use the API?

You’ll need an API Key for your Gimlet user account and some familiarity with basic programming. The API is RESTful, so it doesn’t mandate any particular programming language be used. Just choose a language with a simple HTTP library that supports common HTTP methods like GET and POST.

If you don’t have a favorite programming language, try Ruby, and use the Ruby examples in our API repository.

Generate an API Key

Our Gimlet API uses HTTP Basic Authentication, requiring your email address and a password (an API key) to access your account data. Account administrators can generate API keys for users.

To create an API Key:

  1. Sign into Gimlet and choose the “Account” tab
  2. Click on the “Branches” link (near the top)
  3. Select the “Users” option
  4. Click on any email address
  5. Press the “Generate key” button

After the button is pressed, you’ll see your key, which is a random hexadecimal string. Use this string as your password, along with your email address to access the API endpoints.

Make an API Call

Currently, the main API features we provide are adding and retrieving question data, with some added queries to get data about your branches and stats categories. In the future, we’ll add API support for report data and user management.

Ruby Example - List questions

API Use Cases

How could you use this? You could import sessions from your chat program (for example, LibraryH3lp) into Gimlet and do reporting in one place. Or, if you have a dashboard that aggregated information about all your library services, you could have data export from Gimlet into it on a daily basis. Maybe you could even create a little webform to add transactions to Gimlet even faster.

The possibilities are only up to your imagination.

Feedback Welcome

Lastly, please let us know how you decide to use the API. We’d love to see any examples of how it helps your organization. Feedback and suggestions are super important, too.

And as always: Thank you for using Gimlet!


– Nate for Gimlet HQ