Logo
Api

Batch

Submit multiple coding activity heartbeats in a single batch request (max 100)

POST
/api/external/batch

Authorization

AuthorizationRequiredBearer <token>

In: header

Request Body

application/jsonRequired
bodyRequiredarray<object>

Response Body

Batch heartbeats successfully recorded

TypeScript Definitions

Use the response body type in TypeScript.

successboolean
countinteger
idsarray<string>
curl -X POST "https://ziit.app/api/external/batch" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "timestamp": "2023-10-15T14:30:00Z",
      "project": "my-awesome-project",
      "language": "javascript",
      "editor": "vscode",
      "os": "macos",
      "branch": "main",
      "file": "App.js"
    }
  ]'
{
  "success": true,
  "count": 0,
  "ids": [
    "string"
  ]
}