### POST /v3/forwards Source: https://documentation.mailgun.com/_spec/docs/mailgun/api-reference/send/mailgun.json ### Examples You can add multiple email recipients by including the 'forward.recipient' parameter multiple times up to a maximum of 5. ``` $ curl -X POST https://api.mailgun.net/v3/forwards -F match='email@mg.example.com' -F forward.recipient=destination1@gmail.com -F forward.recipient=destination2@gmail.com ``` The `match` parameter can contain a wild card expression ``` $ curl -X POST https://api.mailgun.net/v3/forwards -F match='match*@mg.example.com' -F forward.recipient=catchall@gmail.com ``` Rules only support `*` or literal characters where `*` matches any sequence of characters. So `a.*@example.com` matches email addresses that start with `a.` not email addresses that start with `a` like a regex match would. ```markdown ### Parameters - **match** (string, query, required): A wildcard expression which matches the recipient address to forward. This is a insensitive match address - **forward.url** (string, query, required): A URL to forward when the rule matches the recipient. May be repeated up to 3 times. Must be a valid URL that resolves - **forward.recipient** (string, query, required): A email address to forward to when the rule matches the recipient. May be repeated up to 5 times - **forward.store** (string, query, required): A URL which will be used to notify you when the email arrives along with a URL you can use to retrieve the message. Must be a valid URL that resolves ### Responses #### 200 - A 200 response **github.com-mailgun-pathfinder-httpapi-ForwardsRule** - **id** (string) (required) - **account_id** (string) (required) - **domain_name** (string) (required) - **domain_id** (string) (required) - **match** (string) (required) - **forward** (object) (required) - **urls** (array (string)) (required) - **recipients** (array (string)) - **store** (string) - **created_at** (string) (required) - **updated_at** (string) (required) #### 400 - A 400 response **github.com-mailgun-scaffold-httpapi-GenericResponse** - **message** (string) (required): Response message #### 401 - A 401 response **github.com-mailgun-scaffold-httpapi-GenericResponse** - **message** (string) (required): Response message #### 500 - A 500 response **github.com-mailgun-scaffold-httpapi-GenericResponse** - **message** (string) (required): Response message ### Example Usage ```bash curl -X POST "https://api.mailgun.net/v3/forwards?match=string&forward.url=string&forward.recipient=string&forward.store=string" ``` ``` -------------------------------- ### GET /v1/keys Source: https://documentation.mailgun.com/_spec/docs/mailgun/api-reference/send/mailgun.json List Mailgun API keys ```markdown ### Parameters - **domain_name** (string, query, optional): Domain name filter for domain keys - **kind** (string (domain|user|web), query, optional): Key kind filter ### Responses #### 200 - A 200 response **github.com-mailgun-cerberus-keys-KeysResp** - **total_count** (integer (int32)) (required): The number of keys returned in 'items' - **items** (array (github.com-mailgun-cerberus-keys-KeyInfoResp)) (required) Array items: - **id** (string) (required): The ID for the key - **description** (string) (required): The description provided for the key upon its creation - **kind** (string (domain|user|web)) (required): Kind ("domain"|"user"|"web") - **role** (string (admin|basic|sending|developer)) (required): Role ("admin"|"basic"|"sending"|"developer") - **created_at** (string) (required): When the key was created in ISO 8601 date-time format without timezone offset (UTC time) (example: "2026-01-23T10:16:00") - **updated_at** (string) (required): When the key was last updated in ISO 8601 date-time format without timezone offset (UTC time) (example: "2026-01-23T10:16:00") - **expires_at** (string): When the key will expire in ISO 8601 date-time format without timezone offset (UTC time) (example: "2026-01-23T10:16:00") - **disabled_reason** (string): The reason for the key's disablement if applicable - **is_disabled** (boolean) (required): Whether or not the key is disabled from use - **domain_name** (string) (required): The sending domain associated with the key required for 'domain' kind keys - **requestor** (string) (required): An email address associated with the key - **user_name** (string) (required): The API key user's name #### 400 - A 400 response **github.com-mailgun-scaffold-httpapi-GenericResponse** - **message** (string) (required): Response message ### Example Usage ```bash curl -X GET "https://api.mailgun.net/v1/keys?domain_name=string&kind=domain" ``` ``` -------------------------------- ### GET /v3/{domain_name}/templates Source: https://documentation.mailgun.com/_spec/docs/mailgun/api-reference/send/mailgun.json Returns a list of templates for the domain. ```markdown ### Parameters - **domain_name** (string, path, required): Domain name to fetch the templates for. - **page** (string (first|last|next|previous), query, optional): Name of the page to retrieve. Value can be `first`, `last`, `next`, or `previous`. Defaults to `first`. - **limit** (integer, query, optional): Number of templates to retrieve. Default and max limit is 100. - **p** (string, query, optional): Pivot used to retrieve the next page of templates. ### Responses #### 200 - A 200 response **github.com-mailgun-temple-httpapi-getPageResponse** - **items** (array,null) (required): List of items - **paging** (object) (required) - **previous** (string) (required): Previous page URL - **first** (string) (required): First page URL - **next** (string) (required): Next page URL - **last** (string) (required): Last page URL #### 401 - A 401 response **github.com-mailgun-scaffold-httpapi-GenericResponse** - **message** (string) (required): Response message #### 500 - A 500 response **github.com-mailgun-scaffold-httpapi-GenericResponse** - **message** (string) (required): Response message ### Example Usage ```bash curl -X GET "https://api.mailgun.net/v3/{domain_name}/templates?page=first&limit=0&p=string" ``` ``` -------------------------------- ### GET /v4/templates Source: https://documentation.mailgun.com/_spec/docs/mailgun/api-reference/send/mailgun.json Returns a list of account-level templates. ```markdown ### Parameters - **page** (string (first|last|next|previous), query, optional): Name of the page to retrieve. Value can be `first`, `last`, `next`, or `previous`. Defaults to `first`. - **limit** (integer, query, optional): Number of templates to retrieve. Default and max limit is 100. - **p** (string, query, optional): Pivot used to retrieve the next page of templates. ### Responses #### 200 - A 200 response **github.com-mailgun-temple-httpapi-getPageResponse** - **items** (array,null) (required): List of items - **paging** (object) (required) - **previous** (string) (required): Previous page URL - **first** (string) (required): First page URL - **next** (string) (required): Next page URL - **last** (string) (required): Last page URL #### 401 - A 401 response **github.com-mailgun-scaffold-httpapi-GenericResponse** - **message** (string) (required): Response message #### 500 - A 500 response **github.com-mailgun-scaffold-httpapi-GenericResponse** - **message** (string) (required): Response message ### Example Usage ```bash curl -X GET "https://api.mailgun.net/v4/templates?page=first&limit=0&p=string" ``` ``` -------------------------------- ### GET /v3/lists/pages Source: https://documentation.mailgun.com/_spec/docs/mailgun/api-reference/send/mailgun.json Paginate over mailing lists ```markdown ### Parameters - **limit** (integer, query, optional): Set limit for the list length returned. Defaults to 100. ### Responses #### 200 - OK **PaginateMailingListResponse** - **paging** (object) - **first** (string): URL to the first page - **next** (string): URL to the next page - **previous** (string): URL to the previous page - **last** (string): URL to the last page - **items** (array (MailingListResponse)) Array items: - **address** (string): The email address of the mailing list - **name** (string): The name of the mailing list - **description** (string): A description of the mailing list - **access_level** (string): List access level, one of: readonly, members, everyone - **reply_preference** (string): Set where replies should go: list or sender - **created_at** (string): Timestamp indicating the mailing list creation time in RFC 5322 format - **members_count** (integer): The number of members on the mailing list #### 429 - Too Many Requests - **message** (string): Error message ### Example Usage ```bash curl -X GET "https://api.mailgun.net/v3/lists/pages?limit=0" ``` ``` -------------------------------- ### GET /v5/accounts/subaccounts Source: https://documentation.mailgun.com/_spec/docs/mailgun/api-reference/send/mailgun.json Fetch all subaccounts ```markdown ### Parameters - **sort** (string (asc|desc), query, optional): Sort order - **filter** (string, query, optional): Name of account to filter by - **limit** (integer, query, optional): Number of subaccounts to return - **skip** (integer, query, optional): Number of subaccounts to skip - **enabled** (boolean, query, optional): Indicate to include enabled subaccounts (true) or disabled accounts (false). Leave unspecified to allow for either, depending on other parameters provided. - **closed** (boolean, query, optional): Indicate to include closed subaccounts (true) or exclude closed accounts (false). Leave unspecified to allow for either, depending on other parameters provided. ### Responses #### 200 - A 200 response **github.com-mailgun-accounts-api-SubaccountListResponse** - **subaccounts** (array (github.com-mailgun-accounts-api-Subaccount)) Array items: - **id** (string): The ID of the subaccount - **name** (string): The name of the subaccount - **created_at** (string): The date when the account was created serialized as RFC 1123 (HTTP-date) string in GMT (UTC) (example: "Wed, 28 May 2025 20:03:05 GMT") - **updated_at** (string): The date when the account was last updated serialized as RFC 1123 (HTTP-date) string in GMT (UTC) (example: "Wed, 28 May 2025 20:03:05 GMT") - **status** (string (disabled|open|closed)): The status of the subaccount ("disabled"|"open"|"closed") - **features** (object) - **total** (integer): The total number of subaccounts ### Example Usage ```bash curl -X GET "https://api.mailgun.net/v5/accounts/subaccounts?sort=asc&filter=string&limit=10&skip=0&enabled=true&closed=true" ``` ``` -------------------------------- ### GET /v5/users Source: https://documentation.mailgun.com/_spec/docs/mailgun/api-reference/send/mailgun.json Get users on an account ```markdown ### Parameters - **role** (string (basic|billing|support|developer|admin), query, optional): The user role by which to filter results (basic == analyst) - **limit** (integer, query, optional): The number of users to return - **skip** (integer, query, optional): The number of users to skip ### Responses #### 200 - A 200 response **github.com-mailgun-users-api-UserListResponse** - **users** (array (github.com-mailgun-users-api-UserResponse)) Array items: - **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 - **email_details** (object) - **address** (string): the full email address - **is_valid** (boolean): whether the email address is valid - **reason** (string): reason why user email is not valid, if applicable - **parts** (object) - **domain** (string): email domain - **local_part** (string): user email identifier - **display_name** (string): email display name, if applicable - **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 in ISO 8601 date-time format without timezone offset (UTC time) and with microseconds - **password_updated_at** (string): 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 - **preferences** (object) - **time_zone** (string): time zone for the user - **time_format** (string): preferred timestamp format for the user's in-app experience - **programming_language** (string): preferred programming language - **auth** (object) - **method** (string) (required): The user-level auth method - **prior_method** (string): The previous auth method for the user, if applicable - **prior_details** (object): Details that may be needed for an auth method - **github_user_id** (string): Github ID, if part of Github Student Developer Pack account - **salesforce_user_id** (string): Salesforce ID, if part of Salesforce platform account - **migration_status** (string): status of migration to Sinch ID for user authentication, if applicable - **total** (integer): total number of users on the account or the total number of users that match the query ### Example Usage ```bash curl -X GET "https://api.mailgun.net/v5/users?role=basic&limit=0&skip=0" ``` ``` -------------------------------- ### POST /v3/{domain_name}/whitelists/import Source: https://documentation.mailgun.com/_spec/docs/mailgun/api-reference/send/mailgun.json Import a CSV file containing a list of addresses and/or domains to add to the allowlist. The CSV file must be 25MB or under and must contain the following column headers: address, domain. For each row provide either an address or a domain, but not both - choose one, keep the other blank. ```markdown ### Parameters - **domain_name** (string, path, required): Domain to update allowlist for - **Content-Type** (string, header, required): Content-Type must be `multipart/form-data` ### Request Body **Content-Type:** multipart/form-data - **file** (string) (required): CSV file ### Responses #### 202 - A 202 response **github.com-mailgun-scaffold-httpapi-GenericResponse** - **message** (string) (required): Response message #### 400 - A 400 response **github.com-mailgun-scaffold-httpapi-GenericResponse** - **message** (string) (required): Response message #### 500 - A 500 response **github.com-mailgun-scaffold-httpapi-GenericResponse** - **message** (string) (required): Response message ### Example Usage ```bash curl -X POST "https://api.mailgun.net/v3/{domain_name}/whitelists/import" \ -H "Content-Type: application/json" \ -d '{ "file": "string" }' ``` ``` -------------------------------- ### POST /v3/{domain_name}/templates Source: https://documentation.mailgun.com/_spec/docs/mailgun/api-reference/send/mailgun.json Store a new template, including its name, description and (optionally) the template content. If the template content is provided, a new version is automatically created and becomes the active version. ```markdown ### Parameters - **domain_name** (string, path, required): Domain name the template is associated with. ### Request Body **Content-Type:** multipart/form-data - **name** (string) (required): Name of the template being stored. Supports utf-8 characters and name will be down cased. - **description** (string): Description of the template being stored - **createdBy** (string): Optional metadata field api user can indicate who created the template. - **template** (string): Content of the template. - **tag** (string): Initial tag of the created version. If the template parameter is provided and the tag is missing, the default value `initial` is used. - **comment** (string): Version comment. This is valid only if a new version is being created. (template parameter is provided.) - **headers** (string): Key value JSON object of headers to be stored with the template. Where key is the header name and value is the header value. The header names `From`, `Subject`, and `Reply-To` are the only ones currently supported. These headers will be inserted into the MIME at the time we attempt delivery. Headers set at the message level will override headers set on the template. e.g. Setting the From header at the time of sending will override the From header saved on the template. Additionally, headers generated by templates are not reflected on the accepted event as they are not prepended to the message until the message is prepped for delivery. if a From header is not provided either in the message or template, we will default to `postmaster@your-sending-domain.tld` ### Responses #### 200 - A 200 response **github.com-mailgun-temple-httpapi-createTemplateOrVersionResponse** - **message** (string) (required): Response message - **template** (object) (required) - **name** (string) (required): Name of the template - **description** (string): Description of the template - **createdAt** (string): Creation date in RFC822 format - **createdBy** (string): Indicate who created the template - **id** (string): Template ID - **domain** (string): Domain of the template - **version** (object) - **tag** (string) (required): Tag of the version. Must be unique to the template - **template** (string): Template content - **engine** (string) (required): Rendering engine - **mjml** (string) (required): Template source - **createdAt** (string) (required): Creation date in RFC822 format - **comment** (string) (required): Comment related to the version - **active** (boolean) (required): If this flag is true - **id** (string) (required): Template ID - **headers** (object): Key value JSON object of headers to be stored with the template. Where key is the header name and value is the header value. The header names `From` - **versions** (array,null): List of template's versions #### 400 - A 400 response **github.com-mailgun-scaffold-httpapi-GenericResponse** - **message** (string) (required): Response message #### 401 - A 401 response **github.com-mailgun-scaffold-httpapi-GenericResponse** - **message** (string) (required): Response message #### 409 - A 409 response **github.com-mailgun-scaffold-httpapi-GenericResponse** - **message** (string) (required): Response message #### 500 - A 500 response **github.com-mailgun-scaffold-httpapi-GenericResponse** - **message** (string) (required): Response message ### Example Usage ```bash curl -X POST "https://api.mailgun.net/v3/{domain_name}/templates" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "description": "string", "createdBy": "string", "template": "string", "tag": "string", "comment": "string", "headers": "string" }' ``` ``` -------------------------------- ### GET /v1/thresholds/hits Source: https://documentation.mailgun.com/_spec/docs/mailgun/api-reference/send/mailgun.json API endpoint for GET /v1/thresholds/hits ```markdown ### Responses #### 200 - A 200 response **github.com-mailgun-thresholds-api-HitListResponse** - **items** (array (github.com-mailgun-thresholds-api-HitListItem)) (required) Array items: - **id** (string) (required) - **name** (string) (required) - **created_at** (string (date-time)) (required) - **updated_at** (string (date-time)) (required) - **triggered** (boolean) (required) - **expires_at** (string (date-time)) (required) - **latest_value** (string) (required) - **metric** (string (hard_bounce_rate|temporary_fail_rate|delivered_rate|complained_rate)) (required): Metric ("hard_bounce_rate"|"temporary_fail_rate"|"delivered_rate"|"complained_rate") - **comparator** (string (=|!=|<|<=|>|>=)) (required): Metric Comparator ("="|"!="|"<"|"<="|">"|">=") - **limit** (string) (required) - **parent_account_id** (string) - **subaccount_id** (string) - **dimension** (string (domain|ip|ip_pool|recipient_provider|subaccount)): Dimension ("domain"|"ip"|"ip_pool"|"recipient_provider"|"subaccount") - **dimension_value** (string) - **total** (integer (int64)) (required) #### default - A default response **github.com-mailgun-scaffold-httpapi-GenericResponse** - **message** (string) (required): Response message ### Example Usage ```bash curl -X GET "https://api.mailgun.net/v1/thresholds/hits" ``` ``` -------------------------------- ### GET /v1/thresholds/limits Source: https://documentation.mailgun.com/_spec/docs/mailgun/api-reference/send/mailgun.json API endpoint for GET /v1/thresholds/limits ```markdown ### Responses #### 200 - A 200 response **github.com-mailgun-thresholds-api-ThresholdLimitListResponse** - **items** (array (github.com-mailgun-thresholds-api-ThresholdLimitItem)) (required): List of threshold limits. Array items: - **id** (string): The unique identifier for the limit. - **parent_account_id** (string): The parent account ID. - **subaccount_id** (string): The subaccount ID this limit belongs to. - **account_group** (string): The group this account belongs to. - **name** (string) (required): A user-friendly name for the limit. - **created_at** (string (date-time)) (required): Timestamp of when the limit was created. - **updated_at** (string (date-time)): Timestamp of when the limit was last updated. - **last_checked** (string (date-time)): Timestamp of when the limit was last checked. - **description** (string): A description of what the limit does. - **filters** (array (github.com-mailgun-thresholds-api-Filter)): A list of filters to apply to the limit. Array items: - **dimension** (string (domain|ip|ip_pool|recipient_provider|subaccount)) (required): Dimension ("domain"|"ip"|"ip_pool"|"recipient_provider"|"subaccount") - **comparator** (string (=|!=|contains|not contains|<|<=|>|>=)) (required): Filter Comparator ("="|"!="|"contains"|"not contains"|"<"|"<="|">"|">=") - **values** (array (string)) (required): The dimension values to apply to filter. - **metric** (string (email_preview_success_count|seed_test_count)) (required): Limit Metric ("email_preview_success_count"|"seed_test_count") - **comparator** (string (=|!=|<|<=|>|>=)) (required): Metric Comparator ("="|"!="|"<"|"<="|">"|">=") - **limit** (string) (required): The value of the limit. - **dimension** (string (domain|ip|ip_pool|recipient_provider|subaccount)) (required): Dimension ("domain"|"ip"|"ip_pool"|"recipient_provider"|"subaccount") - **period** (string): The time period for the metric aggregation in the format of '1h' '1d'. - **total** (integer (int64)) (required): Total number of threshold limits. #### default - A default response **github.com-mailgun-scaffold-httpapi-GenericResponse** - **message** (string) (required): Response message ### Example Usage ```bash curl -X GET "https://api.mailgun.net/v1/thresholds/limits" ``` ``` -------------------------------- ### POST /v3/{domain_name}/bounces/import Source: https://documentation.mailgun.com/_spec/docs/mailgun/api-reference/send/mailgun.json Import a CSV file containing a list of addresses to add to the bounce list. The CSV file must be 25MB or under and must contain the following column headers: address, code, error, created_at. address is a valid email address. code is error code (optional, default: 550). error is error description (optional, default: empty string). created_at is timestamp of bounce event in RFC2822 format (optional, default: current time) ```markdown ### Parameters - **domain_name** (string, path, required): Domain to update bounces for - **Content-Type** (string, header, required): Content-Type must be `multipart/form-data` ### Request Body **Content-Type:** multipart/form-data - **file** (string) (required): CSV file ### Responses #### 202 - A 202 response **github.com-mailgun-scaffold-httpapi-GenericResponse** - **message** (string) (required): Response message #### 400 - A 400 response **github.com-mailgun-scaffold-httpapi-GenericResponse** - **message** (string) (required): Response message #### 500 - A 500 response **github.com-mailgun-scaffold-httpapi-GenericResponse** - **message** (string) (required): Response message ### Example Usage ```bash curl -X POST "https://api.mailgun.net/v3/{domain_name}/bounces/import" \ -H "Content-Type: application/json" \ -d '{ "file": "string" }' ``` ``` -------------------------------- ### GET /v1/thresholds/alerts/send Source: https://documentation.mailgun.com/_spec/docs/mailgun/api-reference/send/mailgun.json API endpoint for GET /v1/thresholds/alerts/send ```markdown ### Responses #### 200 - A 200 response **github.com-mailgun-thresholds-api-SendAlertListResponse** - **items** (array (github.com-mailgun-thresholds-api-SendAlertItem)) (required): List of send alerts. Array items: - **id** (string): The unique identifier for the alert. - **parent_account_id** (string): The parent account ID. - **subaccount_id** (string): The subaccount ID this alert belongs to. - **account_group** (string): The group this account belongs to. - **name** (string) (required): A user-friendly name for the alert. - **created_at** (string (date-time)) (required): Timestamp of when the alert was created. - **updated_at** (string (date-time)): Timestamp of when the alert was last updated. - **last_checked** (string (date-time)): Timestamp of the alert was last checked. - **description** (string): A description of what the alert does. - **alert_channels** (array (github.com-mailgun-thresholds-api-AlertChannel)): A list of alert channels to notify. - **filters** (array (github.com-mailgun-thresholds-api-Filter)): A list of filters to apply to the alert. Array items: - **dimension** (string (domain|ip|ip_pool|recipient_provider|subaccount)) (required): Dimension ("domain"|"ip"|"ip_pool"|"recipient_provider"|"subaccount") - **comparator** (string (=|!=|contains|not contains|<|<=|>|>=)) (required): Filter Comparator ("="|"!="|"contains"|"not contains"|"<"|"<="|">"|">=") - **values** (array (string)) (required): The dimension values to apply to filter. - **metric** (string (hard_bounce_rate|temporary_fail_rate|delivered_rate|complained_rate)) (required): Metric ("hard_bounce_rate"|"temporary_fail_rate"|"delivered_rate"|"complained_rate") - **comparator** (string (=|!=|<|<=|>|>=)) (required): Metric Comparator ("="|"!="|"<"|"<="|">"|">=") - **limit** (string) (required): The threshold limit for the alert. - **dimension** (string (domain|ip|ip_pool|recipient_provider|subaccount)) (required): Dimension ("domain"|"ip"|"ip_pool"|"recipient_provider"|"subaccount") - **period** (string): The time period for the metric aggregation in the format of '1h' '1d'. - **total** (integer (int64)) (required): Total number of send alerts. #### 400 - A 400 response **github.com-mailgun-scaffold-httpapi-GenericResponse** - **message** (string) (required): Response message ### Example Usage ```bash curl -X GET "https://api.mailgun.net/v1/thresholds/alerts/send" ``` ``` -------------------------------- ### GET /v5/users/{user_id} Source: https://documentation.mailgun.com/_spec/docs/mailgun/api-reference/send/mailgun.json Get details for a user on the account ```markdown ### Parameters - **user_id** (string, path, required): The ID of the user on the account ### Responses #### 200 - A 200 response **github.com-mailgun-users-api-UserResponse** - **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 - **email_details** (object) - **address** (string): the full email address - **is_valid** (boolean): whether the email address is valid - **reason** (string): reason why user email is not valid, if applicable - **parts** (object) - **domain** (string): email domain - **local_part** (string): user email identifier - **display_name** (string): email display name, if applicable - **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 in ISO 8601 date-time format without timezone offset (UTC time) and with microseconds - **password_updated_at** (string): 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 - **preferences** (object) - **time_zone** (string): time zone for the user - **time_format** (string): preferred timestamp format for the user's in-app experience - **programming_language** (string): preferred programming language - **auth** (object) - **method** (string) (required): The user-level auth method - **prior_method** (string): The previous auth method for the user, if applicable - **prior_details** (object): Details that may be needed for an auth method - **github_user_id** (string): Github ID, if part of Github Student Developer Pack account - **salesforce_user_id** (string): 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 **github.com-mailgun-users-api-GenericResponse** - **message** (string) (required): Status message ### Example Usage ```bash curl -X GET "https://api.mailgun.net/v5/users/{user_id}" ``` ``` -------------------------------- ### POST /v1/keys Source: https://documentation.mailgun.com/_spec/docs/mailgun/api-reference/send/mailgun.json Create Mailgun API key ```markdown ### Request Body **Content-Type:** multipart/form-data - **domain_name** (string): Web domain to associate with the key, for keys of 'domain' kind - **kind** (string (domain|user|web)): Type of API key ('domain', 'user', or 'web'). Defaults to 'user' if not provided. Note: web keys are not subject to IP allowlisting and have a default/maximum validity period of 1 day. ("domain"|"user"|"web") - **description** (string): Key description - **expiration** (integer): Key lifetime in seconds, must be greater than 0 if set - **role** (string (admin|basic|sending|developer)) (required): Key role ('admin', 'basic' [use in place of analyst], 'sending' [use with keys of domain kind], or 'developer') ("admin"|"basic"|"sending"|"developer") - **user_id** (string): API Key user's string user ID; should be provided for all keys of 'web' kind - **user_name** (string): API Key user's name - **email** (string): API Key user's email address; should be provided for all keys of 'web' kind ### Responses #### 200 - A 200 response **github.com-mailgun-cerberus-keys-CreateKeyResp** - **message** (string) (required): Response message - **key** (object) (required) - **id** (string) (required): The ID for the key - **description** (string) (required): The description provided for the key upon its creation - **kind** (string (domain|user|web)) (required): Kind ("domain"|"user"|"web") - **role** (string (admin|basic|sending|developer)) (required): Role ("admin"|"basic"|"sending"|"developer") - **created_at** (string) (required): When the key was created in ISO 8601 date-time format without timezone offset (UTC time) (example: "2026-01-23T10:16:00") - **updated_at** (string) (required): When the key was last updated in ISO 8601 date-time format without timezone offset (UTC time) (example: "2026-01-23T10:16:00") - **expires_at** (string): When the key will expire in ISO 8601 date-time format without timezone offset (UTC time) (example: "2026-01-23T10:16:00") - **disabled_reason** (string): The reason for the key's disablement if applicable - **is_disabled** (boolean) (required): Whether or not the key is disabled from use - **domain_name** (string) (required): The sending domain associated with the key required for 'domain' kind keys - **requestor** (string) (required): An email address associated with the key - **user_name** (string) (required): The API key user's name - **secret** (string (password)) (required): The full API key secret in plain text returned only once upon key creation #### 403 - A 403 response **github.com-mailgun-scaffold-httpapi-GenericResponse** - **message** (string) (required): Response message ### Example Usage ```bash curl -X POST "https://api.mailgun.net/v1/keys" \ -H "Content-Type: application/json" \ -d '{ "domain_name": "string", "kind": "domain", "description": "string", "expiration": "0", "role": "admin", "user_id": "string", "user_name": "string", "email": "string" }' ``` ``` -------------------------------- ### POST /v3/{domain_name}/unsubscribes/import Source: https://documentation.mailgun.com/_spec/docs/mailgun/api-reference/send/mailgun.json Import a CSV file containing a list of addresses to add to the unsubscribe list. The CSV file must be 25MB or under and can contain the following column headers: address, tags, created_at. address is a valid email address (required). tags is tag to unsubscribe from, use * to unsubscribe an address from all domain's correspondence (optional, default: *). created_at is timestamp of unsubscribe event in RFC2822 format (optional, default: current time) ```markdown ### Parameters - **domain_name** (string, path, required): Domain to update unsubscribes for - **Content-Type** (string, header, required): Content-Type must be `multipart/form-data` ### Request Body **Content-Type:** multipart/form-data - **file** (string) (required): CSV file ### Responses #### 202 - A 202 response **github.com-mailgun-scaffold-httpapi-GenericResponse** - **message** (string) (required): Response message #### 400 - A 400 response **github.com-mailgun-scaffold-httpapi-GenericResponse** - **message** (string) (required): Response message #### 500 - A 500 response **github.com-mailgun-scaffold-httpapi-GenericResponse** - **message** (string) (required): Response message ### Example Usage ```bash curl -X POST "https://api.mailgun.net/v3/{domain_name}/unsubscribes/import" \ -H "Content-Type: application/json" \ -d '{ "file": "string" }' ``` ``` -------------------------------- ### GET /v1/bounce-classification/config/rules Source: https://documentation.mailgun.com/_spec/docs/mailgun/api-reference/send/mailgun.json Deprecated: use GET /v2/bounce-classification/config/groups/{group-id} ```markdown ### Responses #### 200 - A 200 response **github.com-mailgun-bounce-classification-internal-config-Rules** ### Example Usage ```bash curl -X GET "https://api.mailgun.net/v1/bounce-classification/config/rules" ``` ``` -------------------------------- ### POST /v3/{domain_name}/complaints/import Source: https://documentation.mailgun.com/_spec/docs/mailgun/api-reference/send/mailgun.json Import a CSV file containing a list of addresses to add to the complaint list. The CSV file must be 25MB or under and can contain the following column headers: address, created_at. address is a valid email address (required). created_at is timestamp of complaint event in RFC2822 format (optional, default: current time) ```markdown ### Parameters - **domain_name** (string, path, required): Domain to update complaints for - **Content-Type** (string, header, required): Content-Type must be `multipart/form-data` ### Request Body **Content-Type:** multipart/form-data - **file** (string) (required): CSV file ### Responses #### 202 - A 202 response **github.com-mailgun-scaffold-httpapi-GenericResponse** - **message** (string) (required): Response message #### 400 - A 400 response **github.com-mailgun-scaffold-httpapi-GenericResponse** - **message** (string) (required): Response message #### 500 - A 500 response **github.com-mailgun-scaffold-httpapi-GenericResponse** - **message** (string) (required): Response message ### Example Usage ```bash curl -X POST "https://api.mailgun.net/v3/{domain_name}/complaints/import" \ -H "Content-Type: application/json" \ -d '{ "file": "string" }' ``` ```