Common endpoints

Create connection

Creates a connection.

For connectors that require authorization, follow these steps to create the connection:

  1. Get the authorization URL and redirect the user to it.
  2. Once the user grants permission, get the authorization token.
  3. Create the connection by passing the auth token as the authToken argument.

Request

  • name

    string Required

    The connection's name.

    Must be a non-empty string with a maximum of 60 characters.
  • role

    string Required

    Indicates if the connection is a data source or a data destination.

    Possible values: "Source" or "Destination".
  • connector

    string Required

    The code of the connector for which to create the connection. It can be an application, database, file storage, SDK, or webhook connector, but cannot be a file connector or a message broker connector.

    Message broker connectors will be available soon.

  • strategy

    nullable string Conditionally Required

    The strategy for anonymous users. It is required and can only be provided for source SDK connections that use them.

    Possible values: "Conversion", "Fusion", "Isolation" or "Preservation".
  • linkedConnections

    array of int

    The IDs of the connections to which events are sent or from which events are received.

    For source connections (SDK and webhook), the linked connections are the destination application connections to which received events are forwarded. Conversely, for destination application connections, the linked connections are the source SDK and webhook connections from which events are received.

    Optional: This field is present only in pipelines that import events or send events to applications.

  • settings

    nullable object with json values Conditionally Required

    The specific settings of the connection, which vary based on the connector specified in the connector field.

    Please refer to the page that documents the settings for each connector type.

  • authToken

    string Conditionally Required

    The authorization token. Is required if the connector requires authorization.

Response

  • id

    int

    The ID of the connection.

POST /v1/connections
curl https://example.com/v1/connections \
-H "Authorization: Bearer api_xxxxxxx" \
--json '{
"name": "Website",
"role": "Source",
"connector": "javascript",
"strategy": "Conversion",
"linkedConnections": [
529774388,
1432985021
],
"settings": null
}'
Response
{
  "id": 1371036433
}
Errors
404
workspace does not exist
422
connector does not exist
422
linked connection does not exist
422
settings are not valid

Get authorization URL

⚠ Experimental: OAuth support is experimental and credentials are not encrypted. See the Set up OAuth page for more information.

Gets the URL for an application connector that directs to the authorization page of the application.

Request

  • connector

    string Required

    The connector's code. It must be an application connector that requires authorization.

  • role

    string Required

    The role for which to request authorization.

    Possible values: "Source" or "Destination".
  • redirectURI

    string Required

    The URL to which redirect after granting permissions.

Response

  • authUrl

    string

    The authorization URL that directs to the consent page of the application. This page requests explicit permissions for the role.

GET /v1/connections/auth-url
curl -G https://example.com/v1/connections/auth-url \
-H "Authorization: Bearer api_xxxxxxx" \
-d "connector=sample-oauth-app" \
-d "role=Source" \
-d "redirectURI=https%3a%2f%2fexample.com%2fgranted"
Response
{
  "authUrl": "https://login.sample-oauth-app.com/authorize"
}
Errors
404
connector does not exist

Get authorization token

⚠ Experimental: OAuth support is experimental and credentials are not encrypted. See the Set up OAuth page for more information.

Get an authorization token that can be used to create a connection.

Request

  • connector

    string Required

    The name of the connector for which the connection will be created.

  • redirectURI

    string Required

    The URI where the user will be redirected after authorization.

  • authCode

    string Required

    The authorization code to complete the authorization process.

Response

  • authToken

    string

    The OAuth token that can be used to create a connection on the specified connector.

GET /v1/connections/auth-token
curl -G https://example.com/v1/connections/auth-token \
-H "Authorization: Bearer api_xxxxxxx" \
-d "connector=sample-oauth-app" \
-d "redirectURI=https%3a%2f%2fexample.com%2foauth" \
-d "authCode=8aa112345"
Response
{
  "authToken": "jK64q6Vu0DMoqpXm0M+/6qbZagaVipMsRZ"
}
Errors
404
workspace does not exist
422
connector does not exist

Update connection

Updates a connection.

Request

  • :id

    int Required

    The ID of the connection to update.

  • name

    string Required

    The connection's name.

    Must be a non-empty string with a maximum of 60 characters.
  • strategy

    nullable string Conditionally Required

    The strategy for anonymous users. It is required and can only be provided for source SDK connections that use them.

    Possible values: "Conversion", "Fusion", "Isolation" or "Preservation".
  • sendingMode

    nullable string Conditionally Required

    The mode for sending events. It can be one of the sending modes supported by the application.

    It is required and can only be provided with destination application connections that support it.

    Possible values: "Client", "Server" or "ClientAndServer".

Response

No response.
PUT /v1/connections/:id
curl -X PUT https://example.com/v1/connections/1371036433 \
-H "Authorization: Bearer api_xxxxxxx" \
--json '{
"name": "Website",
"strategy": "Conversion"
}'
Errors
404
workspace does not exist
404
connection does not exist

List connections

Returns the workspace's connections, sorted by name.

Request

No parameters.

Response

  • connections

    array of object
    • id

      int

      The ID of the connection.

    • name

      string

      The connection's name.

      It is not longer than 60 characters.
    • connector

      string

      The code of the connection's connector.

    • connectorType

      string

      The type of the connection's connector.

      Possible values: "Application", "Database", "FileStorage", "MessageBroker", "SDK" or "Webhook".
    • role

      string

      Indicates if the connection is a data source or a data destination.

      Possible values: "Source" or "Destination".
    • strategy

      nullable string

      The strategy for anonymous users. It is null if the connection is not an SDK source connection, or if the connection's connector does not support strategies.

      Possible values: "Conversion", "Fusion", "Isolation" or "Preservation".
    • sendingMode

      nullable string

      The mode for sending events. It is null if the connection is not a destination application that supports sending mode.

      Possible values: "Client", "Server" or "ClientAndServer".
    • linkedConnections

      array of int Optional

      The IDs of the connections to which events are sent or from which events are received.

      For source connections (SDK and webhook), the linked connections are the destination application connections to which received events are forwarded. Conversely, for destination application connections, the linked connections are the source SDK and webhook connections from which events are received.

      Optional: This field is present only in pipelines that import events or send events to applications.

    • pipelines

      array of object

      The pipelines of the connection. Empty if the connection has none.

      • id

        int

        The ID of the pipeline.

      • name

        string

        The pipeline's name.

        It is not longer than 60 characters.
      • connector

        string

        The code of the connection's connector.

      • connectorType

        string

        The type of the connection's connector.

        Possible values: "Application", "Database", "FileStorage", "MessageBroker", "SDK" or "Webhook".
      • connection

        int

        The ID of the connection.

      • connectionRole

        string

        The role of the pipeline's connection.

        Possible values: "Source" or "Destination".
      • target

        string

        The entity on which the pipeline operates.

        Possible values: "User" or "Event".
      • enabled

        boolean

        Indicates if the pipeline is enabled.

      • query

        string Optional

        The SELECT query executed on the database to retrieve the users to import.

        Optional: This field is present only for pipelines that import users from a database.

        It is not longer than 1000 characters.
      • userIDColumn

        string Optional

        The column in the database or file that uniquely identifies each user in the connection.

        Optional: This field is present only for pipelines that import users from databases or files.

      • updatedAtColumn

        nullable string Optional

        The column that stores the timestamp of the last update to a user record. It is null if no such column exists.

        Optional: This field is present only for pipelines that import users from databases or files.

      • updatedAtFormat

        nullable string Optional

        The format of the value in the update time column. It is null if no such column exists or if the corresponding Krenalis type is datetime or date.

        It is "ISO8601" if the column value follows the ISO 8601 format. Otherwise, it follows the format accepted by the Python strftime function.

        Optional: This field is present only for pipelines that import users from databases or files.

      • format

        string Optional

        The file format. It corresponds to the code of a file connector.

        Optional: This field is present only for pipelines that import users from a file or export profiles to a file.

        Possible values: "csv", "excel", "parquet" or "json".
      • path

        string Optional

        The file path relative to the root path defined in the file storage connection. Refer to the file storage connector documentation for details on the specific format.

        Optional: This field is present only for pipelines that import users from a file or export profiles to a file.

        It is not longer than 1024 characters.
      • sheet

        nullable string Optional

        The name of the sheet. It is empty if the format is not "excel".

        Optional: This field is present only for pipelines that import users from a file or export profiles to a file.

      • compression

        string Optional

        The compression format of the file. It is empty if the file is not compressed.

        Optional: This field is present only for pipelines that import users from a file or export profiles to a file.

        Possible values: "", "Zip", "Gzip" or "Snappy".
      • orderBy

        string Optional

        The property path by which profiles will be ordered in the exported file.

        Optional: This field is present only for pipelines that export profiles to a file.

        It is not longer than 1024 characters.
      • eventType

        string Optional

        The pipeline's event type.

        Optional: This field is present only for pipelines that send events to applications.

        It is not longer than 100 characters.
      • filter

        nullable object Optional

        The filter applied to the application users. If it's not null, only the application users that match the filter will be included, otherwise all users will be included.

        See the filters documentation for more details.

        Optional: This field is not present for pipelines that import users from a database.

        • filter.logical

          string Possible values: "and" or "or".
        • filter.conditions

          array of object

          A filter's condition.

          • property

            string

            The name or path of the property. If the property has a json type, it can include a json path.

          • operator

            string

            The condition's operator. The allowed values depend on the property's type.

            Possible values: "is", "is not", "is less than", "is less than or equal to", "is greater than", "is greater than or equal to", "is between", "is not between", "contains", "does not contain", "is one of", "is not one of", "starts with", "ends with", "is before", "is on or before", "is after", "is on or after", "is true", "is false", "is empty", "is not empty", "is null", "is not null", "exists" or "does not exist".
          • values

            array of string

            The values the operator applies to, if any. These depend on both the operator and the property's type, including whether they're present and how many there are.

      • incremental

        boolean Optional

        Indicates whether users are imported incrementally:

        • true: imports only users who were created or updated since the last import.
        • false: imports all users, regardless of previous imports.

        Optional: This field is present only for pipelines that import users from applications, databases, or files.

      • matching

        object Optional

        The properties used to identify the match between a profile in the workspace and a user in the application. These properties determine which users should be updated and which should be created as new in the application.

        Optional: This field is present only for pipelines that export profiles to applications.

        • matching.in

          string

          The matching input property.

          It represents the name of the property in the profile schema. Its definition is included in the pipeline's input schema.

        • matching.out

          string

          The matching output property.

          It represents the name of the property in the application's profile schema. Its definition is included in the pipeline's output schema.

      • exportMode

        string Optional

        The mode in which profiles are exported:

        • "CreateOnly": Only new users are created in the application. No existing users are modified.
        • "UpdateOnly": Only existing users are updated in the application. No new users are created.
        • "CreateOrUpdate": If a user already exists in the application, they are updated; otherwise, they are created as a new user.

        Optional: This field is present only for pipelines that export profiles to applications.

        Possible values: "CreateOnly", "UpdateOnly" or "CreateOrUpdate".
      • updateOnDuplicates

        boolean Optional

        Determines whether, when multiple application users match a single profile in the workspace's data warehouse, they should still be updated.

        If set to true, the update will proceed regardless of duplicates, otherwise the duplicated users will not be updated, and an error will be logged.

        This field does not affect user creation.

        Optional: This field is present only for pipelines that export profiles to applications.

      • tableName

        string Optional

        The name of the table where the profiles are exported.

        Optional: This field is present only for pipelines that export profiles to databases.

        It is not longer than 1024 characters.
      • tableKey

        string Optional

        The name of the table column that contains a value identifying a user within the table.

        Typically, this is the column used as the table's primary key. However, it can also be a column with a unique constraint, or one that is guaranteed to contain only unique values.

        If a row with the same value in this column already exists, it will be updated; otherwise, a new row will be created for the exported profile.

        The type of this column must match one of the following Krenalis types: string, int, or uuid.

        Optional: This field is present only for pipelines that export profiles to databases.

      • transformation

        nullable object Optional

        The mapping or function responsible for transforming users or events.

        It is null when the pipeline does not apply any transformation. This may occur in pipelines that import users through events, as well as in pipelines that send events to applications.

        When this field is present and not null, one of either a mapping or a function is present, but not both. The one that is not present is null.

        Optional: This field is not present for pipelines that collect events or for pipelines that export profiles to files.

        • transformation.mapping

          nullable object with string values

          The transformation mapping. A key represents a property path in the profile schema, and its corresponding value is an expression. This expression can reference property paths from the source schema of the application.

        • transformation.function

          nullable object

          The transformation function. A JavaScript or Python function that given an application user, returns an identity.

          • transformation.function.source

            string

            The source code of the JavaScript or Python function.

            It is not longer than 50000 characters.
          • transformation.function.language

            string

            The language of the function.

            Possible values: "JavaScript" or "Python".
          • transformation.function.preserveJSON

            boolean

            Specifies whether JSON values are passed to and present from the function as strings, keeping their original format without any encoding or decoding.

          • transformation.function.inPaths

            array of string

            The paths of the properties that will be passed to the function. It contains at least one property path.

          • transformation.function.outPaths

            array of string

            The paths of the properties that may be present by the function. It contains at least one property path.

      • inSchema

        schema Optional

        The input schema.

        Optional: This field is not present for pipelines that collect events.

      • outSchema

        schema Optional

        The output schema.

        Optional: This field is not present for pipelines that collect events or export profiles to a file.

      • running

        boolean Optional

        Indicates if the pipeline is running.

        Optional: This field is present only for pipelines that import users or export profiles in batch.

      • scheduleStart

        nullable int Optional

        The start time of the schedule in minutes, counting from 00:00. It specifies the minute when the first scheduled execution of the day begins. Subsequent executions occur based on the interval defined by the scheduler period. If the scheduler is disabled, this value is null.

        Optional: This field is present only for pipelines that import users or export profiles in batch.

      • schedulePeriod

        nullable string Optional

        The schedule period, which determines how often an import or export runs automatically. If it is null, the scheduler is disabled, and no automatic executions will occur.

        To change the schedule period, use the Set schedule period endpoint.

        Optional: This field is present only for pipelines that import users or export profiles in batch.

        Possible values: "5m", "15m", "30m", "1h", "2h", "3h", "6h", "8h", "12h" or "24h".
GET /v1/connections
curl https://example.com/v1/connections \
-H "Authorization: Bearer api_xxxxxxx"
Response
{
  "connections": [
    {
      "id": 1371036433,
      "name": "Website",
      "connector": "javascript",
      "connectorType": "SDK",
      "role": "Source",
      "strategy": "Conversion",
      "sendingMode": "Server",
      "linkedConnections": [
        529774388,
        1432985021
      ],
      "pipelines": [
        {
          "id": 705981339,
          "name": "Collect track events",
          "connector": "javascript",
          "connectorType": "SDK",
          "connection": 1371036433,
          "connectionRole": "Source",
          "target": "Event",
          "filter": {
            "logical": "and",
            "conditions": [
              {
                "property": "type",
                "operator": "is",
                "values": [
                  "track"
                ]
              }
            ]
          }
        }
      ]
    }
  ]
}
Errors
404
workspace does not exist

Get connection

Gets a connection.

Request

  • :id

    int Required

    The ID of the connection.

Response

  • id

    int

    The ID of the connection.

  • name

    string

    The connection's name.

    It is not longer than 60 characters.
  • connector

    string

    The code of the connection's connector.

  • connectorType

    string

    The type of the connection's connector.

    Possible values: "Application", "Database", "FileStorage", "MessageBroker", "SDK" or "Webhook".
  • role

    string

    Indicates if the connection is a data source or a data destination.

    Possible values: "Source" or "Destination".
  • strategy

    nullable string

    The strategy for anonymous users. It is null if the connection is not an SDK source connection, or if the connection's connector does not support strategies.

    Possible values: "Conversion", "Fusion", "Isolation" or "Preservation".
  • sendingMode

    nullable string

    The mode for sending events. It is null if the connection is not a destination application that supports sending mode.

    Possible values: "Client", "Server" or "ClientAndServer".
  • linkedConnections

    array of int Optional

    The IDs of the connections to which events are sent or from which events are received.

    For source connections (SDK and webhook), the linked connections are the destination application connections to which received events are forwarded. Conversely, for destination application connections, the linked connections are the source SDK and webhook connections from which events are received.

    Optional: This field is present only in pipelines that import events or send events to applications.

  • pipelines

    array of object

    The pipelines of the connection. Empty if the connection has none.

    • id

      int

      The ID of the pipeline.

    • name

      string

      The pipeline's name.

      It is not longer than 60 characters.
    • connector

      string

      The code of the connection's connector.

    • connectorType

      string

      The type of the connection's connector.

      Possible values: "Application", "Database", "FileStorage", "MessageBroker", "SDK" or "Webhook".
    • connection

      int

      The ID of the connection.

    • connectionRole

      string

      The role of the pipeline's connection.

      Possible values: "Source" or "Destination".
    • target

      string

      The entity on which the pipeline operates.

      Possible values: "User" or "Event".
    • enabled

      boolean

      Indicates if the pipeline is enabled.

    • query

      string Optional

      The SELECT query executed on the database to retrieve the users to import.

      Optional: This field is present only for pipelines that import users from a database.

      It is not longer than 1000 characters.
    • userIDColumn

      string Optional

      The column in the database or file that uniquely identifies each user in the connection.

      Optional: This field is present only for pipelines that import users from databases or files.

    • updatedAtColumn

      nullable string Optional

      The column that stores the timestamp of the last update to a user record. It is null if no such column exists.

      Optional: This field is present only for pipelines that import users from databases or files.

    • updatedAtFormat

      nullable string Optional

      The format of the value in the update time column. It is null if no such column exists or if the corresponding Krenalis type is datetime or date.

      It is "ISO8601" if the column value follows the ISO 8601 format. Otherwise, it follows the format accepted by the Python strftime function.

      Optional: This field is present only for pipelines that import users from databases or files.

    • format

      string Optional

      The file format. It corresponds to the code of a file connector.

      Optional: This field is present only for pipelines that import users from a file or export profiles to a file.

      Possible values: "csv", "excel", "parquet" or "json".
    • path

      string Optional

      The file path relative to the root path defined in the file storage connection. Refer to the file storage connector documentation for details on the specific format.

      Optional: This field is present only for pipelines that import users from a file or export profiles to a file.

      It is not longer than 1024 characters.
    • sheet

      nullable string Optional

      The name of the sheet. It is empty if the format is not "excel".

      Optional: This field is present only for pipelines that import users from a file or export profiles to a file.

    • compression

      string Optional

      The compression format of the file. It is empty if the file is not compressed.

      Optional: This field is present only for pipelines that import users from a file or export profiles to a file.

      Possible values: "", "Zip", "Gzip" or "Snappy".
    • orderBy

      string Optional

      The property path by which profiles will be ordered in the exported file.

      Optional: This field is present only for pipelines that export profiles to a file.

      It is not longer than 1024 characters.
    • eventType

      string Optional

      The pipeline's event type.

      Optional: This field is present only for pipelines that send events to applications.

      It is not longer than 100 characters.
    • filter

      nullable object Optional

      The filter applied to the application users. If it's not null, only the application users that match the filter will be included, otherwise all users will be included.

      See the filters documentation for more details.

      Optional: This field is not present for pipelines that import users from a database.

      • filter.logical

        string Possible values: "and" or "or".
      • filter.conditions

        array of object

        A filter's condition.

        • property

          string

          The name or path of the property. If the property has a json type, it can include a json path.

        • operator

          string

          The condition's operator. The allowed values depend on the property's type.

          Possible values: "is", "is not", "is less than", "is less than or equal to", "is greater than", "is greater than or equal to", "is between", "is not between", "contains", "does not contain", "is one of", "is not one of", "starts with", "ends with", "is before", "is on or before", "is after", "is on or after", "is true", "is false", "is empty", "is not empty", "is null", "is not null", "exists" or "does not exist".
        • values

          array of string

          The values the operator applies to, if any. These depend on both the operator and the property's type, including whether they're present and how many there are.

    • incremental

      boolean Optional

      Indicates whether users are imported incrementally:

      • true: imports only users who were created or updated since the last import.
      • false: imports all users, regardless of previous imports.

      Optional: This field is present only for pipelines that import users from applications, databases, or files.

    • matching

      object Optional

      The properties used to identify the match between a profile in the workspace and a user in the application. These properties determine which users should be updated and which should be created as new in the application.

      Optional: This field is present only for pipelines that export profiles to applications.

      • matching.in

        string

        The matching input property.

        It represents the name of the property in the profile schema. Its definition is included in the pipeline's input schema.

      • matching.out

        string

        The matching output property.

        It represents the name of the property in the application's profile schema. Its definition is included in the pipeline's output schema.

    • exportMode

      string Optional

      The mode in which profiles are exported:

      • "CreateOnly": Only new users are created in the application. No existing users are modified.
      • "UpdateOnly": Only existing users are updated in the application. No new users are created.
      • "CreateOrUpdate": If a user already exists in the application, they are updated; otherwise, they are created as a new user.

      Optional: This field is present only for pipelines that export profiles to applications.

      Possible values: "CreateOnly", "UpdateOnly" or "CreateOrUpdate".
    • updateOnDuplicates

      boolean Optional

      Determines whether, when multiple application users match a single profile in the workspace's data warehouse, they should still be updated.

      If set to true, the update will proceed regardless of duplicates, otherwise the duplicated users will not be updated, and an error will be logged.

      This field does not affect user creation.

      Optional: This field is present only for pipelines that export profiles to applications.

    • tableName

      string Optional

      The name of the table where the profiles are exported.

      Optional: This field is present only for pipelines that export profiles to databases.

      It is not longer than 1024 characters.
    • tableKey

      string Optional

      The name of the table column that contains a value identifying a user within the table.

      Typically, this is the column used as the table's primary key. However, it can also be a column with a unique constraint, or one that is guaranteed to contain only unique values.

      If a row with the same value in this column already exists, it will be updated; otherwise, a new row will be created for the exported profile.

      The type of this column must match one of the following Krenalis types: string, int, or uuid.

      Optional: This field is present only for pipelines that export profiles to databases.

    • transformation

      nullable object Optional

      The mapping or function responsible for transforming users or events.

      It is null when the pipeline does not apply any transformation. This may occur in pipelines that import users through events, as well as in pipelines that send events to applications.

      When this field is present and not null, one of either a mapping or a function is present, but not both. The one that is not present is null.

      Optional: This field is not present for pipelines that collect events or for pipelines that export profiles to files.

      • transformation.mapping

        nullable object with string values

        The transformation mapping. A key represents a property path in the profile schema, and its corresponding value is an expression. This expression can reference property paths from the source schema of the application.

      • transformation.function

        nullable object

        The transformation function. A JavaScript or Python function that given an application user, returns an identity.

        • transformation.function.source

          string

          The source code of the JavaScript or Python function.

          It is not longer than 50000 characters.
        • transformation.function.language

          string

          The language of the function.

          Possible values: "JavaScript" or "Python".
        • transformation.function.preserveJSON

          boolean

          Specifies whether JSON values are passed to and present from the function as strings, keeping their original format without any encoding or decoding.

        • transformation.function.inPaths

          array of string

          The paths of the properties that will be passed to the function. It contains at least one property path.

        • transformation.function.outPaths

          array of string

          The paths of the properties that may be present by the function. It contains at least one property path.

    • inSchema

      schema Optional

      The input schema.

      Optional: This field is not present for pipelines that collect events.

    • outSchema

      schema Optional

      The output schema.

      Optional: This field is not present for pipelines that collect events or export profiles to a file.

    • running

      boolean Optional

      Indicates if the pipeline is running.

      Optional: This field is present only for pipelines that import users or export profiles in batch.

    • scheduleStart

      nullable int Optional

      The start time of the schedule in minutes, counting from 00:00. It specifies the minute when the first scheduled execution of the day begins. Subsequent executions occur based on the interval defined by the scheduler period. If the scheduler is disabled, this value is null.

      Optional: This field is present only for pipelines that import users or export profiles in batch.

    • schedulePeriod

      nullable string Optional

      The schedule period, which determines how often an import or export runs automatically. If it is null, the scheduler is disabled, and no automatic executions will occur.

      To change the schedule period, use the Set schedule period endpoint.

      Optional: This field is present only for pipelines that import users or export profiles in batch.

      Possible values: "5m", "15m", "30m", "1h", "2h", "3h", "6h", "8h", "12h" or "24h".
  • eventTypes

    nullable array of object

    The event types that can be sent to a destination application connection. It is null if the connection is not a destination connection of type Application or if it does not support events.

    To get the schema for the event type, call the Get event schema endpoint.

    • id

      string

      The event type ID, which uniquely identifies it in the context of the connection.

      It is not longer than 100 characters.
    • name

      string

      The name of the event type. It is human-readable, unlike id, and is suitable for showing to users—for example in a user interface.

    • description

      string

      The description of the event type.

    • filter

      string

      The recommended default filter for pipelines that send events to applications using this event type. For example:

      type is "track" and event is "Order Completed"

GET /v1/connections/:id
curl https://example.com/v1/connections/1371036433 \
-H "Authorization: Bearer api_xxxxxxx"
Response
{
  "id": 1371036433,
  "name": "Website",
  "connector": "javascript",
  "connectorType": "SDK",
  "role": "Source",
  "strategy": "Conversion",
  "sendingMode": "Server",
  "linkedConnections": [
    529774388,
    1432985021
  ],
  "pipelines": [
    {
      "id": 705981339,
      "name": "Collect track events",
      "connector": "javascript",
      "connectorType": "SDK",
      "connection": 1371036433,
      "connectionRole": "Source",
      "target": "Event",
      "filter": {
        "logical": "and",
        "conditions": [
          {
            "property": "type",
            "operator": "is",
            "values": [
              "track"
            ]
          }
        ]
      }
    }
  ]
}
Errors
404
workspace does not exist
404
connection does not exist

List connection identities

Retrieves, from the workspace's data warehouse, the identities of a connection.

Identities are sorted by update time, in descending order, so the most recently changed identities are returned first.

Request

  • :id

    int Required

    The ID of the connection. It must be a source connection.

  • first

    int

    The number of identities to skip before starting to return results. The default value is 0.

  • limit

    int

    The maximum number of identities to return. The value must be within the range [1, 1000].

Response

  • identities

    array of object

    The connection's identities. It is empty if the connection has no identities.

    • userId

      string Optional

      The unique identifier that represents the user in the source from which the identity was read. Specifically:

      • For SDK and webhook connections, it corresponds to the User ID of the event.
      • For an application connection, it is the value used to identify the user in the application. For example, in HubSpot's application, it corresponds to the HubSpot ID.
      • For a database or file storage connection, it is the value in the column designated as the identity.

      Optional: This field is not present for anonymous identities.

    • anonymousIds

      array of string Optional

      The anonymous IDs of the identity.

      Optional: This field is present only for identities imported from events.

    • connection

      int

      The ID of the connection through which the identity was read.

    • pipeline

      int

      The ID of the pipeline through which the identity was imported.

    • updatedAt

      datetime

      The date and time when the identity's attributes were last updated in the source.

  • total

    int

    The total number of identities for the connection.

GET /v1/connections/:id/identities
curl -G https://example.com/v1/connections/1371036433/identities \
-H "Authorization: Bearer api_xxxxxxx" \
-d "limit=3"
Response
{
  "identities": [
    {
      "userId": "b8c24mEpaxC",
      "connection": 1371036433,
      "pipeline": 932174586,
      "updatedAt": "2025-12-04 16:17:28.637905Z"
    },
    {
      "anonymousIds": [
        "9f60d802-903b-4d89-81b4-80ae1be56cd7"
      ],
      "connection": 1371036433,
      "pipeline": 932174586,
      "updatedAt": "2025-12-04 16:17:28.637902Z"
    },
    {
      "userId": "u7x49LpQm12",
      "anonymousIds": [
        "0b12df7a-22c4-4a34-a8f0-7e20b219bc11",
        "c41f8d90-55ae-4b19-9b8d-2c5c77ce905c"
      ],
      "connection": 1371036433,
      "pipeline": 1083375521,
      "updatedAt": "2025-12-04 16:17:28.637897Z"
    }
  ],
  "total": 534081
}
Errors
404
workspace does not exist
404
connection does not exist
422
data warehouse is in maintenance mode

Delete connection

Deletes a connection.

Request

  • :id

    int Required

    The ID of the connection.

Response

No response.
DELETE /v1/connections/:id
curl -X DELETE https://example.com/v1/connections/1371036433 \
-H "Authorization: Bearer api_xxxxxxx"
Errors
404
workspace does not exist
404
connection does not exist