Update a field
curl --request PATCH \
--url https://n-api.leadstaker.com/v1/fields/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"type": "TEXT",
"label": "<string>",
"config": {},
"position": 1,
"fieldGroupId": "<string>"
}
'import requests
url = "https://n-api.leadstaker.com/v1/fields/{id}"
payload = {
"type": "TEXT",
"label": "<string>",
"config": {},
"position": 1,
"fieldGroupId": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'TEXT',
label: '<string>',
config: {},
position: 1,
fieldGroupId: '<string>'
})
};
fetch('https://n-api.leadstaker.com/v1/fields/{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://n-api.leadstaker.com/v1/fields/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'TEXT',
'label' => '<string>',
'config' => [
],
'position' => 1,
'fieldGroupId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://n-api.leadstaker.com/v1/fields/{id}"
payload := strings.NewReader("{\n \"type\": \"TEXT\",\n \"label\": \"<string>\",\n \"config\": {},\n \"position\": 1,\n \"fieldGroupId\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<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.patch("https://n-api.leadstaker.com/v1/fields/{id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"TEXT\",\n \"label\": \"<string>\",\n \"config\": {},\n \"position\": 1,\n \"fieldGroupId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://n-api.leadstaker.com/v1/fields/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"TEXT\",\n \"label\": \"<string>\",\n \"config\": {},\n \"position\": 1,\n \"fieldGroupId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"errorCode": "<string>",
"message": "<string>",
"status": 123,
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"status": 123,
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"status": 123,
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}Fields
Update a field
Partial update: only the keys present in the body change. Answers 204 with no body.
PATCH
/
v1
/
fields
/
{id}
Update a field
curl --request PATCH \
--url https://n-api.leadstaker.com/v1/fields/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"type": "TEXT",
"label": "<string>",
"config": {},
"position": 1,
"fieldGroupId": "<string>"
}
'import requests
url = "https://n-api.leadstaker.com/v1/fields/{id}"
payload = {
"type": "TEXT",
"label": "<string>",
"config": {},
"position": 1,
"fieldGroupId": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'TEXT',
label: '<string>',
config: {},
position: 1,
fieldGroupId: '<string>'
})
};
fetch('https://n-api.leadstaker.com/v1/fields/{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://n-api.leadstaker.com/v1/fields/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'TEXT',
'label' => '<string>',
'config' => [
],
'position' => 1,
'fieldGroupId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://n-api.leadstaker.com/v1/fields/{id}"
payload := strings.NewReader("{\n \"type\": \"TEXT\",\n \"label\": \"<string>\",\n \"config\": {},\n \"position\": 1,\n \"fieldGroupId\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<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.patch("https://n-api.leadstaker.com/v1/fields/{id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"TEXT\",\n \"label\": \"<string>\",\n \"config\": {},\n \"position\": 1,\n \"fieldGroupId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://n-api.leadstaker.com/v1/fields/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"TEXT\",\n \"label\": \"<string>\",\n \"config\": {},\n \"position\": 1,\n \"fieldGroupId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"errorCode": "<string>",
"message": "<string>",
"status": 123,
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"status": 123,
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"status": 123,
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}Authorizations
Path Parameters
Minimum string length:
1Body
application/json
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
- Option 9
- Option 10
- Option 11
- Option 12
- Option 13
Response
No content
⌘I