Documentation

Documentation

YourOwn SetupYourOwn SDKYourOwn API
Sphere SetupSphere SDKSphere API
  • Resources

›Collect payload

Introduction

  • Copilot.cx Server API

Reference

  • Collect API
  • Collect payload

    • User events
    • Thing events
    • Custom events
    • Misc. events
    • Preexisting sync events
  • Consent endpoint

Appendix

  • Releases

Thing events

Inform the Copilot.cx system of events related to the connected device (Thing).

Please refer the user_id and thing_id best practices here.

Thing Created

Notifies Copilot.cx that a new Thing was created in your system.

Including a user_id in this call does not constitute a User-Thing association (See below).

  • Type: thing_created

  • Payload fields:

FieldTypeDescriptionMandatory
thing_idStringYour unique Thing identifier. See thing_id.Y
user_idStringYour unique identifier of the User responsible for the action (described above).
firmware_versionStringThe firmware version of the Thing.
modelStringThe hardware model name of the Thing.
custom_propertiesDictionaryCustom properties or attributes for a given Thing
  • Example
    {
      "events": [
        {
          "type": "thing_created",
          "event_id": "15775ead-c5d0-4894-b570-e4627e41cd78",
          "timestamp": 1559570638730,
          "payload": {
            "thing_id": "63:64:78:26:b1:c7",
            "custom_properties": {
              "default_state": "rectangle",
              "length": 20.5,
              "is_upgraded": false
            }
          }
        }
      ]
    }
    

Thing Updated

Notifies Copilot.cx that a Thing was updated in your system.

  • Type: thing_updated

  • Payload fields:

FieldTypeDescriptionMandatory
thing_idStringYour unique Thing identifier. See thing_id.Y
user_idStringYour unique identifier of the User responsible for the action (described above).
firmware_versionStringThe firmware version of the Thing.
modelStringThe hardware model name of the Thing.
custom_propertiesDictionaryCustom properties or attributes for a given Thing
  • Example
    {
      "events": [
        {
        "type": "thing_updated",
          "event_id": "f6496fdd-deb4-4d85-9af6-f947964c84fa",
          "timestamp": 1559627990338,
          "payload": {
            "firmware_version": "14.52",
            "thing_id": "07:1c:9f:92:70:71",
            "custom_properties": {
              "chipset_type": "Intel",
              "height": 20.5,
              "is_max": false
            }
          }
        }
      ]
    }
    

Thing Associated

Notifies Copilot.cx of an association between a User and a Thing in Copilot.

  • Type: user_thing_associated

  • Payload fields:

FieldTypeDescriptionMandatory
user_idStringYour unique identifier of the User to be associated with the thing_id in Copilot.cx (described below)Y
thing_idStringYour unique identifier of the Thing to be associated with the user_id in Copilot.cx (described above)Y
  • Example
    {
      "events": [
        {
          "type": "user_thing_associated",
          "event_id": "d8a4ee55-da8f-4f0a-99b7-3f48629462fd",
          "timestamp": 1559570638730,
          "payload": {
            "user_id": "325ca496-afe8-4f44-bd37-b0dc90bdfdea",
            "thing_id": "63:64:78:26:b1:c7"
          }
        }
      ]
    }
    

Thing Disassociated

Notifies Copilot.cx of an disassociate between a User and a Thing in Copilot.

  • Type: user_thing_dissociated

  • Payload fields:

FieldTypeDescriptionMandatory
user_idStringYour unique identifier of the User to be disassociated with the thing_id in Copilot.cx (described below)Y
thing_idStringYour unique identifier of the Thing to be disassociated with the user_id in Copilot.cx (described above)Y
  • Example
    {
      "events": [
        {
          "type": "user_thing_dissociated",
          "event_id": "d8a4ee55-da8f-4f0a-99b7-3f48629462fd",
          "timestamp": 1559570638730,
          "payload": {
            "user_id": "325ca496-afe8-4f44-bd37-b0dc90bdfdea",
            "thing_id": "63:64:78:26:b1:c7"
          }
        }
      ]
    }
    

Thing Status Changed

Notifies Copilot.cx about a status change of a Thing, as specified by the status_key field. For example, a status may represent the battery level.

  • Type: thing_status_changed

  • Payload fields:

FieldTypeDescriptionMandatory
thing_idStringYour unique identifier of the Thing whose status changed. See thing_id.Y
status_keyStringSpecifies a unique identifier of the status of a Thing. Status values are retained in Copilot.cx according to the string specified here.Y
status_valueStringSpecifies the value of the status_key (described above). This value is a string, even though it can be used to specify numbers.Y
status_dateDateSpecifies the timestamp of the status_value (described above).Y
user_idStringYour unique identifier of the User of the Thing whose status changed, if known.

Only a single status_key, status_value and status_date field can be specified in each request.

  • Example
    {
      "events": [
        {
          "type": "thing_status_changed",
          "event_id": "d8a4ee55-da8f-4f0a-99b7-3f48629462fd",
          "timestamp": 1559570638730,
          "payload": {
            "thing_id": "63:64:78:26:b1:c7",
            "status_key": "battery",
            "status_value": "50",
            "status_date": 1559570238730
          }
        }
      ]
    }
    

Thing Interaction

Notifies Copilot.cx about an interaction that occurred on a Thing, such as pressing a button on the Thing, powering on the Thing and

  • Type: thing_interaction

  • Payload fields:

FieldTypeDescriptionMandatory
thing_idStringYour unique identifier of the Thing on which an interaction occurred.Y
user_idStringYour unique identifier of the User of the Thing whose status changed, if known.
Any other fieldStringAny custom field describing the interaction that was performed. Multiple fields can be specified.

my_custom_interaction_int_value and my_custom_interaction_name are just example of how you can use the custom fields for the thing_interaction event.

  • Example
    {
      "events": [
        {
          "type": "thing_interaction",
          "event_id": "d1d777e1-98f6-4b7d-998c-85cb756f4320",
          "timestamp": 1559570974642,
          "payload": {
            "my_custom_interaction_int_value": 98,
            "my_custom_interaction_name": "MyCoolInteraction",
            "thing_id": "63:64:78:26:b1:c7"
          }
        }
      ]
    }
    

Thing Connected

Notifies Copilot.cx that a thing was connected.

  • Type: thing_connected

  • Payload fields:

FieldTypeDescriptionMandatory
thing_idStringYour unique identifier of the Thing on which an interaction occurred.Y
user_idStringYour unique identifier of the User of the Thing whose status changed, if known.
  • Example
    {
      "events": [
        {
          "type": "thing_connected",
          "event_id": "d1d777e1-98f6-4b7d-998c-85cb756f4320",
          "timestamp": 1559570974642,
          "payload": {
            "thing_id": "63:64:78:26:b1:c7"
          }
        }
      ]
    }
    

Consumable Usage

Trigger this event in case your product has a consumable element (paper, cartridge, razor, etc…) and a user consumes it. This will later be used to identify consumable usage patterns and deviations from these patterns.

  • Type: consumable_usage

  • Payload fields:

FieldTypeDescriptionMandatory
thing_idStringYour unique identifier of the Thing on which an interaction occurred.Y
consumable_typeStringThe types of consumables (e.g. paper/cartrige/razor etc.)
user_idStringYour unique identifier of the User of the Thing whose status changed, if known.
  • Example
    {
      "events": [
        {
          "type": "consumable_usage",
          "event_id": "d1d777e1-98f6-4b7d-998c-85cb756f4320",
          "timestamp": 1559570974642,
          "payload": {
            "thing_id": "63:64:78:26:b1:c7",
            "consumable_type": "CoffeePod"
          }
        }
      ]
    }
    

Firmware Upgrade Started

Trigger this event at the beginning of a firmware upgrade process.

  • Type: firmware_upgrade_started

  • Payload fields:

FieldTypeDescriptionMandatory
thing_idStringYour unique identifier of the Thing on which an interaction occurred.Y
firmware_versionStringThe version of the new firmware
user_idStringYour unique identifier of the User of the Thing whose status changed, if known.
  • Example
    {
      "events": [
        {
          "type": "firmware_upgrade_started",
          "event_id": "d1d777e1-98f6-4b7d-998c-85cb756f4320",
          "timestamp": 1559570974642,
          "payload": {
            "thing_id": "63:64:78:26:b1:c7",
            "firmware_version": "17.52"
          }
        }
      ]
    }
    

Firmware Upgrade Completed

Trigger upon firmware upgrade completion.

  • Type: firmware_upgrade_completed

  • Payload fields:

FieldTypeDescriptionMandatory
thing_idStringYour unique identifier of the Thing on which an interaction occurred.Y
firmware_versionStringThe version of the new firmwareY
resultStringThe resulting status of the firmware upgrade process : success / device_unavailable / incomplete / failedY
user_idStringYour unique identifier of the User of the Thing whose status changed, if known.
  • Example
    {
      "events": [
        {
          "type": "firmware_upgrade_completed",
          "event_id": "d1d777e1-98f6-4b7d-998c-85cb756f4320",
          "timestamp": 1559570974642,
          "payload": {
            "thing_id": "63:64:78:26:b1:c7",
            "firmware_version": "17.53",
            "result": "success"
          }
        }
      ]
    }
    
← User eventsCustom events →
  • Thing Created
  • Thing Updated
  • Thing Associated
  • Thing Disassociated
  • Thing Status Changed
  • Thing Interaction
  • Thing Connected
  • Consumable Usage
  • Firmware Upgrade Started
  • Firmware Upgrade Completed
Copilot
Mail: hello@copilot.cx
Call: (212).398.0001
© Copilot.cx 2025