NiCE Insights - Interaction Context API

: Retrieve context information for interactions.

GitHub OpenAPI

Operations 4

POST /eai-real-time-insight/v1/interaction-context Creates or updates interaction context data #
GET /eai-real-time-insight/v1/interaction-context Gets interaction context data from the cache #
DELETE /eai-real-time-insight/v1/interaction-context Resets interaction context to empty state #
GET /eai-real-time-insight/v1/interaction-context/{keyName} Gets interaction context data by a specific key from the cache #

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/nice:nice-insights-interaction-context-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

nice-insights-interaction-context-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Nice Insights - Interaction Context API
  version: 1.0.0
  description: 'Operations tagged Insights - Interaction Context across 2 of this provider''s published API definitions: nice-realtimeinsights.json, nice-realtimeinsights-openapi.yml. Each path carries the servers of the definition it was published in.'
security:
- Bearer: []
tags:
- name: Insights - Interaction Context
  description: ': Retrieve context information for interactions.'
paths:
  /eai-real-time-insight/v1/interaction-context:
    post:
      tags:
      - Insights - Interaction Context
      summary: Creates or updates interaction context data
      description: 'Creates the interaction context for a contact, or merges the supplied key-value data into the

        existing context. Returns 200 when the full payload is stored, or 206 (Partial Content) when part of

        the supplied structure is unsupported and only a subset could be persisted.'
      operationId: createOrUpdateInteractionContext
      requestBody:
        description: The interaction context data request.
        content:
          application/json; x-api-version=1.0:
            schema:
              required:
              - timestamp
              - contactNumber
              - contextData
              allOf:
              - $ref: '#/components/schemas/InteractionContextDataRequest'
              description: 'API DTO for interaction context data requests with nullable properties for defensive programming.

                Extends the base InteractionContextRequest with context data.'
          text/json; x-api-version=1.0:
            schema:
              required:
              - timestamp
              - contactNumber
              - contextData
              allOf:
              - $ref: '#/components/schemas/InteractionContextDataRequest'
              description: 'API DTO for interaction context data requests with nullable properties for defensive programming.

                Extends the base InteractionContextRequest with context data.'
          application/*+json; x-api-version=1.0:
            schema:
              required:
              - timestamp
              - contactNumber
              - contextData
              allOf:
              - $ref: '#/components/schemas/InteractionContextDataRequest'
              description: 'API DTO for interaction context data requests with nullable properties for defensive programming.

                Extends the base InteractionContextRequest with context data.'
      responses:
        '200':
          description: The full interaction context was created or updated.
          content:
            text/plain; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/InteractionContextResponse'
            application/json; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/InteractionContextResponse'
            text/json; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/InteractionContextResponse'
        '206':
          description: Part of the supplied structure was unsupported; only a subset was persisted.
          content:
            text/plain; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/InteractionContextResponse'
            application/json; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/InteractionContextResponse'
            text/json; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/InteractionContextResponse'
        '400':
          description: Validation failed — e.g. missing timestamp, contactNumber, or contextData; or (service-token callers) a missing/invalid TenantId.
          content:
            text/plain; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: The bearer token is missing or invalid.
          content:
            text/plain; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: An unexpected error occurred while storing the context.
          content:
            text/plain; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    get:
      tags:
      - Insights - Interaction Context
      summary: Gets interaction context data from the cache
      description: Returns the full interaction context (all stored key-value data) for the contact.
      operationId: getInteractionContext
      requestBody:
        description: The interaction context request.
        content:
          application/json; x-api-version=1.0:
            schema:
              required:
              - timestamp
              - contactNumber
              allOf:
              - $ref: '#/components/schemas/InteractionContextRequest'
              description: API DTO for interaction context requests with nullable properties for defensive programming.
          text/json; x-api-version=1.0:
            schema:
              required:
              - timestamp
              - contactNumber
              allOf:
              - $ref: '#/components/schemas/InteractionContextRequest'
              description: API DTO for interaction context requests with nullable properties for defensive programming.
          application/*+json; x-api-version=1.0:
            schema:
              required:
              - timestamp
              - contactNumber
              allOf:
              - $ref: '#/components/schemas/InteractionContextRequest'
              description: API DTO for interaction context requests with nullable properties for defensive programming.
      responses:
        '200':
          description: Returns the full interaction context for the contact.
          content:
            text/plain; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/InteractionContextDataResponse'
            application/json; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/InteractionContextDataResponse'
            text/json; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/InteractionContextDataResponse'
        '400':
          description: Validation failed — e.g. missing timestamp or contactNumber.
          content:
            text/plain; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: The bearer token is missing or invalid.
          content:
            text/plain; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: An unexpected error occurred while retrieving the context.
          content:
            text/plain; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      tags:
      - Insights - Interaction Context
      summary: Resets interaction context to empty state
      description: Clears all stored interaction context for the contact, returning the context to an empty state.
      operationId: resetInteractionContext
      requestBody:
        description: The interaction context request.
        content:
          application/json; x-api-version=1.0:
            schema:
              required:
              - timestamp
              - contactNumber
              allOf:
              - $ref: '#/components/schemas/InteractionContextRequest'
              description: API DTO for interaction context requests with nullable properties for defensive programming.
          text/json; x-api-version=1.0:
            schema:
              required:
              - timestamp
              - contactNumber
              allOf:
              - $ref: '#/components/schemas/InteractionContextRequest'
              description: API DTO for interaction context requests with nullable properties for defensive programming.
          application/*+json; x-api-version=1.0:
            schema:
              required:
              - timestamp
              - contactNumber
              allOf:
              - $ref: '#/components/schemas/InteractionContextRequest'
              description: API DTO for interaction context requests with nullable properties for defensive programming.
      responses:
        '200':
          description: The interaction context was reset to an empty state.
          content:
            text/plain; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/InteractionContextResponse'
            application/json; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/InteractionContextResponse'
            text/json; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/InteractionContextResponse'
        '400':
          description: Validation failed — e.g. missing timestamp or contactNumber.
          content:
            text/plain; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: The bearer token is missing or invalid.
          content:
            text/plain; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: An unexpected error occurred while resetting the context.
          content:
            text/plain; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /eai-real-time-insight/v1/interaction-context/{keyName}:
    get:
      tags:
      - Insights - Interaction Context
      summary: Gets interaction context data by a specific key from the cache
      description: Returns the value stored under a single context key for the contact.
      operationId: getInteractionContextByKey
      parameters:
      - name: keyName
        in: path
        description: The key name to retrieve.
        required: true
        schema:
          type: string
      requestBody:
        description: The interaction context request.
        content:
          application/json; x-api-version=1.0:
            schema:
              required:
              - timestamp
              - contactNumber
              allOf:
              - $ref: '#/components/schemas/InteractionContextRequest'
              description: API DTO for interaction context requests with nullable properties for defensive programming.
          text/json; x-api-version=1.0:
            schema:
              required:
              - timestamp
              - contactNumber
              allOf:
              - $ref: '#/components/schemas/InteractionContextRequest'
              description: API DTO for interaction context requests with nullable properties for defensive programming.
          application/*+json; x-api-version=1.0:
            schema:
              required:
              - timestamp
              - contactNumber
              allOf:
              - $ref: '#/components/schemas/InteractionContextRequest'
              description: API DTO for interaction context requests with nullable properties for defensive programming.
      responses:
        '200':
          description: Returns the value stored under the given context key.
          content:
            text/plain; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/InteractionContextDataResponse'
            application/json; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/InteractionContextDataResponse'
            text/json; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/InteractionContextDataResponse'
        '400':
          description: Validation failed — e.g. missing timestamp or contactNumber.
          content:
            text/plain; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: The bearer token is missing or invalid.
          content:
            text/plain; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: An unexpected error occurred while retrieving the context key.
          content:
            text/plain; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json; x-api-version=1.0:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    InteractionContextDataRequest:
      required:
      - contactNumber
      - contextData
      - timestamp
      type: object
      properties:
        schemaVersion:
          type:
          - string
          - 'null'
          description: Gets or sets the schema version of the interaction context.
          example: '1.0'
        timestamp:
          type:
          - string
          - 'null'
          description: Gets or sets the timestamp of the request, in ISO 8601 format (UTC).
          format: date-time
          example: '2024-01-01T00:00:00.000Z'
        contactNumber:
          type:
          - integer
          - 'null'
          description: Gets or sets the contact number associated with the interaction.
          format: int64
          example: 1234567890
        tenantId:
          type:
          - string
          - 'null'
          description: Gets or sets the tenant identifier. Required for service-token callers; ignored for user-token callers (value is taken from the token).
          example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
        contextData:
          type:
          - object
          - 'null'
          additionalProperties: {}
          description: Gets or sets the context data dictionary containing key-value pairs for the interaction context.
      additionalProperties: false
      description: 'API DTO for interaction context data requests with nullable properties for defensive programming.

        Extends the base InteractionContextRequest with context data.'
      example:
        schemaVersion: '1.0'
        timestamp: '2024-01-01T00:00:00.000Z'
        contactNumber: 1234567890
        tenantId: 3fa85f64-5717-4562-b3fc-2c963f66afa6
    InteractionContextResponse:
      type: object
      properties:
        timestamp:
          type: string
          description: Server timestamp of the response (UTC).
          format: date-time
          example: '2024-01-01T00:00:05.123Z'
        version:
          type: integer
          description: Version of the stored interaction context after the operation.
          format: int32
          example: 3
      additionalProperties: false
      description: Response returned by interaction context create/update and reset operations.
      example:
        timestamp: '2024-01-01T00:00:05.123Z'
        version: 3
    InteractionContextDataResponse:
      type: object
      properties:
        timestamp:
          type: string
          description: Server timestamp of the response (UTC).
          format: date-time
          example: '2024-01-01T00:00:05.123Z'
        version:
          type: integer
          description: Version of the stored interaction context after the operation.
          format: int32
          example: 3
        contextData:
          type:
          - object
          - 'null'
          additionalProperties: {}
          description: The stored interaction context data as key-value pairs.
      additionalProperties: false
      description: Response returned when retrieving interaction context data, including the stored key-value data.
      example:
        timestamp: '2024-01-01T00:00:05.123Z'
        version: 3
    DependencyServiceFailure:
      type: object
      properties:
        service:
          type:
          - string
          - 'null'
        httpStatus:
          type: integer
          format: int32
        errorMessages:
          type:
          - array
          - 'null'
          items:
            type: string
      additionalProperties: false
      description: Details of a failure that originated from a downstream dependency.
    InteractionContextRequest:
      required:
      - contactNumber
      - timestamp
      type: object
      properties:
        schemaVersion:
          type:
          - string
          - 'null'
          description: Gets or sets the schema version of the interaction context.
          example: '1.0'
        timestamp:
          type:
          - string
          - 'null'
          description: Gets or sets the timestamp of the request, in ISO 8601 format (UTC).
          format: date-time
          example: '2024-01-01T00:00:00.000Z'
        contactNumber:
          type:
          - integer
          - 'null'
          description: Gets or sets the contact number associated with the interaction.
          format: int64
          example: 1234567890
        tenantId:
          type:
          - string
          - 'null'
          description: Gets or sets the tenant identifier. Required for service-token callers; ignored for user-token callers (value is taken from the token).
          example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
      additionalProperties: false
      description: API DTO for interaction context requests with nullable properties for defensive programming.
      example:
        schemaVersion: '1.0'
        timestamp: '2024-01-01T00:00:00.000Z'
        contactNumber: 1234567890
        tenantId: 3fa85f64-5717-4562-b3fc-2c963f66afa6
    ErrorResponse:
      type: object
      properties:
        timestamp:
          type: string
          description: Timestamp when the error occurred (UTC).
          format: date-time
          example: '2024-01-01T00:00:05.123Z'
        errorMessages:
          type:
          - array
          - 'null'
          items:
            type: string
          description: Human-readable error messages describing what went wrong.
        debugInfo: {}
        httpStatusCode:
          type: integer
          format: int32
        dependency:
          allOf:
          - $ref: '#/components/schemas/DependencyServiceFailure'
          description: Details of a failure that originated from a downstream dependency.
      additionalProperties: false
      description: Standard error response returned by the API's exception-handling middleware.
      example:
        timestamp: '2024-01-01T00:00:05.123Z'
  securitySchemes:
    Bearer:
      type: http
      description: JWT Authorization header using the Bearer scheme.
      scheme: bearer
      bearerFormat: JWT
x-refined-from:
- nice-realtimeinsights.json
- nice-realtimeinsights-openapi.yml