---
title: "Add Secret"
method: POST
path: "/secrets"
tags: ["Secrets"]
---

# Add Secret

`POST /secrets`

Store a new secret (value encrypted before storage). Returns all secrets.

## Request body

- SecretCreateRequest — Request to store a new secret.
  - `type` string, required — Secret type: 'llm_key', 'github_token', 'integration_key', etc.
  - `provider` string, required — Provider: 'anthropic', 'google', 'github', 'azure', etc.
  - `label` string, required — User-friendly name for this credential.
  - `value` string, required — Plaintext secret value (encrypted on server).
  - `is_default` boolean
  - `authorizer_id` string, nullable — Authorizer artifact that owns this secret
  - `expires_at` string, nullable — ISO-8601 UTC expiry timestamp (for bearer tokens)

## Response `201`

Successful Response

- SecretResponse[]
  - `id` string, required
  - `type` string, required
  - `provider` string, required
  - `label` string, required
  - `created_time` string, required
  - `is_default` boolean, required
  - `authorizer_id` string, nullable
  - `encrypted_value` string, nullable
  - `expires_at` string, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/agience/apis/agience-platform-api.md) · [All operations](https://skmtc.net/agience/apis/agience-platform-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/agience/agience-platform-api/revisions/187bad270c94/schema)
