Create Dynamics Campaign for the DV by steps UI
curl --request POST \
--url https://api-gw.sendspark.com/v2/workspaces/{workspaceId}/dynamics \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-api-secret: <api-key>' \
--data '
{
"name": "My Dynamic Campaign",
"voiceCloning": false,
"languageCode": "en",
"videoUrl": "https://ssoven341-d3vz.com/share/9up29v11k16cqtyie1hx74cmhva5yutz",
"version": 1,
"multivariable": false
}
'import requests
url = "https://api-gw.sendspark.com/v2/workspaces/{workspaceId}/dynamics"
payload = {
"name": "My Dynamic Campaign",
"voiceCloning": False,
"languageCode": "en",
"videoUrl": "https://ssoven341-d3vz.com/share/9up29v11k16cqtyie1hx74cmhva5yutz",
"version": 1,
"multivariable": False
}
headers = {
"x-api-key": "<api-key>",
"x-api-secret": "<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>',
'x-api-secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'My Dynamic Campaign',
voiceCloning: false,
languageCode: 'en',
videoUrl: 'https://ssoven341-d3vz.com/share/9up29v11k16cqtyie1hx74cmhva5yutz',
version: 1,
multivariable: false
})
};
fetch('https://api-gw.sendspark.com/v2/workspaces/{workspaceId}/dynamics', 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-gw.sendspark.com/v2/workspaces/{workspaceId}/dynamics",
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([
'name' => 'My Dynamic Campaign',
'voiceCloning' => false,
'languageCode' => 'en',
'videoUrl' => 'https://ssoven341-d3vz.com/share/9up29v11k16cqtyie1hx74cmhva5yutz',
'version' => 1,
'multivariable' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>",
"x-api-secret: <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-gw.sendspark.com/v2/workspaces/{workspaceId}/dynamics"
payload := strings.NewReader("{\n \"name\": \"My Dynamic Campaign\",\n \"voiceCloning\": false,\n \"languageCode\": \"en\",\n \"videoUrl\": \"https://ssoven341-d3vz.com/share/9up29v11k16cqtyie1hx74cmhva5yutz\",\n \"version\": 1,\n \"multivariable\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-api-secret", "<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://api-gw.sendspark.com/v2/workspaces/{workspaceId}/dynamics")
.header("x-api-key", "<api-key>")
.header("x-api-secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"My Dynamic Campaign\",\n \"voiceCloning\": false,\n \"languageCode\": \"en\",\n \"videoUrl\": \"https://ssoven341-d3vz.com/share/9up29v11k16cqtyie1hx74cmhva5yutz\",\n \"version\": 1,\n \"multivariable\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-gw.sendspark.com/v2/workspaces/{workspaceId}/dynamics")
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["x-api-secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"My Dynamic Campaign\",\n \"voiceCloning\": false,\n \"languageCode\": \"en\",\n \"videoUrl\": \"https://ssoven341-d3vz.com/share/9up29v11k16cqtyie1hx74cmhva5yutz\",\n \"version\": 1,\n \"multivariable\": false\n}"
response = http.request(request)
puts response.read_body{
"combinedVideo": false,
"dynamicBackground": false,
"status": "pending",
"creator": "okn4ra9qjlpzhs2zpuni426jizysbdcp",
"folder": "ibdls2hjvaebvg0k4mz0zgvndbai9th7",
"workspace": "3vwdfm4jmhfyzt1yqp0r8v3qgaocrczb",
"id": "63f6a4145a5e755e2e8fe19d",
"createdAt": "2021-03-01T00:00:00.000Z",
"name": "My Dynamic Campaign",
"languageCode": "en",
"videoProperties": {
"sharePage": {
"title": "Hello there!",
"message": "welcome to my dynamic campaign",
"buttons": [
"<string>"
],
"calendar": {
"provider": "<string>",
"link": "<string>"
},
"layout": "layout-default",
"transcriptionsViewEnabled": false
}
},
"metadata": {
"version": 1,
"migrated": "2021-03-01T00:00:00.000Z"
},
"videosAssets": [
"<string>"
]
}{
"statusCode": 400,
"code": "S400-AHVE",
"error": "Bad Request",
"message": "Invalid request payload input"
}{
"statusCode": 403,
"code": "S403-UPLD",
"error": "Forbidden",
"message": "Invalid request payload input / Any error from provider"
}{
"statusCode": 404,
"error": "Not Found",
"message": "Resource not found or invalid access"
}{
"statusCode": 503,
"error": "Service Unavailable",
"message": "Service Unavailable"
}Dynamics Campaign
Create Dynamics Campaign for the DV by steps UI
Create Dynamics Campaign in folder for the DV by steps UI
POST
/
v2
/
workspaces
/
{workspaceId}
/
dynamics
Create Dynamics Campaign for the DV by steps UI
curl --request POST \
--url https://api-gw.sendspark.com/v2/workspaces/{workspaceId}/dynamics \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-api-secret: <api-key>' \
--data '
{
"name": "My Dynamic Campaign",
"voiceCloning": false,
"languageCode": "en",
"videoUrl": "https://ssoven341-d3vz.com/share/9up29v11k16cqtyie1hx74cmhva5yutz",
"version": 1,
"multivariable": false
}
'import requests
url = "https://api-gw.sendspark.com/v2/workspaces/{workspaceId}/dynamics"
payload = {
"name": "My Dynamic Campaign",
"voiceCloning": False,
"languageCode": "en",
"videoUrl": "https://ssoven341-d3vz.com/share/9up29v11k16cqtyie1hx74cmhva5yutz",
"version": 1,
"multivariable": False
}
headers = {
"x-api-key": "<api-key>",
"x-api-secret": "<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>',
'x-api-secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'My Dynamic Campaign',
voiceCloning: false,
languageCode: 'en',
videoUrl: 'https://ssoven341-d3vz.com/share/9up29v11k16cqtyie1hx74cmhva5yutz',
version: 1,
multivariable: false
})
};
fetch('https://api-gw.sendspark.com/v2/workspaces/{workspaceId}/dynamics', 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-gw.sendspark.com/v2/workspaces/{workspaceId}/dynamics",
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([
'name' => 'My Dynamic Campaign',
'voiceCloning' => false,
'languageCode' => 'en',
'videoUrl' => 'https://ssoven341-d3vz.com/share/9up29v11k16cqtyie1hx74cmhva5yutz',
'version' => 1,
'multivariable' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>",
"x-api-secret: <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-gw.sendspark.com/v2/workspaces/{workspaceId}/dynamics"
payload := strings.NewReader("{\n \"name\": \"My Dynamic Campaign\",\n \"voiceCloning\": false,\n \"languageCode\": \"en\",\n \"videoUrl\": \"https://ssoven341-d3vz.com/share/9up29v11k16cqtyie1hx74cmhva5yutz\",\n \"version\": 1,\n \"multivariable\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-api-secret", "<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://api-gw.sendspark.com/v2/workspaces/{workspaceId}/dynamics")
.header("x-api-key", "<api-key>")
.header("x-api-secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"My Dynamic Campaign\",\n \"voiceCloning\": false,\n \"languageCode\": \"en\",\n \"videoUrl\": \"https://ssoven341-d3vz.com/share/9up29v11k16cqtyie1hx74cmhva5yutz\",\n \"version\": 1,\n \"multivariable\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-gw.sendspark.com/v2/workspaces/{workspaceId}/dynamics")
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["x-api-secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"My Dynamic Campaign\",\n \"voiceCloning\": false,\n \"languageCode\": \"en\",\n \"videoUrl\": \"https://ssoven341-d3vz.com/share/9up29v11k16cqtyie1hx74cmhva5yutz\",\n \"version\": 1,\n \"multivariable\": false\n}"
response = http.request(request)
puts response.read_body{
"combinedVideo": false,
"dynamicBackground": false,
"status": "pending",
"creator": "okn4ra9qjlpzhs2zpuni426jizysbdcp",
"folder": "ibdls2hjvaebvg0k4mz0zgvndbai9th7",
"workspace": "3vwdfm4jmhfyzt1yqp0r8v3qgaocrczb",
"id": "63f6a4145a5e755e2e8fe19d",
"createdAt": "2021-03-01T00:00:00.000Z",
"name": "My Dynamic Campaign",
"languageCode": "en",
"videoProperties": {
"sharePage": {
"title": "Hello there!",
"message": "welcome to my dynamic campaign",
"buttons": [
"<string>"
],
"calendar": {
"provider": "<string>",
"link": "<string>"
},
"layout": "layout-default",
"transcriptionsViewEnabled": false
}
},
"metadata": {
"version": 1,
"migrated": "2021-03-01T00:00:00.000Z"
},
"videosAssets": [
"<string>"
]
}{
"statusCode": 400,
"code": "S400-AHVE",
"error": "Bad Request",
"message": "Invalid request payload input"
}{
"statusCode": 403,
"code": "S403-UPLD",
"error": "Forbidden",
"message": "Invalid request payload input / Any error from provider"
}{
"statusCode": 404,
"error": "Not Found",
"message": "Resource not found or invalid access"
}{
"statusCode": 503,
"error": "Service Unavailable",
"message": "Service Unavailable"
}Path Parameters
Body
application/json
Response
Successful
Example:
false
Example:
false
Example:
"pending"
Example:
"okn4ra9qjlpzhs2zpuni426jizysbdcp"
Example:
"ibdls2hjvaebvg0k4mz0zgvndbai9th7"
Example:
"3vwdfm4jmhfyzt1yqp0r8v3qgaocrczb"
Example:
"63f6a4145a5e755e2e8fe19d"
Example:
"2021-03-01T00:00:00.000Z"
Example:
"My Dynamic Campaign"
Example:
"en"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?
⌘I