Actualizar campaña
curl --request PUT \
--url https://api.jelou.ai/v1/campaigns/{campaignId} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "promo_fin_de_mes",
"scheduledAt": "2026-09-27T11:00:00-05:00"
}
'import requests
url = "https://api.jelou.ai/v1/campaigns/{campaignId}"
payload = {
"name": "promo_fin_de_mes",
"scheduledAt": "2026-09-27T11:00:00-05:00"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'promo_fin_de_mes', scheduledAt: '2026-09-27T11:00:00-05:00'})
};
fetch('https://api.jelou.ai/v1/campaigns/{campaignId}', 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.jelou.ai/v1/campaigns/{campaignId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'promo_fin_de_mes',
'scheduledAt' => '2026-09-27T11:00:00-05:00'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$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.jelou.ai/v1/campaigns/{campaignId}"
payload := strings.NewReader("{\n \"name\": \"promo_fin_de_mes\",\n \"scheduledAt\": \"2026-09-27T11:00:00-05:00\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.put("https://api.jelou.ai/v1/campaigns/{campaignId}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"promo_fin_de_mes\",\n \"scheduledAt\": \"2026-09-27T11:00:00-05:00\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jelou.ai/v1/campaigns/{campaignId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"promo_fin_de_mes\",\n \"scheduledAt\": \"2026-09-27T11:00:00-05:00\"\n}"
response = http.request(request)
puts response.read_body{
"message": [
"Campaign has been updated."
],
"statusMessage": "success",
"status": 1
}{
"message": "<string>",
"statusMessage": "<string>",
"status": 123,
"error": {
"code": "<string>",
"key": "<string>",
"description": "<string>",
"developerMessages": {},
"clientMessages": {}
},
"validationError": {}
}{
"message": "<string>",
"statusMessage": "<string>",
"status": 123,
"error": {
"code": "<string>",
"key": "<string>",
"description": "<string>",
"developerMessages": {},
"clientMessages": {}
},
"validationError": {}
}{
"message": "<string>",
"statusMessage": "<string>",
"status": 123,
"error": {
"code": "<string>",
"key": "<string>",
"description": "<string>",
"developerMessages": {},
"clientMessages": {}
},
"validationError": {}
}{
"message": "<string>",
"statusMessage": "<string>",
"status": 123,
"error": {
"code": "<string>",
"key": "<string>",
"description": "<string>",
"developerMessages": {},
"clientMessages": {}
},
"validationError": {}
}Campaigns
Update campaign
Rename a scheduled campaign or reschedule its send date
PUT
/
v1
/
campaigns
/
{campaignId}
Actualizar campaña
curl --request PUT \
--url https://api.jelou.ai/v1/campaigns/{campaignId} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "promo_fin_de_mes",
"scheduledAt": "2026-09-27T11:00:00-05:00"
}
'import requests
url = "https://api.jelou.ai/v1/campaigns/{campaignId}"
payload = {
"name": "promo_fin_de_mes",
"scheduledAt": "2026-09-27T11:00:00-05:00"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'promo_fin_de_mes', scheduledAt: '2026-09-27T11:00:00-05:00'})
};
fetch('https://api.jelou.ai/v1/campaigns/{campaignId}', 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.jelou.ai/v1/campaigns/{campaignId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'promo_fin_de_mes',
'scheduledAt' => '2026-09-27T11:00:00-05:00'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$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.jelou.ai/v1/campaigns/{campaignId}"
payload := strings.NewReader("{\n \"name\": \"promo_fin_de_mes\",\n \"scheduledAt\": \"2026-09-27T11:00:00-05:00\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.put("https://api.jelou.ai/v1/campaigns/{campaignId}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"promo_fin_de_mes\",\n \"scheduledAt\": \"2026-09-27T11:00:00-05:00\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jelou.ai/v1/campaigns/{campaignId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"promo_fin_de_mes\",\n \"scheduledAt\": \"2026-09-27T11:00:00-05:00\"\n}"
response = http.request(request)
puts response.read_body{
"message": [
"Campaign has been updated."
],
"statusMessage": "success",
"status": 1
}{
"message": "<string>",
"statusMessage": "<string>",
"status": 123,
"error": {
"code": "<string>",
"key": "<string>",
"description": "<string>",
"developerMessages": {},
"clientMessages": {}
},
"validationError": {}
}{
"message": "<string>",
"statusMessage": "<string>",
"status": 123,
"error": {
"code": "<string>",
"key": "<string>",
"description": "<string>",
"developerMessages": {},
"clientMessages": {}
},
"validationError": {}
}{
"message": "<string>",
"statusMessage": "<string>",
"status": 123,
"error": {
"code": "<string>",
"key": "<string>",
"description": "<string>",
"developerMessages": {},
"clientMessages": {}
},
"validationError": {}
}{
"message": "<string>",
"statusMessage": "<string>",
"status": 123,
"error": {
"code": "<string>",
"key": "<string>",
"description": "<string>",
"developerMessages": {},
"clientMessages": {}
},
"validationError": {}
}Endpoint
PUT https://api.jelou.ai/v1/campaigns/{campaignId}
You can only update campaigns in
SCHEDULED status. A campaign that has already started sending, or has finished, can’t be updated.Path parameters
| Property | Type | Description | Required |
|---|---|---|---|
| campaignId | string | ID of the campaign you want to update. Get it from the GET /v1/campaigns endpoint. | Yes |
Request body
| Property | Type | Description | Required |
|---|---|---|---|
| name | string | New campaign name. | No |
| scheduledAt | string | New send date and time, in ISO 8601 format with a time zone. Must be later than the current date and time. | No |
scheduledAt format
scheduledAt uses the ISO 8601 format: YYYY-MM-DDTHH:mm:ss followed by the time zone.
| Example | Meaning |
|---|---|
2026-09-27T16:00:00Z | September 27, 2026 at 16:00 UTC. |
2026-09-27T11:00:00-05:00 | September 27, 2026 at 11:00 in UTC-5 (Ecuador, Colombia, Peru). Same moment as the previous example. |
422 and leaves the campaign unchanged.
Request example
curl --request PUT \
--url https://api.jelou.ai/v1/campaigns/CAMPAIGN_ID \
--header 'Authorization: Basic {{Base64EncodedUsername:Password}}' \
--header 'Content-Type: application/json' \
--data '{
"name": "end_of_month_promo_v2"
}'
Responses
200 - Success
200 - Success
{
"message": ["Campaign has been updated."],
"statusMessage": "success",
"status": 1
}
401 - Unauthorized
401 - Unauthorized
{
"message": "Authentication failed"
}
404 - Not Found
404 - Not Found
{
"message": ["Campaign not found"],
"statusMessage": "failed",
"status": 0
}
422 - Unprocessable Entity
422 - Unprocessable Entity
{
"message": ["Los valores ingresados no son correctos."],
"statusMessage": "failed",
"status": 0,
"validationError": {
"scheduledAt": [
{
"es": "El campo scheduledAt debe ser posterior a la fecha actual",
"en": "The scheduledAt field must be later than the current date",
"pt": "O campo scheduledAt deve ser posterior à data atual"
}
]
}
}
500 - Internal Server Error
500 - Internal Server Error
{
"message": ["We are having trouble processing your request. Please try again later."],
"statusMessage": "failed",
"status": 0,
"error": {
"code": "E0000",
"key": "UNKNOWN_ERROR",
"description": "Error to be thrown when it couldn't be determined the reason of failure",
"developerMessages": {
"es": "Error inesperado occurido, revisar logs.",
"en": "Unexpected error occurred, check logs."
},
"clientMessages": {
"es": "Estamos teniendo problemas procesando la solicitud. Por favor intenta más tarde.",
"en": "We are having trouble processing your request. Please try again later.",
"pt": "Estamos tendo problemas com o processo da solicitação. Por favor tente mais tarde."
}
}
}
Authorizations
Basic authentication using Base64 encoded clientId:clientSecret
Path Parameters
ID de la campaña (24 caracteres hexadecimales).
Example:
"CAMPAIGN_ID"
Body
application/json
Was this page helpful?
⌘I