Récupérer un template
Get /settings/templates/{id}
Url arameters:
Nom | Description | Type | Obligatoire |
---|---|---|---|
id | Id du template | String | Oui |
Réponse :
Nom | Description | Type | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
templates |
|
Struct |
Langage de programmation :
Exemple de réponse :
{ "id": "g65r4g64h65tr47h678th11d", "templateName": "description-du-template", "description": "Description du template", "from": { "address": "from@example.com" "personalName": "Sender name" }, "subject": "Message subject", "htmlContent": "html content", "textContent": "text content", "createdAt": 1447938089, "updatedAt": 1447938089 }
Exemple de code :
curl -X GET -H "Content-Type: application/json" -H "X-Tipimail-ApiUser:YOUR_SMTP_USERNAME" -H "X-Tipimail-ApiKey:YOUR_SMTP_KEY" https://api.tipimail.com/v1/settings/templates/g65r4g64h65tr47h678th11d
require 'vendor/autoload.php'; $tipimail = new Tipimail\Tipimail('YOUR_SMTP_USERNAME', 'YOUR_API_KEY'); try { $result = $tipimail->getSettingsService()->getTemplatesService()->get('646r54g6r4gr6g46g46546d4'); var_dump($result); } catch(Tipimail\Exceptions\TipimailException $e) { echo 'Exception received :', $e->getMessage(), "\n"; }