For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
DocsAPI Reference
  • Data API
      • POSTBatch Operation
      • GETGet Records
      • POSTInsert Records
      • DELDelete Records
      • GETGet Record By ID
      • PUTUpdate Record
      • DELDelete Record
LogoLogo
Login
Login
Data APIRecords

Insert Records

POST
/v1/vaults/:vaultID/:objectName
POST
/v1/vaults/:vaultID/:objectName
$curl -X POST https://{{vault_uri}}.vault.skyflowapis.com/v1/vaults/vaultID/objectName \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "records": [
> {
> "fields": {
> "drivers_license_number": "13456789",
> "name": "John",
> "phone_number": "1236784563",
> "ssn": "123-45-6789"
> }
> },
> {
> "fields": {
> "drivers_license_number": "98765432",
> "name": "James",
> "phone_number": "9876543215",
> "ssn": "345-45-9876"
> }
> }
> ],
> "tokenization": true,
> "upsert": "drivers_license_number",
> "homogeneous": false
>}'
1{
2 "records": [
3 {
4 "skyflow_id": "9322ffcc-fb8b-4fbe-8551-55c80559007c",
5 "tokens": {
6 "drivers_license_number": "358a03eb-2592-4037-be31-046032471d44",
7 "name": "16c5aa3e-fc49-4a87-8891-5a40c6c2f880",
8 "phone_number": "015ef018-adf3-49a0-8590-dbe9746de044",
9 "ssn": "341-11-6689"
10 }
11 },
12 {
13 "skyflow_id": "51782ea4-91a5-4430-a06d-f4b76efd3d2f",
14 "tokens": {
15 "drivers_license_number": "f7d9a190-899c-40bf-b719-9e856afb6995",
16 "name": "071a3ae2-62eb-4b63-bcca-17a4da96fc87",
17 "phone_number": "a2fba7f3-d5e5-4e40-ab44-bce2c0ba1493",
18 "ssn": "522-41-0947"
19 }
20 }
21 ]
22}

Inserts a record in the specified table.

The time-to-live (TTL) for a transient field begins when the field value is set during record insertion.

Columns that have a string data type and a uniqueness constraint accept strings up to 2500 characters. If an inserted string exceeds 2500 characters, the call returns a token insertion error.

Was this page helpful?
Previous

Delete Records

Next
Built with

Authentication

AuthorizationBearer

Access token, prefixed by Bearer .

Path parameters

vaultIDstringRequired
objectNamestringRequired

Request

This endpoint expects an object.
recordslist of objectsRequired
Record values and tokens.
tokenizationbooleanOptionalDefaults to false

If true, this operation returns tokens for fields with tokenization enabled.

upsertstringOptional

Name of a unique column in the table. Uses upsert operations to check if a record exists based on the unique column’s value. If a matching record exists, the record updates with the values you provide. If a matching record doesn’t exist, the upsert operation inserts a new record.

When you upsert a field, include the entire contents you want the field to store. For JSON fields, include all nested fields and values. If a nested field isn’t included, it’s removed.

homogeneousbooleanOptionalDefaults to false

If true, this operation mandates that all the records have the same fields. This parameter does not work with upsert.

byotenumOptionalDefaults to DISABLE
Token insertion behavior.
Allowed values:

Response

OK
recordslist of objects
Inserted records.

Errors

400
Bad Request Error
401
Unauthorized Error
500
Internal Server Error