Skip to main content
PUT
/
api
/
v2
/
public
/
dataref
/
:refName
/
clear-records
curl -X PUT "https://app.refold.ai/api/v2/public/dataref/{refName}/clear-records" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "linked_account_id: YOUR_LINKED_ACCOUNT_ID"
{
  "_id": "6a3149efd396207fd24f7aad",
  "linked_account_id": "user_12345",
  "org_id": "6500a1b2c3d4e5f6a7b8c9d0",
  "environment": "test",
  "name": "contacts",
  "data": {},
  "createdAt": "2026-06-16T13:04:47.926Z",
  "updatedAt": "2026-06-16T13:05:10.228Z",
  "__v": 0
}
Reset a dataref’s data map to {}, removing all records while preserving the dataref itself.

Authentication

x-api-key
string
required
Your Refold API key.
linked_account_id
string
required
The linked account that owns the dataref.

Path Parameters

refName
string
required
The dataref name to clear. Example: contacts

Response

Returns the dataref with its data reset to {}.
{
  "_id": "6a3149efd396207fd24f7aad",
  "linked_account_id": "user_12345",
  "org_id": "6500a1b2c3d4e5f6a7b8c9d0",
  "environment": "test",
  "name": "contacts",
  "data": {},
  "createdAt": "2026-06-16T13:04:47.926Z",
  "updatedAt": "2026-06-16T13:05:10.228Z",
  "__v": 0
}
curl -X PUT "https://app.refold.ai/api/v2/public/dataref/{refName}/clear-records" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "linked_account_id: YOUR_LINKED_ACCOUNT_ID"