Skip to main content
POST
/
v1
/
agents
/
{agent_id}
/
workspace
/
file_share
Workspace: File Share
curl --request POST \
  --url https://api.xpander.ai/v1/agents/{agent_id}/workspace/file_share \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "path": "<string>"
}
'
{
  "url": "<string>"
}
Publish a file from the per-agent workspace to a public CDN URL that can be shared externally (for example, to return a download link from an agent response).

Path Parameters

agent_id
string
required
Agent ID (UUID)

Request Body

path
string
required
Path to the file in the workspace to publish.

Response

status
string
Result status (e.g., ok).
url
string
Public CDN URL for the shared file.
path
string
Original workspace file path.

Example Request

curl -X POST "https://api.xpander.ai/v1/agents/<agent-id>/workspace/file_share" \
  -H "Content-Type: application/json" \
  -H "x-api-key: <your-api-key>" \
  -d '{
    "path": "output/report.csv"
  }'

Notes

  • Shared URLs are unauthenticated — treat them as public links. Do not share files containing secrets.
  • The returned URL is served from the xpander CDN and is safe to include in agent responses or webhooks.

See Also

Authorizations

x-api-key
string
header
required

API Key for authentication

Path Parameters

agent_id
string
required

Body

application/json
path
string
required

Relative path to the file in the workspace to share publicly.

Example:

"output/report.csv"

Response

Successful Response

url
string
required

Public CDN URL for the shared file