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

# Get API Access

> Choose the right Socket API endpoint for your integration.

Socket Swap V3 is available on three endpoints depending on your use case:

| Endpoint | Auth required | Rate limit | Use case |
| - | - | - | - |
| `https://public-backend.socket.tech` | None | Shared | Testing and prototyping |
| `https://backend.socket.tech` | Domain whitelist | Standard | Wallets, widgets, other UIs |
| `https://dedicated-backend.socket.tech` | API key | 20 rps (100 rps enterprise) | Production backends |

***

## Public endpoint

```
https://public-backend.socket.tech
```

No authentication required. Use this to try the API and test your integration before going to production.

```bash theme={null}
curl "https://public-backend.socket.tech/v3/swap/quote?userOps=tx&originChainId=42161&..."
```

***

## Backend endpoint (domain whitelisted)

```
https://backend.socket.tech
```

For wallets, widgets, and frontend UIs. Access is tied to your domain rather than an API key.
[Request access here](https://forms.gle/4rE4mEXbnKeVdCeq7).

Once set up, requests include your `affiliate` ID:

```bash theme={null}
curl "https://backend.socket.tech/v3/swap/quote?userOps=tx&originChainId=42161&..." \
  --header "affiliate: YOUR_AFFILIATE_ID"
```

***

## Dedicated endpoint (API key)

```
https://dedicated-backend.socket.tech
```

For production backend integrations that need guaranteed rate limits. Comes with 20 rps by default; enterprise customers get 100 rps.
[Request access here](https://forms.gle/4rE4mEXbnKeVdCeq7).

```bash theme={null}
curl "https://dedicated-backend.socket.tech/v3/swap/quote?userOps=tx&originChainId=42161&..." \
  --header "x-api-key: YOUR_API_KEY" \
  --header "affiliate: YOUR_AFFILIATE_ID"
```

> [!WARNING]
>
> Keep your API key server-side. Never expose it in frontend code or client bundles.

***

## Server Request ID

All responses include a `server-req-id` header. Capture and include it when reporting issues to the Socket team — it lets us trace the exact request through the system.

```javascript theme={null}
const response = await fetch(url, { headers });
const serverReqId = response.headers.get("server-req-id");
```

***

## Frontend auth token (optional)

Some frontend / widget integrations exchange a Cloudflare Turnstile challenge for a short-lived JWT:

```http theme={null}
POST /v3/auth/token
```

Body fields: `turnstileToken`, plus either `affiliate` or `apiKey` (as configured for your integrator).

Most backend integrations use the dedicated endpoint with `x-api-key` + `affiliate` and do not need this flow. See the [Socket Widget](https://docs.socket.tech/integrate/socket-widget.md) docs if you are embedding the hosted UI.


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