---
title: "An API gateway over SaaS?"
description: "Learn how to proxy SaaS APIs like Airtable with your Zuplo API Gateway."
canonicalUrl: "https://zuplo.com/blog/2022/03/24/an-api-gateway-over-saas"
pageType: "blog"
date: "2022-03-24"
authors: "josh"
tags: "Tutorial"
image: "https://zuplo.com/og?text=An%20API%20gateway%20over%20SaaS?"
---
This one's a little extra. Zuplo is so programmable you can use it in ways
you've never considered for a gateway... a gateway over SaaS APIs - like
AirTable.

<YouTubeVideo videoId="6hvkH-hB384" />

Length: 2 minutes

In this example we use the
[Event Planning Template](https://www.airtable.com/templates/featured/exppdJtYjEgfmd6Sq/event-planning).

And here's the code in our **request handler**

```ts
import { ZuploContext, ZuploRequest, environment } from "@zuplo/runtime";

export default async function (request: ZuploRequest, context: ZuploContext) {
  const body = await request.json();

  const data = {
    records: [
      {
        fields: {
          Name: body.name,
          Email: body.email,
        },
      },
    ],
  };

  const response = await fetch(environment.ATTENDEES_URL, {
    method: "POST",
    headers: {
      Authorization: `Bearer ${environment.API_KEY}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify(data),
  });

  if (!response.ok) {
    return new Response("Error calling AirTable!", {
      status: 500,
    });
  }
  return new Response("Success", {
    status: 200,
  });
}
```

If you'd like to learn about other cool things an API gateway can do, check out
our [top API gateway features guide](/learning-center/top-api-gateway-features).