Skip to content

Get a user's details

Request

Get details for a user on the account

Security
basicAuth
Path
user_idstringrequired

The ID of the user on the account

curl -i -X GET \
  -u '<username>:<password>' \
  'https://api.mailgun.net/v5/users/{user_id}'

Responses

A 200 response

Bodyapplication/json
idstring

the user ID

activatedboolean

user activation status

namestring

full name of user

is_disabledboolean

disablement status of user

emailstring

user email address

email_detailsobject
rolestring

role of user on the account

account_idstring

account ID

opened_ipstring

IP address from which the user opened the account, if applicable

is_masterboolean

whether the user is the account owner

metadataobject

any optional metadata for the user

tfa_enabledboolean

whether 2-factor auth has been enabled for the user

tfa_activeboolean

whether 2-factor auth has been activated for the user

tfa_created_atstring or null
Example:"2022-12-20T16:52:01.892000"
One of:

the date and time at which 2-factor auth was activated in ISO 8601 date-time format without timezone offset (UTC time) and with microseconds

string
password_updated_atstring or null
Example:"2022-12-20T16:52:01.892000"
One of:

the date and time at which the user password was last updated in ISO 8601 date-time format without timezone offset (UTC time) and with microseconds

string
preferencesobject
authobject(github.com-mailgun-users-api-UserAuthResponse)
github_user_idstring or null
One of:

Github ID, if part of Github Student Developer Pack account

string
salesforce_user_idstring or null
One of:

Salesforce ID, if part of Salesforce platform account

string
migration_statusstring

status of migration to Sinch ID for user authentication, if applicable

Response
{ "id": "123", "name": "John Doe", "activated": true, "is_disabled": false, "email": "johndoe@example.com", "email_details": { "address": "johndoe@example.com", "is_valid": true, "parts": {} }, "role": "basic", "account_id": "567", "opened_ip": "67.111.60.111", "is_master": true, "metadata": {}, "tfa_enabled": true, "tfa_active": true, "tfa_created_at": "2022-12-20T16:52:01.892000", "password_updated_at": "2022-12-20T16:52:01.892000", "preferences": { "programming_language": "curl", "time_format": "%m/%d/%y %I:%M %p", "time_zone": "US/Eastern" }, "auth": { "method": "sinch", "prior_details": {}, "prior_method": "" }, "github_user_id": null, "salesforce_user_id": null, "migration_status": "done" }