Welile ID API
Base URL https://welileid.com/api/v1 · Machine-readable spec at /api/v1/openapi.json
Sign-in flow
- Use the native Google Sign-In or Sign in with Apple SDK to get an ID token.
- POST it to
/auth/googleor/auth/apple. You getaccess_token,refresh_tokenandhas_profile. - Store tokens in Keychain / Android Keystore. Send
Authorization: Bearer <access_token>on every call. - If
has_profileis false, upload photos via/uploadsthenPOST /profile. - On a 401, call
/auth/refreshand retry once.
Errors always look like { "error": { "code", "message" } }.
System
- GET
/healthPublicCheck the API is up.
Authentication
- POST
/auth/googlePublicExchange a native Google Sign-In ID token for a Welile session.
- Body
id_token— string, required — from Google Sign-In SDKnonce— string, optional — raw nonce if you hashed one into the requestaccess_token— string, optional
- POST
/auth/applePublicExchange a native Sign in with Apple identity token for a Welile session.
- Body
id_token— string, required — identityToken from ASAuthorizationnonce— string, recommended — the raw (unhashed) nonce
- POST
/auth/refreshPublicGet a new access token before the old one expires (~1 hour).
- Body
refresh_token— string, required
- POST
/auth/sign-outSigned inEnd this device's session.
Account
- GET
/meSigned inSigned-in user, roles and whether they have created their Welile ID.
- DELETE
/meSigned inPermanently delete the account, household and photos.
- Body
confirmation— "DELETE"
Photos
- POST
/uploadsSigned inGet a one-time upload URL for a photo. PUT the compressed JPEG to it, then save `path` on the profile.
- Body
kind— id_photo | selfie | household_logo
Profile
- GET
/profileSigned inYour Welile ID, with 1-hour viewable photo links.
- POST
/profileSigned inCreate your Welile ID (Anchor).
- Body
full_name— string, requiredphone— 07… or +256…, requiredid_photo_path— path from /uploads, requiredselfie_path— path from /uploads, requiredbirth_date— YYYY-MM-DD, optionalid_expiry— YYYY-MM-DD, optional
- PATCH
/profileSigned inUpdate profile and household settings. Send only fields that change.
- Body
full_name— stringphone— stringid_photo_path— stringselfie_path— stringhousehold_name— string | nullhousehold_logo_path— string | nullwhatsapp_group_link— https://chat.whatsapp.com/… | nullbirth_date— YYYY-MM-DD | nullid_expiry— YYYY-MM-DD | null
Family members
- GET
/membersSigned inList everyone under your ID, with search and filters.
- Query
q— name or phone digitsfilter— all | has_id | no_id | no_smartphonetype— dependent | provider
- POST
/membersSigned inAdd a family member directly (no invite).
- Body
full_name— string, requiredphone— string, requiredparent_id— member id they sit under, optionalis_provider— boolean — true = 'I depend on them'has_smartphone— booleanbirth_date— YYYY-MM-DDid_expiry— YYYY-MM-DD
- GET
/members/:idSigned inOne member.
- PATCH
/members/:idSigned inEdit a member.
- Body
full_name— stringphone— stringparent_id— string | nullis_provider— booleanhas_smartphone— boolean | nullbirth_date— YYYY-MM-DD | nullid_expiry— YYYY-MM-DD | null
- DELETE
/members/:idSigned inRemove a member.
- GET
/members/linked-photosSigned inSelfies and ID status of members who joined with their own login, keyed by member id.
- GET
/familySigned inNested family tree plus dashboard stats (totals, expiring IDs).
- GET
/membershipsSigned inHouseholds you have joined through an invite.
Invites
- GET
/invitesSigned inPending invites you sent, with share links.
- POST
/invitesSigned inCreate an invite. Returns the link and a ready WhatsApp share URL.
- Body
full_name— string, requiredphone— string, requiredparent_id— string, optionalis_provider— booleanhas_smartphone— boolean
- DELETE
/invites/:idSigned inCancel an invite.
- GET
/join/:tokenPublicPreview an invite before signing in.
- POST
/join/:token/acceptSigned inAccept an invite as the signed-in user.
- GET
/whatsapp/contactsSigned inHousehold contacts with wa.me links and the saved group link. Add ?format=vcf for a contacts file.
- Query
format— json | vcf
Ads
- GET
/ads/activePublicThe current advert for the welcome screen.
Admin
- GET
/admin/adsAd managerAll adverts.
- POST
/admin/ads/uploadsAd managerOne-time upload URL for an advert image.
- POST
/admin/adsAd managerCreate an advert.
- Body
title— string, requiredimage_path— from /admin/ads/uploadslink_url— stringis_active— boolean
- PATCH
/admin/ads/:idAd managerEdit or switch an advert on/off.
- Body
title— stringlink_url— string | nullis_active— boolean
- DELETE
/admin/ads/:idAd managerDelete an advert and its image.
- GET
/admin/staffAdminEveryone holding a staff role.
- POST
/admin/staffAdminMake an existing account an ad manager.
- Body
email— string, required
- DELETE
/admin/staff/:userIdAdminRemove the ad manager role.
Not a replacement National ID.