POST
api
/
v1
/
event
await fetch('https://functionary.run/api/v1/events', 
    {  
        method: "POST", 
        header: {
            Authorization: "Bearer MY-TOKEN"
        }
        body: {
            ids: ['10', '[email protected]'],
            event: 'sign_up',
        } 
    }
)
{
  "statusCode": 200
}

Basics

There are 2 main API endpoints for functionary. The first is /api/v1/identify. The second is /api/v1/events.

name
string
required

name of the event.

ids
(string | number)[]
required

id or ids of the model your are calling the event on. If the model doesn’t exist, the event will be thrown out.

properties
object

Properties you want stored on the event you are creating.

model
string

The type of the model to assign the event. This is for to avoiding id collisions accross model types. For example, you may send ids = [1], but it is possible that a model where id=1 exists for both model types of “organization” and “customer”. If model="customer" exists functionary knows to assign event to the “customer” model not the organization. If it doesn’t exist, functionary will assign the relationship to the first model it finds with a matching id.

Authorization
object

Your api key found in the dashboard under settings