You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"HTMLPart": "<h3>Dear passenger 1, welcome to <a href=\"https://www.mailjet.com/\">Mailjet</a>!</h3><br />May the delivery force be with you!"
106
+
}
107
+
]
108
+
}
109
+
result = mailjet.send.create(data=data)
110
+
print result.status_code
111
+
print result.json()
112
+
```
113
+
114
+
## Client / Call Configuration Specifics
115
+
116
+
### API Versioning
35
117
36
118
The Mailjet API is spread among three distinct versions:
37
119
38
120
-`v3` - The Email API
39
121
-`v3.1` - Email Send API v3.1, which is the latest version of our Send API
40
-
-`v4` - SMS API
122
+
-`v4` - SMS API (not supported in Python)
41
123
42
124
Since most Email API endpoints are located under `v3`, it is set as the default one and does not need to be specified when making your request. For the others you need to specify the version using `version`. For example, if using Send API `v3.1`:
A `PUT` request in the Mailjet API will work as a `PATCH` request - the update will affect only the specified properties. The other properties of an existing resource will neither be modified, nor deleted. It also means that all non-mandatory properties can be omitted from your payload.
"TextPart": "Dear passenger 1, welcome to Mailjet! May the delivery force be with you!",
115
-
"HTMLPart": "<h3>Dear passenger 1, welcome to Mailjet!</h3><br />May the delivery force be with you!"
279
+
"Name": "last_name",
280
+
"value": "Smith"
116
281
}
117
282
]
118
283
}
119
-
result = mailjet.send.create(data=data)
284
+
result = mailjet.contactdata.update(id=id, data=data)
120
285
print result.status_code
121
286
print result.json()
122
-
123
287
```
124
288
125
-
You can also use the previous version of Mailjet's Send API (v3). You can find the documentation explaining the overall differences and code samples [here](https://dev.mailjet.com/guides/?python#sending-a-basic-email-v3).
289
+
### DELETE request
126
290
127
-
## Create a new Contact
128
-
```python
291
+
Upon a successful `DELETE` request the response will not include a response body, but only a `204 No Content` response code.
Mailjet loves developers. You can be part of this project!
313
+
314
+
This wrapper is a great introduction to the open source world, check out the code!
315
+
316
+
Feel free to ask anything, and contribute:
317
+
318
+
- Fork the project.
319
+
- Create a new branch.
320
+
- Implement your feature or bug fix.
321
+
- Add documentation to it.
322
+
- Commit, push, open a pull request and voila.
323
+
324
+
If you have suggestions on how to improve the guides, please submit an issue in our [Official API Documentation repo](https://github.com/mailjet/api-documentation).
0 commit comments