Start or stop a campaign
Control campaign execution by sending a run action.
curl -X POST "https://api.talkturo.com/api/crm/campaigns/example_string/run" \
-H "Content-Type: application/json" \
-d '{
"action": "start"
}'
import requests
import json
url = "https://api.talkturo.com/api/crm/campaigns/example_string/run"
headers = {
"Content-Type": "application/json"
}
data = {
"action": "start"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.talkturo.com/api/crm/campaigns/example_string/run", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"action": "start"
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"action": "start"
}`)
req, err := http.NewRequest("POST", "https://api.talkturo.com/api/crm/campaigns/example_string/run", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.talkturo.com/api/crm/campaigns/example_string/run')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
"action": "start"
}'
response = http.request(request)
puts response.body
{
"success": true,
"status": "example_string"
}
{
"error": "Bad Request",
"message": "The request contains invalid parameters or malformed data",
"code": 400,
"details": [
{
"field": "email",
"message": "Invalid email format"
}
]
}
{
"error": "Unauthorized",
"message": "Authentication required. Please provide a valid API token",
"code": 401
}
POST
/crm/campaigns/{id}/runPOST
Base URLstring
Target server for requests. Edit to use your own host.
API Key (cookie: sb-access-token)
sb-access-tokenstring
RequiredAuthenticated Talkturo web session cookie (Supabase httpOnly session). Browser clients typically send this automatically after sign-in. Related refresh cookies may also be present depending on the client.
Authenticated Talkturo web session cookie (Supabase httpOnly session).
Browser clients typically send this automatically after sign-in.
Related refresh cookies may also be present depending on the client.
Content-Typestring
RequiredThe media type of the request body
Options: application/json
actionstring
RequiredOptions: start, stop
Request Preview
Response
Response will appear here after sending the request
Authentication
path
parameterstring
RequiredAPI Key for authentication. Authenticated Talkturo web session cookie (Supabase httpOnly session). Browser clients typically send this automatically after sign-in. Related refresh cookies may also be present depending on the client.
Path Parameters
Body
application/json
actionstring
RequiredAllowed values:
startstopResponses
successboolean
statusstring
Resulting status such as running or stopped
Was this page helpful?