Triplit · Example Payload

Triplit Insert Example

Example: Insert a single entity into the todos collection

DatabaseReal-timeSyncLocal-firstDeveloper ToolsTypeScriptOpen Source

Triplit Insert Example is an example object payload from Triplit, with 3 top-level fields. It illustrates the shape of data this provider's APIs accept or return.

Top-level fields

descriptionrequestresponse

Example Payload

triplit-insert-example.json Raw ↑
{
  "description": "Example: Insert a single entity into the todos collection",
  "request": {
    "method": "POST",
    "url": "https://your-project-id.triplit.io/insert",
    "headers": {
      "Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
      "Content-Type": "application/json"
    },
    "body": {
      "collectionName": "todos",
      "entity": {
        "id": "ghi789",
        "text": "Read a book",
        "completed": false,
        "createdAt": "2026-06-12T12:00:00Z"
      }
    }
  },
  "response": {
    "status": 200,
    "body": {
      "id": "ghi789",
      "text": "Read a book",
      "completed": false,
      "createdAt": "2026-06-12T12:00:00Z"
    }
  }
}