Authentication

Most Vudy routes require an API key. Routes that act for a user or team may additionally require a session, explicit profile/team headers, or a team-scoped API key.

Headers#

HeaderPurpose
x-api-keyDashboard-issued key (vudy_sandbox_… or vudy_production_…)
AuthorizationBearer <session> returned by POST /v1/auth/verify-otp
x-profile-idActing profile UUID on routes that support explicit header context
x-team-idActing team UUID on routes that support explicit header context

Patterns at a glance#

PatternRequired headersUse
PublicnoneGET /v1/maintenance
API keyx-api-keyRoutes that do not need user/team context
API key + context headersx-api-key, x-profile-id, x-team-idRoutes documented as supporting explicit header context
API key + sessionx-api-key, Authorization: Bearer <session>Session-authenticated user flows
ConditionalAPI key plus one supported context modeRoutes that explicitly accept session, headers, or key context

Important rules#

  • Always send the API key that belongs to the request host’s environment.
  • Send x-profile-id and x-team-id together. The profile must belong to the team.
  • If a valid session is present on a conditional route, its selected profile/team takes precedence over context headers.
  • Session-only routes use the profile/team selected by OTP verification. To change that context, verify OTP again with the desired profileId.
  • Route reference pages identify required API key permissions such as WRITE or OTC_PROVIDER.

Auth failure statuses#

SituationTypical HTTP status
Missing/invalid API key, wrong environment, missing permissions403
Missing/invalid required session401
No usable context on a conditional route401 or route-level 403
Rate or burst limit exceeded429
Required OTP or KYC access gate closed503

Use the HTTP status and error.code together; do not branch on message text.

Next steps#