Salesforce Agent API

The Agent API from Salesforce — 2 operation(s) for agent.

Documentation

Specifications

Schemas & Data

OpenAPI Specification

salesforce-agent-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Salesforce Bulk API 2.0 Abort Agent API
  description: 'Salesforce Bulk API 2.0 is a simplified, REST-based interface for bulk data operations that improves on the original Bulk API. It uses a straightforward job model and supports CSV format for ingest and query jobs, enabling processing of millions of records asynchronously.

    '
  version: v63.0
  contact:
    name: Salesforce Developers
    url: https://developer.salesforce.com/
  license:
    name: Salesforce Developer Terms
    url: https://www.salesforce.com/company/legal/agreements/
servers:
- url: https://{instance}.salesforce.com/services/data/v{version}/jobs
  description: Salesforce Bulk API 2.0 jobs endpoint
  variables:
    instance:
      default: yourInstance
      description: 'The Salesforce instance identifier (e.g., na1, eu3, or a My Domain subdomain like mycompany).

        '
    version:
      default: '63.0'
      description: 'The Salesforce API version number (e.g., 63.0). Use the latest supported version for new integrations.

        '
security:
- BearerAuth: []
tags:
- name: Agent
paths:
  /services/oauth2/authorize:
    parameters: []
    get:
      tags:
      - Agent
      summary: Salesforce User Agent Flow
      operationId: UserAgentFlow
      parameters:
      - name: response_type
        in: query
        description: ''
        required: true
        style: form
        explode: true
        schema:
          type: string
          examples:
          - token
        example: example_value
      - name: client_id
        in: query
        description: ''
        required: true
        style: form
        explode: true
        schema:
          type: string
          examples:
          - '{{vault:salesforce-consumer-key}}'
        example: '500123'
      - name: redirect_uri
        in: query
        description: ''
        required: true
        style: form
        explode: true
        schema:
          type: string
        example: example_value
      - name: display
        in: query
        description: ''
        required: true
        style: form
        explode: true
        schema:
          type: string
          examples:
          - touch
        example: example_value
      - name: login_hint
        in: query
        description: ''
        required: true
        style: form
        explode: true
        schema:
          type: string
        example: example_value
      - name: nonce
        in: query
        description: ''
        required: true
        style: form
        explode: true
        schema:
          type: string
          examples:
          - awesome
        example: example_value
      responses:
        '200':
          description: OK
          headers:
            Strict-Transport-Security:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: max-age=63072000; includeSubDomains
            X-Content-Type-Options:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: nosniff
            X-XSS-Protection:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: 1; mode=block
            Content-Security-Policy:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: upgrade-insecure-requests
            X-Robots-Tag:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: none
            Cache-Control:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: must-revalidate,no-cache,no-store
            Vary:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: Accept-Encoding
            Content-Encoding:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: gzip
            Connection:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: close
          content:
            text/html; charset=UTF-8:
              schema:
                type: string
                examples:
                - "\n\n\n<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n    <head>\n        <meta HTTP-EQUIV=\"PRAGMA\" CONTENT=\"NO-CACHE\">\n        <script>\nfunction redirectOnLoad() {\nif (this.SfdcApp && this.SfdcApp.projectOneNavigator) { SfdcApp.projectOneNavigator.handleRedirect('<my-domain>?ec=302&startURL=%2Fsetup%2Fsecur%2FRemoteAccessAuthorizationPage.apexp%3Fsource%3D<token>%26display%3Dtouch&display=touch'); }  else \nif (window.location.replace){ \nwindow.location.replace('<my-domain>>?ec=302&startURL=%2Fsetup%2Fsecur%2FRemoteAccessAuthorizationPage.apexp%3Fsource%3D<token>%26display%3Dtouch&display=touch');\n} else {\nwindow.location.href ='<my-domain>>?ec=302&startURL=%2Fsetup%2Fsecur%2FRemoteAccessAuthorizationPage.apexp%3Fsource%3D<token>%26display%3Dtouch&display=touch';\n} \n} \nredirectOnLoad();\n</script>\n    </head>\n</html>\n<!-- Body events -->\n<script type=\"text/javascript\">function bodyOnLoad(){if(window.PreferenceBits){window.PreferenceBits.prototype.csrfToken=\"null\";};}function bodyOnBeforeUnload(){}function bodyOnFocus(){}function bodyOnUnload(){}</script>\n</body>\n</html>\n<!--\n...................................................................................................\n...................................................................................................\n...................................................................................................\n...................................................................................................\n-->\n"
                contentMediaType: text/html; charset=UTF-8
              example: "\n\n\n<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n    <head>\n        <meta HTTP-EQUIV=\"PRAGMA\" CONTENT=\"NO-CACHE\">\n        <script>\nfunction redirectOnLoad() {\nif (this.SfdcApp && this.SfdcApp.projectOneNavigator) { SfdcApp.projectOneNavigator.handleRedirect('<my-domain>?ec=302&startURL=%2Fsetup%2Fsecur%2FRemoteAccessAuthorizationPage.apexp%3Fsource%3D<token>%26display%3Dtouch&display=touch'); }  else \nif (window.location.replace){ \nwindow.location.replace('<my-domain>>?ec=302&startURL=%2Fsetup%2Fsecur%2FRemoteAccessAuthorizationPage.apexp%3Fsource%3D<token>%26display%3Dtouch&display=touch');\n} else {\nwindow.location.href ='<my-domain>>?ec=302&startURL=%2Fsetup%2Fsecur%2FRemoteAccessAuthorizationPage.apexp%3Fsource%3D<token>%26display%3Dtouch&display=touch';\n} \n} \nredirectOnLoad();\n</script>\n    </head>\n</html>\n<!-- Body events -->\n<script type=\"text/javascript\">function bodyOnLoad(){if(window.PreferenceBits){window.PreferenceBits.prototype.csrfToken=\"null\";};}function bodyOnBeforeUnload(){}function bodyOnFocus(){}function bodyOnUnload(){}</script>\n</body>\n</html>\n<!--\n...................................................................................................\n...................................................................................................\n...................................................................................................\n...................................................................................................\n-->\n"
      deprecated: false
      security: []
      servers:
      - url: https://login.salesforce.com
        variables: {}
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /data/v64.0/einstein/ai-evaluations/runs:
    parameters: []
    post:
      tags:
      - Agent
      summary: Salesforce Run Agent Test
      description: Generates a response based on the specified prompt template and input parameters ([documentation](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_prompt_template.htm)).
      operationId: Runagenttest
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/RunagenttestRequest'
              - examples:
                - aiEvaluationDefinitionName: <YOUR_TEST_API_NAME>
              contentMediaType: application/json
            example:
              aiEvaluationDefinitionName: <YOUR_TEST_API_NAME>
        required: true
      responses:
        '201':
          description: Created
          headers:
            Date:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: Wed, 10 Sep 2025 13:46:14 GMT
            Transfer-Encoding:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: chunked
            Connection:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: keep-alive
            Vary:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: Accept-Encoding
            X-Content-Type-Options:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: nosniff
            Content-Encoding:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: gzip
            Sforce-Limit-Info:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: api-usage=183/5000000
            Set-Cookie:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: CookieConsentPolicy=0:1; path=/; expires=Thu, 10-Sep-2026 13:46:14 GMT; Max-Age=31536000; secure
            X-Robots-Tag:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: none
            Cache-Control:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: no-cache,must-revalidate,max-age=0,no-store,private
            Server:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: sfdcedge
            X-SFDC-Request-Id:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: 543c8913aa732b136328d39c8546b5ac
            X-Request-Id:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: 543c8913aa732b136328d39c8546b5ac
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/Runagenttest'
                - examples:
                  - runId: 4KBAU0000002oK54AI
                    status: NEW
                contentMediaType: application/json
              example:
                runId: 4KBAU0000002oK54AI
                status: NEW
      deprecated: false
      servers:
      - url: https://services
        variables: {}
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    RunagenttestRequest:
      title: RunagenttestRequest
      required:
      - aiEvaluationDefinitionName
      type: object
      properties:
        aiEvaluationDefinitionName:
          type: string
          example: example_value
      examples:
      - aiEvaluationDefinitionName: <YOUR_TEST_API_NAME>
    Runagenttest:
      title: Runagenttest
      required:
      - runId
      - status
      type: object
      properties:
        runId:
          type: string
          example: '500123'
        status:
          type: string
          example: example_value
      examples:
      - runId: 4KBAU0000002oK54AI
        status: NEW
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: 'OAuth 2.0 Bearer token obtained from the Salesforce OAuth 2.0 token endpoint. Include this token in the Authorization header as "Bearer {access_token}".

        '