---
title: "Documentation for your Supabase API! - Supaweek Day 3"
description: "Now that you have the API, you'll be surprised at how easy it is to get the documentation"
canonicalUrl: "https://zuplo.com/blog/2023/09/27/documentation-for-your-supabase-api"
pageType: "blog"
date: "2023-09-27"
authors: "abdallah"
tags: "Supabase, API Documentation, Tutorial"
image: "https://zuplo.com/og?text=Supaweek%20Day%203:%20Documentation%20for%20your%20Supa%20API"
---
In [day 1 of the Supaweek](/blog/using-openai-and-supabase-db-to-create-an-api)
we covered how to create an AI-based API using OpenAI and Supabase DB as its
backend, and we added auth and rate-limiting using Zuplo's API Gateway and even
programmed a request handler directly in the gateway. In
[day 2](/blog/handling-user-requests-dynamically), we covered how to handle user
requests dynamically in your API.

Today, we'll cover the documentation of your APIs. Or, as we like to call it in
the API jargon, you're API's **_Developer Portal_**.

## What is an API Developer Portal?

We've hinted at it slightly, it's the documentation of the API, where anyone can
discover all the endpoints that your API exposes and how a request should look
like in terms of headers and body for the API to understand it (including
yourself, when you sooner or later, like any developer, forget how to use your
own API).

You'll wonder: there sure is a bit more to it than just documentation - after
all, there's a reason why they're called developer portals... right?

And you won't be wrong. A Developer Portal usually enables developers to use an
API to do much more, for example with Zuplo's Dev Portal you get out of the box:

- **Self-serving API Keys**: this is so your users don't bug you through support
  tickets every time they want a new API Key or they want to revoke it. You
  know, empower your users and all that.
- [**Developer analytics**](/blog/analytics-for-developers-using-your-api): you
  as an API developer probably have your own analytics, but wouldn't it also be
  cool if the users of your API could understand exactly how they're using the
  API? This could be helpful to know the amount of requests you made, the
  latency of the request for debugging purposes, or more general details like is
  the request I'm making even reaching the backend.
- **Great design and dark mode**: this is a no-brainer 💅🏽.

As you might guess, these are powerful features to build an API that you're
proud of and your users are delighted to use.

## Getting a dev portal for your Supabase API

Now that you know what a Dev Portal is, let's see how easy it is to have one for
your API.

We continue to build on the API we created in
[Day 1](/blog/using-openai-and-supabase-db-to-create-an-api), so make sure you
have it deployed and ready to go.

A video with the walkthrough of this tutorial is available here:

<YouTubeVideo videoId="1Dd21E9yC4o" />

### Step 1 - Assign an API Key to an email account

To manage an API Key from the Dev Portal, you'll need to assign an API Key to
the account that your user will sign up with in the Dev Portal (so not everyone
gets to have a key willy-nilly!).

Go to **_Project settings > API Key Consumers > Add New Consumer_**.

:::info

In the _Key Managers_ field, make sure to add an email that you can log in with
in the next step.

:::

### Step 2 - Open the Dev Portal of your Zuplo API

Go to **_Files > Getting Started_** and click on link **_Your Developer Portal
is live at_**.

You will now see the Dev Portal of your API that your users will go to when
using your API.

### Step 3 - Sign in to the Dev Portal

Acting like a user of your API try to sign in (top right) to the Dev Portal
using the same email that you added as _Key Manager_ in Step 2.

:::info

You will find a demo Auth0 tenant to sign in. We have an announcement coming up
on Friday about Supabase Auth and Zuplo, so stay tuned!

:::

You will now see an API Key that you can start using to make a request to the
API.

In the API Keys sections, you users will be able to roll their keys, delete them
or see the logs and analytics for the specific API Key consumer.

### Step 4 - Make an authenticated request to the API

The Dev Portal offers nice code samples to start using the API. In any route,
select your API Key in the **_Choose a key_** and it will be pre-filled in the
code sample. Now you can copy the `curl` code sample and run it in your terminal
for an authenticated request to your own API!

### Step 5 - Explore the analytics of your API Key

By using the Zuplo API Key service, each user of your API will get their own
analytics and logs. You can see them by viewing the Request Logs of the API Key:

![Request Logs button](https://cdn.zuplo.com/assets/858f5334-01ca-4b4d-aa18-acd5ba8a9805.png)

The logs will show you the details of each request and the statistics of the
responses by status code.

![Analytics overview](https://cdn.zuplo.com/assets/bb93c8ad-8fcf-4683-af27-4472d295e8c0.png)

![Logs overview](https://cdn.zuplo.com/assets/5269da9c-d6c5-42b3-8f92-a8cd04fc8a2d.png)

## Day 3 is over!

Don't forget that you have any questions, comments or feedback, join us in our
[Discord](https://discord.zuplo.com) server, or drop us a tweet at
[Twitter](https://x.com/zuplo). We'd love to hear from you!

Check out [Day 4 of the Supaweek](/blog/monetizing-apis) to learn about
monetizing this API 💸.