> ## Documentation Index
> Fetch the complete documentation index at: https://rain-sandbox-trial.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Rain API

The Rain API allows developers to integrate card issuing, transaction management, and collateralized credit solutions into their applications. This page provides general guidelines for using the API, including access instructions and important notes.

## Developer notes and tips

Before making requests to the Rain API, it's helpful to understand a few key details about how our system handles authentication, redirects, and responses. The following sections provide guidelines to ensure smooth integration.

### `curl` and redirects

We proxy our API, so if you're having trouble testing through `curl`, try adding the `-L` flag to follow redirects! Other clients—such as browsers, backends, and Postman—should follow these automatically.

### Rate limits

The Rain API enforces rate limits to ensure fair usage and prevent abuse. If you exceed these limits, you receive a `429 Too Many Requests` response.

#### Default rate limits

Unauthenticated requests are limited to **1,000 requests per minute** based on IP address.

Authenticated requests (those with a valid `api-key` header) are rate-limited at the **tenant level**. All API calls from your organization share a single bucket, regardless of which endpoints you call.

<Info>
  Subtenants share their parent tenant's rate limit bucket. All API activity across a parent tenant and its subtenants counts toward the same limit.
</Info>

#### Endpoint-specific rate limits

Some endpoints have their own rate limits. On these endpoints, the endpoint-specific limit applies **instead of** the tenant-level limit, and it is keyed by IP address:

| Endpoint            | Rate limit              | Keyed by   |
| ------------------- | ----------------------- | ---------- |
| Signature endpoints | 1 request per second    | IP address |
| List webhooks       | 5 requests per second   | IP address |
| Create card         | 3,000 requests per hour | IP address |
| Create scoped card  | 60 requests per minute  | IP address |

#### Rate limit overrides

If your integration requires higher rate limits, contact your Rain representative to request a rate limit override for your organization. Changes to rate limit overrides may take up to 10 minutes to take effect due to caching.

#### Response headers

Each response includes headers to help you monitor rate limit usage:

| Header                  | Description                                         |
| ----------------------- | --------------------------------------------------- |
| `X-RateLimit-Limit`     | Maximum requests allowed in the current time window |
| `X-RateLimit-Remaining` | Requests remaining in the current time window       |
| `X-RateLimit-Reset`     | Unix timestamp when the rate limit window resets    |

#### Handling rate limit errors

If you exceed the rate limit, the API returns a `429 Too Many Requests` response. When this happens:

1. Check the `X-RateLimit-Reset` header to see when you can retry.
2. Implement exponential backoff.
3. Batch requests where possible.

If you need higher rate limits, contact your account manager.

## Endpoints

Learn how to [authenticate with the API](/reference/authenticating-with-the-api), or select a group of endpoints below to explore further.

<Columns cols={3}>
  <Card title="Applications" href="/reference/applications/create-a-corporate-application-for-a-company" arrow />

  <Card title="Balances" href="/reference/balances/get-a-tenants-credit-balances" arrow />

  <Card title="Cards" href="/reference/cards/get-all-the-cards-for-a-user-or-company" arrow />
</Columns>

<Columns cols={2}>
  <Card title="Companies" href="/reference/companies/get-all-companies" arrow />

  <Card title="Users" href="/reference/users/create-a-user-in-a-company" arrow />

  <Card title="Contracts" href="/reference/contracts/get-smart-contract-information-for-a-company" arrow />

  <Card title="Signatures" href="/reference/signatures/get-payment-signature-for-a-company" arrow />
</Columns>

<Columns cols={3}>
  <Card title="Disputes" href="/reference/disputes/get-all-disputes" arrow />

  <Card title="Keys" href="/reference/keys/create-a-key" arrow />

  <Card title="Transactions" href="/reference/transactions/get-all-transactions" arrow />
</Columns>

<Card title="Webhooks" icon="bolt" href="/docs/webhooks">
  Subscribe to real-time event notifications for cards, transactions, disputes, and more.
</Card>
