/Documentation

Data Store API

Updated Oct 12, 2026

Data Store API link in the Data Store dashboard

Note:

Endpoints

Documents

Documents group

Collections

Collections group

Imports

Imports group

Schemas

Example

 CreateCollectionRequest schema
Additional information in CreateCollectionRequest schema
{ "collection_name": "sessions",   "ttl": {     "duration_hours": 24,     "reference_field": "updated_at"   } }

How to use the API playground

Try it out button
Parameters and request body
Response
Created collection in Data Store

JS example

const CONTAINER_URL = "https://gtm.yourdomain.com"; const API_KEY = process.env.STAPE_API_KEY; const storeBase = `${CONTAINER_URL}/stape-api/${API_KEY}/v2/store`;
async function stapeRequest(path, options = {}) {   const res = await fetch(`${storeBase}${path}`, {     headers: { "Content-Type": "application/json" },     ...options,   });
if (!res.ok || (body && body.success === false)) {     const message = body?.error?.message || `HTTP ${res.status}`;     throw new Error(`Data Store error: ${message}`);   } return body?.data ?? null;
async function deleteCollection(collectionName) {   await stapeRequest(`/collections/${collectionName}`, { method: "DELETE" });   console.log(`Collection "${collectionName}" deleted`); }
deleteCollection("sessions").catch((err) => console.error(err.message));
const CONTAINER_URL = "https://gtm.yourdomain.com"; const API_KEY = process.env.STAPE_API_KEY; const storeBase = `${CONTAINER_URL}/stape-api/${API_KEY}/v2/store`; async function stapeRequest(path, options = {}) {   const res = await fetch(`${storeBase}${path}`, {     headers: { "Content-Type": "application/json" },     ...options,   }); if (!res.ok || (body && body.success === false)) {     const message = body?.error?.message || `HTTP ${res.status}`;     throw new Error(`Data Store error: ${message}`);   } return body?.data ?? null; async function deleteCollection(collectionName) {   await stapeRequest(`/collections/${collectionName}`, { method: "DELETE" });   console.log(`Collection "${collectionName}" deleted`); } deleteCollection("sessions").catch((err) => console.error(err.message));

Was this article helpful?

Comments

Can’t find what you are looking for?