Skip to main content
POST
/
v2
/
environments
Create Environment
curl --request POST \
  --url https://api.tusky.io/v2/environments \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "encrypted": true,
  "publisherIds": [
    {}
  ]
}
'
{
  "id": "<string>",
  "name": "<string>",
  "encrypted": true,
  "publisherIds": [
    {}
  ],
  "createdAt": "<string>"
}
Create a new environment. Environments are containers for files, folders, and secrets. They can be public or private (encrypted).

Request Body

name
string
required
Environment name. 1–128 characters.
encrypted
boolean
default:"false"
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.
publisherIds
array
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

id
string
Environment ID.
name
string
Environment name.
encrypted
boolean
Whether encrypted.
publisherIds
array
Assigned publisher IDs.
createdAt
string
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.