Difference between revisions of "User Profile Update"
Ashley DeBon (talk | contribs) (→Update User Profile Image) |
Ashley DeBon (talk | contribs) (→Successful Response (200)) |
||
| Line 39: | Line 39: | ||
| user_image || file || Yes || Profile image file (jpeg, png, or jpg) | | user_image || file || Yes || Profile image file (jpeg, png, or jpg) | ||
|} | |} | ||
| + | |||
| + | === cURL Example for Android === | ||
| + | |||
| + | <pre> curl --location 'https://apimobile.callproof.com/api/user-profile' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --form 'user_image=@"/path/to/your/profile-image.jpg"' </pre> | ||
| + | |||
| + | === cURL Example for iOS === | ||
| + | |||
| + | <pre> curl --location 'https://apimobile.callproof.com/api/user-profile' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --form 'user_image=@"/path/to/your/profile-image.jpg"' </pre> | ||
=== Successful Response (200) === | === Successful Response (200) === | ||
Latest revision as of 12:10, 21 July 2026
Mobile_API »Update User Profile Image
Base URL
https://apimobile.callproof.com
Endpoint
/api/user-profile
Purpose
Uploads and saves a new profile image for the authenticated user.
HTTP Method
POST
Headers
| Header | Required | Description |
|---|---|---|
| Authorization | Yes | Bearer access token |
| Content-Type | Yes | multipart/form-data (file upload)
|
Security
- Yes – Requires Bearer Token authentication.
Parameters
Path Parameters
None.
Query Parameters
None.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_image | file | Yes | Profile image file (jpeg, png, or jpg) |
cURL Example for Android
curl --location 'https://apimobile.callproof.com/api/user-profile' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --form 'user_image=@"/path/to/your/profile-image.jpg"'
cURL Example for iOS
curl --location 'https://apimobile.callproof.com/api/user-profile' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --form 'user_image=@"/path/to/your/profile-image.jpg"'
Successful Response (200)
Indicates that the user profile image was updated successfully.
| Field | Type | Description |
|---|---|---|
| clientStatusCode | integer | Status indicator for the client (for example, 200) |
| user_id | integer | Identifier of the authenticated user |
| company_id | integer | Identifier of the authenticated user’s company |
| message | string | Confirmation message (for example, "User Profile Updated Successfully") |
| uri | string | Requested resource URI |
Error Responses
| Status Code | Meaning |
|---|---|
| 200 | Validation failed – response body uses clientStatusCode 401 with the first validation error message
|
| 400 | Bad Request – the profile image could not be updated |
| 401 | Unauthorized – missing, invalid, or expired Bearer token |
- Validation (HTTP 200, clientStatusCode 401) – Missing
user_image, or file is not a valid jpeg/png/jpg image. - 400 – Storage/directory failure (for example, "Unable To Create"), or another upload/update error.
- 401 – Authentication failed or the access token is missing/expired.