Add contacts to an advanced list
POSThttps://api.emelia.io/advanced/lists/contacts
Add contacts to an advanced list
Request
- application/json
Bodyrequired
idstringrequired
contact objectrequired
Responses
- 200
- 400
Successfully added contact
- application/json
- Schema
- Example (auto)
Schema
successboolean
Default value:
true
contactIdstring
{
"success": true,
"contactId": "string"
}
Error adding contact
- application/json
- Schema
- Example (auto)
Schema
errorstring
{
"error": "string"
}
Authorization: Authorization
name: Authorizationtype: apiKeyin: headerdescription: The API key to use for authentication. You can find it in your [Emelia account](https://app.emelia.io/settings/api). You just need to pass the API key in the Authorization header.
- python
- nodejs
- curl
- go
- ruby
- php
- java
- javascript
- HTTP.CLIENT
- REQUESTS
import http.client
import json
conn = http.client.HTTPSConnection("api.emelia.io")
payload = json.dumps({
"id": "string",
"contact": {
"linkedinUrlProfile": "string",
"email": "string",
"firstName": "string",
"lastName": "string",
"field1": "string",
"field2": "string"
}
})
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': '<Authorization>'
}
conn.request("POST", "/advanced/lists/contacts", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
ResponseClear