Skip to Content
SeyloDocs
API referenceEnvironment

Save a project's shared variables

POST
/api/v1/env.setShared

Replaces the project's shared variables (.env text). Shared variables cannot reference services. Services that use them get the new values on their next deploy or restart.

Needs env.edit on the project. Available to MCP clients and the assistant.

Authorization

cookieseylo_session<token>

Request Body

application/json
  1. body
projectId*string

Panel-issued id.

Match^[a-z0-9]{16}$
text*string

Contents of a .env file.

Lengthlength <= 262144
expectedUpdatedAt?|null

Response Body

Success.

application/json
  1. response
updatedAt*string
Formatdate-time
diagnostics*array<>
affectedServiceIds*array<>
Example Request
curl -X POST 'https://example.com/api/v1/env.setShared' \  -H 'Content-Type: application/json' \  -d '{  "projectId": "string",  "text": "string"}'
Example Response
{  "updatedAt": "2019-08-24T14:15:22Z",  "diagnostics": [    {      "code": "invalid-line",      "severity": "error",      "message": "string",      "detail": "string",      "params": {},      "range": {        "start": 0,        "end": 0,        "startLine": 1,        "startColumn": 1,        "endLine": 1,        "endColumn": 1      },      "fixes": [        {          "kind": "edit",          "title": "string",          "edits": [            {              "range": {                "start": 0,                "end": 0,                "startLine": 1,                "startColumn": 1,                "endLine": 1,                "endColumn": 1              },              "text": "string"            }          ]        }      ]    }  ],  "affectedServiceIds": [    "string"  ]}