Users

Mailgun API supports viewing user entities.

Get users on an account

get/v5/users

Get users on an account

SecuritybasicAuth
Request
query Parameters
role
string

The user role by which to filter results (basic == analyst)

Enum: "basic" "billing" "support" "developer" "admin"
Responses
200

A 200 response

Response Schema: application/json
Array of objects
Array
id
string

the user ID

activated
boolean

user activation status

name
string

full name of user

is_disabled
boolean

disablement status of user

email
string

user email address

object
role
string

role of user on the account

account_id
string

account ID

opened_ip
string

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

is_master
boolean

whether the user is the account owner

metadata
object

any optional metadata for the user

tfa_enabled
boolean

whether 2-factor auth has been enabled for the user

tfa_active
boolean

whether 2-factor auth has been activated for the user

tfa_created_at
string

the date and time at which 2-factor auth was activated

object
object
github_user_id
string or null

Github ID, if part of Github Student Developer Pack account

salesforce_user_id
string or null

Salesforce ID, if part of Salesforce platform account

migration_status
string

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

Request samples
Response samples
application/json
{
  • "users": [
    • {
      }
    ]
}

Get a user's details

get/v5/users/{user_id}

Get details for a user on the account

SecuritybasicAuth
Request
path Parameters
user_id
required
string

The ID of the user on the account

Responses
200

A 200 response

Response Schema: application/json
id
string

the user ID

activated
boolean

user activation status

name
string

full name of user

is_disabled
boolean

disablement status of user

email
string

user email address

object
role
string

role of user on the account

account_id
string

account ID

opened_ip
string

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

is_master
boolean

whether the user is the account owner

metadata
object

any optional metadata for the user

tfa_enabled
boolean

whether 2-factor auth has been enabled for the user

tfa_active
boolean

whether 2-factor auth has been activated for the user

tfa_created_at
string

the date and time at which 2-factor auth was activated

object
object
github_user_id
string or null

Github ID, if part of Github Student Developer Pack account

salesforce_user_id
string or null

Salesforce ID, if part of Salesforce platform account

migration_status
string

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

404

A 404 response

Request samples
Response samples
application/json
{
  • "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",
  • "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"
}

Get one's own user details

get/v5/users/me

Get one's own user details, requires use of api key of 'user' kind

SecuritybasicAuth
Responses
200

A 200 response

Response Schema: application/json
id
string

the user ID

activated
boolean

user activation status

name
string

full name of user

is_disabled
boolean

disablement status of user

email
string

user email address

object
role
string

role of user on the account

account_id
string

account ID

opened_ip
string

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

is_master
boolean

whether the user is the account owner

metadata
object

any optional metadata for the user

tfa_enabled
boolean

whether 2-factor auth has been enabled for the user

tfa_active
boolean

whether 2-factor auth has been activated for the user

tfa_created_at
string

the date and time at which 2-factor auth was activated

object
object
github_user_id
string or null

Github ID, if part of Github Student Developer Pack account

salesforce_user_id
string or null

Salesforce ID, if part of Salesforce platform account

migration_status
string

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

403

A 404 response

Request samples
Response samples
application/json
{
  • "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",
  • "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"
}