Create a new environment. Environments are containers for files, folders, and secrets. They can be public or private (encrypted).
Request Body
Environment name. 1–128 characters.
Whether to enable end-to-end encryption. When true, all files are encrypted client-side before upload. Encryption keys are managed via Sui Seal and stored as secrets. Cannot be changed after creation.
Array of publisher IDs to assign to this environment. Assigning multiple publishers enables horizontal scaling — uploads are distributed across publishers for shorter publishing times. If omitted, the account’s default publisher is used.
Response
ISO 8601 creation timestamp.
Example
curl -X POST https://api.tusky.io/v2/environments \
-H "Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Production Assets",
"encrypted": false,
"publisherIds": ["pub_primary", "pub_secondary"]
}'
Response
{
"id": "env_abc123",
"name": "Production Assets",
"encrypted": false,
"publisherIds": ["pub_primary", "pub_secondary"],
"createdAt": "2026-03-07T14:00:00Z"
}
The encrypted setting is permanent — it cannot be changed after creation.
Assigning multiple publishers to an environment scales your publishing infrastructure horizontally. Incoming uploads are load-balanced across all assigned publishers, reducing publishing latency for high-throughput workloads.