Delete fields from a table or view
curl --request DELETE \
--url https://api.zapier.com/tables/v2/tables/{table_id}/fields \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"field_ids": [
1,
2
]
}
'import requests
url = "https://api.zapier.com/tables/v2/tables/{table_id}/fields"
payload = { "field_ids": [1, 2] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({field_ids: [1, 2]})
};
fetch('https://api.zapier.com/tables/v2/tables/{table_id}/fields', 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.zapier.com/tables/v2/tables/{table_id}/fields",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'field_ids' => [
1,
2
]
]),
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.zapier.com/tables/v2/tables/{table_id}/fields"
payload := strings.NewReader("{\n \"field_ids\": [\n 1,\n 2\n ]\n}")
req, _ := http.NewRequest("DELETE", 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.delete("https://api.zapier.com/tables/v2/tables/{table_id}/fields")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"field_ids\": [\n 1,\n 2\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zapier.com/tables/v2/tables/{table_id}/fields")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"field_ids\": [\n 1,\n 2\n ]\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"field": {
"id": 123,
"name": "<string>",
"type": "string",
"created_at": "2023-11-07T05:31:56Z",
"edited_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"options": {
"is_unique": false,
"required": false,
"read_only": false,
"converted_from": "string",
"converted_from_version": 123,
"choice_provider": {
"choices": [
{
"value": "<string>",
"label": "<string>",
"color": "<string>"
}
],
"kind": "static"
},
"formula": {
"formula": "<string>",
"field_id_args": [
123
],
"rerender_on": "any"
},
"button": {
"label": "<string>",
"additional_labels": [
"<string>"
],
"is_enabled": true,
"custom_label": "<string>",
"disable_on_click": false
},
"include_time": true,
"timezone": "Africa/Abidjan",
"date_format": "<string>",
"time_format": "<string>",
"ai_formula": {
"model": "gpt-3.5-turbo",
"prompt": "<string>",
"connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"field_id_args": [
123
],
"max_length": 123,
"temperature": 123
},
"source_column_key": "<string>",
"slug": "<string>",
"icon": "<string>",
"alignment": "left",
"decimals": 123,
"currency_format": "<string>",
"phone_number_format": "<string>",
"description": "<string>"
},
"config": {
"hidden": false,
"locked": true,
"order": 123,
"width": 123,
"default_display_field_id": 123,
"default_link_field_id": 123,
"summary_formulas": [
{
"decimals": 123,
"aggregate_function": "<string>"
}
]
},
"is_order_field": false,
"is_filter_field": false,
"is_selected_field": false,
"source_field": "<unknown>",
"linked_records_destination_tables": [
{
"table_name": "<string>",
"table_id": "01563e3a-b5d3-d676-4c61-efb99302bd5b",
"table_owner_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
}
],
"meta": {
"did_change": true
}
}{
"detail": "<string>",
"code": "<string>",
"meta": {},
"errors": [
{
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"meta": {}
}
],
"message": "",
"support_id": ""
}{
"detail": "<string>",
"code": "<string>",
"meta": {},
"errors": [
{
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"meta": {}
}
],
"message": "",
"support_id": ""
}{
"detail": "<string>",
"code": "<string>",
"meta": {},
"errors": [
{
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"meta": {}
}
],
"message": "",
"support_id": ""
}{
"detail": "<string>",
"code": "<string>",
"meta": {},
"errors": [
{
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"meta": {}
}
],
"message": "",
"support_id": ""
}{
"detail": "<string>",
"code": "<string>",
"meta": {},
"errors": [
{
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"meta": {}
}
],
"message": "",
"support_id": ""
}Fields
Delete fields from a table or view
Removes fields from the table or view matching the table_id.
The request is refused if the account cannot delete the table’s fields, if the table does not have every named field, or if a conflict strategy says the deletion is not allowed.
On an account with soft-delete enabled the field is trashed rather than removed, and stays readable through the list operation’s trash filter until the retention window ends.
DELETE
/
tables
/
v2
/
tables
/
{table_id}
/
fields
Delete fields from a table or view
curl --request DELETE \
--url https://api.zapier.com/tables/v2/tables/{table_id}/fields \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"field_ids": [
1,
2
]
}
'import requests
url = "https://api.zapier.com/tables/v2/tables/{table_id}/fields"
payload = { "field_ids": [1, 2] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({field_ids: [1, 2]})
};
fetch('https://api.zapier.com/tables/v2/tables/{table_id}/fields', 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.zapier.com/tables/v2/tables/{table_id}/fields",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'field_ids' => [
1,
2
]
]),
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.zapier.com/tables/v2/tables/{table_id}/fields"
payload := strings.NewReader("{\n \"field_ids\": [\n 1,\n 2\n ]\n}")
req, _ := http.NewRequest("DELETE", 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.delete("https://api.zapier.com/tables/v2/tables/{table_id}/fields")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"field_ids\": [\n 1,\n 2\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zapier.com/tables/v2/tables/{table_id}/fields")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"field_ids\": [\n 1,\n 2\n ]\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"field": {
"id": 123,
"name": "<string>",
"type": "string",
"created_at": "2023-11-07T05:31:56Z",
"edited_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"options": {
"is_unique": false,
"required": false,
"read_only": false,
"converted_from": "string",
"converted_from_version": 123,
"choice_provider": {
"choices": [
{
"value": "<string>",
"label": "<string>",
"color": "<string>"
}
],
"kind": "static"
},
"formula": {
"formula": "<string>",
"field_id_args": [
123
],
"rerender_on": "any"
},
"button": {
"label": "<string>",
"additional_labels": [
"<string>"
],
"is_enabled": true,
"custom_label": "<string>",
"disable_on_click": false
},
"include_time": true,
"timezone": "Africa/Abidjan",
"date_format": "<string>",
"time_format": "<string>",
"ai_formula": {
"model": "gpt-3.5-turbo",
"prompt": "<string>",
"connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"field_id_args": [
123
],
"max_length": 123,
"temperature": 123
},
"source_column_key": "<string>",
"slug": "<string>",
"icon": "<string>",
"alignment": "left",
"decimals": 123,
"currency_format": "<string>",
"phone_number_format": "<string>",
"description": "<string>"
},
"config": {
"hidden": false,
"locked": true,
"order": 123,
"width": 123,
"default_display_field_id": 123,
"default_link_field_id": 123,
"summary_formulas": [
{
"decimals": 123,
"aggregate_function": "<string>"
}
]
},
"is_order_field": false,
"is_filter_field": false,
"is_selected_field": false,
"source_field": "<unknown>",
"linked_records_destination_tables": [
{
"table_name": "<string>",
"table_id": "01563e3a-b5d3-d676-4c61-efb99302bd5b",
"table_owner_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
}
],
"meta": {
"did_change": true
}
}{
"detail": "<string>",
"code": "<string>",
"meta": {},
"errors": [
{
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"meta": {}
}
],
"message": "",
"support_id": ""
}{
"detail": "<string>",
"code": "<string>",
"meta": {},
"errors": [
{
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"meta": {}
}
],
"message": "",
"support_id": ""
}{
"detail": "<string>",
"code": "<string>",
"meta": {},
"errors": [
{
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"meta": {}
}
],
"message": "",
"support_id": ""
}{
"detail": "<string>",
"code": "<string>",
"meta": {},
"errors": [
{
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"meta": {}
}
],
"message": "",
"support_id": ""
}{
"detail": "<string>",
"code": "<string>",
"meta": {},
"errors": [
{
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"meta": {}
}
],
"message": "",
"support_id": ""
}Scopes
Path Parameters
Body
application/json
The fields to remove, and how to resolve conflicts.
Was this page helpful?