- Postman collection
- Open API spec
Authentication
Customers
Accounts
Aliases
Event Schemas
Usage Meters
AddOns
Licenses
Feature
Price Plans
Settings
Price Experimentation
Jobs
Event Ingestion
Entitlements
- POSTIngest event if a user is entitled to a feature
- GETGet Feature credits balance
- GETList feature credits entries of a feature for an account
- PATCHUpdate a feature credits entry
- POSTVoid a feature credits entry of a feature for an account
- GETGet entitlements for a account
- POSTCheck entitlement value for a account
- GETGet entitlement value for a account
- POST
Event Management
Metrics
Credits
Invoices
Payments
Wallet
InvoiceGroups
APIs
Ingest event if a user is entitled to a feature
This API let’s you to ingest an event if a user is entitled to a feature
curl --request POST \
--url https://api.togai.com/entitled \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"event": {
"schemaName": "<string>",
"id": "c0b1306d-f506-43a6-856b-69221efaee6b",
"timestamp": "2022-06-15T07:30:35.123",
"accountId": 1,
"attributes": [
{
"name": "message",
"value": 100,
"unit": "characters"
}
],
"dimensions": {}
}
}'
{
"success": true
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
Contents of the event
Name of the Event Schema. Know more about event schema
Togai restricts users to ingest events with same id within a period of 45 days. This restriction is common for /entitled API, /ingest API and /ingestBatch API. i.e, an id used on /ingest API will not be allowed on /ingestBatch or /entitled APIs
Source time stamp of the event. This timestamp must be in ISO 8601 format.
The event will be associated with the provided account
Attributes are numeric values. It can be usage metric which you push to Togai
Name of the event attribute
Value of the event attribute
Unit with which the attribute value was measured. Natively supported units - "Meters, Miles, Kilometers, Grams, Kilograms, ounces, Pounds, Minutes, Hours, Seconds, Milliseconds, Microseconds, None". Clients are free to add any other custom units.
Dimensions are tags/labels associated with the events.
Response
curl --request POST \
--url https://api.togai.com/entitled \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"event": {
"schemaName": "<string>",
"id": "c0b1306d-f506-43a6-856b-69221efaee6b",
"timestamp": "2022-06-15T07:30:35.123",
"accountId": 1,
"attributes": [
{
"name": "message",
"value": 100,
"unit": "characters"
}
],
"dimensions": {}
}
}'
{
"success": true
}