V3 REFERENCE Sender Addresses and Domains

/sender

Manage an email sender for a single API key. An e-mail address or a complete domain (*) has to be registered and validated before being used to send e-mails. In order to manage a sender available across multiple API keys, see the related MetaSender resource.

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

# list sender resources

curl -s -X GET \
--user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \
https://api.mailjet.com/v3/REST/sender
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.
  • Read Only
  • [ Type RFC3339 DateTime ]
DNS DNS domain to which sender belongs.
  • Read Only
  • [ Type TDNS ]
Email Email Address of this sender.
  • Mandatory
  • Unique
  • [ Type TSenderEmail ]
EmailType Type of emails that can be sent from this address.
  • [ Type String ]

Allowed values:
  • transactional
  • bulk
Filename Filename expected on the domain name webserver, used for verifying the domain in case of a catch-all address.
  • Read Only
  • [ Type String ]
ID Unique numerical ID for this object.
  • Read Only
  • [ Type Integer ]
IsDefaultSender Is this the default sender for this API key?
  • [ Type Boolean ]
Name User-provided name for this sender.
  • [ Type String ]
Status Status of the sender.
  • Read Only
  • [ Type TSenderStatus ]

Allowed values:
  • Inactive
  • Active
  • Deleted
Filters
Name Description
DnsID Only retrieve senders for which DnsID matches the specified value.
  • [ Type Integer ]
Domain Only retrieve senders for which the email address domain matches the specified value.
  • [ Type String ]
Email Only retrieve sender resources for which Email equals the specified value.
  • [ Type String ]
LocalPart Only retrieve senders for which the email address' local part matches the specified value.
  • [ Type String ]
ShowDeleted Also retrieve sender resources which were deleted.
  • [ Type Boolean ]
Status Only retrieve sender resources for which Status equals the specified value.
  • [ Type String ]

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

# access the sender resource identified by $ID

curl -s -X GET \
--user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \
https://api.mailjet.com/v3/REST/sender/$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/sender/$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.
  • Read Only
  • [ Type RFC3339 DateTime ]
DNS DNS domain to which sender belongs.
  • Read Only
  • [ Type TDNS ]
Email Email Address of this sender.
  • Mandatory
  • Unique
  • [ Type TSenderEmail ]
EmailType Type of emails that can be sent from this address.
  • [ Type String ]

Allowed values:
  • transactional
  • bulk
Filename Filename expected on the domain name webserver, used for verifying the domain in case of a catch-all address.
  • Read Only
  • [ Type String ]
ID Unique numerical ID for this object.
  • Read Only
  • [ Type Integer ]
IsDefaultSender Is this the default sender for this API key?
  • [ Type Boolean ]
Name User-provided name for this sender.
  • [ Type String ]
Status Status of the sender.
  • Read Only
  • [ Type TSenderStatus ]

Allowed values:
  • Inactive
  • Active
  • Deleted

Add a new sender resource with a POST request.

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

curl -s -X POST \
--user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \
https://api.mailjet.com/v3/REST/sender \
-H 'Content-Type: application/json' \
-d '{"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.
  • Read Only
  • [ Type RFC3339 DateTime ]
DNS DNS domain to which sender belongs.
  • Read Only
  • [ Type TDNS ]
Email Email Address of this sender.
  • Mandatory
  • Unique
  • [ Type TSenderEmail ]
EmailType Type of emails that can be sent from this address.
  • [ Type String ]

Allowed values:
  • transactional
  • bulk
Filename Filename expected on the domain name webserver, used for verifying the domain in case of a catch-all address.
  • Read Only
  • [ Type String ]
ID Unique numerical ID for this object.
  • Read Only
  • [ Type Integer ]
IsDefaultSender Is this the default sender for this API key?
  • [ Type Boolean ]
Name User-provided name for this sender.
  • [ Type String ]
Status Status of the sender.
  • Read Only
  • [ Type TSenderStatus ]

Allowed values:
  • Inactive
  • Active
  • Deleted

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

# update content of resource sender identified by ID $ID

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

    
# 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/sender/: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.
  • Read Only
  • [ Type RFC3339 DateTime ]
DNS DNS domain to which sender belongs.
  • Read Only
  • [ Type TDNS ]
Email Email Address of this sender.
  • Mandatory
  • Unique
  • [ Type TSenderEmail ]
EmailType Type of emails that can be sent from this address.
  • [ Type String ]

Allowed values:
  • transactional
  • bulk
Filename Filename expected on the domain name webserver, used for verifying the domain in case of a catch-all address.
  • Read Only
  • [ Type String ]
ID Unique numerical ID for this object.
  • Read Only
  • [ Type Integer ]
IsDefaultSender Is this the default sender for this API key?
  • [ Type Boolean ]
Name User-provided name for this sender.
  • [ Type String ]
Status Status of the sender.
  • Read Only
  • [ Type TSenderStatus ]

Allowed values:
  • Inactive
  • Active
  • Deleted

Remove one given sender resource with a DELETE request, providing the sender's ID value.

# delete resource sender with ID $ID

curl -s -X DELETE \
--user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \
https://api.mailjet.com/v3/REST/sender/$ID
    
# delete the resource using the alternate unique key Email
# note: all keys marked as 'unique' may be used as an alternate ID

curl -s -X DELETE \
--user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \
https://api.mailjet.com/v3/REST/sender/: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.