Events.com Custom Agents API

Custom agent CRUD, runs, and schedule management

OpenAPI Specification

eventscom-custom-agents-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Saasxl-api doc Custom Agents API
  version: '1.0'
  description: Custom agent CRUD, runs, and schedule management
servers:
- url: https://datagol-be.events.com
  description: Generated server url
tags:
- name: Custom Agents
  description: Custom agent CRUD, runs, and schedule management
paths:
  /customAgents/api/v1/{customAgentId}:
    get:
      tags:
      - Custom Agents
      summary: Get a custom agent by ID
      operationId: getCustomAgentById
      parameters:
      - name: customAgentId
        in: path
        required: true
        schema:
          type: string
      - name: isIncludeConnectorData
        in: query
        required: false
        schema:
          type: boolean
          default: true
      responses:
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                oneOf:
                - type: object
                - $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '503':
          description: Service Unavailable
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '501':
          description: Not Implemented
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/CustomAgentDTO'
      security:
      - s_jwt: []
    put:
      tags:
      - Custom Agents
      summary: Update an existing custom agent
      operationId: updateCustomAgent
      parameters:
      - name: customAgentId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomAgentDTO'
        required: true
      responses:
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                oneOf:
                - type: object
                - $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '503':
          description: Service Unavailable
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '501':
          description: Not Implemented
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/CustomAgentDTO'
      security:
      - s_jwt: []
    delete:
      tags:
      - Custom Agents
      summary: Delete a custom agent
      operationId: deleteCustomAgent
      parameters:
      - name: customAgentId
        in: path
        required: true
        schema:
          type: string
      responses:
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                oneOf:
                - type: object
                - $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '503':
          description: Service Unavailable
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '501':
          description: Not Implemented
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '200':
          description: OK
      security:
      - s_jwt: []
  /customAgents/api/v1:
    get:
      tags:
      - Custom Agents
      summary: List all custom agents accessible to the current user
      operationId: getAllCustomAgents
      responses:
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                oneOf:
                - type: object
                - $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '503':
          description: Service Unavailable
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '501':
          description: Not Implemented
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CustomAgentDTO'
      security:
      - s_jwt: []
    post:
      tags:
      - Custom Agents
      summary: Create a new custom agent
      operationId: createCustomAgent
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomAgentDTO'
        required: true
      responses:
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                oneOf:
                - type: object
                - $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '503':
          description: Service Unavailable
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '501':
          description: Not Implemented
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/CustomAgentDTO'
      security:
      - s_jwt: []
  /customAgents/api/v1/public/byIds:
    post:
      tags:
      - Custom Agents
      summary: Get active public custom agents by IDs
      operationId: getActivePublicCustomAgentsByIds
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkIdsRequestDTO'
        required: true
      responses:
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                oneOf:
                - type: object
                - $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '503':
          description: Service Unavailable
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '501':
          description: Not Implemented
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CustomAgentDTO'
      security:
      - s_jwt: []
  /customAgents/api/v1/migrateServiceAccounts:
    post:
      tags:
      - Custom Agents
      summary: Migrate service accounts for existing custom agents
      operationId: migrateServiceAccountsForCustomAgents
      responses:
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                oneOf:
                - type: object
                - $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '503':
          description: Service Unavailable
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '501':
          description: Not Implemented
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/MigrationResultDTO'
      security:
      - s_jwt: []
  /customAgents/api/v1/{customAgentId}/runs:
    get:
      tags:
      - Custom Agents
      summary: List agent runs for a custom agent
      description: Returns paginated run history with status, timing, and error details
      operationId: getAgentRuns
      parameters:
      - name: customAgentId
        in: path
        required: true
        schema:
          type: string
      - name: page
        in: query
        required: false
        schema:
          type: integer
          format: int32
          default: 0
      - name: pageSize
        in: query
        required: false
        schema:
          type: integer
          format: int32
          default: 20
      - name: status
        in: query
        required: false
        schema:
          type: string
          enum:
          - RUNNING
          - COMPLETED
          - FAILED
      responses:
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                oneOf:
                - type: object
                - $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '503':
          description: Service Unavailable
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '501':
          description: Not Implemented
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOPageAgentRunDTO'
      security:
      - s_jwt: []
  /customAgents/api/v1/thirdParty/{customAgentId}:
    get:
      tags:
      - Custom Agents
      summary: Get custom agent config for third-party access
      operationId: getConfigForThirdParty
      parameters:
      - name: customAgentId
        in: path
        required: true
        schema:
          type: string
      responses:
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                oneOf:
                - type: object
                - $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '503':
          description: Service Unavailable
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '501':
          description: Not Implemented
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/CustomAgentDTO'
      security:
      - s_jwt: []
components:
  schemas:
    PageAgentRunDTO:
      type: object
      properties:
        totalPages:
          type: integer
          format: int32
        totalElements:
          type: integer
          format: int64
        pageable:
          $ref: '#/components/schemas/PageableObject'
        size:
          type: integer
          format: int32
        content:
          type: array
          items:
            $ref: '#/components/schemas/AgentRunDTO'
        number:
          type: integer
          format: int32
        sort:
          type: array
          items:
            $ref: '#/components/schemas/SortObject'
        first:
          type: boolean
        last:
          type: boolean
        numberOfElements:
          type: integer
          format: int32
        empty:
          type: boolean
    AgentSkillDTO:
      type: object
      properties:
        id:
          type: integer
          format: int64
        name:
          type: string
        description:
          type: string
        s3Url:
          type: string
        enabled:
          type: boolean
    CustomAgentConfig:
      type: object
      properties:
        connectors:
          type: array
          items:
            $ref: '#/components/schemas/CustomAgentConnector'
        voiceConfig:
          $ref: '#/components/schemas/VoiceConfigDTO'
        webSearchEnabled:
          type: boolean
        browserEnabled:
          type: boolean
        deepResearchEnabled:
          type: boolean
        showImages:
          type: boolean
        subAgents:
          type: array
          items:
            $ref: '#/components/schemas/CustomAgentDTO'
        mcpConfigs:
          type: array
          items:
            type: object
            additionalProperties:
              type: object
        skillIds:
          type: array
          items:
            type: integer
            format: int64
    MigrationResultDTO:
      type: object
      properties:
        totalProcessed:
          type: integer
          format: int32
        successCount:
          type: integer
          format: int32
        failureCount:
          type: integer
          format: int32
        successIds:
          type: array
          items:
            type: string
        failures:
          type: array
          items:
            $ref: '#/components/schemas/MigrationFailureDTO'
        message:
          type: string
        allSuccessful:
          type: boolean
    VoiceConfigDTO:
      type: object
      properties:
        voiceEnabled:
          type: boolean
        speechToText:
          $ref: '#/components/schemas/ProviderConfigDTO'
        textToSpeech:
          $ref: '#/components/schemas/ProviderConfigDTO'
    CustomAgentConnector:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
        sourceType:
          type: string
          enum:
          - AI
          - BACKEND
        data:
          type: object
          additionalProperties:
            type: object
    ProviderConfigDTO:
      type: object
      properties:
        provider:
          type: string
        apiKey:
          type: string
    PageableObject:
      type: object
      properties:
        offset:
          type: integer
          format: int64
        sort:
          type: array
          items:
            $ref: '#/components/schemas/SortObject'
        pageNumber:
          type: integer
          format: int32
        pageSize:
          type: integer
          format: int32
        paged:
          type: boolean
        unpaged:
          type: boolean
    SaasxlResponseDTOObject:
      type: object
      properties:
        success:
          type: boolean
        version:
          type: string
        date:
          type: string
          format: date-time
        error:
          $ref: '#/components/schemas/ErrorMessage'
        data:
          type: object
    BulkIdsRequestDTO:
      type: object
      properties:
        ids:
          type: array
          items:
            type: string
    AgentRunDTO:
      type: object
      properties:
        id:
          type: integer
          format: int64
        agentId:
          type: string
        conversationId:
          type: string
        companyId:
          type: integer
          format: int64
        status:
          type: string
          enum:
          - RUNNING
          - COMPLETED
          - FAILED
        errorMessage:
          type: string
        startedAt:
          type: string
          format: date-time
        finishedAt:
          type: string
          format: date-time
        temporalWorkflowId:
          type: string
        createDate:
          type: string
          format: date-time
        modiDate:
          type: string
          format: date-time
    CustomAgentDTO:
      type: object
      properties:
        createdBy:
          $ref: '#/components/schemas/UserDTO'
        modifiedBy:
          $ref: '#/components/schemas/UserDTO'
        createDate:
          type: string
          format: date-time
        modiDate:
          type: string
          format: date-time
        id:
          type: string
        type:
          type: string
        uiMetadata:
          type: object
          additionalProperties:
            type: object
        name:
          type: string
        description:
          type: string
        configs:
          $ref: '#/components/schemas/CustomAgentConfig'
        userId:
          type: integer
          format: int64
        companyId:
          type: integer
          format: int64
        isPublished:
          type: boolean
        prompt:
          type: string
        instructions:
          type: string
        examples:
          type: string
        skills:
          type: array
          items:
            $ref: '#/components/schemas/AgentSkillDTO'
        scheduleConfig:
          type: object
          additionalProperties:
            type: object
        permissionOfUser:
          type: string
        scope:
          type: string
    ErrorMessage:
      type: object
      properties:
        statusCode:
          type: integer
          format: int32
        requestId:
          type: string
        message:
          type: object
        details:
          type: object
        errorCodes:
          type: array
          items:
            type: string
    UserDTO:
      type: object
      properties:
        id:
          type: integer
          format: int64
        firstname:
          type: string
        lastname:
          type: string
        email:
          type: string
        companyName:
          type: string
        companyId:
          type: integer
          format: int64
        status:
          type: string
        roles:
          type: array
          items:
            type: string
        permissions:
          uniqueItems: true
          type: array
          items:
            type: string
        joinDate:
          type: string
          format: date-time
        mfaEnabled:
          type: boolean
        redirectToMfaFlow:
          type: boolean
        tokenExpiryTime:
          type: integer
          format: int64
        isServiceAccount:
          type: boolean
        lastLogin:
          type: string
          format: date-time
        signInMethod:
          type: string
          enum:
          - EMAIL
          - GOOGLE
          - MICROSOFT
        isOnboardingCompleted:
          type: boolean
        role:
          type: string
        department:
          type: string
        anonymousUserId:
          type: string
        thirdPartyUser:
          type: boolean
    MigrationFailureDTO:
      type: object
      properties:
        agentId:
          type: string
        errorMessage:
          type: string
        exceptionType:
          type: string
    SortObject:
      type: object
      properties:
        direction:
          type: string
        nullHandling:
          type: string
        ascending:
          type: boolean
        property:
          type: string
        ignoreCase:
          type: boolean
    SaasxlResponseDTOPageAgentRunDTO:
      type: object
      properties:
        success:
          type: boolean
        version:
          type: string
        date:
          type: string
          format: date-time
        error:
          $ref: '#/components/schemas/ErrorMessage'
        data:
          $ref: '#/components/schemas/PageAgentRunDTO'
  securitySchemes:
    s_jwt:
      type: http
      description: Jwt Token
      scheme: bearer
      bearerFormat: JWT