Skip to main content

Update User API

The Update User API enables status updates for users within an organization, such as suspending, reactivating, or deleting a user. These actions help manage user access based on organizational needs and security policies.

Only active organizations are authorized to perform update actions. Inactive organizations are restricted from executing any update requests.

Endpoint Details:

Input Parameters

Required Headers:

HeaderValue TypeRequiredDescription
Admin-Api-keystringyesAdmin-level API key of the organization
Content-TypestringyesMust be application/json

Request Body Parameters:

ParameterTypeRequiredDescription
emailstringyesEmail of the user to be updated
actionstringyesAction to perform: suspend

Valid Actions:

  • suspend → Temporarily restricts user access

  • active → Reactivates a previously suspended user

Action: Suspend

This action allows an active admin within the organization to suspend a user, temporarily restricting their access. This status can later be reversed by reactivating the user.

Sample Request:

curl --location 'https://signals.smarte.pro/signals/v1/user/update' \
--header 'Admin_Api_Key: Flexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxp4=' \
--header 'Content-Type: application/json' \
--data-raw

'{
"email": "dev.udi@smarte.pro",
"action": "suspend"
}'

Response

{
"message": "Action performed successfully",
"data": {
"userId": "6d7800ad-81b0-4b60-9a0f-821a1944346b",
"organization": {
"orgId": "8b884c5f-d9a3-4620-bf09-8dd263610581",
"orgName": "smarte",
"website": "https://www.smarte.pro/",
"cleanedWebsite": "smarte.pro",
"status": "active",
"dailyRateLimit": 10000,
"qpsLimit": 5,
"createdAt": "2025-04-10T18:49:51.000+00:00",
"updatedAt": "2025-04-10T18:52:46.000+00:00",
"adminApiKey": null
},
"email": "dev.udi@smarte.pro",
"role": "user",
"status": "suspend",
"createdAt": "2025-04-10T18:56:50.000+00:00",
"updatedAt": "2025-04-10T18:59:14.049+00:00",
"apiKey": null
}
}

Action: Active

This action allows an admin to reactivate a suspended user. Only users with a status of "suspend" are eligible for reactivation. Users marked as "deleted" cannot be returned to an "active" state.

Sample Request:

curl --location 'https://signals.smarte.pro/signals/v1/user/update' \
--header 'Admin_Api_Key: Flexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxp4=' \
--header 'Content-Type: application/json' \
--data-raw

'{
"email": "dev.udi@smarte.pro",
"action": "active"
}'

Response

{
"message": "Action performed successfully",
"data": {
"userId": "6d7800ad-81b0-4b60-9a0f-821a1944346b",
"organization": {
"orgId": "8b884c5f-d9a3-4620-bf09-8dd263610581",
"orgName": "smarte",
"website": "https://www.smarte.pro/",
"cleanedWebsite": "smarte.pro",
"status": "active",
"dailyRateLimit": 10000,
"qpsLimit": 5,
"createdAt": "2025-04-10T18:49:51.000+00:00",
"updatedAt": "2025-04-10T18:52:46.000+00:00",
"adminApiKey": null
},
"email": "dev.udi@smarte.pro",
"role": "user",
"status": "active",
"createdAt": "2025-04-10T18:56:50.000+00:00",
"updatedAt": "2025-04-10T18:59:14.049+00:00",
"apiKey": null
}
}