Appearance
Xash app endpoints
This section documents the endpoints that exist for the Xash mobile app and for Xash's own point-of-sale product. They are about creating and looking after an account by hand: registering, proving you hold the phone with an SMS code, setting a PIN, adding business details.
A server integration does not call these in normal running. They are here because:
- you need two of them once, to create your account without the app (Registration and Set password);
- one of them resets a forgotten password (PIN and SMS codes);
- the app's developers need a reference.
Everything a partner integration uses day to day is in the main part of these docs, starting with the quickstart.
What is here
| Page | Endpoints | Token needed |
|---|---|---|
| Registration | POST /api/v1/auth/register | No |
| Set password | POST /api/v1/auth/set-password | No |
| PIN setup and reset | POST /api/v1/auth/request-pin-otp, POST /api/v1/auth/set-pin, POST /api/v1/auth/forgot-pin, POST /api/v1/auth/reset-pin | No |
| Resend user number | POST /api/v1/auth/resend-user-number/{phone} | No |
| Create business | POST /api/v1/auth/create-business, GET /api/v1/auth/business/categories | Yes |
| Delete account | DELETE /api/v1/auth/profile | Yes |
| Link codes | POST /api/v1/auth/link-code, POST /api/v1/auth/link-code/redeem | Issue: no. Redeem: yes |
SMS codes
Several of these endpoints send or check a 5-digit code delivered by SMS to the account's phone. A code:
- is valid for 10 minutes;
- can be used once;
- is cancelled after 5 wrong guesses, after which a new one must be requested.
These endpoints have tight rate limits, noted on each page. Passing one answers 429.