Gainsight Custom Events API

Send custom events for tracking

Business capability
Product Telemetry Instrumentation BC-4280.10

Operations 3

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /custom_events Track a custom event for a user · Gainsight Send a custom event #
Ask an LLM
“How do I send a custom product event, like 'report exported', for one of my users?”
“Can I attach the page URL and custom attributes to a tracked event?”
Tell an agent
Send custom event {eventName} for user {identifyId}.
Track event {eventName} for user {identifyId} on account {accountId} with attributes {attributes}.
GET /v1/events/custom List custom events · Get Custom events #
Ask an LLM
“Which custom events has a given user fired in a date range?”
“Can I filter recorded custom events by event name?”
Tell an agent
List custom events matching {filter}.
Show custom events recorded between {dateRangeStart} and {dateRangeEnd}.
POST /v1/events/custom Record a custom event with the v1 API · Create custom event #
Ask an LLM
“What does the v1 endpoint need to record a custom event with a product key and user type?”
“Can I tie a v1 custom event to a specific session?”
Tell an agent
Record v1 custom event {eventName} for user {identifyId} of type {userType} under product {propertyKey}.
Create a v1 custom event {eventName} in session {sessionId} for {identifyId} ({userType}, product {propertyKey}).

Documentation

📖
Documentation
https://support.gainsight.com/PX/API_for_Developers
📖
Authentication
https://support.gainsight.com/PX/API_for_Developers/02About/Authentication
📖
Documentation
https://support.gainsight.com/PX/API_for_Developers/APIs_for_Developers/PX_API
📖
Documentation
https://gainsightpx.docs.apiary.io/
📖
Documentation
https://support.gainsight.com/gainsight_nxt/API_and_Developer_Docs/Company_and_Relationship_API/Company_API_Documentation
📖
Authentication
https://support.gainsight.com/gainsight_nxt/API_and_Developer_Docs/Generate_REST_API/Generate_REST_API_Key
📖
Documentation
https://support.gainsight.com/gainsight_nxt/API_and_Developer_Docs/Person_API/People_API_Documentation
📖
Documentation
https://support.gainsight.com/gainsight_nxt/API_and_Developer_Docs/Custom_Object_API/Gainsight_Custom_Object_API_Documentation
📖
Documentation
https://support.gainsight.com/gainsight_nxt/API_and_Developer_Docs/Cockpit_API/Call_To_Action_(CTA)_API_Documentation
📖
Documentation
https://support.gainsight.com/gainsight_nxt/API_and_Developer_Docs/Timeline_API/Timeline_APIs
📖
Documentation
https://support.gainsight.com/gainsight_nxt/API_and_Developer_Docs/Success_Plan_APIs/Success_Plan_APIs
📖
Documentation
https://support.gainsight.com/gainsight_nxt/API_and_Developer_Docs/Data_Management_APIs/Data_Management_APIs
📖
Documentation
https://support.gainsight.com/gainsight_nxt/API_and_Developer_Docs/Bulk_API/Gainsight_Bulk_REST_APIs
📖
Documentation
https://support.gainsight.com/gainsight_nxt/API_and_Developer_Docs/Bulk_API/Gainsight_Bulk_API
📖
Documentation
https://support.gainsight.com/gainsight_nxt/API_and_Developer_Docs/Events_API/Events_API
📖
Documentation
https://support.gainsight.com/gainsight_nxt/API_and_Developer_Docs/User_Management_APIs/User_Management_APIs
📖
Documentation
https://support.gainsight.com/gainsight_nxt/API_and_Developer_Docs/User_Management_APIs/SCIM_API
📖
Documentation
https://support.gainsight.com/gainsight_nxt/API_and_Developer_Docs/User_Management_APIs/API_for_Company_Team_Record
📖
Documentation
https://support.gainsight.com/gainsight_nxt/API_and_Developer_Docs/Customer_Goals_API/Customer_Goals_APIs
📖
Documentation
https://support.gainsight.com/gainsight_nxt/API_and_Developer_Docs/Renewal_Center_API/Renewal_Center_API
📖
Documentation
https://support.gainsight.com/gainsight_nxt/API_and_Developer_Docs/Cockpit_API/Task_APIs

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/gainsight:gainsight-custom-events-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

gainsight-custom-events-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Gainsight Custom Events API
  version: '1.0'
  description: 'Operations tagged Custom Events across 2 of this provider''s published API definitions: gainsight-px-api-openapi.yml, gainsight-custom-events-api-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.aptrinsic.com/v1
  description: Gainsight PX Production API
- url: https://api.aptrinsic.com/
tags:
- name: Custom Events
  description: Send custom events for tracking
paths:
  /custom_events:
    post:
      operationId: sendCustomEvent
      summary: Gainsight Send a custom event
      description: Send a custom event for a user to track specific interactions.
      tags:
      - Custom Events
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomEvent'
      responses:
        '200':
          description: Event sent successfully
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
      security:
      - apiKey: []
    servers:
    - url: https://api.aptrinsic.com/v1
      description: Gainsight PX Production API
  /v1/events/custom:
    servers:
    - url: https://api.aptrinsic.com/
    get:
      tags:
      - Custom Events
      summary: Get Custom events
      description: 'Retrieves custom events. Supports filtering, sorting and paging.

        ### Filtering

        The filter parameter accepts a list of semicolon-separated filters in the form: {fieldName}{operator}{fieldValue}

        Filter terms within a single filter parameter are joined by a logical AND.

        Separate filter parameters are joined by a logical OR.

        #### Supported filter fields

        | Field |

        | ----- |

        | identifyId |

        | eventName |

        | date |


        #### Operators

        | Operator | Meaning |

        | ----- | -------- |

        | == | Exact match |

        | != | Not equal |

        | | Greater than |

        | >= | Greater than or equal |

        | ~ | Matches string, supports wildcard characters * and ? |

        | !~ | Not like, supports wildcard characters * and ? |


        Examples:


        | URI | Results |

        | ----- | -------- |

        | GET /v1/events/custom?filter=identifyId==ABC123 | Custom event matches for user with identifyId of ''ABC123''. |


        ### Sorting

        The sort parameter accepts a list of semi-colon separated fields names, each with an optional dash to imply descending sort order.

        #### Supported sort fields

        | Field |

        | ----- |

        | accountId |

        | date |


        Examples:


        | URI | Results |

        | ----- | -------- |

        | GET /v1/events/custom?sort=-date | Matches sorted by date descending. |'
      operationId: getCustomEventsUsingGET
      parameters:
      - name: dateRangeEnd
        in: query
        description: Date range end
        required: false
        allowEmptyValue: false
        x-example: dateRangeEnd=12345678
        schema:
          type: string
      - name: dateRangeStart
        in: query
        description: Date range start
        required: false
        allowEmptyValue: false
        x-example: dateRangeStart=12345678
        schema:
          type: string
      - name: filter
        in: query
        description: Filters
        required: false
        allowEmptyValue: false
        style: form
        explode: true
        schema:
          type: array
          items:
            type: string
      - name: pageSize
        in: query
        description: Number of events per page
        required: false
        allowEmptyValue: false
        schema:
          type: integer
          format: int32
          default: 25
          maximum: 1000
          minimum: 1
      - name: scrollId
        in: query
        description: Used for fetching subsequent pages after the first one.  Returned in response.scrollId
        required: false
        allowEmptyValue: false
        schema:
          type: string
      - name: sort
        in: query
        description: Sort fields
        required: false
        allowEmptyValue: false
        x-example: sort=-date;accountId
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/CustomEventsPage'
        '400':
          description: Bad request
        '401':
          description: Unauthorized or bad API Key
        '429':
          description: Rate limit exceeded
      deprecated: false
    post:
      tags:
      - Custom Events
      summary: Create custom event
      description: Creates custom event with the given data
      operationId: createCustomEventUsingPOST
      responses:
        '201':
          description: Create custom events
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ResponseEntity'
        '400':
          description: Bad request
        '401':
          description: Unauthorized or bad API Key
        '429':
          description: Rate limit exceeded
        '500':
          description: Internal error
      deprecated: false
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomEvent_2'
        description: Custom event data
        required: true
components:
  responses:
    BadRequest:
      description: Invalid request body or parameters
    Unauthorized:
      description: Authentication failed or API key is missing
  schemas:
    CustomEvent:
      type: object
      required:
      - identifyId
      - eventName
      properties:
        identifyId:
          type: string
          description: User identification string
        accountId:
          type: string
          description: Account identifier
        eventName:
          type: string
          description: Name of the custom event
        date:
          type: integer
          format: int64
          description: Event timestamp in milliseconds
        attributes:
          type: object
          description: Custom event attributes
        url:
          type: string
          description: URL where the event occurred
        referrer:
          type: string
          description: Referrer URL
    ResponseEntity:
      type: object
      properties:
        body:
          type: object
        statusCode:
          type: string
          enum:
          - '100'
          - '101'
          - '102'
          - '103'
          - '200'
          - '201'
          - '202'
          - '203'
          - '204'
          - '205'
          - '206'
          - '207'
          - '208'
          - '226'
          - '300'
          - '301'
          - '302'
          - '303'
          - '304'
          - '305'
          - '307'
          - '308'
          - '400'
          - '401'
          - '402'
          - '403'
          - '404'
          - '405'
          - '406'
          - '407'
          - '408'
          - '409'
          - '410'
          - '411'
          - '412'
          - '413'
          - '414'
          - '415'
          - '416'
          - '417'
          - '418'
          - '419'
          - '420'
          - '421'
          - '422'
          - '423'
          - '424'
          - '426'
          - '428'
          - '429'
          - '431'
          - '451'
          - '500'
          - '501'
          - '502'
          - '503'
          - '504'
          - '505'
          - '506'
          - '507'
          - '508'
          - '509'
          - '510'
          - '511'
        statusCodeValue:
          type: integer
          format: int32
      title: ResponseEntity
    CustomEvent_2:
      type: object
      required:
      - eventName
      - identifyId
      - propertyKey
      - userType
      properties:
        eventId:
          type: string
        identifyId:
          type: string
        propertyKey:
          type: string
        date:
          type: integer
          format: int64
        eventType:
          type: string
        sessionId:
          type: string
        userType:
          type: string
          enum:
          - LEAD
          - USER
          - VISITOR
          - EMPTY_USER_TYPE
        accountId:
          type: string
        globalContext:
          type: object
        eventName:
          type: string
        attributes:
          type: object
        url:
          type: string
        referrer:
          type: string
        remoteHost:
          type: string
      title: CustomEvent
      description: Custom Event object
    CustomEventsPage:
      type: object
      properties:
        customEvents:
          type: array
          description: Array of custom events
          readOnly: true
          items:
            $ref: '#/components/schemas/CustomEvent_2'
        totalHits:
          type: integer
          format: int64
          description: Total number of records matching filters
          readOnly: true
        scrollId:
          type: string
          description: If passed on subsequent requests as the scrollId parameter, will fetch the next page
          readOnly: true
      title: CustomEventsPage
  securitySchemes:
    apiKey:
      type: apiKey
      name: X-APTRINSIC-API-KEY
      in: header
      description: Gainsight PX API key
    X-APTRINSIC-API-KEY:
      type: apiKey
      name: Aptrinsic API Key
      in: header
externalDocs:
  description: Gainsight PX API Documentation
  url: https://support.gainsight.com/PX/API_for_Developers/APIs_for_Developers/PX_API
x-refined-from:
- gainsight-px-api-openapi.yml
- gainsight-custom-events-api-openapi.yml