V3 REFERENCE Campaigns

newsletter/:id/detailcontent

An action to upload the content of the newsletter

Return the text and html contents of the newsletter


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

    
    
Properties
Name Description
Text-part The plain text part of the message
  • [ Type Ansistring ]
Html-part The html-formatted part of the message
  • [ Type Ansistring ]

Update the text and html contents of the newsletter


curl -s -X POST \
--user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \
https://api.mailjet.com/v3/REST/newsletter/:id/detailcontent \
-H 'Content-Type: application/json' \
-d '{"Text-part": ...}'
Properties
Name Description
Text-part The plain text part of the message
  • [ Type Ansistring ]
Html-part The html-formatted part of the message
  • [ Type Ansistring ]

Update the text and/or html contents of the newsletter


curl -s -X PUT \
--user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \
https://api.mailjet.com/v3/REST/newsletter/:id/detailcontent \
-H 'Content-Type: application/json' \
-d '{"Text-part": ...}'

    
# update the content, using the value of the  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/newsletter/:id/detailcontent \
-H 'Content-Type: application/json' \
-d '{"Text-part": ...}'
    
Properties
Name Description
Text-part The plain text part of the message
  • [ Type Ansistring ]
Html-part The html-formatted part of the message
  • [ Type Ansistring ]

Empty the text and html contents of the newsletter


curl -s -X DELETE \
--user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \
https://api.mailjet.com/v3/REST/newsletter
    
# delete the resource using the alternate unique key 
# 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/newsletter/:id/detailcontent