Skip to content

Dynamic POP API ​

Send POP events using your own flexible schema. Use this endpoint when you need to control the structure of your event data.

Endpoint ​

http
POST /coatro/v1/pop/dynamic

Description ​

Send POP events using your own flexible schema. You control the structure of each event object, and you specify a schema version to track changes over time.

Request Body ​

json
{
  "schemaVersion": "1.0",
  "events": [
    {
      // Your custom event structure
      "customField1": "value1",
      "customField2": 123,
      "timestamp": "2025-01-27T10:00:00Z"
    }
  ]
}

Request Schema ​

FieldTypeRequiredDescription
schemaVersionstringYesVersion identifier for your event schema (e.g., "1.0", "2.1"). Must be non-empty
eventsarrayYesArray of event objects with your custom structure (minimum 1 item)

Example Request ​

API Base URL: https://services-api.viana.ai

bash
curl -X POST "<API_BASE_URL>/coatro/v1/pop/dynamic" \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "schemaVersion": "1.0",
    "events": [
      {
        "customField1": "value1",
        "customField2": 123,
        "timestamp": "2025-01-27T10:00:00Z"
      }
    ]
  }'

Response ​

202 Accepted ​

Your events have been accepted and will be processed.

json
{
  "message": "Events accepted",
  "acceptedAt": "2025-01-27T10:00:00Z",
  "eventCount": 1,
  "schemaVersion": "1.0"
}

Response Schema ​

FieldTypeDescription
messagestringStatus message
acceptedAtstringTimestamp when events were accepted
eventCountintegerNumber of events accepted
schemaVersionstringSchema version you provided

Error Responses ​

  • 400 Bad Request - Invalid event data or missing required fields
  • 401 Unauthorized - Invalid or missing API key
  • 500 Internal Server Error - Server error

For processing large files with dynamic POP events, see the Dynamic Bulk Ingestion API.