---
title: "Create Developer Secret"
method: POST
path: "/secrets"
tags: ["secrets"]
---

# Create Developer Secret

`POST /secrets`

Create a new secret for a developer.

Args:
    developer_id: ID of the developer creating the secret
    secret: Secret to create

Returns:
    The created secret

Raises:
    HTTPException: If a secret with this name already exists (409 Conflict)

## Request body

- CreateSecretRequest
  - `metadata` object, nullable
  - `name` string, required
  - `description` string, nullable
  - `value` string, required

## Response `201`

Successful Response

- Secret — A secret that can be used in tasks and sessions
  - `id` string, uuid, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `metadata` object, nullable
  - `name` string, required
  - `description` string, nullable
  - `value` string, required

## Other responses

- `422` — Validation Error

## Changes

- **2025-05-12** `3b58badc86fa` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/julep-ai/apis/julep-agents-api/changes/secrets/post.md)

---

[API](https://skmtc.dev/julep-ai/apis/julep-agents-api.md) · [All operations](https://skmtc.dev/julep-ai/apis/julep-agents-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/julep-ai/julep-agents-api/revisions/21c8182519ef/schema)
