Skip to main content
PUT
/
v1
/
endpoint
/
{id}
Update a endpoint
curl --request PUT \
  --url https://api.formizee.com/v1/endpoint/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "slug": "my-endpoint",
  "name": "My Endpoint",
  "isEnabled": true,
  "emailNotifications": false,
  "redirectUrl": "https://example.com/thanks-you",
  "targetEmails": [
    "[email protected]",
    "[email protected]"
  ],
  "icon": "bolt",
  "color": "pink"
}
'
import requests

url = "https://api.formizee.com/v1/endpoint/{id}"

payload = {
"slug": "my-endpoint",
"name": "My Endpoint",
"isEnabled": True,
"emailNotifications": False,
"redirectUrl": "https://example.com/thanks-you",
"targetEmails": ["[email protected]", "[email protected]"],
"icon": "bolt",
"color": "pink"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
slug: 'my-endpoint',
name: 'My Endpoint',
isEnabled: true,
emailNotifications: false,
redirectUrl: 'https://example.com/thanks-you',
targetEmails: ['[email protected]', '[email protected]'],
icon: 'bolt',
color: 'pink'
})
};

fetch('https://api.formizee.com/v1/endpoint/{id}', 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.formizee.com/v1/endpoint/{id}",
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([
'slug' => 'my-endpoint',
'name' => 'My Endpoint',
'isEnabled' => true,
'emailNotifications' => false,
'redirectUrl' => 'https://example.com/thanks-you',
'targetEmails' => [
'[email protected]',
'[email protected]'
],
'icon' => 'bolt',
'color' => 'pink'
]),
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.formizee.com/v1/endpoint/{id}"

payload := strings.NewReader("{\n \"slug\": \"my-endpoint\",\n \"name\": \"My Endpoint\",\n \"isEnabled\": true,\n \"emailNotifications\": false,\n \"redirectUrl\": \"https://example.com/thanks-you\",\n \"targetEmails\": [\n \"[email protected]\",\n \"[email protected]\"\n ],\n \"icon\": \"bolt\",\n \"color\": \"pink\"\n}")

req, _ := http.NewRequest("PUT", 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.put("https://api.formizee.com/v1/endpoint/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"slug\": \"my-endpoint\",\n \"name\": \"My Endpoint\",\n \"isEnabled\": true,\n \"emailNotifications\": false,\n \"redirectUrl\": \"https://example.com/thanks-you\",\n \"targetEmails\": [\n \"[email protected]\",\n \"[email protected]\"\n ],\n \"icon\": \"bolt\",\n \"color\": \"pink\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.formizee.com/v1/endpoint/{id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"slug\": \"my-endpoint\",\n \"name\": \"My Endpoint\",\n \"isEnabled\": true,\n \"emailNotifications\": false,\n \"redirectUrl\": \"https://example.com/thanks-you\",\n \"targetEmails\": [\n \"[email protected]\",\n \"[email protected]\"\n ],\n \"icon\": \"bolt\",\n \"color\": \"pink\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": "enp_4VjHrJoEwAFC6itz8oUBW9NW2bia",
  "workspaceId": "ws_4VjHrJoEwAFC6itz8oUBW9NW2bia",
  "slug": "my-endpoint",
  "name": "My Endpoint",
  "targetEmails": [
    "[email protected]",
    "[email protected]"
  ],
  "isEnabled": true,
  "emailNotifications": false,
  "redirectUrl": "https://example.com/thanks-you",
  "icon": "bolt",
  "color": "pink"
}
{
"code": "BAD_REQUEST",
"message": "Missing required field 'name'.",
"docs": "https://formizee.com/api-references/errors/code/BAD_REQUEST",
"requestId": "<string>"
}
{
"code": "UNAUTHORIZED",
"message": "Missing required field 'name'.",
"docs": "https://formizee.com/api-references/errors/code/UNAUTHORIZED",
"requestId": "<string>"
}
{
"code": "FORBIDDEN",
"message": "Missing required field 'name'.",
"docs": "https://formizee.com/api-references/errors/code/FORBIDDEN",
"requestId": "<string>"
}
{
"code": "NOT_FOUND",
"message": "Missing required field 'name'.",
"docs": "https://formizee.com/api-references/errors/code/NOT_FOUND",
"requestId": "<string>"
}
{
"code": "METHOD_NOT_ALLOWED",
"message": "Missing required field 'name'.",
"docs": "https://formizee.com/api-references/errors/code/METHOD_NOT_ALLOWED",
"requestId": "<string>"
}
{
"code": "CONFLICT",
"message": "Missing required field 'name'.",
"docs": "https://formizee.com/api-references/errors/code/CONFLICT",
"requestId": "<string>"
}
{
"code": "PAYLOAD_TOO_LARGE",
"message": "Missing required field 'name'.",
"docs": "https://formizee.com/api-references/errors/code/PAYLOAD_TOO_LARGE",
"requestId": "<string>"
}
{
"code": "TOO_MANY_REQUESTS",
"message": "Missing required field 'name'.",
"docs": "https://formizee.com/api-references/errors/code/TOO_MANY_REQUESTS",
"requestId": "<string>"
}
{
"code": "INTERNAL_SERVER_ERROR",
"message": "Missing required field 'name'.",
"docs": "https://formizee.com/api-references/errors/code/INTERNAL_SERVER_ERROR",
"requestId": "<string>"
}
{
"code": "GATEWAY_TIMEOUT",
"message": "Missing required field 'name'.",
"docs": "https://formizee.com/api-references/errors/code/GATEWAY_TIMEOUT",
"requestId": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

The id of the endpoint

Pattern: ^[a-zA-Z]+_[a-zA-Z0-9]+$
Example:

"enp_4VjHrJoEwAFC6itz8oUBW9NW2bia"

Body

application/json
slug
string

The slug of the endpoint

Required string length: 4 - 64
Pattern: ^[a-z0-9.-]+$
Example:

"my-endpoint"

name
string

The name of the endpoint

Required string length: 4 - 64
Example:

"My Endpoint"

isEnabled
boolean
default:true

The state of the endpoint. If is false, the endpoint don't receive more submissions

Example:

true

emailNotifications
boolean
default:true

The state of the email notifications. If is true, the endpoint will send a notification for each submission created

Example:

false

redirectUrl
string<uri>
default:https://formizee.com/f/thanks-you

The redirect url of the endpoint. When a user send a submission through a form, will be redirected to this url.

Example:

"https://example.com/thanks-you"

targetEmails
string<email>[]
icon
enum<string>
default:file

The icon of the endpoint

Available options:
file,
file-chart,
start,
bookmark,
heart,
flag,
bolt,
bell,
lightbulb,
credit-card,
stack,
cube,
database,
server,
inbox,
calendar,
mail,
checkcircle,
book,
chat,
user-group,
console,
tools,
grid,
moon,
sun,
cloud,
cart,
gift,
music,
beaker,
video,
code,
maps,
face-smile,
face-frown,
paint,
bug,
school,
rocket
Example:

"bolt"

color
enum<string>
default:gray

The color the endpoint icon

Available options:
gray,
amber,
red,
lime,
teal,
cyan,
indigo,
violet,
pink,
white
Example:

"pink"

Response

Update a endpoint

id
string
required

The id of the endpoint

Example:

"enp_4VjHrJoEwAFC6itz8oUBW9NW2bia"

workspaceId
string
required

The id of the workspace

Example:

"ws_4VjHrJoEwAFC6itz8oUBW9NW2bia"

slug
string
required

The slug of the endpoint

Required string length: 4 - 64
Pattern: ^[a-z0-9.-]+$
Example:

"my-endpoint"

name
string
required

The name of the endpoint

Required string length: 4 - 64
Example:

"My Endpoint"

targetEmails
string<email>[]
required
isEnabled
boolean
default:true

The state of the endpoint. If is false, the endpoint don't receive more submissions

Example:

true

emailNotifications
boolean
default:true

The state of the email notifications. If is true, the endpoint will send a notification for each submission created

Example:

false

redirectUrl
string<uri>
default:https://formizee.com/f/thanks-you

The redirect url of the endpoint. When a user send a submission through a form, will be redirected to this url.

Example:

"https://example.com/thanks-you"

icon
enum<string>
default:file

The icon of the endpoint

Available options:
file,
file-chart,
start,
bookmark,
heart,
flag,
bolt,
bell,
lightbulb,
credit-card,
stack,
cube,
database,
server,
inbox,
calendar,
mail,
checkcircle,
book,
chat,
user-group,
console,
tools,
grid,
moon,
sun,
cloud,
cart,
gift,
music,
beaker,
video,
code,
maps,
face-smile,
face-frown,
paint,
bug,
school,
rocket
Example:

"bolt"

color
enum<string>
default:gray

The color the endpoint icon

Available options:
gray,
amber,
red,
lime,
teal,
cyan,
indigo,
violet,
pink,
white
Example:

"pink"