Criar formulário
curl --request POST \
--url https://api.notifique.dev/v1/forms/lists \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Exemplo",
"template": "BLANK",
"features": {
"queue": true,
"doubleOptIn": true,
"captureContact": true
},
"endedMessage": "string"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Exemplo',
template: 'BLANK',
features: {queue: true, doubleOptIn: true, captureContact: true},
endedMessage: 'string'
})
};
fetch('https://api.notifique.dev/v1/forms/lists', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.notifique.dev/v1/forms/lists"
payload = {
"name": "Exemplo",
"template": "BLANK",
"features": {
"queue": True,
"doubleOptIn": True,
"captureContact": True
},
"endedMessage": "string"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.notifique.dev/v1/forms/lists"
payload := strings.NewReader("{\n \"name\": \"Exemplo\",\n \"template\": \"BLANK\",\n \"features\": {\n \"queue\": true,\n \"doubleOptIn\": true,\n \"captureContact\": true\n },\n \"endedMessage\": \"string\"\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))
}{
"success": true,
"data": {
"id": "clxx...",
"addonType": "FORM",
"template": "BLANK",
"features": {
"queue": true,
"doubleOptIn": true,
"captureContact": true
},
"name": "Exemplo",
"status": "ACTIVE",
"doubleOptInEnabled": true,
"subscriptionsCount": 1,
"createdAt": "2025-02-10T14:00:00.000Z",
"updatedAt": "2025-02-10T14:00:00.000Z",
"endedMessage": "string",
"hostedPageTheme": {},
"hostedPageCopy": {},
"hostedPageForm": {}
}
}{
"success": false,
"error": "Bad Request",
"code": "VALIDATION_ERROR",
"message": "Campo inválido ou ausente."
}{
"success": false,
"error": "Bad Request",
"code": "VALIDATION_ERROR",
"message": "Campo inválido ou ausente."
}{
"success": false,
"error": "Bad Request",
"code": "VALIDATION_ERROR",
"message": "Campo inválido ou ausente."
}{
"success": false,
"error": "Bad Request",
"code": "VALIDATION_ERROR",
"message": "Campo inválido ou ausente."
}Forms
Criar formulário
Cria um formulário de captura.
POST
/
v1
/
forms
/
lists
Criar formulário
curl --request POST \
--url https://api.notifique.dev/v1/forms/lists \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Exemplo",
"template": "BLANK",
"features": {
"queue": true,
"doubleOptIn": true,
"captureContact": true
},
"endedMessage": "string"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Exemplo',
template: 'BLANK',
features: {queue: true, doubleOptIn: true, captureContact: true},
endedMessage: 'string'
})
};
fetch('https://api.notifique.dev/v1/forms/lists', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.notifique.dev/v1/forms/lists"
payload = {
"name": "Exemplo",
"template": "BLANK",
"features": {
"queue": True,
"doubleOptIn": True,
"captureContact": True
},
"endedMessage": "string"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.notifique.dev/v1/forms/lists"
payload := strings.NewReader("{\n \"name\": \"Exemplo\",\n \"template\": \"BLANK\",\n \"features\": {\n \"queue\": true,\n \"doubleOptIn\": true,\n \"captureContact\": true\n },\n \"endedMessage\": \"string\"\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))
}{
"success": true,
"data": {
"id": "clxx...",
"addonType": "FORM",
"template": "BLANK",
"features": {
"queue": true,
"doubleOptIn": true,
"captureContact": true
},
"name": "Exemplo",
"status": "ACTIVE",
"doubleOptInEnabled": true,
"subscriptionsCount": 1,
"createdAt": "2025-02-10T14:00:00.000Z",
"updatedAt": "2025-02-10T14:00:00.000Z",
"endedMessage": "string",
"hostedPageTheme": {},
"hostedPageCopy": {},
"hostedPageForm": {}
}
}{
"success": false,
"error": "Bad Request",
"code": "VALIDATION_ERROR",
"message": "Campo inválido ou ausente."
}{
"success": false,
"error": "Bad Request",
"code": "VALIDATION_ERROR",
"message": "Campo inválido ou ausente."
}{
"success": false,
"error": "Bad Request",
"code": "VALIDATION_ERROR",
"message": "Campo inválido ou ausente."
}{
"success": false,
"error": "Bad Request",
"code": "VALIDATION_ERROR",
"message": "Campo inválido ou ausente."
}Autorizações
ntfAddonsBearerAuthntfAddonsApiKeyHeader
Authorization: Bearer sk_live_xxxxx
Corpo
application/json
Resposta
Formulário criado
Exemplo:
true
Show child attributes
Show child attributes
Exemplo:
{
"id": "clxx...",
"addonType": "FORM",
"template": "BLANK",
"features": {
"queue": true,
"doubleOptIn": true,
"captureContact": true
},
"name": "Exemplo",
"status": "ACTIVE",
"doubleOptInEnabled": true,
"subscriptionsCount": 1,
"createdAt": "2025-02-10T14:00:00.000Z",
"updatedAt": "2025-02-10T14:00:00.000Z",
"endedMessage": "string",
"hostedPageTheme": {},
"hostedPageCopy": {},
"hostedPageForm": {}
}
Esta página foi útil?

