curl --request DELETE \
--url https://api.instaview.sk/contact-fields/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.instaview.sk/contact-fields/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.instaview.sk/contact-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://api.instaview.sk/contact-fields/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.instaview.sk/contact-fields/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.instaview.sk/contact-fields/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.instaview.sk/contact-fields/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "order_number",
"deleted": true,
"referencedBy": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Renewal outreach"
}
]
}Delete Contact Field
Removes the definition. The values already stored on your contacts are LEFT IN PLACE and simply stop being returned, so nothing is irreversibly lost — define the key again and they reappear. What the delete does break is any agent flow still using {{contact.<key>}}: the token resolves to an empty string from now on, and the response names those agents.
curl --request DELETE \
--url https://api.instaview.sk/contact-fields/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.instaview.sk/contact-fields/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.instaview.sk/contact-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://api.instaview.sk/contact-fields/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.instaview.sk/contact-fields/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.instaview.sk/contact-fields/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.instaview.sk/contact-fields/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "order_number",
"deleted": true,
"referencedBy": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Renewal outreach"
}
]
}Overview
DELETE /contact-fields/{id}
{
"id": "9c22...",
"key": "order_number",
"deleted": true,
"referencedBy": [
{ "id": "a1b2...", "name": "Renewal outreach" }
]
}
What is and is not lost
{{contact.order_number}}
in a saved flow resolves to an empty string from now on, and nothing else in the system would
have told you. So the response names those agents in referencedBy.
Treat a non-empty referencedBy as work to do: open each agent and remove or replace the token.
An empty array means nothing referenced the field.
Seeded fields cannot be deleted
A field withisSystem: true belongs to the platform. DELETE on one is a 403. If you had
defined your own field shadowing it, deleting yours simply reveals the seeded field again.
Scopes
write:contacts — not delete:contacts. This removes schema, not a contact, and the
values already stored deliberately survive it; requiring the delete scope would imply the
opposite.
Error Scenarios
- 403 Forbidden: a seeded field; or the key lacks
write:contacts - 404 Not Found: no such field in your company’s catalog
Related Resources
List Contact Fields
Update Contact Field
Authorizations
API key for authentication using Bearer scheme
Path Parameters
Query Parameters
Required for ATS API keys to specify which company to access. Ignored for standard company API keys.
Response
Id of the deleted field
Key of the deleted field
"order_number"
Always true; a failed delete answers with an error status
true
Agents whose saved flow still references {{contact.<key>}}. The token now resolves to an empty string in their calls. Empty when nothing referenced the field.
Show child attributes
Show child attributes