V3 REFERENCE Sender Addresses and Domains

/metasender

Management of domains used for sending messages. A domain or address must be registered and validated before being used. See the related Sender object if you wish to register a given e-mail address.

List metasender resources available for this apikey, use a GET request. Alternatively, you may want to add one or more filters.

# list metasender resources

curl -s -X GET \
--user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \
https://api.mailjet.com/v3/REST/metasender
Unique Key

In addition to the resource $ID, you can also use the unique key $Email to identify this resource. Please refer to the field(s) description below for more information.

Properties
Name Description
CreatedAt Timestamp when object was created in database.
  • [ Type TRFC3339DateTime ]
Description User provided readable description of the domain.
  • [ Type AnsiString ]
Email The email address (lowercase), which may consist of a wildcard (*) in the local part.
  • Mandatory
  • Unique
  • [ Type TEmail ]
Filename Filename expected on the domain name webserver, used for verifying the domain, in case of a catch-all address.
  • Read Only
  • [ Type AnsiString ]
ID Unique numerical ID for this object.
  • Read Only
  • [ Type Int64 ]
IsEnabled Is the domain authorized to send mails through Mailjet.
  • [ Type Boolean ]
Filters
Name Description
DNS Only retrieve metasender resources for which DNS ID equals the specified value.).
  • [ Type Int64 ]
User Only retrieve metasender resources for which User ID equals the specified value.
  • [ Type Int64 ]

Access a given metasender resource, use a GET request, providing the metasender's ID value.

# access the metasender resource identified by $ID

curl -s -X GET \
--user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \
https://api.mailjet.com/v3/REST/metasender/$ID

    
# access the resource through the Email's value
# note: all keys marked as 'unique' may be used as an alternate ID

curl -s -X GET \
--user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \
https://api.mailjet.com/v3/REST/metasender/$Email
    
    
Unique Key

In addition to the resource $ID, you can also use the unique key $Email to identify this resource. Please refer to the field(s) description below for more information.

Properties
Name Description
CreatedAt Timestamp when object was created in database.
  • [ Type TRFC3339DateTime ]
Description User provided readable description of the domain.
  • [ Type AnsiString ]
Email The email address (lowercase), which may consist of a wildcard (*) in the local part.
  • Mandatory
  • Unique
  • [ Type TEmail ]
Filename Filename expected on the domain name webserver, used for verifying the domain, in case of a catch-all address.
  • Read Only
  • [ Type AnsiString ]
ID Unique numerical ID for this object.
  • Read Only
  • [ Type Int64 ]
IsEnabled Is the domain authorized to send mails through Mailjet.
  • [ Type Boolean ]

Add a new metasender resource with a POST request.

# add a new metasender resource, beware of the Read Only fields!

curl -s -X POST \
--user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \
https://api.mailjet.com/v3/REST/metasender \
-H 'Content-Type: application/json' \
-d '{"CreatedAt": ...}'
Unique Key

In addition to the resource $ID, you can also use the unique key $Email to identify this resource. Please refer to the field(s) description below for more information.

Properties
Name Description
CreatedAt Timestamp when object was created in database.
  • [ Type TRFC3339DateTime ]
Description User provided readable description of the domain.
  • [ Type AnsiString ]
Email The email address (lowercase), which may consist of a wildcard (*) in the local part.
  • Mandatory
  • Unique
  • [ Type TEmail ]
Filename Filename expected on the domain name webserver, used for verifying the domain, in case of a catch-all address.
  • Read Only
  • [ Type AnsiString ]
ID Unique numerical ID for this object.
  • Read Only
  • [ Type Int64 ]
IsEnabled Is the domain authorized to send mails through Mailjet.
  • [ Type Boolean ]

Update one specific metasender resource with a PUT request, providing the metasender's ID value. Be sure to include all the mandatory properties.

# update content of resource metasender identified by ID $ID

curl -s -X PUT \
--user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \
https://api.mailjet.com/v3/REST/metasender/$ID \
-H 'Content-Type: application/json' \
-d '{"CreatedAt": ...}'

    
# update the content, using the value of the Email property
# note: all keys marked as 'unique' may be used as an alternate ID

curl -s -X PUT \
--user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \
https://api.mailjet.com/v3/REST/metasender/:Email \
-H 'Content-Type: application/json' \
-d '{"CreatedAt": ...}'
    
Unique Key

In addition to the resource $ID, you can also use the unique key $Email to identify this resource. Please refer to the field(s) description below for more information.

Properties
Name Description
CreatedAt Timestamp when object was created in database.
  • [ Type TRFC3339DateTime ]
Description User provided readable description of the domain.
  • [ Type AnsiString ]
Email The email address (lowercase), which may consist of a wildcard (*) in the local part.
  • Mandatory
  • Unique
  • [ Type TEmail ]
Filename Filename expected on the domain name webserver, used for verifying the domain, in case of a catch-all address.
  • Read Only
  • [ Type AnsiString ]
ID Unique numerical ID for this object.
  • Read Only
  • [ Type Int64 ]
IsEnabled Is the domain authorized to send mails through Mailjet.
  • [ Type Boolean ]