Storing and Deleting Events

Storing an event in a stream creates that stream if it does not exist, so there is no need to “pre-configure” streams before starting to send events to them.

If you provide a timestamp header formatted as an ISO8601 date, that timestamp will be used as the canonical timestamp for the event. If you do not provide a timestamp header, a timestamp will be automatically generated for the event.

post
Store Event with an auto-generated unique ID

https://api.sentenai.com/streams/<stream-name>/events
Request
Response
Path Parameters
stream-name
required
string
Name of the stream to post events too.
Headers
Content-Type
required
string
application/json
Auth-Key
required
string
Your Sentenai API key
timestamp
optional
string
ISO8601 formatted
201: Created
Event successfully saved.

put
Store Event with your own unique ID

https://api.sentenai.com/streams/<stream-name>/events/<event-id>
Request
Response
Path Parameters
event-id
optional
string
Your own unique ID for the event
stream-name
optional
string
Name of the stream to post events too
Headers
Content-Type
required
string
application/json
Auth-Key
required
string
Your Sentenai API key
timestamp
optional
string
ISO8601 formatted
201: Created
Event successfully saved.

delete
Delete Event from Stream

https://api.sentenai.com/streams/<stream-name>/events/<event-id>
Request
Response
Path Parameters
stream-name
required
string
Stream that contains the event
event-id
required
string
ID of the event to be deleted
Headers
Auth-Key
required
string
Your Sentenai API key
200: OK
404: Not Found