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>"
},
"name": "<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>"
},
"name": "<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>'},
name: '<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>'
],
'name' => '<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 \"name\": \"<string>\",\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 \"name\": \"<string>\",\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 \"name\": \"<string>\",\n \"agentId\": {},\n \"successLinkId\": {},\n \"notifyOwners\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"agentId": {},
"key": "<string>",
"description": "<string>",
"descriptionText": {
"es": "<string>",
"en": "<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>",
"name": "<string>"
}Crear o reemplazar un formulario
Hace upsert por key. Un campo de contraseña solo se acepta con un envío external; wondeya nunca almacena una contraseña.
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>"
},
"name": "<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>"
},
"name": "<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>'},
name: '<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>'
],
'name' => '<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 \"name\": \"<string>\",\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 \"name\": \"<string>\",\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 \"name\": \"<string>\",\n \"agentId\": {},\n \"successLinkId\": {},\n \"notifyOwners\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"agentId": {},
"key": "<string>",
"description": "<string>",
"descriptionText": {
"es": "<string>",
"en": "<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>",
"name": "<string>"
}Autorizaciones
Una clave de API del espacio de trabajo: wdy_live_… / wdy_test_…. Se crea en POST /workspaces/{tenantId}/keys y se muestra exactamente una vez.
Cuerpo
El id en kebab-case que emite el modelo.
Cuándo ofrecer el formulario. En inglés, salvo que se indique descriptionLocale.
6008Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Nombre administrativo. Si se omite, se conserva el nombre existente.
120El agente al que pertenece este formulario; null = el pool del espacio de trabajo.
Idioma de las instrucciones proporcionadas. Si se omite, se usa inglés para mantener la compatibilidad.
es, en Un id de link del agente, hacia donde navega el éxito.
Respuesta
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
120