Skip to main content
POST
https://api.app.shinzo.ai
/
v1
/
agent
/
{agentId}
/
filesystem
/
archives
Create Archive
curl --request POST \
  --url https://api.app.shinzo.ai/v1/agent/{agentId}/filesystem/archives \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "paths": [
    {}
  ],
  "outputPath": "<string>",
  "format": "<string>",
  "compressionLevel": 123
}
'

Authentication

Requires JWT token or Platform API key.
agentId
string
required
Agent UUID
paths
array
required
List of file or directory paths to include in the archive
outputPath
string
required
Destination path for the archive file
format
string
Archive format: zip, tar, tar.gz, or tar.bz2
compressionLevel
number
Compression level (0-9, where 9 is maximum compression)

Example Request

curl -X POST "https://api.app.shinzo.ai/v1/agent/agt_abc123/filesystem/archives" \
  -H "Authorization: Bearer <jwt_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "paths": [
      "/workspace/src",
      "/workspace/config.json"
    ],
    "output_path": "/workspace/backup.tar.gz",
    "format": "tar.gz",
    "compression_level": 6
  }'

Response

{
  "path": "/workspace/backup.tar.gz",
  "size": 4096,
  "format": "tar.gz"
}

Response Fields

FieldTypeDescription
pathstringAbsolute path of the created archive
sizenumberArchive size in bytes
formatstringArchive format used

Status Codes

CodeDescription
201Archive created successfully
400Invalid request body or paths
401Invalid authentication
403Access denied
404Agent or source paths not found