> For the complete documentation index, see [llms.txt](https://docs.snapfix.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.snapfix.com/how-the-apps-work/screens/account/profile.md).

# My profile

{% hint style="info" %}
Draft, written by an agent and not yet checked by a person ([how to read these docs](https://docs.snapfix.com/how-to-read.md)). Platforms: web, iOS and Android. [Source on GitHub](https://github.com/snapfix/docs/blob/main/spec/screens/account/profile.md).
{% endhint %}

Every signed-in person sees their own profile here, and changes their name, photo, email address, phone number, on-call status and password. On the web they also choose the language and delete the profile.

* **Where:** web: side menu "My Profile", a drawer on the right. iOS and Android: the side menu's profile card, then the "My Profile" tab of the profile hub. The hub's other tabs are "Notifications", [Settings](https://docs.snapfix.com/how-the-apps-work/screens/account/app-settings.md) and "Help Hub".
* **Who:** every signed-in user, for their own profile.
  * Email, phone and password can be changed only by accounts that sign in with a Snapfix password. The web checks `login_src` is `snapfix`. iOS checks that Snapfix sign-in is allowed and single sign-on is not in use; otherwise "Change Password" is dimmed and "ADD" / "CHANGE" are hidden.
  * While the web session is flagged for profile verification, the photo, name, on-call and password controls are disabled and the drawer's close button is hidden.
* **Feature:** [Profile and settings](https://docs.snapfix.com/product/features/account/profile.md)

![My profile](https://3653879137-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsVVGa79QbcEkJ7n8srxe%2Fuploads%2Fgit-blob-23d35b6908df3d2bac3d890da1c2033313573902%2Fprofile.png?alt=media)

The screenshot shows the web drawer for a test account with four or more sites: the collapsed "On Call" panel, the name, an empty phone number, a verified email, "Languages" with "English (Default)", "Change Password" and "Delete My Profile".

## Layout

**Web drawer**, top to bottom:

1. "My Profile" and a close button.
2. The round photo, or the initials when there is none, with an edit button.
3. "On Call", when the person belongs to at least one site: one switch per site, in a card when there are fewer than four sites, otherwise in a collapsed panel.
4. "First Name" and "Last Name", "Phone Number" and "Email", each with a pencil. A verified phone or email shows a tick; an unverified one shows a button that sends a verification code.
5. "Languages": the current language ("English (Default)" when never changed) and "Change Language".
6. "Change Password", for Snapfix sign-ins only.
7. "Delete My Profile".

The code also has a communication-preferences card ("Receive site updates", "Receive periodic group & task updates", "Receive product & feature updates"), but nothing renders it \[[ASK-27](https://github.com/snapfix/docs/blob/main/ASK.md#ask-27-where-do-users-change-their-communication-consent-and-how-should-it-be-stored)].

**iOS and Android**, on the "My Profile" tab:

* the photo with a change control;
* "On Call" with one row per site and an "All Accounts" switch. With more than three sites the list is collapsed behind an arrow;
* "First name" and "Last name" (Android "First Name", "Last Name");
* "Phone number" with a country code and "Email", each with "Verify Phone" / "Verify Email" or "Verified", and "ADD" or "CHANGE";
* Android only: "Username" when the account has a staff username;
* "Logout" and "Change Password";
* "Save" and "Cancel" once the name or photo has changed;
* on iOS, the version and copyright at the bottom. Five taps on it show a toast with the version, send the local database to the server and reveal a "Sync all Data" button (`ProfileVC+Version.swift`).

The apps delete the profile from [Settings](https://docs.snapfix.com/how-the-apps-work/screens/account/app-settings.md), not from this tab.

## Inputs

| Field                       | Type                      | Required                                          | Default                                       | Rules and messages                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| --------------------------- | ------------------------- | ------------------------------------------------- | --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Photo                       | Image                     | No                                                | Current photo, or initials                    | Web: the shared upload dialog with a cropper, then saved. The apps upload it with the next save.                                                                                                                                                                                                                                                                                                                                                                    |
| First name                  | Text                      | Yes                                               | Current first name                            | Web dialog: at most 30 characters (typing stops there) \[[ASK-35](https://github.com/snapfix/docs/blob/main/ASK.md#ask-35-is-the-webs-30-character-name-limit-intended)]. The code's empty message is "Please enter a first name"; live, with the field emptied "Save" is disabled and no message shows. iOS: an "Error" alert "Please enter first name.", which replaces any earlier message from the same check. Android: "Please enter first name" on the field. |
| Last name                   | Text                      | Yes on the web; not checked on the apps           | Current last name                             | Web: at most 30 characters, empty message "Please enter a last name" in the code; live, as for the first name, only "Save" turns off. The apps save an empty last name.                                                                                                                                                                                                                                                                                             |
| Phone number (web dialog)   | Phone with country picker | Yes                                               | Empty; country Ireland                        | The phone component's own messages; live, "This field is required" when empty and "Number is not valid" for a short number. "Send OTP" stays off until the number is valid.                                                                                                                                                                                                                                                                                         |
| Email (web dialog)          | Email                     | Yes                                               | Empty                                         | At most 70 characters. "Please enter an email address" and "Please enter a valid email address" under the field. "Send OTP" stays off until valid.                                                                                                                                                                                                                                                                                                                  |
| Phone and email (apps)      | Text                      | One of phone, email or staff username must remain | Current values                                | Removing both with no staff username: iOS "You can't remove email and mobile number at the same time.Please add email or mobile number.", Android the same with a space after the full stop. iOS: "Please enter valid email address." for a bad email. Android: "Please enter valid phone number" for a bad number; a bad email makes Save do nothing, with no message.                                                                                             |
| Username (Android)          | Text                      | No                                                | The staff username; hidden when there is none | Save does not write it back.                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| Verification code (web)     | 6 characters              | Yes                                               | Empty                                         | "Please enter a verification code"; "Invalid verification code format" when not 6 characters.                                                                                                                                                                                                                                                                                                                                                                       |
| Old password (web)          | Password                  | Yes, unless the sign-in token is fresh            | Empty                                         | "Please enter your old password". Not shown after a recent sign-in.                                                                                                                                                                                                                                                                                                                                                                                                 |
| New password, confirm (web) | Password                  | Yes                                               | Empty                                         | At least 8 characters with an uppercase letter, a lowercase letter and a number. Live, a checklist under the fields shows the rules ("At least 8 characters", "At least 1 number", "At least 1 uppercase letter", "At least 1 lowercase letter") and the code's "Please enter a valid password" is not seen. "Passwords do not match" shows under the confirm field, and stays after both fields are emptied.                                                       |
| Language (web)              | Choice                    | Yes                                               | Current language                              | "Please choose your language", each language's own name with the English name ("Français (French)"), "Select" and "Cancel". The current language only closes the list.                                                                                                                                                                                                                                                                                              |
| On call                     | Switch per site           | No                                                | Current status                                | One site per switch; disabled while verification is required. What being on call changes beyond the on-call list is not known \[[ASK-36](https://github.com/snapfix/docs/blob/main/ASK.md#ask-36-what-does-being-on-call-change)].                                                                                                                                                                                                                                  |

## Actions

| Action                             | Who                               | What happens                                                                                                                                                                                                                                                                                                                                                          | API                                                                                                                                                                                                                                                                                   |
| ---------------------------------- | --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Open (web)                         | Signed-in user                    | Loads the profile and the on-call list.                                                                                                                                                                                                                                                                                                                               | [`GET /v1/app/user`](https://docs.snapfix.com/engineering-reference/api/account.md#get-v1appuser), [`GET /v1/app/user/on-call-status`](https://docs.snapfix.com/engineering-reference/api/account.md#get-v1appuseron-call-status)                                                     |
| Save name or photo (web)           | Signed-in user                    | Saves first name, last name, the joined "first last" name and the image URL, as typed. Nothing is escaped. An unchanged name dialog closes without a request.                                                                                                                                                                                                         | [`PUT /v1/app/user`](https://docs.snapfix.com/engineering-reference/api/account.md#put-v1appuser)                                                                                                                                                                                     |
| "Send OTP", then "Verify" (web)    | Snapfix sign-in                   | Sends a code to the new phone or email, then opens the verification dialog. The contact changes only when the code is right.                                                                                                                                                                                                                                          | `POST /v1/app/user/generate-code`, `POST /v1/app/user/verify-code` ([Account API](https://docs.snapfix.com/engineering-reference/api/account.md))                                                                                                                                     |
| Verification button (web)          | Signed-in user                    | Sends a code to the current, unverified phone or email.                                                                                                                                                                                                                                                                                                               | `POST /v1/app/user/generate-code`                                                                                                                                                                                                                                                     |
| On-call switch (web)               | Signed-in user with a site        | Turns on-call on or off for that site: "On Call enabled for {site}" or "On Call disabled for {site}". When the server says the status was already set, the switch goes back.                                                                                                                                                                                          | [`PUT /v1/app/user/on-call-status`](https://docs.snapfix.com/engineering-reference/api/account.md#put-v1appuseron-call-status)                                                                                                                                                        |
| "Select" language (web)            | Signed-in user                    | Saves the language and reloads the page.                                                                                                                                                                                                                                                                                                                              | [`PUT /v1/app/user`](https://docs.snapfix.com/engineering-reference/api/account.md#put-v1appuser)                                                                                                                                                                                     |
| Save password (web)                | Snapfix sign-in                   | Changes the password; the old one must match when the sign-in is not recent. When the account still has to verify, the button reads "Send OTP" and the code dialog comes first.                                                                                                                                                                                       | `PUT /v1/app/user/update-password` ([Account API](https://docs.snapfix.com/engineering-reference/api/account.md))                                                                                                                                                                     |
| "Delete My Profile" (web)          | Signed-in user                    | Confirms (see [Dialogs](#dialogs-and-sheets)), deletes the profile, shows success for 1.5 seconds, clears the session and opens [Snapfix profile deleted](https://docs.snapfix.com/how-the-apps-work/screens/account/profile-deleted.md). The server needs a fresh sign-in and otherwise answers 406; the web then opens the mini sign-in and deletes again after it. | [`DELETE /v1/app/user`](https://docs.snapfix.com/engineering-reference/api/account.md#delete-v1appuser)                                                                                                                                                                               |
| "Save" (apps)                      | Signed-in user                    | Checks the fields, then saves. A changed email or phone goes through the auth save first and sends the stored password with it. Shows "Refreshing...". iOS then returns to Home; a failed save on iOS also returns with no message.                                                                                                                                   | `save_pri_user_v7` ([Users API](https://docs.snapfix.com/engineering-reference/api/users.md)); email or phone: `save_pri_user_auth_v7` ([Auth API](https://docs.snapfix.com/engineering-reference/api/auth.md))                                                                       |
| "Cancel" (apps)                    | Signed-in user with unsaved edits | Restores the saved name and photo.                                                                                                                                                                                                                                                                                                                                    | -                                                                                                                                                                                                                                                                                     |
| On-call (apps)                     | Signed-in user with a site        | A site's switch turns that site on or off; "All Accounts" sends every site in one request. iOS turns the switch back when offline.                                                                                                                                                                                                                                    | One site: [`POST ?action=update_on_call_status`](https://docs.snapfix.com/engineering-reference/api/account.md#post-actionupdate_on_call_status); all: [`PUT /v1/app/user/on-call-status`](https://docs.snapfix.com/engineering-reference/api/account.md#put-v1appuseron-call-status) |
| "Change Password" (apps)           | Snapfix sign-in                   | Opens the password change. A wrong old password offers a reset that sends a new password by SMS or email. For a staff username the reset calls an address with a trailing space.                                                                                                                                                                                      | `edit_user_password_v7` ([Auth API](https://docs.snapfix.com/engineering-reference/api/auth.md))                                                                                                                                                                                      |
| "Verify" / "ADD" / "CHANGE" (apps) | Snapfix sign-in                   | Opens the change or verify sheet with a code.                                                                                                                                                                                                                                                                                                                         | [Auth API](https://docs.snapfix.com/engineering-reference/api/auth.md)                                                                                                                                                                                                                |
| "Logout" (apps)                    | Signed-in user                    | Confirms, then signs out. Android: "Confirm Logout", "Are you sure you want to logout?", "Logout" and "Cancel".                                                                                                                                                                                                                                                       | -                                                                                                                                                                                                                                                                                     |

## States

* **Loading:** web: a spinner for the on-call list and on the photo while it uploads; dialog buttons show progress, then success for 1.5 seconds before closing. Apps: "Refreshing..." while saving.
* **Empty:** a person with no sites has no on-call block on the web; the apps show the "On Call" header with no rows.
* **Error:** an alert with the server's message. The web password dialog falls back to "An error occurred while updating your password.". A refused code keeps the verification dialog open.
* **No permission:** see Who. The apps ask for camera or photo access only when that photo source is chosen.
* **Offline (mobile):** the stored profile still shows. Save, verify and on-call need a connection; iOS shows "You must be connected to the Internet to carry out this task. Please connect and try again." and Android its connection alert.

## Dialogs and sheets

* **"Change Profile Details" (web):** "First name \*" and "Last name \*", "Cancel" and "Save"; Save is off while the form is invalid.
* **"Change Email Address" / "Change Phone Number" (web):** "Enter a new email address, and we will send an OTP (One Time Password) for verification." (or the phone version), the field, "Cancel" and "Send OTP".
* **Verification (web):** "Enter code to verify your email" or "Enter SMS code to verify your phone number", "An email has been sent to" or "An SMS has been send to" with the address, "Enter the code below.", the code field, "Resend code" with a 30-second countdown, "Cancel" and "Verify".
* **"Change Password" (web):** old password (hidden after a recent sign-in), "New password", "Confirm password", "Cancel" and "Save". An account that still has to set a password gets "Create Password" with "Almost there, …!", "Log out" and "Create".
* **"Site verification required" (web):** opened by the API's verification answer; "Go to Profile" opens this drawer.
* **"Delete Snapfix Profile" (web):** "Are you sure you want to delete your Snapfix profile?", "Deleting your profile will remove you from Snapfix and all tasks and messages will become anonymous." / "You will not be able to log into Snapfix again.", and "A deleted profile cannot be reinstated.", with "Delete Snapfix Profile" and "Close". Live, the body shows raw tags (`<\/div>`, `<\/p>`, `<\/span>`) and the warning image does not load. What the server keeps after a deletion is in [Snapfix profile deleted](https://docs.snapfix.com/how-the-apps-work/screens/account/profile-deleted.md) \[[ASK-25](https://github.com/snapfix/docs/blob/main/ASK.md#ask-25-what-should-deleting-a-profile-remove)].
* **Apps:** the change or verify sheets for email and phone, the password screen, the reset offer, and the logout confirmation.

## Platform differences

| Topic             | Web                                        | iOS                                                                                    | Android                                                                                |
| ----------------- | ------------------------------------------ | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| Shape             | Drawer                                     | "My Profile" tab                                                                       | "My Profile" tab                                                                       |
| Name editing      | Dialog; both names required, 30 characters | Fields on the tab; last name may be empty                                              | Same as iOS                                                                            |
| Contact changes   | Dialog and code                            | Sheet and code                                                                         | Sheet and code                                                                         |
| Language          | Here                                       | [Settings](https://docs.snapfix.com/how-the-apps-work/screens/account/app-settings.md) | [Settings](https://docs.snapfix.com/how-the-apps-work/screens/account/app-settings.md) |
| Delete            | "Delete My Profile" here                   | [Settings](https://docs.snapfix.com/how-the-apps-work/screens/account/app-settings.md) | [Settings](https://docs.snapfix.com/how-the-apps-work/screens/account/app-settings.md) |
| Logout            | Side menu                                  | "Logout" here                                                                          | "Logout" here                                                                          |
| Username          | Not shown                                  | Not shown                                                                              | "Username" for staff usernames                                                         |
| Bad email on save | Message under the field                    | "Please enter valid email address."                                                    | No message                                                                             |
| Service           | Laravel `/v1/app/user`                     | php-apis actions                                                                       | php-apis actions                                                                       |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.snapfix.com/how-the-apps-work/screens/account/profile.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
