Upload Contact Add To Campaign And Start Api
curl --request POST \
--url https://services.meetchase.ai/api/v1/campaigns/{campaign_id}/contacts/upload-and-start \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"city": "London",
"country": "United Kingdom",
"custom_data": {
"age": 26,
"role": "Sales Manager"
},
"email": "tara@example.com",
"first_name": "Tara",
"last_name": "Williams",
"tags": [
"finance",
"manager"
]
}
'import requests
url = "https://services.meetchase.ai/api/v1/campaigns/{campaign_id}/contacts/upload-and-start"
payload = {
"city": "London",
"country": "United Kingdom",
"custom_data": {
"age": 26,
"role": "Sales Manager"
},
"email": "tara@example.com",
"first_name": "Tara",
"last_name": "Williams",
"tags": ["finance", "manager"]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
city: 'London',
country: 'United Kingdom',
custom_data: {age: 26, role: 'Sales Manager'},
email: 'tara@example.com',
first_name: 'Tara',
last_name: 'Williams',
tags: ['finance', 'manager']
})
};
fetch('https://services.meetchase.ai/api/v1/campaigns/{campaign_id}/contacts/upload-and-start', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://services.meetchase.ai/api/v1/campaigns/{campaign_id}/contacts/upload-and-start",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'city' => 'London',
'country' => 'United Kingdom',
'custom_data' => [
'age' => 26,
'role' => 'Sales Manager'
],
'email' => 'tara@example.com',
'first_name' => 'Tara',
'last_name' => 'Williams',
'tags' => [
'finance',
'manager'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://services.meetchase.ai/api/v1/campaigns/{campaign_id}/contacts/upload-and-start"
payload := strings.NewReader("{\n \"city\": \"London\",\n \"country\": \"United Kingdom\",\n \"custom_data\": {\n \"age\": 26,\n \"role\": \"Sales Manager\"\n },\n \"email\": \"tara@example.com\",\n \"first_name\": \"Tara\",\n \"last_name\": \"Williams\",\n \"tags\": [\n \"finance\",\n \"manager\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://services.meetchase.ai/api/v1/campaigns/{campaign_id}/contacts/upload-and-start")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"city\": \"London\",\n \"country\": \"United Kingdom\",\n \"custom_data\": {\n \"age\": 26,\n \"role\": \"Sales Manager\"\n },\n \"email\": \"tara@example.com\",\n \"first_name\": \"Tara\",\n \"last_name\": \"Williams\",\n \"tags\": [\n \"finance\",\n \"manager\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://services.meetchase.ai/api/v1/campaigns/{campaign_id}/contacts/upload-and-start")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"city\": \"London\",\n \"country\": \"United Kingdom\",\n \"custom_data\": {\n \"age\": 26,\n \"role\": \"Sales Manager\"\n },\n \"email\": \"tara@example.com\",\n \"first_name\": \"Tara\",\n \"last_name\": \"Williams\",\n \"tags\": [\n \"finance\",\n \"manager\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Campaigns
Add Contact to Campaign & Start
This endpoint first uplaods a contact, then adds them to a campaign.
Path Parameters
- campaign_id (
int): The ID of the campaign to which the contacts are being added.
Query Parameters
- bot_id (
int): (Optional) The ID of the bot responsible for managing the contact’s email exchanges within the campaign. - start_immediately (
bool): A flag indicating whether emails should be immediately sent to the contact after adding. Default isFalse- will wait for an appropriate time.
Request Body
- contact (
ContactUpload): An object containing the contact details to be added to the campaign.
Headers
X-API-Key: The API key for authenticating the request.
Response
BaseItem: The ID of the newly inserted contact.
Errors
400 Bad Request: If the contact is already associated with the organisation or there are no bots in the organisation.401 Unauthorized: If the API key is invalid.404 Not Found: If the campaign does not exist or is not associated with the organisation.
POST
/
api
/
v1
/
campaigns
/
{campaign_id}
/
contacts
/
upload-and-start
Upload Contact Add To Campaign And Start Api
curl --request POST \
--url https://services.meetchase.ai/api/v1/campaigns/{campaign_id}/contacts/upload-and-start \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"city": "London",
"country": "United Kingdom",
"custom_data": {
"age": 26,
"role": "Sales Manager"
},
"email": "tara@example.com",
"first_name": "Tara",
"last_name": "Williams",
"tags": [
"finance",
"manager"
]
}
'import requests
url = "https://services.meetchase.ai/api/v1/campaigns/{campaign_id}/contacts/upload-and-start"
payload = {
"city": "London",
"country": "United Kingdom",
"custom_data": {
"age": 26,
"role": "Sales Manager"
},
"email": "tara@example.com",
"first_name": "Tara",
"last_name": "Williams",
"tags": ["finance", "manager"]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
city: 'London',
country: 'United Kingdom',
custom_data: {age: 26, role: 'Sales Manager'},
email: 'tara@example.com',
first_name: 'Tara',
last_name: 'Williams',
tags: ['finance', 'manager']
})
};
fetch('https://services.meetchase.ai/api/v1/campaigns/{campaign_id}/contacts/upload-and-start', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://services.meetchase.ai/api/v1/campaigns/{campaign_id}/contacts/upload-and-start",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'city' => 'London',
'country' => 'United Kingdom',
'custom_data' => [
'age' => 26,
'role' => 'Sales Manager'
],
'email' => 'tara@example.com',
'first_name' => 'Tara',
'last_name' => 'Williams',
'tags' => [
'finance',
'manager'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://services.meetchase.ai/api/v1/campaigns/{campaign_id}/contacts/upload-and-start"
payload := strings.NewReader("{\n \"city\": \"London\",\n \"country\": \"United Kingdom\",\n \"custom_data\": {\n \"age\": 26,\n \"role\": \"Sales Manager\"\n },\n \"email\": \"tara@example.com\",\n \"first_name\": \"Tara\",\n \"last_name\": \"Williams\",\n \"tags\": [\n \"finance\",\n \"manager\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://services.meetchase.ai/api/v1/campaigns/{campaign_id}/contacts/upload-and-start")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"city\": \"London\",\n \"country\": \"United Kingdom\",\n \"custom_data\": {\n \"age\": 26,\n \"role\": \"Sales Manager\"\n },\n \"email\": \"tara@example.com\",\n \"first_name\": \"Tara\",\n \"last_name\": \"Williams\",\n \"tags\": [\n \"finance\",\n \"manager\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://services.meetchase.ai/api/v1/campaigns/{campaign_id}/contacts/upload-and-start")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"city\": \"London\",\n \"country\": \"United Kingdom\",\n \"custom_data\": {\n \"age\": 26,\n \"role\": \"Sales Manager\"\n },\n \"email\": \"tara@example.com\",\n \"first_name\": \"Tara\",\n \"last_name\": \"Williams\",\n \"tags\": [\n \"finance\",\n \"manager\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Key used to authenticate user API requests.
Path Parameters
Body
application/json
Required string length:
1 - 63Required string length:
1 - 63Required string length:
1 - 63Required string length:
1 - 63Maximum array length:
16Required string length:
1 - 31Response
Successful Response