Gainsight Accounts API

Manage account records and attributes

Operations 11

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

GET /accounts List product accounts · Gainsight List accounts #
Ask an LLM
“How can I page through every account tracked in Gainsight PX?”
“Can I sort the account list by when each account was last seen?”
Tell an agent
List product accounts sorted by {sort}.
Show the next page of PX accounts using scroll ID {scrollId}.
POST /accounts Create or update a product account · Gainsight Create or update an account #
Ask an LLM
“How do I add a customer account to Gainsight PX, or overwrite it if it already exists?”
“Can one call both create a new PX account and upsert an existing one?”
Tell an agent
Upsert PX account {id} with the name {name}.
Create or update account {id} called {name} on the {plan} plan.
GET /accounts/{accountId} Get a product account · Gainsight Get an account #
Ask an LLM
“What does Gainsight PX currently store for a single account?”
“Where can I look up one PX account's plan and custom attributes?”
Tell an agent
Fetch PX account {accountId}.
Show me the details stored for account {accountId}.
PATCH /accounts/{accountId} Partially update a product account · Gainsight Update an account #
Ask an LLM
“Can I change just an account's plan without resending all its attributes?”
“How would I patch a single field on an existing PX account?”
Tell an agent
Patch account {accountId} so its plan is {plan}.
Change the Salesforce ID on account {accountId} to {sfdcId}.
DELETE /accounts/{accountId} Delete a product account · Gainsight Delete an account #
Ask an LLM
“Can I remove an account from Gainsight PX entirely?”
“Is there a way to delete a PX account by its ID?”
Tell an agent destructive · confirm first
Delete PX account {accountId}.
Remove account {accountId} from Gainsight PX.
GET /v1/accounts Filter accounts with the v1 API · Get accounts #
Ask an LLM
“Which accounts match a filter such as industry equals software in the v1 accounts API?”
“Does the v1 account listing support semicolon-separated filter expressions?”
Tell an agent
Get v1 accounts matching the filter {filter}.
Pull {pageSize} accounts per page from the v1 endpoint.
POST /v1/accounts Create an account with product tag keys · Create account #
Ask an LLM
“What do I need to create a v1 account, and why does it ask for a property key?”
“Can I set health score, renewal date and industry when creating a v1 account?”
Tell an agent
Create v1 account {id} named {name} under product key {propertyKeys}.
Add account {id} called {name} for tag {propertyKeys} with renewal date {renewalDate}.
PUT /v1/accounts/update Update an account whose ID has special characters · Update account (accountId passed via request body) #
Ask an LLM
“My account ID contains slashes, so how can I update it without putting it in the URL?”
“Is there an update route that takes the account ID in the body instead of the path?”
Tell an agent
Update account {id} (ID passed in the body) with name {name} and product key {propertyKeys}.
Set the health score of body-identified account {id} to {healthScore}, keeping name {name} and key {propertyKeys}.
GET /v1/accounts/{accountId} Get an account with the v1 API · Get account #
Ask an LLM
“Can I fetch one account's full v1 record, including NPS and CSM?”
“What fields come back when I retrieve a single account from the v1 endpoint?”
Tell an agent
Retrieve v1 account {accountId}.
Look up the v1 record for account {accountId}, including its health score.
PUT /v1/accounts/{accountId} Replace an account's data by ID in the path · Update account #
Ask an LLM
“How do I overwrite a v1 account's record when I have a clean account ID for the URL?”
“Can I update the number of employees on an account through the v1 API?”
Tell an agent
Replace v1 account {accountId} with name {name}, ID {id} and product key {propertyKeys}.
Update v1 account {accountId}: set employees to {numberOfEmployees}, id {id}, name {name}, key {propertyKeys}.
DELETE /v1/accounts/{accountId} Delete an account and all its users · Delete account #
Ask an LLM
“Does deleting a v1 account also delete the users attached to it?”
“How can I wipe an account along with every user under it?”
Tell an agent destructive · confirm first
Delete v1 account {accountId} and cascade to its users.
Permanently remove account {accountId} and all associated users.

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

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-accounts-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-accounts-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Gainsight Accounts API
  version: '1.0'
  description: 'Operations tagged Accounts across 2 of this provider''s published API definitions: gainsight-px-api-openapi.yml, gainsight-accounts-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: Accounts
  description: Manage account records and attributes
paths:
  /accounts:
    get:
      operationId: listAccounts
      summary: Gainsight List accounts
      description: Retrieve a paginated list of accounts in Gainsight PX.
      tags:
      - Accounts
      parameters:
      - $ref: '#/components/parameters/pageSize'
      - $ref: '#/components/parameters/scrollId'
      - $ref: '#/components/parameters/sort'
      - $ref: '#/components/parameters/filter'
      responses:
        '200':
          description: Accounts retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/Account'
                  scrollId:
                    type: string
                  totalHits:
                    type: integer
        '401':
          $ref: '#/components/responses/Unauthorized'
      security:
      - apiKey: []
    post:
      operationId: createAccount
      summary: Gainsight Create or update an account
      description: Create a new account or update an existing account.
      tags:
      - Accounts
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountInput'
      responses:
        '200':
          description: Account created or updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Account'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
      security:
      - apiKey: []
    servers:
    - url: https://api.aptrinsic.com/v1
      description: Gainsight PX Production API
  /accounts/{accountId}:
    get:
      operationId: getAccount
      summary: Gainsight Get an account
      description: Retrieve a specific account by ID.
      tags:
      - Accounts
      parameters:
      - $ref: '#/components/parameters/accountId'
      responses:
        '200':
          description: Account details returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Account'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
      - apiKey: []
    patch:
      operationId: updateAccount
      summary: Gainsight Update an account
      description: Update specific attributes of an account.
      tags:
      - Accounts
      parameters:
      - $ref: '#/components/parameters/accountId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountInput'
      responses:
        '200':
          description: Account updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Account'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
      - apiKey: []
    delete:
      operationId: deleteAccount
      summary: Gainsight Delete an account
      description: Delete an account from Gainsight PX.
      tags:
      - Accounts
      parameters:
      - $ref: '#/components/parameters/accountId'
      responses:
        '204':
          description: Account deleted
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
      - apiKey: []
    servers:
    - url: https://api.aptrinsic.com/v1
      description: Gainsight PX Production API
  /v1/accounts:
    servers:
    - url: https://api.aptrinsic.com/
    get:
      tags:
      - Accounts
      summary: Get accounts
      description: 'Retrieves accounts. 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.

        #### 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/accounts?filter=sicCode==64;numberOfEmployees>25 | Accounts with sicCode of 64 and more than 25 employees. |

        | GET /v1/accounts?filter=sicCode==64;numberOfEmployees>25&filter=sicCode==63;numberOfEmployees>3000 | Accounts with: (sicCode of 64 AND more than 25 employees) OR (sicCode of 63 AND more than 3000 employees). |

        | GET /v1/accounts?filter=location.cityName==Portland | Accounts with a city of ''Portland''. |

        | GET /v1/accounts?filter=customAttributes.internalId==12345 | Accounts with a custom attribute of internalId equal to 12345''. |


        ### Sorting

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

        Examples:


        | URI | Results |

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

        | GET /v1/accounts?sort=name;location.stateCode | Accounts sorted by name and state code in ascending order. |

        | GET /v1/accounts?sort=-createDate | Accounts sorted by createDate in descending order. |'
      operationId: getAccountsUsingGET
      parameters:
      - 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 accounts 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
        required: false
        allowEmptyValue: false
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/AccountsPage'
        '400':
          description: Bad request
        '401':
          description: Unauthorized or bad API Key
        '429':
          description: Rate limit exceeded
      deprecated: false
    post:
      tags:
      - Accounts
      summary: Create account
      description: Creates a new account with the given data
      operationId: createAccountUsingPOST
      responses:
        '201':
          description: Created Account
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ResponseEntity'
        '400':
          description: Bad request, possible duplicate
        '401':
          description: Unauthorized or bad API Key
        '429':
          description: Rate limit exceeded
      deprecated: false
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Account_2'
        description: Account data
        required: true
  /v1/accounts/update:
    servers:
    - url: https://api.aptrinsic.com/
    put:
      tags:
      - Accounts
      summary: Update account (accountId passed via request body)
      description: 'Updates an account with accountId specified in the request body.

        This update method is useful when the account ID contains special characters that make it impossible to use the update method with the accountId in the request path.'
      operationId: updateAccountUsingPUT
      responses:
        '204':
          description: Updated
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ResponseEntity'
        '401':
          description: Unauthorized or bad API Key
        '404':
          description: Account not found
        '429':
          description: Rate limit exceeded
      deprecated: false
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Account_2'
        description: Account data
        required: true
  /v1/accounts/{accountId}:
    servers:
    - url: https://api.aptrinsic.com/
    get:
      tags:
      - Accounts
      summary: Get account
      description: Retrieves the account with the given id
      operationId: getAccountUsingGET
      parameters:
      - name: accountId
        in: path
        description: Account id
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Account_2'
        '400':
          description: Bad request
        '401':
          description: Unauthorized or bad API Key
        '404':
          description: Account not found
        '429':
          description: Rate limit exceeded
      deprecated: false
    put:
      tags:
      - Accounts
      summary: Update account
      description: Updates an account with the given data
      operationId: updateAccountUsingPUT_1
      parameters:
      - name: accountId
        in: path
        description: Account id
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Updated
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ResponseEntity'
        '401':
          description: Unauthorized or bad API Key
        '404':
          description: Account not found
        '429':
          description: Rate limit exceeded
      deprecated: false
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Account_2'
        description: Account data
        required: true
    delete:
      tags:
      - Accounts
      summary: Delete account
      description: 'Deletes Account

        Note: Performs a cascading delete of all users associated with the account'
      operationId: deleteAccountUsingDELETE
      parameters:
      - name: accountId
        in: path
        description: Account id
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Deleted
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ResponseEntity'
        '204':
          description: No Content
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ResponseEntity'
        '401':
          description: Unauthorized or bad API Key
        '404':
          description: Account not found
        '429':
          description: Rate limit exceeded
      deprecated: false
components:
  parameters:
    scrollId:
      name: scrollId
      in: query
      description: Scroll ID for cursor-based pagination
      schema:
        type: string
    filter:
      name: filter
      in: query
      description: Filter expression for results
      schema:
        type: string
    accountId:
      name: accountId
      in: path
      required: true
      description: Unique account identifier
      schema:
        type: string
    sort:
      name: sort
      in: query
      description: Sort field and direction (e.g., lastSeenDate:desc)
      schema:
        type: string
    pageSize:
      name: pageSize
      in: query
      description: Number of results per page
      schema:
        type: integer
        default: 20
        maximum: 500
  responses:
    Unauthorized:
      description: Authentication failed or API key is missing
    BadRequest:
      description: Invalid request body or parameters
    NotFound:
      description: The requested resource was not found
  schemas:
    Account:
      type: object
      properties:
        id:
          type: string
          description: Account unique identifier
        name:
          type: string
          description: Account name
        trackedSubscriptionId:
          type: string
          description: Tracked subscription ID
        sfdcId:
          type: string
          description: Salesforce account ID
        lastSeenDate:
          type: integer
          format: int64
          description: Last seen timestamp
        dupisBuyer:
          type: boolean
          description: Whether the account is a buyer
        numberOfUsers:
          type: integer
          description: Number of users in the account
        numberOfVisits:
          type: integer
          description: Total visits from the account
        plan:
          type: string
          description: Account plan or tier
        customAttributes:
          type: object
          description: Custom account attributes
    AccountInput:
      type: object
      required:
      - id
      - name
      properties:
        id:
          type: string
          description: Unique account identifier
        name:
          type: string
          description: Account name
        trackedSubscriptionId:
          type: string
          description: Tracked subscription ID
        sfdcId:
          type: string
          description: Salesforce account ID
        plan:
          type: string
          description: Account plan or tier
        customAttributes:
          type: object
          description: Custom account attributes
    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
    Account_2:
      type: object
      required:
      - id
      - name
      - propertyKeys
      properties:
        id:
          type: string
        name:
          type: string
        trackedSubscriptionId:
          type: string
        sfdcId:
          type: string
        lastSeenDate:
          type: integer
          format: int64
        dunsNumber:
          type: string
        industry:
          type: string
        numberOfEmployees:
          type: integer
          format: int32
        sicCode:
          type: string
        website:
          type: string
        naicsCode:
          type: string
        plan:
          type: string
        location:
          $ref: '#/components/schemas/Location'
        numberOfUsers:
          type: integer
          format: int32
          description: Number of users
          readOnly: true
        propertyKeys:
          type: array
          example:
          - AP-XXXXXXXXXX-2
          description: Aptrinsic Tag Key, at least one is required
          items:
            type: string
        createDate:
          type: integer
          format: int64
          readOnly: true
        lastModifiedDate:
          type: integer
          format: int64
          readOnly: true
        customAttributes:
          type: object
          description: Map of apiName to value
        parentGroupId:
          type: string
          description: Id to group Accounts together
        renewalDate:
          type: integer
          format: int64
        healthScore:
          type: integer
          format: int32
        gsId:
          type: string
        nps:
          type: number
          format: float
        csm:
          type: string
      title: Account
      description: Account object
    Location:
      type: object
      properties:
        countryName:
          type: string
          example: United States
        countryCode:
          type: string
          example: USA
          description: See ISO 3166
        stateName:
          type: string
          example: California
        stateCode:
          type: string
          example: CA
          description: See ISO 3166
        city:
          type: string
          example: San Mateo
        street:
          type: string
          example: 101 Broadway
        postalCode:
          type: string
          example: 94010
        continent:
          type: string
          example: NA
          description: See ISO 3166
        regionName:
          type: string
          description: See ISO 3166-2
        timeZone:
          type: string
        coordinates:
          $ref: '#/components/schemas/Coordinates'
      title: Location
      description: Location object
    Coordinates:
      type: object
      properties:
        latitude:
          type: number
          format: double
          example: 37.567147
        longitude:
          type: number
          format: double
          example: -122.324211
      title: Coordinates
      description: Coordinates object
    AccountsPage:
      type: object
      properties:
        accounts:
          type: array
          description: Array of accounts
          readOnly: true
          items:
            $ref: '#/components/schemas/Account_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: AccountsPage
  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-accounts-api-openapi.yml