Analytics apiEventEvents

Log Event

POST
/events

Authorization

AuthorizationRequiredBearer <token>

The API key for a Web integration. For more details, see authentication documentation

In: header

AuthorizationRequiredBearer <token>

The API key for an API integration. For more details, see authentication documentation

In: header

Request Body

application/jsonRequired

Note: The maximum size of the request body is 2 MB.

bodyRequiredobject | object | object

Response Body

Event logged successfully

responseRequiredobject | object | object
export type Response = SelectMessageEvent | SelectConversationEvent | SelectSearchEvent;
 
export interface SelectMessageEvent {
  id: string;
  type: string;
  messageId: string;
  createdAt: string;
  projectId: string | null;
  integrationId: string | null;
  /**
   * A customizable collection of custom properties or attributes.
   */
  properties?: {
    [k: string]: unknown;
  } | null;
  /**
   * A customizable collection of custom properties or attributes. Some properties have first class support for the Inkeep Portal or Widget and are noted in the description.
   */
  userProperties?: {
    /**
     * The unique identifier for the user. This value is sent by the inkeep widget.
     */
    id?: string | number | null;
    /**
     * The type of identification for the user. This value is sent by the inkeep widget.
     */
    identificationType?: string | null;
    /**
     * The unique identifier for the user. This value is sent by the Inkeep Support Agent Copilot. This value is used to create the graphs on the Inkeep Portal.
     */
    userId?: string | number | null;
    /**
     * The name of the support agent assigned to the user. This value is sent by the Inkeep Support Agent Copilot. This value is used to create the graphs on the Inkeep Portal.
     */
    supportAgentName?: string | null;
    [k: string]: unknown;
  } | null;
  entityType: "message";
}
export interface SelectConversationEvent {
  id: string;
  type: string;
  conversationId: string;
  createdAt: string;
  projectId: string | null;
  integrationId: string | null;
  /**
   * A customizable collection of custom properties or attributes.
   */
  properties?: {
    [k: string]: unknown;
  } | null;
  /**
   * A customizable collection of custom properties or attributes. Some properties have first class support for the Inkeep Portal or Widget and are noted in the description.
   */
  userProperties?: {
    /**
     * The unique identifier for the user. This value is sent by the inkeep widget.
     */
    id?: string | number | null;
    /**
     * The type of identification for the user. This value is sent by the inkeep widget.
     */
    identificationType?: string | null;
    /**
     * The unique identifier for the user. This value is sent by the Inkeep Support Agent Copilot. This value is used to create the graphs on the Inkeep Portal.
     */
    userId?: string | number | null;
    /**
     * The name of the support agent assigned to the user. This value is sent by the Inkeep Support Agent Copilot. This value is used to create the graphs on the Inkeep Portal.
     */
    supportAgentName?: string | null;
    [k: string]: unknown;
  } | null;
  entityType: "conversation";
}
export interface SelectSearchEvent {
  id: string;
  type: string;
  searchQuery: string;
  createdAt: string;
  projectId: string | null;
  integrationId: string | null;
  /**
   * A customizable collection of custom properties or attributes.
   */
  properties?: {
    [k: string]: unknown;
  } | null;
  /**
   * A customizable collection of custom properties or attributes. Some properties have first class support for the Inkeep Portal or Widget and are noted in the description.
   */
  userProperties?: {
    /**
     * The unique identifier for the user. This value is sent by the inkeep widget.
     */
    id?: string | number | null;
    /**
     * The type of identification for the user. This value is sent by the inkeep widget.
     */
    identificationType?: string | null;
    /**
     * The unique identifier for the user. This value is sent by the Inkeep Support Agent Copilot. This value is used to create the graphs on the Inkeep Portal.
     */
    userId?: string | number | null;
    /**
     * The name of the support agent assigned to the user. This value is sent by the Inkeep Support Agent Copilot. This value is used to create the graphs on the Inkeep Portal.
     */
    supportAgentName?: string | null;
    [k: string]: unknown;
  } | null;
  entityType: "search";
}
 
curl -X POST "https://api.analytics.inkeep.com/events" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "string",
    "type": "string",
    "messageId": "string",
    "createdAt": "2019-08-24T14:15:22Z",
    "projectId": "string",
    "integrationId": "string",
    "properties": {},
    "userProperties": {
      "id": "string",
      "identificationType": "COOKIED",
      "userId": "string",
      "supportAgentName": "string"
    },
    "entityType": "message"
  }'
{
  "id": "string",
  "type": "string",
  "messageId": "string",
  "createdAt": "string",
  "projectId": "string",
  "integrationId": "string",
  "properties": {},
  "userProperties": {
    "id": "string",
    "identificationType": "COOKIED",
    "userId": "string",
    "supportAgentName": "string"
  },
  "entityType": "message"
}