Update component text variant
curl --request PUT \
--url https://api.dittowords.com/v1/components \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"data": {
"signup_username": {
"text": "Nom d'utilisateur",
"status": "FINAL"
},
"signup_password": {
"text": "Mot de passe"
},
"signup_register": {
"text": "S'inscrire"
}
}
}
EOFimport requests
url = "https://api.dittowords.com/v1/components"
payload = { "data": {
"signup_username": {
"text": "Nom d'utilisateur",
"status": "FINAL"
},
"signup_password": { "text": "Mot de passe" },
"signup_register": { "text": "S'inscrire" }
} }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
data: {
signup_username: {text: 'Nom d\'utilisateur', status: 'FINAL'},
signup_password: {text: 'Mot de passe'},
signup_register: {text: 'S\'inscrire'}
}
})
};
fetch('https://api.dittowords.com/v1/components', 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.dittowords.com/v1/components",
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([
'data' => [
'signup_username' => [
'text' => 'Nom d\'utilisateur',
'status' => 'FINAL'
],
'signup_password' => [
'text' => 'Mot de passe'
],
'signup_register' => [
'text' => 'S\'inscrire'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.dittowords.com/v1/components"
payload := strings.NewReader("{\n \"data\": {\n \"signup_username\": {\n \"text\": \"Nom d'utilisateur\",\n \"status\": \"FINAL\"\n },\n \"signup_password\": {\n \"text\": \"Mot de passe\"\n },\n \"signup_register\": {\n \"text\": \"S'inscrire\"\n }\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<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.put("https://api.dittowords.com/v1/components")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"signup_username\": {\n \"text\": \"Nom d'utilisateur\",\n \"status\": \"FINAL\"\n },\n \"signup_password\": {\n \"text\": \"Mot de passe\"\n },\n \"signup_register\": {\n \"text\": \"S'inscrire\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dittowords.com/v1/components")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"signup_username\": {\n \"text\": \"Nom d'utilisateur\",\n \"status\": \"FINAL\"\n },\n \"signup_password\": {\n \"text\": \"Mot de passe\"\n },\n \"signup_register\": {\n \"text\": \"S'inscrire\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"componentsUpdated": 1,
"componentsSkipped": 0
}Components
Update component text variant
Used for updating the text and status fields for components in the workspace of the requesting user.
-> Currently only supports updating variant text or status on components via the variant query parameter (an error will be thrown if the variant param is not specified)
-> Currently only available for teams on team or enterprise plans
PUT
/
components
Update component text variant
curl --request PUT \
--url https://api.dittowords.com/v1/components \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"data": {
"signup_username": {
"text": "Nom d'utilisateur",
"status": "FINAL"
},
"signup_password": {
"text": "Mot de passe"
},
"signup_register": {
"text": "S'inscrire"
}
}
}
EOFimport requests
url = "https://api.dittowords.com/v1/components"
payload = { "data": {
"signup_username": {
"text": "Nom d'utilisateur",
"status": "FINAL"
},
"signup_password": { "text": "Mot de passe" },
"signup_register": { "text": "S'inscrire" }
} }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
data: {
signup_username: {text: 'Nom d\'utilisateur', status: 'FINAL'},
signup_password: {text: 'Mot de passe'},
signup_register: {text: 'S\'inscrire'}
}
})
};
fetch('https://api.dittowords.com/v1/components', 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.dittowords.com/v1/components",
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([
'data' => [
'signup_username' => [
'text' => 'Nom d\'utilisateur',
'status' => 'FINAL'
],
'signup_password' => [
'text' => 'Mot de passe'
],
'signup_register' => [
'text' => 'S\'inscrire'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.dittowords.com/v1/components"
payload := strings.NewReader("{\n \"data\": {\n \"signup_username\": {\n \"text\": \"Nom d'utilisateur\",\n \"status\": \"FINAL\"\n },\n \"signup_password\": {\n \"text\": \"Mot de passe\"\n },\n \"signup_register\": {\n \"text\": \"S'inscrire\"\n }\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<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.put("https://api.dittowords.com/v1/components")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"signup_username\": {\n \"text\": \"Nom d'utilisateur\",\n \"status\": \"FINAL\"\n },\n \"signup_password\": {\n \"text\": \"Mot de passe\"\n },\n \"signup_register\": {\n \"text\": \"S'inscrire\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dittowords.com/v1/components")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"signup_username\": {\n \"text\": \"Nom d'utilisateur\",\n \"status\": \"FINAL\"\n },\n \"signup_password\": {\n \"text\": \"Mot de passe\"\n },\n \"signup_register\": {\n \"text\": \"S'inscrire\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"componentsUpdated": 1,
"componentsSkipped": 0
}Authorizations
Query Parameters
The API ID of the variant.
Example:
"french"
Optional parameter to specify the format of the request body. Passing in this query parameter will validate the request body against the specified format preventing unexpected results if an invalid payload is provided.
Available options:
flat, structured, nested Example:
"structured"
Body
application/json
Object that maps component API IDs to their new attributes.
Show child attributes
Show child attributes
Example:
{
"signup_username": {
"text": "Nom d'utilisateur",
"status": "FINAL"
}
}⌘I