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

# Quickstart

> Authenticate with YCloud and make your first API request.

In this quickstart, you call the Balance API to confirm that your base URL and
API key are configured correctly.

## Before you begin

You need:

* A YCloud account
* A YCloud API key
* `curl` or another HTTP client

## How it works

Every server-side API request uses the `https://api.ycloud.com/v2` base URL and
sends your key in the `X-API-Key` header. This example retrieves account
balance because it does not create or send anything.

## Request

<Steps>
  <Step title="Store your API key">
    Export the key in your current terminal session. Replace the placeholder with your real key.

    ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
    export YCLOUD_API_KEY="YOUR_API_KEY"
    ```

    Do not commit API keys to source control. See [Authentication](/en/api-reference/guides/api-fundamentals/authentication) for production guidance.
  </Step>

  <Step title="Request your balance">
    Retrieve your account balance.

    ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
    curl https://api.ycloud.com/v2/balance \
      --header "X-API-Key: $YCLOUD_API_KEY" \
      --header "Accept: application/json"
    ```
  </Step>
</Steps>

## Response

A successful request returns HTTP `200` with your current balance.

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "amount": 10.5,
  "currency": "USD"
}
```

| Field | Description |
| - | - |
| `amount` | Available account balance. |
| `currency` | ISO currency used by the account. |

If the API returns `401` or `403`, check the header name and API key. See
[Handle errors](/en/api-reference/guides/api-fundamentals/handle-errors) before adding retries.

<Tip>A successful balance response confirms that your base URL and API key work together.</Tip>

## Next steps

<CardGroup cols={2}>
  <Card title="Send a WhatsApp message" icon="whatsapp" href="/en/api-reference/guides/whatsapp-platform/send-whatsapp-message">
    Send templates, text, and media messages.
  </Card>

  <Card title="Configure webhooks" icon="webhook" href="/en/api-reference/guides/api-fundamentals/configure-webhooks">
    Receive delivery updates and inbound messages.
  </Card>

  <Card title="Handle API errors" icon="triangle-exclamation" href="/en/api-reference/guides/api-fundamentals/handle-errors">
    Read error responses and design safe retries.
  </Card>

  <Card title="Balance API reference" icon="code" href="/api-reference/balance/retrieve-balance">
    Inspect the complete response schema and try the endpoint.
  </Card>
</CardGroup>


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