Secrets
Secrets operations in the Hlix API.
See the OpenAPI document for schemas and operation IDs.
Prerequisites
Section titled “Prerequisites”- Protected operations require an API key in
x-api-keyor a browser session cookie; some actions require a verified user session - Tenant-scoped operations use
X-Organization-Id; browser sessions can use their active workspace. Discovery and personal-workspace bootstrap do not require an active workspace - The base URL for your deployment,
https://server.hlix.aiby default
Operations
Section titled “Operations”| Method | Path | Operation |
|---|---|---|
GET |
/v1/api/secrets/project/{projectId} |
List a project’s secrets configs |
POST |
/v1/api/secrets/project/{projectId} |
Configure a secrets provider |
DELETE |
/v1/api/secrets/project/{projectId}/{configId} |
Delete a secrets config |
PATCH |
/v1/api/secrets/project/{projectId}/{configId} |
Update a secrets config |
GET |
/v1/api/secrets/project/{projectId}/entries |
List the project’s secrets, masked, with the file each belongs to |
PUT |
/v1/api/secrets/project/{projectId}/entries |
Create or replace secrets in the project store |
DELETE |
/v1/api/secrets/project/{projectId}/entries/{key} |
Remove one secret from the project store |
POST |
/v1/api/secrets/project/{projectId}/export |
Export one source file’s secrets, values in clear |
PUT |
/v1/api/secrets/project/{projectId}/files |
Upload whole secret files and let the store parse them |
GET |
/v1/api/secrets/project/{projectId}/sync-logs |
List a project’s secrets sync history |
POST |
/v1/api/secrets/project/{projectId}/test |
Resolve the project’s secrets and report the key names |
List a project’s secrets configs
Section titled “List a project’s secrets configs”GET /v1/api/secrets/project/{projectId} · operation ID listProjectSecretsConfigs
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
projectId |
path | yes | string | |
X-Organization-Id |
header | no | string | The workspace (organization) to act in. Omitted, the session’s active organization is used. |
Responses
| Status | Body | Description |
|---|---|---|
200 |
SecretsConfigSummary[] | Each configuration with a redacted configSummary. The encrypted config field is omitted. |
400 |
ApiError | The request named no active organization. |
401 |
ApiError | No valid session or API key. |
403 |
ApiError | Authenticated, but not a member of the named organization — or a client collaborator without the required access on this project. |
404 |
ApiError | The resource does not exist, or the caller is a task-scoped credential and this endpoint is outside its allowlist. |
Configure a secrets provider
Section titled “Configure a secrets provider”POST /v1/api/secrets/project/{projectId} · operation ID createProjectSecretsConfig
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
projectId |
path | yes | string | |
X-Organization-Id |
header | no | string | The workspace (organization) to act in. Omitted, the session’s active organization is used. |
Request body — application/json, CreateSecretsConfig (required)
The contract does not pin this body’s properties.
Responses
| Status | Body | Description |
|---|---|---|
201 |
SecretsConfig | The stored row. config is the encrypted credential blob — ciphertext, never plaintext. |
400 |
ValidationError | ApiError | The JSON body failed schema validation (ValidationError), or the request named no active organization (ApiError). |
401 |
ApiError | No valid session or API key. |
403 |
ApiError | Authenticated, but not a member of the named organization — or a client collaborator without the required access on this project. |
404 |
ApiError | The resource does not exist, or the caller is a task-scoped credential and this endpoint is outside its allowlist. |
500 |
ApiError | The config could not be written. |
Delete a secrets config
Section titled “Delete a secrets config”DELETE /v1/api/secrets/project/{projectId}/{configId} · operation ID deleteProjectSecretsConfig
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
projectId |
path | yes | string | |
configId |
path | yes | string | |
X-Organization-Id |
header | no | string | The workspace (organization) to act in. Omitted, the session’s active organization is used. |
Responses
| Status | Body | Description |
|---|---|---|
200 |
DeletedAck | The config is gone. Deleting one that was never there answers the same 200 — the call is idempotent. |
400 |
ApiError | The request named no active organization. |
401 |
ApiError | No valid session or API key. |
403 |
ApiError | Authenticated, but not a member of the named organization — or a client collaborator without the required access on this project. |
404 |
ApiError | The resource does not exist, or the caller is a task-scoped credential and this endpoint is outside its allowlist. |
Update a secrets config
Section titled “Update a secrets config”PATCH /v1/api/secrets/project/{projectId}/{configId} · operation ID updateProjectSecretsConfig
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
projectId |
path | yes | string | |
configId |
path | yes | string | |
X-Organization-Id |
header | no | string | The workspace (organization) to act in. Omitted, the session’s active organization is used. |
Request body — application/json, UpdateSecretsConfig (required)
| Property | Type | Required | Notes |
|---|---|---|---|
config |
object | no | For an Infisical config, the fields to change (clientId, clientSecret, projectId, environment, siteUrl, secretPath, recursive); a field left out keeps its stored value. For a manual config, the whole config. |
envFilter |
string | null | no | |
isActive |
boolean | no | |
label |
string | no | min length 1, max length 100 |
Responses
| Status | Body | Description |
|---|---|---|
200 |
SecretsConfig | The updated row, with the re-encrypted config ciphertext. |
400 |
ValidationError | ApiError | The body failed validation, or the merged provider config is not valid — for Infisical, a missing field or a server address that is not a public https origin. |
401 |
ApiError | No valid session or API key. |
403 |
ApiError | Authenticated, but not a member of the named organization — or a client collaborator without the required access on this project. |
404 |
ApiError | No such config in this workspace. |
List the project’s secrets, masked, with the file each belongs to
Section titled “List the project’s secrets, masked, with the file each belongs to”GET /v1/api/secrets/project/{projectId}/entries · operation ID listProjectSecretEntries
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
projectId |
path | yes | string | |
X-Organization-Id |
header | no | string | The workspace (organization) to act in. Omitted, the session’s active organization is used. |
Responses
| Status | Body | Description |
|---|---|---|
200 |
SecretEntries | Every secret attached to the project. Values are masked to their last four characters and there is no option that unmasks them — POST …/export is the only route that returns plaintext. |
400 |
ApiError | The request named no active organization. |
401 |
ApiError | No valid session or API key. |
403 |
ApiError | Authenticated, but not a member of the named organization — or a client collaborator without the required access on this project. |
404 |
ApiError | No such project in this workspace. |
Create or replace secrets in the project store
Section titled “Create or replace secrets in the project store”PUT /v1/api/secrets/project/{projectId}/entries · operation ID upsertProjectSecretEntries
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
projectId |
path | yes | string | |
X-Organization-Id |
header | no | string | The workspace (organization) to act in. Omitted, the session’s active organization is used. |
Request body — application/json, UpsertSecretEntries (required)
| Property | Type | Required | Notes |
|---|---|---|---|
entries |
object[] | yes |
Responses
| Status | Body | Description |
|---|---|---|
200 |
SecretEntriesWritten | How many entries landed, and the keys refused because their source is not a path this platform will write inside a checkout. |
400 |
ValidationError | ApiError | The JSON body failed schema validation (ValidationError), or the request named no active organization (ApiError). |
401 |
ApiError | No valid session or API key. |
403 |
ApiError | Authenticated, but not a member of the named organization — or a client collaborator without the required access on this project. |
404 |
ApiError | No such project in this workspace. |
409 |
ApiError | The project is archived and accepts no further writes. |
Remove one secret from the project store
Section titled “Remove one secret from the project store”DELETE /v1/api/secrets/project/{projectId}/entries/{key} · operation ID deleteProjectSecretEntry
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
projectId |
path | yes | string | |
key |
path | yes | string | |
source |
query | no | string | Remove the key only from this source file. If omitted, remove it from every file that declares it. |
X-Organization-Id |
header | no | string | The workspace (organization) to act in. Omitted, the session’s active organization is used. |
Responses
| Status | Body | Description |
|---|---|---|
200 |
SecretEntryDeleted | How many (key, source) pairs were removed. Zero is a success, not a 404 — the call is idempotent. |
400 |
ApiError | The request named no active organization. |
401 |
ApiError | No valid session or API key. |
403 |
ApiError | Authenticated, but not a member of the named organization — or a client collaborator without the required access on this project. |
404 |
ApiError | No such project in this workspace. |
409 |
ApiError | The project is archived and accepts no further writes. |
Export one source file’s secrets, values in clear
Section titled “Export one source file’s secrets, values in clear”POST /v1/api/secrets/project/{projectId}/export · operation ID exportProjectSecrets
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
projectId |
path | yes | string | |
X-Organization-Id |
header | no | string | The workspace (organization) to act in. Omitted, the session’s active organization is used. |
Request body — application/json, ExportSecrets (required)
| Property | Type | Required | Notes |
|---|---|---|---|
format |
string | no | min length 1, max length 64 |
source |
string | no | min length 1, max length 512 |
Responses
| Status | Body | Description |
|---|---|---|
200 |
string (binary) | The secret file in its recorded format unless format overrides it. Supported formats include dotenv, direnv, Terraform HCL/JSON, Java properties, Spring YAML, .NET appsettings and user secrets, Azure Functions local settings, npm credentials, Rails database.yml, Wrangler/Fly TOML, Serverless environment settings and credentials JSON/YAML/INI. The response is text/plain and contains plaintext secrets. Every export records a secrets.exported audit entry. Formats marked shape are reconstructed with captured values; comments and uncaptured content are omitted. |
400 |
ValidationError | ApiError | The JSON body failed schema validation (ValidationError), or the request named no active organization (ApiError). |
401 |
ApiError | No valid session or API key. |
403 |
ApiError | Authenticated, but not a member of the named organization — or a client collaborator without the required access on this project. |
404 |
ApiError | No such project in this workspace. |
Upload whole secret files and let the store parse them
Section titled “Upload whole secret files and let the store parse them”PUT /v1/api/secrets/project/{projectId}/files · operation ID importProjectSecretFiles
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
projectId |
path | yes | string | |
X-Organization-Id |
header | no | string | The workspace (organization) to act in. Omitted, the session’s active organization is used. |
Request body — application/json, ImportSecretFiles (required)
| Property | Type | Required | Notes |
|---|---|---|---|
files |
object[] | yes |
Responses
| Status | Body | Description |
|---|---|---|
200 |
SecretFilesImported | Import results for each file. Supported key/value documents are parsed under their source path, replacing that path’s previous entries. Opaque credentials such as private keys, keystores, service-account JSON and Docker/AWS configuration are preserved byte-for-byte as protected files for provisioning and hlix pull. Encrypted files without an available decryption key (SOPS, Ansible Vault and git-crypt) and .env.example files are listed in skipped. Secret values are never included in this response. |
400 |
ValidationError | ApiError | The JSON body failed schema validation (ValidationError), or the request named no active organization (ApiError). |
401 |
ApiError | No valid session or API key. |
403 |
ApiError | Authenticated, but not a member of the named organization — or a client collaborator without the required access on this project. |
404 |
ApiError | No such project in this workspace. |
409 |
ApiError | The project is archived and accepts no further writes. |
List a project’s secrets sync history
Section titled “List a project’s secrets sync history”GET /v1/api/secrets/project/{projectId}/sync-logs · operation ID listProjectSecretsSyncLogs
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
projectId |
path | yes | string | |
X-Organization-Id |
header | no | string | The workspace (organization) to act in. Omitted, the session’s active organization is used. |
Responses
| Status | Body | Description |
|---|---|---|
200 |
SecretsSyncLog[] | Each push of secrets into a Cloud Machine or into GitHub: how many moved, and whether it worked. |
400 |
ApiError | The request named no active organization. |
401 |
ApiError | No valid session or API key. |
403 |
ApiError | Authenticated, but not a member of the named organization — or a client collaborator without the required access on this project. |
404 |
ApiError | The resource does not exist, or the caller is a task-scoped credential and this endpoint is outside its allowlist. |
Resolve the project’s secrets and report the key names
Section titled “Resolve the project’s secrets and report the key names”POST /v1/api/secrets/project/{projectId}/test · operation ID testProjectSecrets
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
projectId |
path | yes | string | |
X-Organization-Id |
header | no | string | The workspace (organization) to act in. Omitted, the session’s active organization is used. |
Responses
| Status | Body | Description |
|---|---|---|
200 |
SecretsProbe | The keys every active config resolves to, merged. Names and a count only — the values are fetched to prove the credentials work and then discarded. |
400 |
ApiError | The provider rejected the request; error contains its message. This status also covers a request without an active workspace. |
401 |
ApiError | No valid session or API key. |
403 |
ApiError | Authenticated, but not a member of the named organization — or a client collaborator without the required access on this project. |
404 |
ApiError | The resource does not exist, or the caller is a task-scoped credential and this endpoint is outside its allowlist. |
If a request fails
Section titled “If a request fails”The response table for each operation lists its documented errors. Common status codes include:
400— the body failed schema validation, or the request named no active organization. AValidationErrorbody carries the failing fields; anApiErrorbody carries onlyerror.401— no valid session or API key.403— authenticated, but not a member of the named organization, or a client collaborator without the required access.404— check the resource ID and your access to the selected Workspace.409— the expected revision or state is stale, or another operation currently owns the transition.500— the operation failed server-side. Retry only where an idempotency key makes that safe.