Before you begin
- Agree base URLs, credentials, and contacts with Bilt. See Environments and credentials.
- Agree contact normalization: E.164 for phones, and a policy for email case and plus-addressing.
How it works
After a link succeeds, tell your customer through your own channel that their account was linked. Implement these endpoints on your server. Bilt calls them in this order.Steps
1
Look up the contact
Bilt calls Look up a contact first. Return the
partnerMemberId you find, or 200 with exists: false. Keep it read-only.2
Link the account
Bilt calls Link an account. Run these checks in order:
- Validate the bearer token, and return
401before you read the body. - Return
403unlesscontact.isVerifiedistrue. A missing value is nottrue. - Return
400for an inconsistent body, such as a malformed contact or UUID. - Resolve the account by exact match on the verified contact. Use
partnerMemberIdonly to choose between matches. Return404when nothing matches.
3
Create and link, if you support it
Create and link an account is optional, enabled per partner. Bilt calls it only when a member with no account asks to open one. Run the link account checks.If you already hold an account for the contact, return
409 account_exists and write nothing. Bilt then links that account through link account with the same idempotencyKey. Use account_exists only for that case.Make links safe to retry
Bilt retries a timeout or5xx with the same idempotencyKey. A retry must never leave a second link or account. Use one of these approaches:
- Store the key, and tell Bilt how long you keep it.
- Enforce one active link per account and per member, and answer a repeat with success.
200 linked, and do not refuse the key as spent.
What can go wrong
- The bearer token is missing or wrong. Answer
401before you read the body. - The contact is not verified. Answer
403, and never link it. - You already hold an account on create and link. Answer
409 account_existsand write nothing. - A retry arrives after the link ended. Refuse the spent
idempotencyKey, or the account is silently relinked.
Next steps
- Unlink an account covers the unlink endpoint you host.
- Test and go live has the full checklist.