---
title: "POST /rotated-secret-create-splunk"
method: POST
path: "/rotated-secret-create-splunk"
tags: ["v2"]
---

# POST /rotated-secret-create-splunk

`POST /rotated-secret-create-splunk`

## Request body

- RotatedSecretCreateSplunk — rotatedSecretCreateSplunk is a command that creates a rotated secret for a Splunk target. Currently we support target-rotator behavior (rotate credentials on the target itself).
  - `audience` string — Token audience for Splunk token creation (required for rotator-type=token)
  - `authentication-credentials` string — The credentials to connect with use-user-creds/use-target-creds
  - `auto-rotate` string — Whether to automatically rotate every --rotation-interval days, or disable existing automatic rotation [true/false]
  - `delete_protection` string — Protection from accidental deletion of this object [true/false]
  - `description` string — Description of the object
  - `expiration-date` string — Token expiration date in YYYY-MM-DD format (required for rotator-type=token when manual rotation is selected and no existing token is provided). Time will be set to 00:00 UTC.
  - `hec-token` string — Current Splunk HEC token value to store (relevant only for rotator-type=hec-token). If not provided, a new HEC input will be created in Splunk.
  - `hec-token-name` string — Splunk HEC input name to manage (required for rotator-type=hec-token)
  - `input-rule` string[] — Agentic input rule in name=...,rule=... format (e.g. name=rule1,rule=Sanitize input)
  - `item-custom-fields` object — Additional custom fields to associate with the item
  - `json` boolean — Set output format to JSON
  - `key` string — The name of a key that used to encrypt the secret value (if empty, the account default protectionKey key will be used)
  - `max-versions` string — Set the maximum number of versions, limited by the account settings defaults.
  - `name` string, required — Rotated secret name
  - `output-rule` string[] — Agentic output rule in name=...,rule=... format (e.g. name=rule1,rule=Mask secrets)
  - `password-length` string — The length of the password to be generated
  - `rotated-password` string — rotated-username password (relevant only for rotator-type=password)
  - `rotated-username` string — username to be rotated, if selected use-self-creds at rotator-creds-type, this username will try to rotate it's own password, if use-target-creds is selected, target credentials will be use to rotate the rotated-password (relevant only for rotator-type=password)
  - `rotation-event-in` string[] — How many days before the rotation of the item would you like to be notified
  - `rotation-hour` integer — The Hour of the rotation in UTC
  - `rotation-interval` string — The number of days to wait between every automatic key rotation (1-365)
  - `rotator-type` string, required — The rotator type. options: [target/password/token/hec-token]
  - `splunk-token` string — Current Splunk authentication token to store (relevant only for rotator-type=token). If not provided, a new token will be created in Splunk.
  - `tags` string[] — Add tags attached to this object
  - `target-name` string, required — The target name to associate
  - `token` string — Authentication token (see `/auth` and `/configure`)
  - `token-owner` string — Splunk token owner username (relevant only for rotator-type=token)
  - `uid-token` string — The universal identity token, Required only for universal_identity authentication

## Response `200`

rotatedSecretCreateSplunkResponse wraps response body.

- RotatedSecretCreateOutput
  - `name` string

## Other responses

- `default` — errorResponse wraps any error to return it as a JSON object with one "error" field.

---

[API](https://skmtc.net/akeyless/apis/akeyless-api.md) · [All operations](https://skmtc.net/akeyless/apis/akeyless-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/akeyless/akeyless-api/versions/0ceb25634501/schema)
