Introducing Confident Voice: Watch the Launch Video Now

List Prompt Actions

(v2)

GET

Lists the prompt actions on the prompt, newest first. A prompt action runs an evaluation automatically when something happens to the prompt, such as a new commit.

GET/v2/prompts/{promptId}/prompt-actions
curl -X GET "https://api.confident-ai.com/v2/prompts/{promptId}/prompt-actions" \
  -H "CONFIDENT_API_KEY: <PROJECT-API-KEY>"
200
{
  "success": true,
  "data": {
    "promptActions": [
      {
        "id": "<PROMPT-ACTION-ID>",
        "promptId": "<PROMPT-ID>",
        "enabled": true,
        "trigger": [
          "COMMIT"
        ],
        "evalTask": {
          "id": "<EVAL-TASK-ID>",
          "name": "Greeting regression",
          "datasetId": "<DATASET-ID>",
          "evaluatorCollectionId": "<EVALUATOR-COLLECTION-ID>",
          "variableMapping": {
            "name": "input"
          }
        },
        "createdAt": "2025-01-18T16:45:00.000Z",
        "updatedAt": "2025-01-20T09:12:00.000Z"
      }
    ]
  },
  "deprecated": false
}

Headers

  • CONFIDENT_API_KEYstringRequired

    The API key of your Confident AI project.

Path parameters

  • promptIdstringRequired

    The unique id of the prompt.

Response

List Prompt Actions succeeded.

  • successboolean

    Indicates if the request was successful.

  • dataobject

    The prompt actions on a prompt.

    Show 1 propertyHide 1 property
    • promptActionslist of objects

      This is the list of prompt actions on the prompt, newest first.

      Show 7 propertiesHide 7 properties
      • idstring

        This is the unique id of the prompt action.

      • promptIdstring

        This is the id of the prompt the action belongs to.

      • enabledboolean

        Whether the action runs when triggered.

      • triggerlist of enums

        These are the events that start the action.

        Show 4 enum valuesHide 4 enum values
        • COMMIT
        • VERSION
        • MERGE
        • PULL_REQUEST
      • evalTaskobject

        The evaluation a prompt action runs.

        Show 5 propertiesHide 5 properties
        • idstring

          This is the unique id of the evaluation.

        • namestring

          This is the name of the evaluation, unique within your project.

        • datasetIdstring | null

          This is the id of the dataset the prompt is evaluated against, or null when none is set.

        • evaluatorCollectionIdstring | null

          This is the id of the evaluator collection that scores the outputs, or null when none is set.

        • variableMappingobject | null

          This maps each prompt variable to the dataset field that fills it, or is null when none is set.

      • createdAtstring

        When the action was created.

      • updatedAtstring

        When the action was last changed.

  • deprecatedboolean

    Indicates if this endpoint is deprecated.

Built byConfident AI