When does an API need an SDK?

Posted by Oryzae@reddit | ExperiencedDevs | View on Reddit | 4 comments

I’ve been working on APIs for the last ~5 years or so and at every place the docs have been available for our clients. At my previous company the APIs were pretty straightforward - minimal chains, you fire a request, wait for webhooks (poll if you don’t get them over an X amount of time), cancel if you need to. Also there were only about 10-15 endpoints to hit.

At my current company though, we have 30-40 endpoints and lots of chaining - API to check if the system is ready or hasn’t hit daily limits, generate a part of your payload by calling another API to get some dependency information, call another API to upload images and get URLs, and then include all this information to call another API. We don’t even have an OpenAPI / Swagger spec - just handwritten docs.

I feel like having an SDK / installable programming language package would greatly improve the developer experience. The SDK would be for external devs.

Nobody at my company cares about doing this and other than a few customers I’m not getting a ton of requests for this either. In fact in my experience I don’t really hear anyone clamoring for an SDK when working with APIs in general.

So my question is: How/When do you decide you need an installable pip/gem/npm package? Is it worth my time and effort to write one over a couple of weekends or so for shits and giggles? I can’t make infra changes, otherwise a stopgap I see is having documentation that would have code snippets in many languages (Postman does this but have had to help clients debug the Postman snippet, so I feel like this approach would be a little moot). We didn’t have a way to reach our devs until the last couple of weeks where we spun up a Discord, and that is getting a little bit of activity. Should I make a poll? Other devs can say yes and not adopt it, so not sure if it’s a super wise choice?

Ultimately I want to provide the best developer experience I can, and feeling very unclear about the role an SDK would play. Thank you for your time reading this and sharing any opinions you would have.