Create or replace a form
curl --request POST \
--url https://api.wondeya.com/v1/forms \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"key": "<string>",
"description": "<string>",
"fields": [
{
"key": "<string>",
"label": {
"es": "<string>",
"en": "<string>"
},
"required": true,
"placeholder": {
"es": "<string>",
"en": "<string>"
},
"options": [
{
"es": "<string>",
"en": "<string>"
}
],
"minLength": {},
"maxLength": {},
"pattern": {},
"confirms": {}
}
],
"submit": {
"url": "<string>",
"method": "POST",
"tokenField": {}
},
"successMessage": {
"es": "<string>",
"en": "<string>"
},
"agentId": {},
"successLinkId": {},
"notifyOwners": true
}
'import requests
url = "https://api.wondeya.com/v1/forms"
payload = {
"key": "<string>",
"description": "<string>",
"fields": [
{
"key": "<string>",
"label": {
"es": "<string>",
"en": "<string>"
},
"required": True,
"placeholder": {
"es": "<string>",
"en": "<string>"
},
"options": [
{
"es": "<string>",
"en": "<string>"
}
],
"minLength": {},
"maxLength": {},
"pattern": {},
"confirms": {}
}
],
"submit": {
"url": "<string>",
"method": "POST",
"tokenField": {}
},
"successMessage": {
"es": "<string>",
"en": "<string>"
},
"agentId": {},
"successLinkId": {},
"notifyOwners": True
}
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({
key: '<string>',
description: '<string>',
fields: [
{
key: '<string>',
label: {es: '<string>', en: '<string>'},
required: true,
placeholder: {es: '<string>', en: '<string>'},
options: [{es: '<string>', en: '<string>'}],
minLength: {},
maxLength: {},
pattern: {},
confirms: {}
}
],
submit: {url: '<string>', method: 'POST', tokenField: {}},
successMessage: {es: '<string>', en: '<string>'},
agentId: {},
successLinkId: {},
notifyOwners: true
})
};
fetch('https://api.wondeya.com/v1/forms', 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.wondeya.com/v1/forms",
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([
'key' => '<string>',
'description' => '<string>',
'fields' => [
[
'key' => '<string>',
'label' => [
'es' => '<string>',
'en' => '<string>'
],
'required' => true,
'placeholder' => [
'es' => '<string>',
'en' => '<string>'
],
'options' => [
[
'es' => '<string>',
'en' => '<string>'
]
],
'minLength' => [
],
'maxLength' => [
],
'pattern' => [
],
'confirms' => [
]
]
],
'submit' => [
'url' => '<string>',
'method' => 'POST',
'tokenField' => [
]
],
'successMessage' => [
'es' => '<string>',
'en' => '<string>'
],
'agentId' => [
],
'successLinkId' => [
],
'notifyOwners' => true
]),
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://api.wondeya.com/v1/forms"
payload := strings.NewReader("{\n \"key\": \"<string>\",\n \"description\": \"<string>\",\n \"fields\": [\n {\n \"key\": \"<string>\",\n \"label\": {\n \"es\": \"<string>\",\n \"en\": \"<string>\"\n },\n \"required\": true,\n \"placeholder\": {\n \"es\": \"<string>\",\n \"en\": \"<string>\"\n },\n \"options\": [\n {\n \"es\": \"<string>\",\n \"en\": \"<string>\"\n }\n ],\n \"minLength\": {},\n \"maxLength\": {},\n \"pattern\": {},\n \"confirms\": {}\n }\n ],\n \"submit\": {\n \"url\": \"<string>\",\n \"method\": \"POST\",\n \"tokenField\": {}\n },\n \"successMessage\": {\n \"es\": \"<string>\",\n \"en\": \"<string>\"\n },\n \"agentId\": {},\n \"successLinkId\": {},\n \"notifyOwners\": true\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://api.wondeya.com/v1/forms")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"key\": \"<string>\",\n \"description\": \"<string>\",\n \"fields\": [\n {\n \"key\": \"<string>\",\n \"label\": {\n \"es\": \"<string>\",\n \"en\": \"<string>\"\n },\n \"required\": true,\n \"placeholder\": {\n \"es\": \"<string>\",\n \"en\": \"<string>\"\n },\n \"options\": [\n {\n \"es\": \"<string>\",\n \"en\": \"<string>\"\n }\n ],\n \"minLength\": {},\n \"maxLength\": {},\n \"pattern\": {},\n \"confirms\": {}\n }\n ],\n \"submit\": {\n \"url\": \"<string>\",\n \"method\": \"POST\",\n \"tokenField\": {}\n },\n \"successMessage\": {\n \"es\": \"<string>\",\n \"en\": \"<string>\"\n },\n \"agentId\": {},\n \"successLinkId\": {},\n \"notifyOwners\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wondeya.com/v1/forms")
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 \"key\": \"<string>\",\n \"description\": \"<string>\",\n \"fields\": [\n {\n \"key\": \"<string>\",\n \"label\": {\n \"es\": \"<string>\",\n \"en\": \"<string>\"\n },\n \"required\": true,\n \"placeholder\": {\n \"es\": \"<string>\",\n \"en\": \"<string>\"\n },\n \"options\": [\n {\n \"es\": \"<string>\",\n \"en\": \"<string>\"\n }\n ],\n \"minLength\": {},\n \"maxLength\": {},\n \"pattern\": {},\n \"confirms\": {}\n }\n ],\n \"submit\": {\n \"url\": \"<string>\",\n \"method\": \"POST\",\n \"tokenField\": {}\n },\n \"successMessage\": {\n \"es\": \"<string>\",\n \"en\": \"<string>\"\n },\n \"agentId\": {},\n \"successLinkId\": {},\n \"notifyOwners\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"agentId": {},
"key": "<string>",
"description": "<string>",
"fields": [
{
"key": "<string>",
"kind": "text",
"label": {
"es": "<string>",
"en": "<string>"
},
"required": true,
"placeholder": {
"es": "<string>",
"en": "<string>"
},
"options": [
{
"es": "<string>",
"en": "<string>"
}
],
"minLength": {},
"maxLength": {},
"pattern": {},
"confirms": {}
}
],
"submit": {
"mode": "internal",
"url": "<string>",
"method": "POST",
"tokenField": {}
},
"successMessage": {
"es": "<string>",
"en": "<string>"
},
"successLinkId": {},
"notifyOwners": true,
"createdAt": "<string>",
"updatedAt": "<string>"
}Forms
Create or replace a form
Upserts by key. A password field is only accepted with an external submit; wondeya never stores a password.
POST
/
v1
/
forms
Create or replace a form
curl --request POST \
--url https://api.wondeya.com/v1/forms \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"key": "<string>",
"description": "<string>",
"fields": [
{
"key": "<string>",
"label": {
"es": "<string>",
"en": "<string>"
},
"required": true,
"placeholder": {
"es": "<string>",
"en": "<string>"
},
"options": [
{
"es": "<string>",
"en": "<string>"
}
],
"minLength": {},
"maxLength": {},
"pattern": {},
"confirms": {}
}
],
"submit": {
"url": "<string>",
"method": "POST",
"tokenField": {}
},
"successMessage": {
"es": "<string>",
"en": "<string>"
},
"agentId": {},
"successLinkId": {},
"notifyOwners": true
}
'import requests
url = "https://api.wondeya.com/v1/forms"
payload = {
"key": "<string>",
"description": "<string>",
"fields": [
{
"key": "<string>",
"label": {
"es": "<string>",
"en": "<string>"
},
"required": True,
"placeholder": {
"es": "<string>",
"en": "<string>"
},
"options": [
{
"es": "<string>",
"en": "<string>"
}
],
"minLength": {},
"maxLength": {},
"pattern": {},
"confirms": {}
}
],
"submit": {
"url": "<string>",
"method": "POST",
"tokenField": {}
},
"successMessage": {
"es": "<string>",
"en": "<string>"
},
"agentId": {},
"successLinkId": {},
"notifyOwners": True
}
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({
key: '<string>',
description: '<string>',
fields: [
{
key: '<string>',
label: {es: '<string>', en: '<string>'},
required: true,
placeholder: {es: '<string>', en: '<string>'},
options: [{es: '<string>', en: '<string>'}],
minLength: {},
maxLength: {},
pattern: {},
confirms: {}
}
],
submit: {url: '<string>', method: 'POST', tokenField: {}},
successMessage: {es: '<string>', en: '<string>'},
agentId: {},
successLinkId: {},
notifyOwners: true
})
};
fetch('https://api.wondeya.com/v1/forms', 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.wondeya.com/v1/forms",
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([
'key' => '<string>',
'description' => '<string>',
'fields' => [
[
'key' => '<string>',
'label' => [
'es' => '<string>',
'en' => '<string>'
],
'required' => true,
'placeholder' => [
'es' => '<string>',
'en' => '<string>'
],
'options' => [
[
'es' => '<string>',
'en' => '<string>'
]
],
'minLength' => [
],
'maxLength' => [
],
'pattern' => [
],
'confirms' => [
]
]
],
'submit' => [
'url' => '<string>',
'method' => 'POST',
'tokenField' => [
]
],
'successMessage' => [
'es' => '<string>',
'en' => '<string>'
],
'agentId' => [
],
'successLinkId' => [
],
'notifyOwners' => true
]),
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://api.wondeya.com/v1/forms"
payload := strings.NewReader("{\n \"key\": \"<string>\",\n \"description\": \"<string>\",\n \"fields\": [\n {\n \"key\": \"<string>\",\n \"label\": {\n \"es\": \"<string>\",\n \"en\": \"<string>\"\n },\n \"required\": true,\n \"placeholder\": {\n \"es\": \"<string>\",\n \"en\": \"<string>\"\n },\n \"options\": [\n {\n \"es\": \"<string>\",\n \"en\": \"<string>\"\n }\n ],\n \"minLength\": {},\n \"maxLength\": {},\n \"pattern\": {},\n \"confirms\": {}\n }\n ],\n \"submit\": {\n \"url\": \"<string>\",\n \"method\": \"POST\",\n \"tokenField\": {}\n },\n \"successMessage\": {\n \"es\": \"<string>\",\n \"en\": \"<string>\"\n },\n \"agentId\": {},\n \"successLinkId\": {},\n \"notifyOwners\": true\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://api.wondeya.com/v1/forms")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"key\": \"<string>\",\n \"description\": \"<string>\",\n \"fields\": [\n {\n \"key\": \"<string>\",\n \"label\": {\n \"es\": \"<string>\",\n \"en\": \"<string>\"\n },\n \"required\": true,\n \"placeholder\": {\n \"es\": \"<string>\",\n \"en\": \"<string>\"\n },\n \"options\": [\n {\n \"es\": \"<string>\",\n \"en\": \"<string>\"\n }\n ],\n \"minLength\": {},\n \"maxLength\": {},\n \"pattern\": {},\n \"confirms\": {}\n }\n ],\n \"submit\": {\n \"url\": \"<string>\",\n \"method\": \"POST\",\n \"tokenField\": {}\n },\n \"successMessage\": {\n \"es\": \"<string>\",\n \"en\": \"<string>\"\n },\n \"agentId\": {},\n \"successLinkId\": {},\n \"notifyOwners\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wondeya.com/v1/forms")
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 \"key\": \"<string>\",\n \"description\": \"<string>\",\n \"fields\": [\n {\n \"key\": \"<string>\",\n \"label\": {\n \"es\": \"<string>\",\n \"en\": \"<string>\"\n },\n \"required\": true,\n \"placeholder\": {\n \"es\": \"<string>\",\n \"en\": \"<string>\"\n },\n \"options\": [\n {\n \"es\": \"<string>\",\n \"en\": \"<string>\"\n }\n ],\n \"minLength\": {},\n \"maxLength\": {},\n \"pattern\": {},\n \"confirms\": {}\n }\n ],\n \"submit\": {\n \"url\": \"<string>\",\n \"method\": \"POST\",\n \"tokenField\": {}\n },\n \"successMessage\": {\n \"es\": \"<string>\",\n \"en\": \"<string>\"\n },\n \"agentId\": {},\n \"successLinkId\": {},\n \"notifyOwners\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"agentId": {},
"key": "<string>",
"description": "<string>",
"fields": [
{
"key": "<string>",
"kind": "text",
"label": {
"es": "<string>",
"en": "<string>"
},
"required": true,
"placeholder": {
"es": "<string>",
"en": "<string>"
},
"options": [
{
"es": "<string>",
"en": "<string>"
}
],
"minLength": {},
"maxLength": {},
"pattern": {},
"confirms": {}
}
],
"submit": {
"mode": "internal",
"url": "<string>",
"method": "POST",
"tokenField": {}
},
"successMessage": {
"es": "<string>",
"en": "<string>"
},
"successLinkId": {},
"notifyOwners": true,
"createdAt": "<string>",
"updatedAt": "<string>"
}Authorizations
A workspace API key: wdy_live_… / wdy_test_…. Created at POST /workspaces/{tenantId}/keys and shown exactly once.
Body
application/json
The kebab-case id the model emits.
ENGLISH, prompt-facing: when to offer it.
Maximum string length:
600Maximum array length:
8Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The agent this form belongs to; null = the workspace pool.
A link id from the agent, where success navigates.
Response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes