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

# GetRequest Endpoints: Capture, Mock, and Proxy HTTP Traffic

> Learn how GetRequest endpoints intercept every HTTP request, letting you mock responses or proxy traffic to your backend with zero downtime switching.

Every endpoint in GetRequest is a stable, public URL that sits in front of your traffic. Whether you're mocking an API response during development or forwarding live requests to your production backend, the endpoint captures everything that passes through it — before it even decides where to send it.

## What Is an Endpoint?

An endpoint is a uniquely addressable URL hosted under your project that accepts HTTP requests. You configure each endpoint with a method, a slug, and an action that determines what happens to incoming traffic. Because GetRequest owns the URL, you can change the behavior of that URL at any time without touching your clients, webhooks, or integrations.

The full URL for any endpoint follows this pattern:

```text theme={null}
https://e.getrequest.io/{project_uri}/{slug}
```

For example, if your project URI is `ddfkU760XMs2z7te` and your slug is `payment-webhook`, your endpoint lives at:

```text theme={null}
https://e.getrequest.io/ddfkU760XMs2z7te/payment-webhook
```

That URL never changes, even if you rename the endpoint, swap its action type, or update the upstream target.

## Endpoint Types

GetRequest gives you two action types. You can switch between them at any time with no downtime.

| Feature                 | JSON                                | Forward                                |
| ----------------------- | ----------------------------------- | -------------------------------------- |
| **Purpose**             | Return a static mock response       | Proxy requests to your backend         |
| **Response body**       | JSON you define in the dashboard    | Whatever your upstream server returns  |
| **HTTP status**         | Always `200 OK`                     | Mirrors your backend's status code     |
| **Best for**            | Local development, testing, mocking | Production, staging, real integrations |
| **Upstream URL needed** | No                                  | Yes                                    |

### JSON Endpoints

A JSON endpoint returns a static response body you define in the dashboard. It always responds with HTTP 200, making it ideal for mocking third-party APIs, standing up fake webhook targets, or unblocking frontend work before a backend is ready.

### Forward Endpoints

A Forward endpoint acts as a transparent proxy. GetRequest receives the incoming request, forwards it to the upstream URL you configure, and returns the real response — status code, headers, and body — back to the caller. Use this type for production and staging traffic where you need the real backend behavior alongside GetRequest's logging and reliability layer.

## Creating an Endpoint

When you create an endpoint, you configure four fields:

<ParamField path="name" type="string" required>
  A human-readable label for the endpoint, displayed in your dashboard. This does not affect the URL.
</ParamField>

<ParamField path="slug" type="string" required>
  The URL path segment appended to your project URI. Once set, this forms the permanent endpoint URL. Use lowercase letters, numbers, and hyphens (e.g. `payment-webhook`).
</ParamField>

<ParamField path="method" type="string" required>
  The HTTP method this endpoint accepts. Choose from `GET`, `POST`, `PUT`, `PATCH`, or `DELETE`.
</ParamField>

<ParamField path="action" type="string" required>
  The behavior of the endpoint. Set to `JSON` to return a static response, or `Forward` to proxy requests to an upstream URL.
</ParamField>

## Switching Between Types

You can toggle any endpoint between JSON and Forward directly from the dashboard. The switch takes effect immediately — there is no redeployment, no DNS change, and no interruption to incoming traffic. This makes it straightforward to:

* Promote a mock endpoint to a real forward when your backend is ready
* Temporarily switch a forward endpoint to JSON to absorb traffic during an outage
* Test downstream behavior against a controlled static response at any time

<Note>
  Both JSON and Forward endpoints log every request that arrives, regardless of the action type or response outcome. Switching types never creates a gap in your log history.
</Note>

## Endpoint URL Structure

The endpoint URL is constructed from two parts you control:

```text theme={null}
https://e.getrequest.io / {project_uri} / {slug}
```

* **`project_uri`** — A unique identifier assigned to your project (e.g. `ddfkU760XMs2z7te`). You can find it in your project settings.
* **`slug`** — The path segment you define when creating the endpoint.

The base domain `e.getrequest.io` is fixed and shared across all GetRequest customers. Your project URI ensures all requests are routed to the correct project.

<Tip>
  Point your webhook providers, API clients, or SDKs at the endpoint URL as early as possible. Because the URL is stable, you can capture real traffic immediately and change the action type later without updating your integration.
</Tip>
