Profile and Settings API
Product: NEXTMEGABYTE (Greenitco ITAM) · Module: API Documentation · Audience: Developer, Administrator
This page lists the NEXTMEGABYTE REST API endpoints for profile and settings. All URLs are relative to your portal, for example https://your-domain.com/api/.... Authenticate first with the Login API and send the standard headers described in the API Overview. Example values are shortened and anonymized.
Update app settings
POST /api/settings-update
Saves the signed-in user's app settings.
Headers: standard authenticated headers (apptoken, token, Content-Type: application/x-www-form-urlencoded). See API Overview.
Request Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| new_ticket_created | String | No | 0 or 1 |
| ticket_reopened | String | No | 0 or 1 |
| ticket_commented | String | No | 0 or 1 |
| sla_breached | String | No | 0 or 1 |
| device_checkin | String | No | 0 or 1 |
| device_checkout | String | No | 0 or 1 |
| new_user_added | String | No | 0 or 1 |
| user_deleted | String | No | 0 or 1 |
| whatsapp_notification_enabled | String | No | 0 or 1 |
Example response (shortened)
{status: success, msg: Setting has updated successfully}
Get user profile
GET /api/user/get-profile/user_id
Returns the profile of a user.
Headers: standard authenticated headers (apptoken, token, Content-Type: application/x-www-form-urlencoded). See API Overview.
Top-level response fields: code, status, message, data
Example response (values shortened and anonymized)
{
"code": 200,
"status": "success",
"message": null,
"data": [
{
"id": 123,
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"username": "<string>",
"employee_num": null,
"website": null,
"company": "<string>",
"location": "<string>",
"role": "<string>"
}
]
}
Update user profile
POST /api/editprofile
Updates the signed-in user's name and profile picture.
Request Headers
| Header | Type | Description |
|---|---|---|
| Content-Type | String | Must be application/x-www-form-urlencoded |
| apptoken | String | Must be apptoken |
| access_token | String | Must be access_token |
Request Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| first_name | String | Yes | user first_name |
| last_name | String | Yes | user last_name |
| location_id | String | Yes | location id which it gets from login api |
Example request
{ "first_name": "" "last_name": "" "location_id": "3", }
Example response (values shortened and anonymized)
{
"status": "success",
"msg": "Profile has updated successfully",
"data": {
"first_name": "<string>",
"last_name": "<string>",
"username": "<string>",
"email": "<string>",
"phone": null,
"jobtitle": null,
"employee_num": null,
"country": null,
"gravatar": null,
"location_id": "<string>",
"company_id": 1,
"manager_id": null,
"department_id": null,
"access_token": "<token>",
"website": null,
"company_name": "<string>",
"location_name": "<string>",
"manager_name": "<string>",
"profile_img": "https://your-domain.com/...",
"user_permissions": {
"users": 1,
"superuser": 0,
"admin": 0,
"reports": 0,
"license_keys": 0,
"service_tickets": 1,
"status_board": 0
},
"...": "1 more fields"
}
}