Update View
Update an existing view by its name.
curl -X PUT "https://api.datafiniti.co/v4/views/John Doe" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"name": "John Doe",
"fields": [
"example_string"
]
}'
import requests
import json
url = "https://api.datafiniti.co/v4/views/John Doe"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
data = {
"name": "John Doe",
"fields": [
"example_string"
]
}
response = requests.put(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.datafiniti.co/v4/views/John Doe", {
method: "PUT",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
},
body: JSON.stringify({
"name": "John Doe",
"fields": [
"example_string"
]
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"name": "John Doe",
"fields": [
"example_string"
]
}`)
req, err := http.NewRequest("PUT", "https://api.datafiniti.co/v4/views/John Doe", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.datafiniti.co/v4/views/John Doe')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Put.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
request.body = '{
"name": "John Doe",
"fields": [
"example_string"
]
}'
response = http.request(request)
puts response.body
{
"name": "John Doe",
"fields": [
"example_string"
],
"created_at": "2024-12-25T10:00:00Z"
}
{
"error": "Bad Request",
"message": "The request contains invalid parameters or malformed data",
"code": 400,
"details": [
{
"field": "email",
"message": "Invalid email format"
}
]
}
PUT
/views/{view_name}PUT
Bearer Token
Bearer Tokenstring
RequiredBearer token obtained from the /auth endpoint. Include in requests as: Authorization: Bearer <token>
Bearer token obtained from the /auth endpoint. Include in requests as: Authorization: Bearer <token>
path
view_namestring
RequiredThe name of the view to update
Content-Typestring
RequiredThe media type of the request body
Options: application/json
namestring
Name for the view
fieldsarray
List of fields to include in the view
Request Preview
Response
Response will appear here after sending the request
Authentication
header
Authorizationstring
RequiredBearer token. Bearer token obtained from the /auth endpoint. Include in requests as: Authorization: Bearer <token>
Path Parameters
view_namestring
RequiredThe name of the view to update
Responses
namestring
View name
fieldsstring[]
Fields included in this view
created_atstring
Timestamp when the view was created
errorstring
Error message describing what went wrong
Nobody's perfect, and you may find a view you created isn't quite right for your project. Not to worry, you can always update your views.
Was this page helpful?
Last updated Mar 26, 2026
Built with Documentation.AI