Duplicate form
curl --request POST \
--url https://app.azalt.co/api/v1/forms/{id}/duplicate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"siteIds": [
"<string>"
],
"years": [
123
],
"name": "<string>",
"organizationId": "<string>",
"unitMapping": {}
}
'import requests
url = "https://app.azalt.co/api/v1/forms/{id}/duplicate"
payload = {
"siteIds": ["<string>"],
"years": [123],
"name": "<string>",
"organizationId": "<string>",
"unitMapping": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
siteIds: ['<string>'],
years: [123],
name: '<string>',
organizationId: '<string>',
unitMapping: {}
})
};
fetch('https://app.azalt.co/api/v1/forms/{id}/duplicate', 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://app.azalt.co/api/v1/forms/{id}/duplicate",
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([
'siteIds' => [
'<string>'
],
'years' => [
123
],
'name' => '<string>',
'organizationId' => '<string>',
'unitMapping' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://app.azalt.co/api/v1/forms/{id}/duplicate"
payload := strings.NewReader("{\n \"siteIds\": [\n \"<string>\"\n ],\n \"years\": [\n 123\n ],\n \"name\": \"<string>\",\n \"organizationId\": \"<string>\",\n \"unitMapping\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://app.azalt.co/api/v1/forms/{id}/duplicate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"siteIds\": [\n \"<string>\"\n ],\n \"years\": [\n 123\n ],\n \"name\": \"<string>\",\n \"organizationId\": \"<string>\",\n \"unitMapping\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.azalt.co/api/v1/forms/{id}/duplicate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"siteIds\": [\n \"<string>\"\n ],\n \"years\": [\n 123\n ],\n \"name\": \"<string>\",\n \"organizationId\": \"<string>\",\n \"unitMapping\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"isPublic": true
}{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "UNAUTHORIZED",
"message": "Authorization not provided",
"issues": []
}{
"code": "FORBIDDEN",
"message": "Insufficient access",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}Form
Duplicate form
Create a copy of an existing form with all elements, configurations, and settings. Requires site manager permissions.
Parameters:
id: Source form identifier to duplicatenewName: Name for the duplicated form (must be unique)newDescription: Optional description overridesiteIds: Target sites for deployment (can differ from source)copySubmissions: Whether to copy existing submission data (default: false)
Duplication includes:
- All form elements with identical configurations
- Conditional logic and element dependencies
- Validation rules and constraints
- File upload settings and restrictions
- Public access and security settings
- Custom metadata and categorization
Customization Options:
- Modify site deployment during duplication
- Update form metadata while preserving structure
- Choose whether to inherit submission data
- Adjust period configurations for different timeframes
Common Use Cases:
- Creating forms for new reporting periods (annual copies)
- Deploying similar forms to different site groups
- Template creation for standardized data collection
- A/B testing different form configurations
- Backup creation before major modifications
- Regional customization of global forms
POST
/
forms
/
{id}
/
duplicate
Duplicate form
curl --request POST \
--url https://app.azalt.co/api/v1/forms/{id}/duplicate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"siteIds": [
"<string>"
],
"years": [
123
],
"name": "<string>",
"organizationId": "<string>",
"unitMapping": {}
}
'import requests
url = "https://app.azalt.co/api/v1/forms/{id}/duplicate"
payload = {
"siteIds": ["<string>"],
"years": [123],
"name": "<string>",
"organizationId": "<string>",
"unitMapping": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
siteIds: ['<string>'],
years: [123],
name: '<string>',
organizationId: '<string>',
unitMapping: {}
})
};
fetch('https://app.azalt.co/api/v1/forms/{id}/duplicate', 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://app.azalt.co/api/v1/forms/{id}/duplicate",
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([
'siteIds' => [
'<string>'
],
'years' => [
123
],
'name' => '<string>',
'organizationId' => '<string>',
'unitMapping' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://app.azalt.co/api/v1/forms/{id}/duplicate"
payload := strings.NewReader("{\n \"siteIds\": [\n \"<string>\"\n ],\n \"years\": [\n 123\n ],\n \"name\": \"<string>\",\n \"organizationId\": \"<string>\",\n \"unitMapping\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://app.azalt.co/api/v1/forms/{id}/duplicate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"siteIds\": [\n \"<string>\"\n ],\n \"years\": [\n 123\n ],\n \"name\": \"<string>\",\n \"organizationId\": \"<string>\",\n \"unitMapping\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.azalt.co/api/v1/forms/{id}/duplicate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"siteIds\": [\n \"<string>\"\n ],\n \"years\": [\n 123\n ],\n \"name\": \"<string>\",\n \"organizationId\": \"<string>\",\n \"unitMapping\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"isPublic": true
}{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "UNAUTHORIZED",
"message": "Authorization not provided",
"issues": []
}{
"code": "FORBIDDEN",
"message": "Insufficient access",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json

