Views

Create a view

POST
Add a new view to the space

Request

This endpoint expects an object.
sheetId
stringRequired
Sheet ID
name
stringRequired
config
objectRequired
The configuration of a view. Filters, sorting, and search query.

Response

This endpoint returns an object
data
object
A view

Errors

POST
1curl -X POST https://api.x.flatfile.com/v1/views \
2 -H "Authorization: Bearer <token>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "sheetId": "us_sh_YOUR_ID",
6 "name": "My View",
7 "config": {
8 "sortField": "email",
9 "sortDirection": "asc",
10 "filter": "error",
11 "filterField": "email",
12 "q": "firstname like %John%"
13 }
14}'
1{
2 "data": {
3 "id": "us_vi_YOUR_ID",
4 "sheetId": "us_sh_YOUR_ID",
5 "name": "My View",
6 "config": {
7 "sortField": "email",
8 "sortDirection": "asc",
9 "filter": "error",
10 "filterField": "email",
11 "q": "firstname like %John%"
12 },
13 "createdBy": "us_usr_YOUR_ID"
14 }
15}