Create View
Create a new view to configure and save custom field filters for later use.
curl -X POST "https://api.datafiniti.co/v4/views" \
-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"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
data = {
"name": "John Doe",
"fields": [
"example_string"
]
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.datafiniti.co/v4/views", {
method: "POST",
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("POST", "https://api.datafiniti.co/v4/views", 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')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.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"
}
]
}
/views
Bearer token obtained from the /auth endpoint. Include in requests as: Authorization: Bearer <token>
The media type of the request body
Name for the view
List of fields to include in the view
Request Preview
Response
Response will appear here after sending the request
Authentication
Bearer token. Bearer token obtained from the /auth endpoint. Include in requests as: Authorization: Bearer <token>
Responses
View name
Fields included in this view
Timestamp when the view was created
Error message describing what went wrong
While you can dynamically filter your search results, many times it will be more convenient to configure a view, and save it for later use. Once created, you can simply include view: <view_name> in your future search requests.
Last updated Mar 26, 2026
Built with Documentation.AI