> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stardex.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Manually extract insights from an activity

> Runs the AI extraction pipeline on a specific activity (e.g. a secondary note or meeting transcript). Useful for re-running extraction or bypassing the cron.



## OpenAPI

````yaml /api-reference/openapi-v1.json post /v1/company-insights/trigger
openapi: 3.1.0
info:
  title: Stardex API (v1)
  version: 1.0.0
  description: >-
    Stardex ATS API — manage candidates, jobs, companies, and recruiting
    workflows.
servers:
  - url: https://api.stardex.ai
    description: Production API server
security:
  - bearerAuth: []
tags:
  - name: Persons
    description: Manage person records — contacts, work history, and custom fields.
  - name: Jobs
    description: Manage job postings — pipeline stages, team members, and custom fields.
  - name: Candidates
    description: Manage candidate records and pipeline stage transitions.
  - name: Companies
    description: Browse and retrieve company records.
  - name: Lists
    description: Create, search, and retrieve saved person and company lists.
  - name: Person Activities
    description: Create and manage activity records (notes, emails, meetings) for persons.
  - name: Team Members
    description: List team members for use in search filters and assignments.
  - name: Custom Fields
    description: Retrieve custom field definitions and tag options for search filters.
paths:
  /v1/company-insights/trigger:
    post:
      tags:
        - Company Insights
      summary: Manually extract insights from an activity
      description: >-
        Runs the AI extraction pipeline on a specific activity (e.g. a secondary
        note or meeting transcript). Useful for re-running extraction or
        bypassing the cron.
      operationId: triggerCompanyInsightExtraction
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                activity_id:
                  type: string
                  format: uuid
                  description: >-
                    Activity (secondary_note or meeting_transcript) to extract
                    insights from.
              required:
                - activity_id
      responses:
        '200':
          description: Extraction completed
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  data:
                    type: object
                    properties:
                      ai_auto_update_id:
                        type:
                          - string
                          - 'null'
                        format: uuid
                        description: >-
                          Audit row created for this extraction (null if
                          skipped).
                      added_count:
                        type: number
                        description: Number of new insights inserted.
                    required:
                      - ai_auto_update_id
                      - added_count
                required:
                  - success
                  - data
              example:
                success: true
                data:
                  ai_auto_update_id: 55555555-5555-5555-5555-555555555555
                  added_count: 3
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                    description: Always false for error responses.
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: >-
                          Machine-readable error code (e.g. "VALIDATION_ERROR",
                          "NOT_FOUND").
                      message:
                        type: string
                        description: Human-readable error description.
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                    description: Always false for error responses.
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: >-
                          Machine-readable error code (e.g. "VALIDATION_ERROR",
                          "NOT_FOUND").
                      message:
                        type: string
                        description: Human-readable error description.
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                    description: Always false for error responses.
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: >-
                          Machine-readable error code (e.g. "VALIDATION_ERROR",
                          "NOT_FOUND").
                      message:
                        type: string
                        description: Human-readable error description.
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Authenticate with a Bearer token: API key, OAuth token, or session
        token.

````