Update a campaign
curl --request PATCH \
--url https://api.hostreach.io/v1/public/v1/campaigns/{id} \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"name": "Valencia Q3 2026",
"mode": "extract_and_contact",
"platform": "fotocasa",
"contactMode": "whatsapp",
"segmentation": {
"filters": {
"operation": "rent"
},
"expectedResults": 50
},
"settings": "<unknown>",
"allUrlsChecked": false
}
'import requests
url = "https://api.hostreach.io/v1/public/v1/campaigns/{id}"
payload = {
"name": "Valencia Q3 2026",
"mode": "extract_and_contact",
"platform": "fotocasa",
"contactMode": "whatsapp",
"segmentation": {
"filters": { "operation": "rent" },
"expectedResults": 50
},
"settings": "<unknown>",
"allUrlsChecked": False
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Valencia Q3 2026',
mode: 'extract_and_contact',
platform: 'fotocasa',
contactMode: 'whatsapp',
segmentation: {filters: {operation: 'rent'}, expectedResults: 50},
settings: '<unknown>',
allUrlsChecked: false
})
};
fetch('https://api.hostreach.io/v1/public/v1/campaigns/{id}', 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://api.hostreach.io/v1/public/v1/campaigns/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Valencia Q3 2026',
'mode' => 'extract_and_contact',
'platform' => 'fotocasa',
'contactMode' => 'whatsapp',
'segmentation' => [
'filters' => [
'operation' => 'rent'
],
'expectedResults' => 50
],
'settings' => '<unknown>',
'allUrlsChecked' => false
]),
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://api.hostreach.io/v1/public/v1/campaigns/{id}"
payload := strings.NewReader("{\n \"name\": \"Valencia Q3 2026\",\n \"mode\": \"extract_and_contact\",\n \"platform\": \"fotocasa\",\n \"contactMode\": \"whatsapp\",\n \"segmentation\": {\n \"filters\": {\n \"operation\": \"rent\"\n },\n \"expectedResults\": 50\n },\n \"settings\": \"<unknown>\",\n \"allUrlsChecked\": false\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.hostreach.io/v1/public/v1/campaigns/{id}")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Valencia Q3 2026\",\n \"mode\": \"extract_and_contact\",\n \"platform\": \"fotocasa\",\n \"contactMode\": \"whatsapp\",\n \"segmentation\": {\n \"filters\": {\n \"operation\": \"rent\"\n },\n \"expectedResults\": 50\n },\n \"settings\": \"<unknown>\",\n \"allUrlsChecked\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hostreach.io/v1/public/v1/campaigns/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Valencia Q3 2026\",\n \"mode\": \"extract_and_contact\",\n \"platform\": \"fotocasa\",\n \"contactMode\": \"whatsapp\",\n \"segmentation\": {\n \"filters\": {\n \"operation\": \"rent\"\n },\n \"expectedResults\": 50\n },\n \"settings\": \"<unknown>\",\n \"allUrlsChecked\": false\n}"
response = http.request(request)
puts response.read_bodyCampaigns
Update a campaign
PATCH
/
public
/
v1
/
campaigns
/
{id}
Update a campaign
curl --request PATCH \
--url https://api.hostreach.io/v1/public/v1/campaigns/{id} \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"name": "Valencia Q3 2026",
"mode": "extract_and_contact",
"platform": "fotocasa",
"contactMode": "whatsapp",
"segmentation": {
"filters": {
"operation": "rent"
},
"expectedResults": 50
},
"settings": "<unknown>",
"allUrlsChecked": false
}
'import requests
url = "https://api.hostreach.io/v1/public/v1/campaigns/{id}"
payload = {
"name": "Valencia Q3 2026",
"mode": "extract_and_contact",
"platform": "fotocasa",
"contactMode": "whatsapp",
"segmentation": {
"filters": { "operation": "rent" },
"expectedResults": 50
},
"settings": "<unknown>",
"allUrlsChecked": False
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Valencia Q3 2026',
mode: 'extract_and_contact',
platform: 'fotocasa',
contactMode: 'whatsapp',
segmentation: {filters: {operation: 'rent'}, expectedResults: 50},
settings: '<unknown>',
allUrlsChecked: false
})
};
fetch('https://api.hostreach.io/v1/public/v1/campaigns/{id}', 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://api.hostreach.io/v1/public/v1/campaigns/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Valencia Q3 2026',
'mode' => 'extract_and_contact',
'platform' => 'fotocasa',
'contactMode' => 'whatsapp',
'segmentation' => [
'filters' => [
'operation' => 'rent'
],
'expectedResults' => 50
],
'settings' => '<unknown>',
'allUrlsChecked' => false
]),
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://api.hostreach.io/v1/public/v1/campaigns/{id}"
payload := strings.NewReader("{\n \"name\": \"Valencia Q3 2026\",\n \"mode\": \"extract_and_contact\",\n \"platform\": \"fotocasa\",\n \"contactMode\": \"whatsapp\",\n \"segmentation\": {\n \"filters\": {\n \"operation\": \"rent\"\n },\n \"expectedResults\": 50\n },\n \"settings\": \"<unknown>\",\n \"allUrlsChecked\": false\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.hostreach.io/v1/public/v1/campaigns/{id}")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Valencia Q3 2026\",\n \"mode\": \"extract_and_contact\",\n \"platform\": \"fotocasa\",\n \"contactMode\": \"whatsapp\",\n \"segmentation\": {\n \"filters\": {\n \"operation\": \"rent\"\n },\n \"expectedResults\": 50\n },\n \"settings\": \"<unknown>\",\n \"allUrlsChecked\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hostreach.io/v1/public/v1/campaigns/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Valencia Q3 2026\",\n \"mode\": \"extract_and_contact\",\n \"platform\": \"fotocasa\",\n \"contactMode\": \"whatsapp\",\n \"segmentation\": {\n \"filters\": {\n \"operation\": \"rent\"\n },\n \"expectedResults\": 50\n },\n \"settings\": \"<unknown>\",\n \"allUrlsChecked\": false\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
API key (hr_live_... or hr_test_...). Generate from Settings › Workspace › Acceso API.
Path Parameters
Body
application/json
New campaign name.
Maximum string length:
255Example:
"Valencia Q3 2026"
extract_only: scrape only. extract_and_contact: scrape + send WhatsApp sequence. Forced to extract_and_contact for csv_import and widget.
Available options:
extract_only, extract_and_contact Example:
"extract_and_contact"
Change the platform (portal source) for this campaign.
Available options:
idealista, fotocasa, metrocuadrado, inmuebles24, zonaprop, widget, csv_import Example:
"fotocasa"
Outreach channel. whatsapp requires a connected WhatsApp Business account.
Available options:
whatsapp, whatsapp-no-api Example:
"whatsapp"
Platform-specific segmentation object.
- Portal:
{ filters: <portal-filter-object>, expectedResults: 50 }. - CSV import:
{ batchSize: 10 }(integer 1–25, required before going running). - Widget: leave empty.
Example:
{
"filters": { "operation": "rent" },
"expectedResults": 50
}
Scheduling and AI messaging settings.
Mark incremental sync as completed for this campaign run.
Example:
false
Response
200 - undefined
Was this page helpful?
⌘I