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

# Rest API

The LinkGate RESTful API lets publishers create and edit links, also called lockers, directly from their own websites. If you're planning to make a large number of links, use the [Dynamic API](https://docs.linkgate.gg/api/dynamic.md). It lets you use multiple different destinations on a single base link.

Open **Settings → API** in the dashboard. Your token is already filled into the examples, so copy one instead of typing the token by hand.

Every call uses this base URL:

```text theme={null}
https://linkgate.gg/api/v1/lockers
```

And every call needs the token:

```text theme={null}
Authorization: Bearer lg_live_...
```

| Call | What it does |
| - | - |
| `POST /api/v1/lockers` | Create a link |
| `GET /api/v1/lockers` | List your links |
| `GET /api/v1/lockers/{id}` | Read one link |
| `PATCH /api/v1/lockers/{id}` | Change the title, destination, or slug |
| `DELETE /api/v1/lockers/{id}` | Delete a link |

A create body looks like this.

```json theme={null}
{
  "title": "Example title",
  "target": "https://example.com"
}
```

`title` is the link title, up to 70 characters. `target` is the destination URL, and it has to be a real `http` or `https` address. The response includes the id. You use that id when you edit or delete, and in the dashboard examples it's written as `YOUR_LINK_ID`. The samples are Python, PHP, Node, and cURL. The variable that holds the result is `response`.

If the token leaks, contact [support](https://linkgate.gg/dashboard/settings/support) and ask for a reset. You can't rotate it yourself. A reset turns the old token off immediately, so update every app that was using it.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.