Skip to main content
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

1

Store your API key

Export the key in your current terminal session. Replace the placeholder with your real key.
Do not commit API keys to source control. See Authentication for production guidance.
2

Request your balance

Retrieve your account balance.

Response

A successful request returns HTTP 200 with your current balance.
If the API returns 401 or 403, check the header name and API key. See Handle errors before adding retries.
A successful balance response confirms that your base URL and API key work together.

Next steps

Send a WhatsApp message

Send templates, text, and media messages.

Configure webhooks

Receive delivery updates and inbound messages.

Handle API errors

Read error responses and design safe retries.

Balance API reference

Inspect the complete response schema and try the endpoint.