Authentication
Yara authenticates every private endpoint with API keys.
Using the Secret Key
All private endpoints require the x-yara-api-key header with your secret key. Requests without a valid key receive 401 Unauthorized.
curl -X GET "https://api.yara.cash/api/v1/wallet" \
-H "x-yara-api-key: <your_secret_key>" \
-H "Content-Type: application/json"Public Endpoints
Some endpoints don't require authentication:
GET /api/rates- Get exchange rates
GET https://api.yara.cash/api/rates — fetches current exchange rates without authentication.
curl https://api.yara.cash/api/ratesAuthentication Errors
401 Unauthorized
Missing or invalid API key.
{
"error": "invalid account ID"
}- Check that you're sending the
x-yara-api-keyheader - Verify your API key is correct
- Ensure the key hasn't been revoked