Skip to main content
Follow these patterns to build reliable, performant, and secure integrations with the Yoshi API.

Error handling

Always check the response envelope before accessing data:
Include request_id in error logs and support tickets — it lets Yoshi trace exactly what happened.

Retry strategy

The SDKs handle retries automatically with configurable maxRetries (default: 2).

Caching

Never cache balance data — it changes with every sync and users expect current numbers.

Webhook processing

Respond fast, process later:
Return a 2xx response within 15 seconds. If your handler takes longer, Yoshi marks the delivery as failed and retries.
Idempotent processing: Events can be delivered more than once. Use event.id to deduplicate:

Security

Never expose API keys client-side. API keys grant full access to the user’s financial data. Always make API calls from a backend server.
Use environment variables. Don’t hardcode keys in source code:
Rotate keys periodically. Create a new key, update your services, then revoke the old one. Multiple active keys are supported for zero-downtime rotation. Verify webhook signatures. Always verify the signature before processing webhook events — otherwise anyone can send fake events to your endpoint.

Rate limit budgeting

Each API key has a limit of 100 requests per minute. If you have multiple services sharing a key:
  • Track usage across services using the X-RateLimit-Remaining header
  • Prioritize user-facing requests over background jobs
  • Use webhooks to reduce polling — each webhook you process replaces multiple poll requests
  • Consider separate keys for different services so they have independent limits

What’s next

Errors

Full error codes reference.

Rate limits

Detailed rate limiting documentation.
Last modified on April 17, 2026