Submit a company event

Submit a company event

     

Request Path Parameters
Parameter Type Required Description
org_id number Yes The unique identifier of your organization
id number Yes The unique identifier of the company

     

Request Body Parameter
Attribute Type Required Description
event_name String Yes The name of the event that occured
custom_attributes Object No The custom attributes which are set for the contact

Example Request & Response


$ curl https://api.custerem.com/<org_id>/companies/<id>/events/ \
-X POST \
-H 'Authorization: X-API-KEY <Your API Key>' \
-H 'Content-Type: application/json' \
-d '{
    "event_name": "login",
    "custom_attributes": {
        "userId": "12232"
    }
}'

 

201 Created

{
    "event_name": "login",
    "custom_attributes": {
        "userId": "12232",
        "invited": "mail@example.com"
    }
}

 

400 Bad Request

{
    "event_name": [
        "This field may not be blank."
    ]
}

 

404 Not Found

{
    "status_code": 404,
    "message": "Company with id 32 not found"
}