{"openapi":"3.1.0","info":{"title":"Flow Myna API","description":"Process mining API for tracking events and objects. Use your API key to authenticate requests.","version":"1.0.0"},"paths":{"/v1/event":{"post":{"tags":["track"],"summary":"Record Event","description":"Record a single event with associated objects. Objects are auto-created if they don't exist. Dataset is determined by the API key.","operationId":"record_event_v1_event_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-FlowMyna-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Flowmyna-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKeyAuth":[]},{"ApiKeyHeader":[]}]}},"/v1/event/batch":{"post":{"tags":["track"],"summary":"Record Multiple Events","description":"Record multiple events in a single request (up to 100 events). Supports both API key auth (server-side) and tracker ID auth (browser-based).","operationId":"record_event_batch_v1_event_batch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventBatchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventBatchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKeyAuth":[]},{"ApiKeyHeader":[]}]}},"/v1/health":{"get":{"tags":["track"],"summary":"API Health Check","description":"Check if the API is available and verify your API key.","operationId":"api_health_v1_health_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-FlowMyna-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Flowmyna-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKeyAuth":[]},{"ApiKeyHeader":[]}]}},"/v1/object/upsert":{"post":{"tags":["track"],"summary":"Upsert Object","description":"Create or update an object with its properties. Uses upsert semantics - creates if not exists, merges properties if exists.","operationId":"upsert_object_v1_object_upsert_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-FlowMyna-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Flowmyna-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObjectUpsertRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObjectUpsertResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKeyAuth":[]},{"ApiKeyHeader":[]}]}},"/v1/object/batch":{"post":{"tags":["track"],"summary":"Batch Upsert Objects","description":"Create or update multiple objects in a single request (up to 100 objects). Uses upsert semantics.","operationId":"upsert_object_batch_v1_object_batch_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-FlowMyna-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Flowmyna-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObjectBatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObjectBatchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKeyAuth":[]},{"ApiKeyHeader":[]}]}}},"components":{"schemas":{"EventBatchRequest":{"properties":{"events":{"items":{"$ref":"#/components/schemas/EventRequest"},"type":"array","maxItems":100,"minItems":1,"title":"Events"}},"type":"object","required":["events"],"title":"EventBatchRequest","description":"Request to record multiple events at once"},"EventBatchResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"processed":{"type":"integer","title":"Processed"},"failed":{"type":"integer","title":"Failed"},"event_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Event Ids"},"errors":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Errors"}},"type":"object","required":["success","processed","failed","event_ids"],"title":"EventBatchResponse","description":"Response after recording a batch of events"},"EventObject":{"properties":{"type":{"type":"string","maxLength":100,"minLength":1,"title":"Type","description":"Object type (e.g., 'Order', 'Customer')"},"id":{"type":"string","maxLength":500,"minLength":1,"title":"Id","description":"External ID of the object (e.g., 'ORD-123')"},"properties":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Properties","description":"Additional properties for the object"},"qualifier":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Qualifier","description":"Qualifier describing the object's role in the event (e.g., 'initiator', 'target', 'performer')"}},"type":"object","required":["type","id"],"title":"EventObject","description":"An object (entity) associated with an event"},"EventRequest":{"properties":{"event":{"type":"string","maxLength":200,"minLength":1,"title":"Event","description":"Event type name (e.g., 'Order Placed')"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp","description":"When the event occurred (defaults to now)"},"properties":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Properties","description":"Event properties/attributes"},"objects":{"items":{"$ref":"#/components/schemas/EventObject"},"type":"array","minItems":1,"title":"Objects","description":"Objects involved in this event"}},"type":"object","required":["event","objects"],"title":"EventRequest","description":"Request to record an event"},"EventResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"event_id":{"type":"string","format":"uuid","title":"Event Id"},"event_type":{"type":"string","title":"Event Type"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"objects_count":{"type":"integer","title":"Objects Count"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","event_id","event_type","timestamp","objects_count","message"],"title":"EventResponse","description":"Response after recording an event"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ObjectBatchRequest":{"properties":{"objects":{"items":{"$ref":"#/components/schemas/ObjectUpsertRequest"},"type":"array","maxItems":100,"minItems":1,"title":"Objects"}},"type":"object","required":["objects"],"title":"ObjectBatchRequest","description":"Request to upsert multiple objects at once"},"ObjectBatchResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"processed":{"type":"integer","title":"Processed"},"failed":{"type":"integer","title":"Failed"},"objects":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Objects"},"errors":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Errors"}},"type":"object","required":["success","processed","failed","objects"],"title":"ObjectBatchResponse","description":"Response after upserting a batch of objects"},"ObjectUpsertRequest":{"properties":{"type":{"type":"string","maxLength":100,"minLength":1,"title":"Type","description":"Object type (e.g., 'Customer', 'Order')"},"id":{"type":"string","maxLength":500,"minLength":1,"title":"Id","description":"External ID of the object"},"properties":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Properties","description":"Object properties/attributes"}},"type":"object","required":["type","id"],"title":"ObjectUpsertRequest","description":"Request to create or update an object"},"ObjectUpsertResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"object_id":{"type":"string","format":"uuid","title":"Object Id"},"object_type":{"type":"string","title":"Object Type"},"external_id":{"type":"string","title":"External Id"},"created":{"type":"boolean","title":"Created"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","object_id","object_type","external_id","created","message"],"title":"ObjectUpsertResponse","description":"Response after upserting an object"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key with Bearer prefix: `Bearer fm_live_xxx`"},"ApiKeyHeader":{"type":"apiKey","in":"header","name":"X-FlowMyna-Api-Key","description":"Alternative: API key without prefix: `fm_live_xxx`"}}},"servers":[{"url":"https://api.flowmyna.com"}]}