Sign in or register via an Apple identityToken. The iOS client performs Sign in with Apple and POSTs the resulting identityToken; the server verifies it against Apple JWKS. `fullName` is REQUIRED on the very first sign-in (Apple delivers the user name only once, outside the JWT).
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/auth/social/apple" \ -H "Content-Type: application/json" \ -d '{ "identityToken": "eyJraWQiOiJZdXlYb1kiLCJhbGciOiJSUzI1NiJ9…<truncated Apple JWT>…", "fullName": { "givenName": "Khalid", "familyName": "Al-Saud" }, "acceptedTermsVersion": "2026-04" }'{ "data": { "user": { "id": "usr_01jq8z4b2k6h7n8m9p0r3s5t7v", "fullName": "Khalid Al-Saud", "email": "[email protected]", "phone": "+966555012345", "avatarFileId": "fil_01jq8z4c0e3p5q7r9s2t4w6x8z", "avatar": { "original": "https://cdn.trackme.sa/u/khalid-original.jpg", "thumb": "https://cdn.trackme.sa/u/khalid-thumb.jpg", "medium": "https://cdn.trackme.sa/u/khalid-medium.jpg" }, "city": "Riyadh", "country": "SA", "status": "active", "types": [ "customer" ], "preferences": { "cuisines": [ "burgers", "coffee" ], "language": "en" }, "language": "en", "createdAt": "2026-04-12T08:14:22.000Z", "updatedAt": "2026-05-18T11:02:09.000Z", "deletedAt": null }, "accessToken": "oat_01jq8z4ay9k2m4p6r8t0v2x4z6" }, "meta": { "requestId": "req_01jq8z1mxc0e0v6r3xj0a8h9k7" }}{ "error": { "code": "AUTH_REQUIRED", "message": "Authentication is required to access this resource." }, "meta": { "requestId": "req_01jq8z1mxc0e0v6r3xj0a8h9k7" }}{ "error": { "code": "CONFLICT", "message": "This action conflicts with an existing record.", "targetType": "order", "targetId": "ord_01jq8z3a0n0y9v0x1g4t2c7m6e" }, "meta": { "requestId": "req_01jq8z1mxc0e0v6r3xj0a8h9k7" }}{ "error": { "code": "VALIDATION_ERROR", "message": "One or more fields are invalid.", "fields": [ { "path": "email", "rule": "email", "message": "Must be a valid email address." } ] }, "meta": { "requestId": "req_01jq8z1mxc0e0v6r3xj0a8h9k7" }}{ "error": { "code": "RATE_LIMITED", "message": "Too many requests — slow down and retry after the indicated delay.", "retryAfterSeconds": 60 }, "meta": { "requestId": "req_01jq8z1mxc0e0v6r3xj0a8h9k7" }}Sign in or register via a Google ID token. The mobile client performs the Google handshake (google_sign_in) and POSTs the resulting ID token; the server verifies it against Google JWKS. POST
The token audience must exactly match an entry in the server GOOGLE_OAUTH_CLIENT_IDS allowlist; belonging to the same Google project alone is insufficient. Mobile Android serverClientId must be the Web OAuth client ID approved in this list. Signature, issuer, audience and expiry are verified; invalid tokens return 401 SOCIAL_TOKEN_INVALID. acceptedTermsVersion is required.
Send an OTP via email, SMS, or WhatsApp. POST
OTPs are six digits, valid for 10 minutes, and single-use. Limited to 5 send attempts INCLUDING failures per destination and purpose per 15 minutes; the sixth attempt returns 429 with retryAfterSeconds. With channel omitted, email destinations use email and phones try SMS first, then WhatsApp as fallback. An explicit channel disables fallback. Phone syntax must be international E.164; local 05... fails validation (422). Taqnyat account permissions and approved sender determine destination coverage. Provider rejections, including country/IP restrictions, return 409 OTP_DELIVERY_FAILED. sent:true means accepted by the provider, not confirmed handset delivery. An unavailable fallback does not mask the primary delivery failure.