Skip to main content
Update Campaign
curl --request PUT \
  --url https://api.agents.timepay.ai/api/v1/campaigns/update/{id} \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "campaignType": "<string>",
  "startDate": "<string>",
  "startTime": "<string>",
  "endDate": "<string>",
  "endTime": "<string>",
  "languages": [
    {}
  ],
  "region": "<string>",
  "tags": [
    {}
  ]
}
'
{
	"success": true,
	"message": "Campaign updated successfully",
	"updatedFields": [
		"name", ...
	]
}

Headers

Authorization
string
required
Bearer token for authentication (e.g., Bearer <your_token>).

Path Parameters

id
string
required
The Campaign Id to update details for (e.g., camp_abc123).

Body Parameters

name
string
The name of the campaign.
description
string
A brief description of the campaign’s purpose.
campaignType
string
The type of campaign (e.g., emi, edi, lead).
startDate
string
Start date in YYYY-MM-DD format.
startTime
string
Start time in HH:MM format (24-hour).
endDate
string
End date in YYYY-MM-DD format.
endTime
string
End time in HH:MM format (24-hour).
languages
array
List of languages supported in this campaign.
region
string
Target region for the campaign.
tags
array
Tags for categorization (e.g., ["priority", "revised"]).

Response

success
boolean
Indicates if the update was successful.
message
string
A confirmation message.
data
object
error
string
The error type or code (Error responses only).
{
	"success": true,
	"message": "Campaign updated successfully",
	"updatedFields": [
		"name", ...
	]
}