Skip to content

Integration

Custom Domains Integration

Verify Workspace-owned domains, bind branded auth and API hosts by Project environment, and understand domain lifecycle request and response fields.

Choose this when

Use this path after basic auth works and you want branded customer hosts such as:

  • https://auth.customer.com
  • https://api.customer.com

Each host binds to one Project, one environment, and one purpose: auth or api.

Before you start

You need DNS access for the domain, a selected Workspace and Project, and a decision about whether you are configuring sandbox or production first.

Get credentials from Console

Credentials and configuration values
ValueConsole sourceEnv varUsed for
Domain hostIntegration > Domains > Add domainLAMBA_CUSTOM_DOMAIN_HOSTHost name to verify and bind
Verification tokenIntegration > Domains > Domain detailsLAMBA_DOMAIN_VERIFICATION_TOKENTXT record value for domain ownership verification
Project and environmentTop Project selector and environment badgeLAMBA_PROJECT_ID and LAMBA_ENVBinding a verified host to the runtime context
PurposeIntegration > Domains > BindingsLAMBA_DOMAIN_PURPOSE`auth` for issuer/login host or `api` for Customer API host

Configure environment variables

LAMBA_CUSTOMER_API_BASE=https://test.api.uselamba.com
LAMBA_CUSTOM_DOMAIN_HOST=auth.customer.com
LAMBA_PROJECT_ID=<project-id>
LAMBA_ENV=test

Make the first request

You can manage domains from the console. Server-side admin automation can use the public admin domain routes with a customer admin session or management token.

POSThttps://test.api.uselamba.com/v1/admin/domains
Auth
Customer admin session or management token
Used for
Creates a domain verification record
curl -X POST "$LAMBA_CUSTOMER_API_BASE/v1/admin/domains" \
  -H "Authorization: Bearer $ADMIN_OR_MANAGEMENT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "host": "auth.customer.com"
  }'

Publish the TXT record:

name:  _lamba-verification.auth.customer.com
type:  TXT
value: <verification-token>

Then verify and bind the domain:

curl -X POST "$LAMBA_CUSTOMER_API_BASE/v1/admin/domains/$DOMAIN_ID/verify" \
  -H "Authorization: Bearer $ADMIN_OR_MANAGEMENT_TOKEN"

Request fields

Request and response fields
FieldTypeRequiredMeaningNotes
hoststringRequiredFully qualified custom host to verify.Example: `auth.customer.com`.
purposeauth | apiRequiredWhether the binding serves auth/OIDC or Customer API traffic.-
projectIdstringRequiredProject that owns the runtime binding.-
environmenttest | prodRequiredEnvironment that should serve traffic on this host.-

Response fields

Request and response fields
FieldTypeRequiredMeaningNotes
idstringRequiredDomain record ID used for verify, bind, and delete operations.-
hoststringRequiredCustom host being managed.-
isVerifiedbooleanRequiredWhether ownership verification has succeeded.-
statusstringRequiredCurrent domain lifecycle state.-
verificationTokenstringRequiredTXT record value to publish before verification.-
bindingsarrayRequiredProject, environment, purpose, and binding status records.-

Done when

Done when

  • The TXT verification record is published for the exact host.
  • The domain status is verified in `Integration > Domains`.
  • The host is bound to the expected Project, environment, and purpose.
  • OIDC discovery from a branded auth host returns that host as issuer.
  • Redirect URIs on App Clients use the branded host exactly where needed.

Troubleshooting

SymptomLikely causeFix
Verification failsTXT record missing, wrong name, or DNS not propagatedCheck the _lamba-verification.<host> record and retry
Host fails closedMissing Project/environment/purpose bindingAdd the correct binding in Integration > Domains
Token validation failsValidator still expects id.uselamba.com issuerRead discovery from the branded auth host and update issuer config
Redirect failsApp Client redirect URI uses old hostUpdate Integration > App Clients > Edit > Redirect URIs
  • OIDC Integration: /docs/quickstart/oidc
  • OAuth/OIDC Security: /docs/reference/oauth-oidc-security
  • Environment Separation: /docs/concepts/environments
  • Customer API request and response contract: /docs/quickstart/customer-api