Send message
Post /messages/send
Parameters:
Name | Description | Type | Mandatory | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
to |
An array of recipient information
|
Array | Yes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
msg |
|
Struct | Yes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
headers | Header on JSON format | Struct | No | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
apiKey | Id of the api key used to send emails. If empty, we used apikey from authentication | String | No |
Response:
Name | Description | Type |
---|---|---|
status | success / failure | String |
PHP : With a dedicated library
Attention : the following PHP code require to install the Tipimail's library. For this, download and install 'Composer' and then in the folder where your script is saved, execute in the terminal console the following line : composer require tipimail/tipimail
Programming language:
Request exemple:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | { "to" : [ { "address" : "to1@example.com" , "personalName" : "Nameto1" }, { "address" : "to2@example.com" , "personalName" : "Nameto2" } ], "msg" : { "from" : { "personalName" : "Fromname" , "address" : "from@example.com" }, "replyTo" : { "personalName" : "Replytoname" , "address" : "reply@example.com" }, "subject" : "Subject" , "text" : "Text content" , "html" : "<p>Html content</p>" , "images" : [ { "contentType" : "image/png" , "filename" : "IMAGECID" , "content" : "azerty" } ], "attachments" : [ { "contentType" : "text/plain" , "filename" : "myfile.txt" , "content" : "azerty" } ], }, "headers" : { "X-TM-META" : { "orderId" : 123456789, "shipmentId" : 123456789 }, "X-TM-SUB" : [ { "email" : "email1@example.com" , "values" : { "firstName" : "Name1" , "uniqueId" : 132456798 } }, { "email" : "email2@example.com" , "values" : { "subject" : "mon mail numero 2" , "firstName" : "Name2" , "meta" : { "uniqueId" : 987654321, "orderId" : 132456798, "shipmentId" : 1237498798 } } } ], "X-TM-TAGS" : [ "welcome" , "website1" ] } } |
Response exemple:
1 2 3 4 | { "status" : "success" } |