POST
/projects/{project_id}/branches/{branch_id}/auth/domainsAdd domain to redirect_uri whitelistAdds a domain to the redirect URI whitelist for the specified branch. Only domains in this list are permitted as redirect targets after authentication.
Parameters
project_idstringpathrequiredThe Neon project ID
branch_idstringpathrequiredThe Neon branch ID
Request body
requiredapplication/json
objectNeonAuthAddDomainToRedirectURIWhitelistRequest
auth_providerstringrequiredAuthentication provider integrated with this Neon Auth configuration. `better_auth` integrates with Better Auth (the current, recommended provider). `stack` integrates with Stack Auth (deprecated). `mock` is a simulated provider for local development and testing only.
domainstring · urirequiredURI to add to the redirect URI allowlist for the auth provider.
{
"auth_provider": "better_auth",
"domain": "https://example.com"
}Responses
objectGeneralError
codestringrequiredmessagestringrequiredError message
request_idstringUnique identifier for the request, useful for debugging. You can set this value manually by including an `X-Request-ID` header in the request. If not provided, the value will be generated automatically.
{
"code": "",
"message": "string",
"request_id": "string"
}