POST
/
features
curl --request POST \
  --url https://api.togai.com/features \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "DiscountCredits",
  "schemaAssociations": [
    "event_schema1",
    "event_schema2"
  ]
}'
{
  "id": "feature.1zYnCiM9Bpg.lv25y",
  "name": "DiscountCredits",
  "displayName": "DiscountCredits",
  "schemaAssociations": [
    {
      "schemaName": "event_schema1",
      "attributeName": "distance"
    },
    {
      "schemaName": "event_schema2",
      "attributeName": "time"
    }
  ],
  "createdAt": "2020-01-01T00:00:00Z",
  "updatedAt": "2020-01-01T00:00:00Z"
}

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
name
string
required

Name of the feature

billableName
string

Billable name of feature. Billable name takes precedence over name to display in invoice.

schemaAssociations
object[]
required

Association of a feature with event_schemas

Response

200 - application/json
id
string
required
name
string
required
billableName
string
displayName
string
required

Display name of feature. This is an auto-generated field which contains billableName of feature. If billableName is not provided, name will be used as display name.

schemaAssociations
object[]
required

Association of a feature with event_schemas

createdAt
string
required
updatedAt
string