Skip to content
Pile
Esc
↑↓navigate↵open⌘Jpreview

Create agent session artifact

POST/workspaces/{organizationId}/agent/sessions/{sessionId}/artifacts
Authorization
AuthorizationBearer token · headerrequired

Workspace API key (Authorization: Bearer <key>). Issue keys under Settings → Developer or POST /workspaces/{organizationId}/tokens.

Path parameters
organizationIdstringrequired
sessionIdstringrequired
Request body
application/json
namestringrequired
min length 1
typestringrequired
Allowed:difflogscreenshottraceoutputother
contentstring
datastring
mimeTypestring
urlstring
Responses
201

Artifact captured

idstringrequired
sessionIdstringrequired
actorIdstring | nullrequired
typestringrequired
Allowed:thoughtresponseerrorelicitationpromptactionstatusartifact
messagestringrequired
payloadany | null
parentIdstring | nullrequired
startedAtstring | nullrequired
endedAtstring | nullrequired
durationMsnumber | nullrequired
createdAtstringrequired
404

Session not found

Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST 'https://pile.nyc/workspaces/string/agent/sessions/string/artifacts' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string",
  "type": "diff",
  "content": "string",
  "data": "string",
  "mimeType": "string",
  "url": "string"
}'
Response
{
  "id": "string",
  "sessionId": "string",
  "actorId": "string",
  "type": "thought",
  "message": "string",
  "payload": null,
  "parentId": "string",
  "startedAt": "string",
  "endedAt": "string",
  "durationMs": 0,
  "createdAt": "string"
}

Was this page helpful?