POST
/
api
/
v1
/
agentic
/
workflows
/
upload
curl --request POST \
  --url https://api.collinear.ai/api/v1/agentic/workflows/upload \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{}'
{
  "message": "Workflow logs uploaded successfully",
  "workflow_id": "d9f82ea2-3cb4-4fd9-a8bb-1d9b293fab67"
}

Parameters

Headers

  • Authorization: Bearer token
  • X-Workflow-Type: Type of agent workflow (chat|automation|orchestration)

Body (multipart/form-data)

  • file: The workflow log file to upload
  • tags (optional): Array of workflow tags
  • metadata (optional): JSON string of additional metadata

Example:

 [
  {
    "role": "user",
    "content": "I want to book a flight from New York to London next Monday."
  },
  {
    "role": "assistant",
    "content": "Sure. Let me find the best options for flights from New York to London on Monday."
  },
  {
    "role": "agent_action",
    "tool": "FlightSearchTool",
    "input": {
      "from": "New York",
      "to": "London",
      "date": "2024-06-10"
    },
    "output": {
      "status": "success",
      "results": [
        {
          "flight": "BA117",
          "price": "$600",
          "departure": "08:00 AM"
        }
      ]
    }
  },
  {
    "role": "assistant",
    "content": "I found British Airways flight BA117 for $600 departing at 08:00 AM. Would you like to book it?"
  },
  {
    "role": "user",
    "content": "Yes, please book it."
  },
  {
    "role": "agent_action",
    "tool": "FlightBookingTool",
    "input": {
      "flight": "BA117"
    },
    "output": {
      "status": "success",
      "confirmation_number": "ABC12345"
    }
  },
  {
    "role": "assistant",
    "content": "Your flight has been booked! Your confirmation number is ABC12345."
  }
]

Response

{
  "message": "Workflow logs uploaded successfully",
  "workflow_id": "d9f82ea2-3cb4-4fd9-a8bb-1d9b293fab67"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Response

200
application/json

Successful Response

The response is of type object.