Skip to main content

Upload secrets from a file

post/v1/secrets/configs/config/secrets/upload

A file up to 1 MiB: a JSON object with flat values or dotenv; the format is detected from the content. Secrets from the file are created or overwritten; other secrets are not affected. File parsing errors are returned with the InvalidSecretsFile code. Also accepts a configuration service token with write access: Authorization: Bearer <token>. The configuration's trusted networks apply. Requires editor access to the environment.

Request​

Authorization

  • Authorizationstringheaderrequired

    Key in the format Bearer <API-key>. Create a key on the API keys page.

Request body

    configstringrequired

    Configuration alias

    Example: production/local
    filestringrequired

    Secrets file contents: a JSON object or dotenv

    Example: DATABASE_URL=postgresql://user:****@db:5432/app
    projectstringrequired

    Project alias

    Example: payments

Response

    property name* SecretsSecret
    can_be_convergedboolean

    The override can be removed to fall back to the root config value

    can_be_promotedboolean

    The override can be promoted to the root config

    created_atstring<date-time>

    Creation date

    fingerprintstring

    Value fingerprint for comparison without revealing the value: HMAC-SHA256 with the team key, empty for restricted

    Example: 9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08
    idinteger<int64>

    Identifier

    Example: 7001
    namestring

    Name

    Example: DATABASE_URL
    notestring

    Note

    Example: Connection string for the main database
    overrideboolean

    The secret is overridden in this branch and not inherited from the root config

    reminder object
    next_atstring

    Next reminder date in YYYY-MM-DD format

    Example: 2026-03-01
    notestring

    Note

    Example: Check key rotation
    repeat_daysinteger<uint64>

    Repeat interval in days

    Example: 90
    updated_atstring<date-time>

    Update date

    valuestring

    Value; empty for secrets with restricted visibility unless the request uses a service token

    Example: postgresql://user:****@db:5432/app
    value_typestring

    Value type; the value is validated against it on change

    Possible values: [string, json, boolean, integer, decimal, email, url, yaml, xml, date, datetime]

    Example: url
    visibilitystring

    Visibility: masked — the value is hidden in the interface, unmasked — shown, restricted — the value is not returned to users, only to a service token

    Possible values: [masked, unmasked, restricted]

    Example: masked