curl -X GET "<base_url>/usermanagement/v1/user?userName={userName}" \
-H "X-AccessToken: YOUR_ACCESS_TOKEN"
const res = await fetch(
"<base_url>/usermanagement/v1/user?userName={userName}",
{
headers: {
"X-AccessToken": process.env.PUREWL_ACCESS_TOKEN,
},
}
);
const user = await res.json();
{
"header": {
"code": 1,
"message": "Accounts fetched successfully",
"response_code": 1
},
"body": {
"username": "string",
"uuid": "string",
"profileId": "string",
"status": 1,
"isExpired": 0,
"isDeleted": 0,
"subscriptionType": "paid",
"expiryDate": "17-07-2026",
"createdAt": "2026-06-16T10:24:00Z",
"updatedAt": "2026-06-16T10:24:00Z",
"services": [
{
"slug": "rmd",
"status": 1,
"isExpired": 0,
"subscriptionType": "paid",
"expiryDate": "17-07-2026",
"firstName": "string",
"lastName": "string",
"email": "string",
"phoneNumber": "string",
"dateOfBirth": "string",
"addressLine1": "string",
"city": "string",
"state": "string",
"zipCode": "string",
"countryId": 1,
"countrySlug": "US"
}
]
}
}
User Management
Get User
Retrieve a user’s profile details, account status, and subscribed services by username.
GET
/
usermanagement
/
v1
/
user
curl -X GET "<base_url>/usermanagement/v1/user?userName={userName}" \
-H "X-AccessToken: YOUR_ACCESS_TOKEN"
const res = await fetch(
"<base_url>/usermanagement/v1/user?userName={userName}",
{
headers: {
"X-AccessToken": process.env.PUREWL_ACCESS_TOKEN,
},
}
);
const user = await res.json();
{
"header": {
"code": 1,
"message": "Accounts fetched successfully",
"response_code": 1
},
"body": {
"username": "string",
"uuid": "string",
"profileId": "string",
"status": 1,
"isExpired": 0,
"isDeleted": 0,
"subscriptionType": "paid",
"expiryDate": "17-07-2026",
"createdAt": "2026-06-16T10:24:00Z",
"updatedAt": "2026-06-16T10:24:00Z",
"services": [
{
"slug": "rmd",
"status": 1,
"isExpired": 0,
"subscriptionType": "paid",
"expiryDate": "17-07-2026",
"firstName": "string",
"lastName": "string",
"email": "string",
"phoneNumber": "string",
"dateOfBirth": "string",
"addressLine1": "string",
"city": "string",
"state": "string",
"zipCode": "string",
"countryId": 1,
"countrySlug": "US"
}
]
}
}
Returns the user profile details for the given username, including account status and the services the user is subscribed to.
See Errors for the response envelope and the full list of codes.
- URL:
/usermanagement/v1/user - Full URL:
<base_url>/usermanagement/v1/user - Request Method: GET
Authentication
Send the Access Token in theX-AccessToken request header on every authenticated call:
X-AccessToken: YOUR_ACCESS_TOKEN
Your Secret Key must never be used client-side or committed to source control. Exchange it for an Access Token server-side (see Authentication) and send only the Access Token from client code.
Request Parameters
string
required
Unique username of the user to retrieve.
Sample Request
curl -X GET "<base_url>/usermanagement/v1/user?userName={userName}" \
-H "X-AccessToken: YOUR_ACCESS_TOKEN"
const res = await fetch(
"<base_url>/usermanagement/v1/user?userName={userName}",
{
headers: {
"X-AccessToken": process.env.PUREWL_ACCESS_TOKEN,
},
}
);
const user = await res.json();
curl -X GET "<base_url>/usermanagement/v1/user?userName={userName}" \
-H "X-AccessToken: YOUR_ACCESS_TOKEN"
const res = await fetch(
"<base_url>/usermanagement/v1/user?userName={userName}",
{
headers: {
"X-AccessToken": process.env.PUREWL_ACCESS_TOKEN,
},
}
);
const user = await res.json();
Response
object
object
Show body
Show body
string
The user’s username.
string
External identifier of the user.
string
Internal profile id (used by downstream services).
number
Account status flag.
number
Whether the account is expired (
0 = no, 1 = yes).number
Whether the account is deleted (
0 = no, 1 = yes).string
Subscription type.
string
Subscription expiry date.
string
Account creation timestamp.
string
Account last-update timestamp.
array
Subscribed services.
Show service entry
Show service entry
string
Service slug.
number
Service status flag.
number
Whether this service subscription is expired (
0 = no, 1 = yes).string
Subscription type for this service.
string
Subscription expiry date for this service.
string
User’s first name.
string
User’s last name.
string
User’s email address.
string
User’s phone number.
string
Date of birth, format
DD-MM-YYYY.string
Street address (Line 1).
string
City name.
string
U.S. state.
string
U.S. ZIP or ZIP+4 postal code.
number
Numeric country identifier.
string
ISO country code / slug (e.g.
US).Sample Response
Success
{
"header": {
"code": 1,
"message": "Accounts fetched successfully",
"response_code": 1
},
"body": {
"username": "string",
"uuid": "string",
"profileId": "string",
"status": 1,
"isExpired": 0,
"isDeleted": 0,
"subscriptionType": "paid",
"expiryDate": "17-07-2026",
"createdAt": "2026-06-16T10:24:00Z",
"updatedAt": "2026-06-16T10:24:00Z",
"services": [
{
"slug": "rmd",
"status": 1,
"isExpired": 0,
"subscriptionType": "paid",
"expiryDate": "17-07-2026",
"firstName": "string",
"lastName": "string",
"email": "string",
"phoneNumber": "string",
"dateOfBirth": "string",
"addressLine1": "string",
"city": "string",
"state": "string",
"zipCode": "string",
"countryId": 1,
"countrySlug": "US"
}
]
}
}
{
"header": {
"code": 1,
"message": "Accounts fetched successfully",
"response_code": 1
},
"body": {
"username": "string",
"uuid": "string",
"profileId": "string",
"status": 1,
"isExpired": 0,
"isDeleted": 0,
"subscriptionType": "paid",
"expiryDate": "17-07-2026",
"createdAt": "2026-06-16T10:24:00Z",
"updatedAt": "2026-06-16T10:24:00Z",
"services": [
{
"slug": "rmd",
"status": 1,
"isExpired": 0,
"subscriptionType": "paid",
"expiryDate": "17-07-2026",
"firstName": "string",
"lastName": "string",
"email": "string",
"phoneNumber": "string",
"dateOfBirth": "string",
"addressLine1": "string",
"city": "string",
"state": "string",
"zipCode": "string",
"countryId": 1,
"countrySlug": "US"
}
]
}
}
Status Codes
| Status | Meaning |
|---|---|
200 | Success. |
500 | Internal server error. |
Error codes
Returned inheader.response_code when the request fails.
| Code | Message |
|---|---|
998 | Internal server error |
1002 | You are not permitted to the resource! |
1005 | Invalid username or reseller |
Next steps
Delete a User
Permanently remove this user when the relationship ends.
Create a User
Register a new user and onboard them to one or more services.
User Management overview
Review the full account lifecycle and core objects.