Skip to main content
POST
https://api.fltr.com
/
v1
/
datasets
Create Dataset
curl --request POST \
  --url https://api.fltr.com/v1/datasets \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "is_public": true,
  "metadata": {}
}
'
{
  "400": {},
  "401": {},
  "429": {},
  "id": "<string>",
  "name": "<string>",
  "description": "<string>",
  "is_public": true,
  "document_count": 123,
  "created_at": "<string>",
  "updated_at": "<string>",
  "metadata": {}
}

Request

Creates a new dataset. Datasets are containers for related documents that can be searched together.

Headers

Authorization
string
required
Bearer token for authenticationExample: Bearer fltr_sk_abc123...
Content-Type
string
required
Must be application/json

Body

name
string
required
Name of the dataset (1-200 characters)
description
string
Optional description (max 1000 characters)
is_public
boolean
default:false
Whether the dataset is publicly accessible
metadata
object
Custom metadata as key-value pairs

Response

id
string
Unique dataset identifier (e.g., ds_abc123)
name
string
Dataset name
description
string
Dataset description
is_public
boolean
Public accessibility status
document_count
integer
Number of documents (always 0 for new datasets)
created_at
string
ISO 8601 timestamp of creation
updated_at
string
ISO 8601 timestamp of last update
metadata
object
Custom metadata

Examples

curl -X POST https://api.fltr.com/v1/datasets \
  -H "Authorization: Bearer fltr_sk_abc123..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Product Documentation",
    "description": "All product docs and guides",
    "is_public": false,
    "metadata": {
      "category": "documentation",
      "team": "product"
    }
  }'

Response

{
  "id": "ds_abc123def456",
  "name": "Product Documentation",
  "description": "All product docs and guides",
  "is_public": false,
  "document_count": 0,
  "created_at": "2024-01-10T12:00:00Z",
  "updated_at": "2024-01-10T12:00:00Z",
  "metadata": {
    "category": "documentation",
    "team": "product"
  }
}

Errors

400
error
Bad Request - Invalid parameters
{
  "error": "Invalid dataset name",
  "code": "invalid_name",
  "details": {
    "field": "name",
    "issue": "Name cannot be empty"
  }
}
401
error
Unauthorized - Invalid or missing API key
{
  "error": "Invalid API key",
  "code": "invalid_api_key"
}
429
error
Rate Limit Exceeded
{
  "error": "Rate limit exceeded",
  "code": "rate_limit_exceeded",
  "retry_after": 3600
}

Notes

  • Dataset names must be unique within your account
  • Maximum 1,000 datasets per account
  • Use is_public: true to make datasets accessible without authentication (read-only)
  • Metadata is indexed and searchable
  • Deleting a dataset also deletes all its documents