Add a secret

POST https://runix.chat/api/v1/armada/secrets

Keep a new secret for the organization. Every run of the agent gets it as the environment variable it is named, from its next turn on. Its value is kept encrypted and never shown again. The organization's members get an armada_secret event.

Guests and bots cannot use this endpoint.

Changes: New in Zulip 13.0 (feature level ZF-448986).

Usage examples

The -u line implements HTTP Basic authentication. See the Authorization header documentation for how to get those credentials for users and bots.

curl -sSX POST https://runix.chat/api/v1/armada/secrets \
    -u EMAIL_ADDRESS:API_KEY \
    --data-urlencode name=WANDB_API_KEY \
    --data-urlencode 'secret=the value' \
    --data-urlencode 'note=The team'"'"'s W&B account'

Parameters

name string required

Example: "WANDB_API_KEY"

The environment variable the secret is in: capital letters, digits and _, not starting with a digit, at most 64 characters. Names that every run needs for itself, such as PATH, HOME, the proxy variables and those starting with ARMADA_, CODEX_, LC_ or LD_, are refused, as is a name the organization already uses.


secret string required

Example: "the value"

The secret's value, between 1 and 4096 characters.


note string optional

Example: "The team's W&B account"

What the secret is for, at most 200 characters.


Response

Return values

  • secret: object

    One of the organization's secrets, as its members see it: never its value.

    Changes: New in Zulip 13.0 (feature level ZF-448986).

    • name: string

      The environment variable every run gets it in.

    • hint: string

      The last four characters of a value of 16 characters or more; empty for a shorter one.

    • note: string

      What the secret is for.

    • added_by: integer | null

      The ID of the user who added it, or null if they were deleted.

    • date_added: integer

      When it was added, as a UNIX timestamp.

    • replaced_by: integer | null

      The ID of the user who last gave it a new value, or null if no one has.

    • date_replaced: integer | null

      When it was last given a new value, as a UNIX timestamp, or null.

    • date_used: integer | null

      When a run was last started with it, as a UNIX timestamp, or null if none has been.

Example response(s)

Changes: As of Zulip 7.0 (feature level 167), if any parameters sent in the request are not supported by this endpoint, a successful JSON response will include an ignored_parameters_unsupported array.

A typical successful JSON response may look like:

{
    "msg": "",
    "result": "success",
    "secret": {
        "added_by": 11,
        "date_added": 1792230000,
        "date_replaced": null,
        "date_used": null,
        "hint": "7f3a",
        "name": "WANDB_API_KEY",
        "note": "The team's W&B account",
        "replaced_by": null
    }
}