---
title: "POST /accounts/key/generate_secret_key/"
method: POST
path: "/accounts/key/generate_secret_key/"
tags: ["accounts"]
---

# POST /accounts/key/generate_secret_key/

`POST /accounts/key/generate_secret_key/`

## Request

- Base URL: `http://localhost:8000`
- URL: `http://localhost:8000/accounts/key/generate_secret_key/`
- Auth: one of:
  - API key in header `X-Api-Key`
  - API key in header `X-Secret-Key`

## Request body

- CreateSecretKey
  - `key_name` string, required

## Response `200`

OK

- SecretKeyCreateResponse
  - `status` boolean, required
  - `result` SecretKeyCreateResult, required
    - `key_id` string, uuid, required
    - `key_name` string, required
    - `api_key` string, required
    - `masked_api_key` string, required
    - `secret_key` string, required
    - `masked_secret_key` string, required

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `500`: Internal Server Error
- `default`: Default error response

---

[API](https://skmtc.dev/futureagi/apis/future-agi-management-api.md) · [All operations](https://skmtc.dev/futureagi/apis/future-agi-management-api/llms.txt) · [OpenAPI document](https://skmtc.dev/futureagi/apis/future-agi-management-api/revisions/c8684118e142?raw)
