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

# Gateway API

> Call Qubrics Gateway endpoints for email validation, discovery, execution, supplier order and usage.

This page describes the Gateway release contract. Qubrics Gateway gives your application one API host for partner capabilities. Use one API key and the same prepaid wallet across every Gateway call.

```text theme={null}
https://api.qubrics.com
```

> [!NOTE]
>
> Gateway calls use a team API key in the `Authorization: Bearer` header. Create
> and scope keys from your Qubrics account before making a call.

## Find and call an endpoint

Search returns the endpoints your key can use. It is free and returns the best five to eight matches. Set `detail` to `true` when you need each match's input schema, price and required parameters.

```bash theme={null}
curl https://api.qubrics.com/v1/search \
  -H "Authorization: Bearer $QUBRICS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"check whether an email can receive mail","category":"enrichment","detail":true}'
```

Call an endpoint directly with its typed route, or pass its ID and parameters to `execute`. `execute` has no wrapper fee. The selected endpoint keeps its own permission, rate class and charge.

```bash theme={null}
curl https://api.qubrics.com/v1/execute \
  -H "Authorization: Bearer $QUBRICS_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: validation-001" \
  -d '{"endpoint_id":"enrichment.validate_email","params":{"email":"person@example.com"}}'
```

## Validate an email

`POST /v1/enrichment/validate-email` checks whether an address can receive mail. Its supported suppliers start at `$0.0039` and `$0.0195` per billable result. Qubrics charges the starting self-serve price of the supplier that answers.

Every result except `unknown` is charged. An outage moves to the next available partner automatically. Set `waterfall` to `true` to continue after an `unknown`; the first result that is not `unknown` decides the response and charge. An all-`unknown` call costs `$0`.

The response includes the submitted `email`, a `result` of `valid`, `invalid`, `catch_all`, `disposable` or `unknown`, plus `served_by` and `served_by_fallback`.

```bash theme={null}
curl https://api.qubrics.com/v1/enrichment/validate-email \
  -H "Authorization: Bearer $QUBRICS_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: validation-001" \
  -d '{"email":"person@example.com","waterfall":true}'
```

If a supplier reaches its request cap, the response code is `supplier_rate_limited` with HTTP `429`, `Retry-After` and a `$0` charge. Wait for that duration and use a new idempotency key. A team rate-limit response also includes the `X-RateLimit-*` headers. A dependency failure returns `503` with `Retry-After` and costs `$0`.

## Set supplier order

Read or replace your team's order for a supported endpoint.

```bash theme={null}
curl https://api.qubrics.com/v1/account/get-supplier-order \
  -H "Authorization: Bearer $QUBRICS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"endpoint_id":"enrichment.validate_email"}'

curl https://api.qubrics.com/v1/account/set-supplier-order \
  -H "Authorization: Bearer $QUBRICS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"endpoint_id":"enrichment.validate_email","supplier_order":["<supplier-id>"]}'
```

The order is the complete failover chain. A supplier you leave out is never used. The endpoint must support every supplier in the submitted order.

## Read usage

`POST /v1/account/usage` is free. Supply an inclusive `start_at`, an exclusive `end_at` no more than 31 days later, and an optional `limit` from 1 to 100. Use the returned cursor with the same time range.

The response lists each paid call with its endpoint, serving supplier, result class, price in microdollars and time. It also returns daily totals per endpoint. The default page size is 25 and the maximum is 100.

```bash theme={null}
curl https://api.qubrics.com/v1/account/usage \
  -H "Authorization: Bearer $QUBRICS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"start_at":"2026-12-01T00:00:00.000Z","end_at":"2026-12-02T00:00:00.000Z","limit":25}'
```

## Wallet and rate limits

The wallet is prepaid. A paid call places a hold, calls the selected partner and settles the partner's price. Failed, timed-out and uncharged outcomes cost `$0`.

When the available balance is too low, the API returns `402` with code `insufficient_balance`, `balance_microdollars`, `amount_needed_microdollars` and `top_up_url`. An ownerless team also receives `owner_invite_url` when an owner must be invited before top-up. A key spend limit returns code `key_spend_limit_exceeded` with `limit_microdollars`, `spent_microdollars` and `resets_at`. Add credit or wait for the limit reset, then retry the original operation.

An idempotency key replays the same paid result for 24 hours and charges once. If an identical request is still in flight, wait for that request to finish. A changed request with the same key is rejected as an idempotency conflict.

Limits are shared by team across all keys and measured per second.

| Call class | Limit |
| - | -: |
| Paid calls | 50 per second |
| Other free calls | 100 per second |
| Email and Mailbox calls | 1,000 per second |

Each team can have an approved override. A `429` from the team limit includes `Retry-After` and costs `$0`.

## Next steps

> [card] [SDKs](https://qubrics.com/docs/developer-tools/sdks)
>
> Use a generated client for typed Gateway requests.

> [card] [CLI](https://qubrics.com/docs/developer-tools/cli.md)
>
> Run Gateway calls from a terminal with `qubrics`.

> [card] [API errors](https://qubrics.com/docs/api/errors.md)
>
> Handle shared error envelopes and retry headers.


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