Admin
bearerAuthAuthorizationBearer <token>Bearer token authentication
application/json- body
userId*stringThe user id
role*|array<>The role to set, this can be a string or an array of strings. Eg: admin or [admin, user]
User role updated
application/json- response
user?curl -X POST 'https://dev.auth.graphxserver.io/api/auth/admin/set-role' \ -H 'Content-Type: application/json' \ -d '{ "userId": "string", "role": "string"}'{ "user": { "id": "string", "name": "string", "email": "string", "emailVerified": false, "image": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "username": "string", "displayUsername": "string", "twoFactorEnabled": false, "role": "string", "banned": false, "banReason": "string", "banExpires": "2019-08-24T14:15:22Z", "lastLoginMethod": "string", "phoneNumber": "string", "metadata": null, "emailOtpEnabled": false }}bearerAuthAuthorizationBearer <token>Bearer token authentication
id?stringThe id of the User
User
application/json- response
user?curl -X GET 'https://dev.auth.graphxserver.io/api/auth/admin/get-user'{ "user": { "id": "string", "name": "string", "email": "string", "emailVerified": false, "image": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "username": "string", "displayUsername": "string", "twoFactorEnabled": false, "role": "string", "banned": false, "banReason": "string", "banExpires": "2019-08-24T14:15:22Z", "lastLoginMethod": "string", "phoneNumber": "string", "metadata": null, "emailOtpEnabled": false }}bearerAuthAuthorizationBearer <token>Bearer token authentication
application/json- body
email*stringThe email of the user
password?stringname*stringThe name of the user
role?|array<>data?User created
application/json- response
user?curl -X POST 'https://dev.auth.graphxserver.io/api/auth/admin/create-user' \ -H 'Content-Type: application/json' \ -d '{ "email": "string", "name": "string"}'{ "user": { "id": "string", "name": "string", "email": "string", "emailVerified": false, "image": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "username": "string", "displayUsername": "string", "twoFactorEnabled": false, "role": "string", "banned": false, "banReason": "string", "banExpires": "2019-08-24T14:15:22Z", "lastLoginMethod": "string", "phoneNumber": "string", "metadata": null, "emailOtpEnabled": false }}bearerAuthAuthorizationBearer <token>Bearer token authentication
application/json- body
userId*stringThe user id
data*The user data to update
User updated
application/json- response
user?curl -X POST 'https://dev.auth.graphxserver.io/api/auth/admin/update-user' \ -H 'Content-Type: application/json' \ -d '{ "userId": "string", "data": { "property1": null, "property2": null }}'{ "user": { "id": "string", "name": "string", "email": "string", "emailVerified": false, "image": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "username": "string", "displayUsername": "string", "twoFactorEnabled": false, "role": "string", "banned": false, "banReason": "string", "banExpires": "2019-08-24T14:15:22Z", "lastLoginMethod": "string", "phoneNumber": "string", "metadata": null, "emailOtpEnabled": false }}bearerAuthAuthorizationBearer <token>Bearer token authentication
searchValue?stringsearchField?stringThe field to search in, defaults to email. Can be email or name. Eg: "name"
"email""name"searchOperator?stringThe operator to use for the search. Can be contains, starts_with or ends_with. Eg: "contains"
"contains""starts_with""ends_with"limit?|numberoffset?|numbersortBy?stringThe field to sort by
sortDirection?stringThe direction to sort by
"asc""desc"filterField?stringThe field to filter by
filterValue?|number|boolean|array<string>|array<number>filterOperator?stringThe operator to use for the filter
"eq""ne""lt""lte""gt""gte""in""not_in""contains""starts_with""ends_with"List of users
application/json- response
users*array<>total*numberlimit?numberoffset?numbercurl -X GET 'https://dev.auth.graphxserver.io/api/auth/admin/list-users'{ "users": [ { "id": "string", "name": "string", "email": "string", "emailVerified": false, "image": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "username": "string", "displayUsername": "string", "twoFactorEnabled": false, "role": "string", "banned": false, "banReason": "string", "banExpires": "2019-08-24T14:15:22Z", "lastLoginMethod": "string", "phoneNumber": "string", "metadata": null, "emailOtpEnabled": false } ], "total": 0, "limit": 0, "offset": 0}bearerAuthAuthorizationBearer <token>Bearer token authentication
application/json- body
userId*stringThe user id
List of user sessions
application/json- response
sessions?array<>curl -X POST 'https://dev.auth.graphxserver.io/api/auth/admin/list-user-sessions' \ -H 'Content-Type: application/json' \ -d '{ "userId": "string"}'{ "sessions": [ { "id": "string", "expiresAt": "2019-08-24T14:15:22Z", "token": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "ipAddress": "string", "userAgent": "string", "userId": "string", "impersonatedBy": "string", "activeOrganizationId": "string", "activeTeamId": "string" } ]}bearerAuthAuthorizationBearer <token>Bearer token authentication
application/json- body
userId*stringThe user id
User unbanned
application/json- response
user?curl -X POST 'https://dev.auth.graphxserver.io/api/auth/admin/unban-user' \ -H 'Content-Type: application/json' \ -d '{ "userId": "string"}'{ "user": { "id": "string", "name": "string", "email": "string", "emailVerified": false, "image": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "username": "string", "displayUsername": "string", "twoFactorEnabled": false, "role": "string", "banned": false, "banReason": "string", "banExpires": "2019-08-24T14:15:22Z", "lastLoginMethod": "string", "phoneNumber": "string", "metadata": null, "emailOtpEnabled": false }}bearerAuthAuthorizationBearer <token>Bearer token authentication
application/json- body
userId*stringThe user id
banReason?stringThe reason for the ban
banExpiresIn?numberThe number of seconds until the ban expires
User banned
application/json- response
user?curl -X POST 'https://dev.auth.graphxserver.io/api/auth/admin/ban-user' \ -H 'Content-Type: application/json' \ -d '{ "userId": "string"}'{ "user": { "id": "string", "name": "string", "email": "string", "emailVerified": false, "image": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "username": "string", "displayUsername": "string", "twoFactorEnabled": false, "role": "string", "banned": false, "banReason": "string", "banExpires": "2019-08-24T14:15:22Z", "lastLoginMethod": "string", "phoneNumber": "string", "metadata": null, "emailOtpEnabled": false }}bearerAuthAuthorizationBearer <token>Bearer token authentication
application/json- body
userId*stringThe user id
Impersonation session created
application/json- response
session?user?curl -X POST 'https://dev.auth.graphxserver.io/api/auth/admin/impersonate-user' \ -H 'Content-Type: application/json' \ -d '{ "userId": "string"}'{ "session": { "id": "string", "expiresAt": "2019-08-24T14:15:22Z", "token": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "ipAddress": "string", "userAgent": "string", "userId": "string", "impersonatedBy": "string", "activeOrganizationId": "string", "activeTeamId": "string" }, "user": { "id": "string", "name": "string", "email": "string", "emailVerified": false, "image": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "username": "string", "displayUsername": "string", "twoFactorEnabled": false, "role": "string", "banned": false, "banReason": "string", "banExpires": "2019-08-24T14:15:22Z", "lastLoginMethod": "string", "phoneNumber": "string", "metadata": null, "emailOtpEnabled": false }}bearerAuthAuthorizationBearer <token>Bearer token authentication
Bad Request. Usually due to missing parameters, or invalid parameters.
application/json- response
message*stringcurl -X POST 'https://dev.auth.graphxserver.io/api/auth/admin/stop-impersonating'{ "message": "string"}bearerAuthAuthorizationBearer <token>Bearer token authentication
application/json- body
sessionToken*stringThe session token
Session revoked
application/json- response
success?booleancurl -X POST 'https://dev.auth.graphxserver.io/api/auth/admin/revoke-user-session' \ -H 'Content-Type: application/json' \ -d '{ "sessionToken": "string"}'{ "success": true}bearerAuthAuthorizationBearer <token>Bearer token authentication
application/json- body
userId*stringThe user id
Sessions revoked
application/json- response
success?booleancurl -X POST 'https://dev.auth.graphxserver.io/api/auth/admin/revoke-user-sessions' \ -H 'Content-Type: application/json' \ -d '{ "userId": "string"}'{ "success": true}bearerAuthAuthorizationBearer <token>Bearer token authentication
application/json- body
userId*stringThe user id
User removed
application/json- response
success?booleancurl -X POST 'https://dev.auth.graphxserver.io/api/auth/admin/remove-user' \ -H 'Content-Type: application/json' \ -d '{ "userId": "string"}'{ "success": true}bearerAuthAuthorizationBearer <token>Bearer token authentication
application/json- body
newPassword*stringThe new password
1 <= lengthuserId*stringThe user id
1 <= lengthPassword set
application/json- response
status?booleancurl -X POST 'https://dev.auth.graphxserver.io/api/auth/admin/set-user-password' \ -H 'Content-Type: application/json' \ -d '{ "newPassword": "string", "userId": "string"}'{ "status": true}bearerAuthAuthorizationBearer <token>Bearer token authentication
application/json- body
permissions*The permission to check
Success
application/json- response
error?stringsuccess*booleancurl -X POST 'https://dev.auth.graphxserver.io/api/auth/admin/has-permission' \ -H 'Content-Type: application/json' \ -d '{ "permissions": {}}'{ "error": "string", "success": true}