> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lovable.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect your app to GatewayAPI

> Connect your app to GatewayAPI, an SMS and RCS messaging API, to send mobile messages, track delivery status, and handle inbound replies from your Lovable app.

export const connector_0 = "GatewayAPI"

[GatewayAPI](https://gatewayapi.com/) is an SMS and RCS messaging platform for sending mobile messages through an API. The GatewayAPI connector lets your Lovable app send SMS and RCS messages, batch-send notifications, and connect delivery events back to app workflows.

With GatewayAPI, your app can:

* Send SMS and RCS messages to phone numbers
* Batch-send mobile messages for notifications and campaigns
* Add labels and references so messages can be matched to orders, bookings, or other app records
* Receive delivery status callbacks through a public webhook endpoint you configure in GatewayAPI
* Receive inbound SMS and RCS replies when your GatewayAPI account supports them

GatewayAPI is a good fit for apps that need transactional alerts, operational notifications, customer messaging, or campaign workflows backed by your GatewayAPI account.

## Common use cases and example apps

| Example app                    | Example prompt                                                                                                            | Description                                                                                                                                                                                  |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Appointment reminders**      | *Use GatewayAPI and build an appointment reminder app that sends SMS reminders before each booking.*                      | **Reduce missed appointments with scheduled SMS reminders.**<br />The app stores bookings, sends GatewayAPI messages before each appointment, and records delivery status for each reminder. |
| **Order status notifications** | *Use GatewayAPI and build an order tracking app that texts customers when their order is packed, shipped, and delivered.* | **Keep customers updated from order events.**<br />The app sends SMS or RCS updates when order status changes and uses message references to connect callbacks to the right order.           |
| **Incident alerting**          | *Use GatewayAPI and build an incident alert tool that texts on-call staff when a critical event is created.*              | **Send high-priority alerts outside email and chat.**<br />The app detects critical incidents, sends mobile alerts through GatewayAPI, and stores delivery results for audit trails.         |
| **Two-way support inbox**      | *Use GatewayAPI and build a support inbox that receives inbound SMS replies from customers.*                              | **Turn inbound customer replies into support records.**<br />The app exposes a public webhook endpoint, verifies GatewayAPI signatures, and stores replies for the support team.             |
| **Campaign sender**            | *Use GatewayAPI and build a campaign tool that sends approved SMS updates to a customer list.*                            | **Send segmented mobile campaigns from app data.**<br />The app batches recipients, sends messages through GatewayAPI, and tracks callback events for each campaign.                         |
| **Delivery status dashboard**  | *Use GatewayAPI and build a dashboard showing sent, delivered, and failed SMS messages from GatewayAPI webhooks.*         | **Monitor message delivery inside your app.**<br />The app saves webhook events, groups them by message reference, and shows delivery trends over time.                                      |

## How to connect GatewayAPI

Workspace **admins** and **owners** can connect GatewayAPI.

App connectors are enabled by default on Free, Pro, and Business plans. On Enterprise plans, workspace admins and owners can enable app connectors in **Connectors → Admin settings → App connectors**.

You can create multiple GatewayAPI connections using different API tokens, which is useful for separating environments (for example, development and production), targeting different GatewayAPI accounts, or using separate GatewayAPI domains.

When the connection is created, GatewayAPI becomes available across all projects in the workspace. Anyone building in a project can ask Lovable in chat to link their project to it.

### Prerequisites

Before connecting GatewayAPI, make sure you have:

* A GatewayAPI account
* A GatewayAPI API token
* The GatewayAPI domain where your API token is valid, either **Global (gatewayapi.com)** or **EU (gatewayapi.eu)**
* Lovable workspace owner or admin role

<Note>
  All SMS, RCS, webhook, and API usage through this connector uses your GatewayAPI account. Messaging costs, quotas, and billing are handled directly by GatewayAPI, not Lovable.
</Note>

### Step 1: Get a GatewayAPI API token

A GatewayAPI API token lets your Lovable app authenticate with the GatewayAPI messaging APIs. You can create separate tokens for different environments or apps.

To create or copy a GatewayAPI API token:

<Steps>
  <Step title="Open your GatewayAPI account">
    Sign in to the [GatewayAPI dashboard](https://app.gatewayapi.com/) with the account you want Lovable to use.
  </Step>

  <Step title="Open API token settings">
    In GatewayAPI, open the section where API tokens are managed for your account.
  </Step>

  <Step title="Create or copy an API token">
    Create a new API token for Lovable or copy an existing token. Use a descriptive name, for example `Lovable integration`, if GatewayAPI asks for one.
  </Step>

  <Step title="Note your API domain">
    Note whether the token belongs to the global GatewayAPI domain (`gatewayapi.com`) or the EU domain (`gatewayapi.eu`). You need to select the matching domain in Lovable.
  </Step>
</Steps>

<Warning>
  Your API token functions like a password. Keep it secure and never share it publicly. You'll need it in the next step.
</Warning>

See GatewayAPI documentation for more information: [GatewayAPI authentication](https://gatewayapi.com/docs/authentication/).

### Step 2: Connect GatewayAPI to Lovable

You can create multiple connections using different API tokens.

<Steps>
  <Step title="Open GatewayAPI in Connectors">
    Go to **Connectors → App connectors** and select **GatewayAPI**.
  </Step>

  <Step title="Add a connection">
    Click **Add connection**.
  </Step>

  <Step title="Configure the connection">
    * **Display name**: name the connection, for example `GatewayAPI Prod`.
    * **API domain**: select the GatewayAPI domain where your token is valid. The default is **Global (gatewayapi.com)**. Select **EU (gatewayapi.eu)** for tokens issued for the EU domain.
    * **API token**: paste your GatewayAPI API token.
  </Step>

  <Step title="Choose who can access this connection">
    Under **Who can access this connection**, decide who in your workspace can use the connection:

    * **Only you** (default): only the person creating the connection can use it and its associated data.
    * **Invite specific people**: only you and explicitly added workspace members can use the connection and its associated data.
    * **Invite entire workspace**: click **Invite entire workspace** to make the connection available to everyone in your Lovable workspace.

    See [Connection-level access](/integrations/introduction#connection-level-access) for more information.
  </Step>

  <Step title="Connect">
    Click **Connect**.
  </Step>
</Steps>

When connected, anyone building in a project can ask Lovable in chat to link their project to GatewayAPI (based on configured connection-level access). Your Lovable apps can then send SMS and RCS messages through GatewayAPI.

## Receiving delivery status and inbound replies

GatewayAPI sends delivery status updates and inbound SMS or RCS messages to webhook endpoints that you configure in the GatewayAPI dashboard. These webhook events do not go through the Lovable connector gateway.

When prompting Lovable to build webhook handling, ask it to:

* Create a public endpoint for GatewayAPI webhook events
* Store a separate `GATEWAYAPI_WEBHOOK_SECRET` backend secret for webhook signature verification
* Verify the `Signature` header before trusting webhook data
* Save each event before responding with a 2xx status
* Respond within 5 seconds so GatewayAPI does not treat the event as failed
* Use GatewayAPI message references to match status callbacks to app records

After Lovable creates the webhook endpoint, register that endpoint and webhook secret in the GatewayAPI dashboard for the matching domain.

<Note>
  Inbound SMS requires a short code or keyword leased from GatewayAPI and assigned to the webhook in GatewayAPI. Availability and pricing are handled by GatewayAPI.
</Note>

## Limitations

The GatewayAPI connector cannot:

* Create, update, or delete GatewayAPI webhooks for you. Configure webhooks in the GatewayAPI dashboard
* Route delivery status or inbound message webhook events through the connector gateway
* Lease short codes, keywords, or other inbound messaging resources for you
* Support per-end-customer GatewayAPI authentication. Each connection represents one GatewayAPI API token shared across all projects linked to it
* Use more than one GatewayAPI domain per connection. A single connection authenticates against either the global domain or the EU domain

## How to unlink projects from a {connector_0} connection

Editors and above can remove specific projects from a connection without deleting the connection entirely. The connection will remain available for other projects.

To unlink projects:

<Steps>
  <Step title="Open Connectors">
    Open **Connectors**, then go to **App connectors**, and select **{connector_0}**.
  </Step>

  <Step title="Open the connection">
    Open the connection you want to manage.
  </Step>

  <Step title="Select projects">
    Under **Linked projects**, check the projects you want to unlink.
  </Step>

  <Step title="Confirm">
    Click **Unlink projects** and confirm.
  </Step>
</Steps>

When unlinked, those projects will no longer have access to {connector_0} through this connection. If a project needs {connector_0} again, you can link it to any available connection.

## How to delete a {connector_0} connection

Workspace admins and owners can delete {connector_0} connections. Other members can delete a connection if they created it, or if they have been explicitly granted access to it.

<Warning>
  Deleting a connection is permanent and cannot be undone. It will remove the credentials from all linked projects, and any apps using this connection will stop working until a new connection is added.
</Warning>

Before deleting, review the **Linked projects** section to see which projects are currently using the connection.

To delete a connection:

<Steps>
  <Step title="Open Connectors">
    Open **Connectors**, then go to **App connectors**, and select **{connector_0}**.
  </Step>

  <Step title="Open the connection">
    Open the connection you want to remove.
  </Step>

  <Step title="Review linked projects">
    Review the **Linked projects** section.
  </Step>

  <Step title="Delete">
    Under **Delete this connection**, click **Delete** and confirm.
  </Step>
</Steps>
