---
updatedAt: 2026-04-21T04:46:34.000Z
agentTools:
  projectIndex: https://developer.alloy.com/public/llms.txt
---

# Runs a portfolio evaluation

Given a portfolio workflow specified by the header, the API will run a portfolio evaluation.


# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Alloy API",
    "version": "1.0.0",
    "description": "hey hey hey, it's the Alloy API!"
  },
  "servers": [
    {
      "url": "https://sandbox.alloy.co/v1",
      "description": "Sandbox endpoint"
    }
  ],
  "security": [
    {
      "oauth2": []
    },
    {
      "basic": []
    }
  ],
  "tags": [
    {
      "name": "Portfolio Evaluations",
      "description": "Endpoints allowing users to work with portfolio evaluations"
    }
  ],
  "paths": {
    "/portfolio-evaluations": {
      "parameters": [
        {
          "in": "header",
          "name": "Authorization",
          "schema": {
            "type": "string",
            "description": "Basic authorization header per the OAuth Client Authorization Header standard.\n\nThe format is `Basic <auth_string>`, where `<auth_string>` is the base64 encoding of the string `token:secret` (check [Authentication Guide](https://developer.alloy.com/public/docs/authentication-guide) for details).\n"
          }
        },
        {
          "in": "header",
          "name": "alloy-workflow-token",
          "schema": {
            "type": "string",
            "description": "If you have migrated to the new API Key Settings page and are using account-level API keys for authentication, this header is required to specify which workflow to use for the evaluation. \n\nIf you have not migrated yet, this header is optional, as the workflow will be determined by the Authorization header using workflow_token.\n"
          }
        }
      ],
      "post": {
        "summary": "Runs a portfolio evaluation",
        "description": "Given a portfolio workflow specified by the header, the API will run a portfolio evaluation.\n",
        "tags": [
          "Portfolio Evaluations"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdHocPortfolioEvalRequestBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Portfolio Evaluation created and is queued for processing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdHocPortfolioEval201ResponseBody"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "basic": {
        "type": "http",
        "description": "HTTP basic authorization using a workflow token and secret",
        "scheme": "basic"
      },
      "oauth2": {
        "type": "oauth2",
        "description": "Oauth2 using a workflow token and secret to generate a bearer token",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "/oauth/bearer",
            "scopes": {}
          }
        }
      }
    },
    "schemas": {
      "AdHocPortfolioEvalRequestBody": {
        "type": "object",
        "required": [
          "source"
        ],
        "properties": {
          "source": {
            "description": "Allowed values are (`\"adhoc\"`)",
            "type": "string"
          },
          "as_of_time": {
            "description": "ISO 8601 timestamp the portfolio evaluation runs as of. Defaults to the time of the request.\n",
            "type": "string",
            "format": "date-time"
          }
        },
        "example": {
          "source": "adhoc",
          "as_of_time": "2026-10-01T00:00:00.000Z"
        }
      },
      "AdHocPortfolioEval201ResponseBody": {
        "type": "object",
        "properties": {
          "portfolio_evaluation_token": {
            "description": "Unique token corresponding to a portfolio evaluation",
            "type": "string"
          },
          "status": {
            "description": "The current status of the portfolio evaluation",
            "type": "string",
            "enum": [
              "pending"
            ]
          }
        },
        "example": {
          "portfolio_evaluation_token": "PE-54321",
          "status": "pending"
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": false
  }
}
```