---
title: Event
slug: event
description: Learn how to send events and pageviews to the Salesmachine API using code examples. This guide showcases the syntax for sending requests via curl and ensures successful responses with a "success" status. Discover how to track specific contact IDs effectiv
createdAt: 2023-09-28T15:08:25.826Z
---

Events are called when recording a specific action in the application. Events are specific to contacts defined by their unique\_id.

***

:::ApiMethodV2
```json
{
  "name": "Send an event",
  "method": "POST",
  "url": "https://api.successeve.com/v1/track/event",
  "description": " ",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "rJJLvAjMcFcJ2jQ0mESEw",
        "language": "curl",
        "code": "curl -X POST -H \"Content-Type: application/json\"   \\\n-d '{\n  \"contact_uid\":\"123456\", \n  \"event_uid\" : \"user_registration\", \n  \"params\" : {\"account_uid\" : \"78910\", \"display_name\" : \"Registration\"}\n  }' \n'https://api.salesmachine.io/v1/track/event?api_token=<YOUR_API_TOKEN>'",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "rJJLvAjMcFcJ2jQ0mESEw"
  },
  "results": {
    "languages": [
      {
        "id": "SIEe5Lll7Vdzn0_mTsN-i",
        "language": "200",
        "customLabel": "",
        "code": "{status: \"success\"}"
      }
    ],
    "selectedLanguageId": "SIEe5Lll7Vdzn0_mTsN-i"
  },
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [
      {
        "name": "contact_uid",
        "kind": "required",
        "type": "string",
        "description": "Unique identifier referring to a contact, it must match a unique ID in your application like database ID or email address."
      },
      {
        "name": "event_uid",
        "kind": "required",
        "type": "string",
        "description": "Event name in snake_case format.",
        "children": []
      },
      {
        "name": "params.account_uid",
        "kind": "optional",
        "type": "string",
        "description": "Account id is a link to an account",
        "children": []
      },
      {
        "name": "params.display_name",
        "kind": "optional",
        "type": "string",
        "description": "Human readable event name.",
        "children": []
      }
    ],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  }
}
```
:::

***

:::ApiMethodV2
```json
{
  "name": "Send a pageview",
  "method": "POST",
  "url": "https://api.successeve.com/v1/track/event",
  "description": " ",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "rJJLvAjMcFcJ2jQ0mESEw",
        "language": "curl",
        "code": "curl -X POST -H \"Content-Type: application/json\" -u 'YOUR_API_TOKEN:' \\\n-d '{\"contact_uid\":\"123456\", \"event_uid\" : \"pageview\", \"params\" : {\"account_uid\" : \"78910\", \"visit_url\" : \"http://myproduct.com/onboarding\" }'\\\n'https://api.successeve.com/v1/track/event'",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "rJJLvAjMcFcJ2jQ0mESEw"
  },
  "results": {
    "languages": [
      {
        "id": "SIEe5Lll7Vdzn0_mTsN-i",
        "language": "200",
        "customLabel": "",
        "code": "{status: \"success\"}"
      }
    ],
    "selectedLanguageId": "SIEe5Lll7Vdzn0_mTsN-i"
  },
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [
      {
        "name": "contact_uid",
        "kind": "required",
        "type": "string",
        "description": "Unique identifier referring to a contact, it must match a unique ID in your application like database ID or email address."
      },
      {
        "name": "event_uid",
        "kind": "optional",
        "type": "string",
        "description": "Event name in snake_case format.",
        "children": []
      },
      {
        "name": "params.account_uid",
        "kind": "optional",
        "type": "string",
        "description": "Account id is a link to an account",
        "children": []
      },
      {
        "name": "params.display_name",
        "kind": "optional",
        "type": "string",
        "description": "Human readable event name.",
        "children": []
      }
    ],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  }
}
```
:::

