Skip to main content
POST
/
api
/
v1
/
secrets
Create secret
curl --request POST \
  --url https://neo.api.projectdiscovery.io/api/v1/secrets \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "default_available": true,
  "name": "GITHUB_TOKEN",
  "value": "ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
'
{
  "default_available": false,
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "masked_value": "ghp_xx••••••••xxxx",
  "name": "GITHUB_TOKEN",
  "created_at": "2023-11-07T05:31:56Z",
  "created_by_agent": true,
  "project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "updated_at": "2023-11-07T05:31:56Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.neo.projectdiscovery.io/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

JWT authentication token

Body

application/json
name
string
required

Secret name (environment variable style). Must start with uppercase letter, contain only uppercase letters, numbers, and underscores.

Required string length: 1 - 128
Pattern: ^[A-Z][A-Z0-9_]*$
Example:

"GITHUB_TOKEN"

value
string
required

The secret value to store. This will be encrypted at rest. Maximum length is 10,000 characters.

Required string length: 1 - 10000
Example:

"ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

created_by_agent
boolean
default:false

Indicates whether this secret was automatically created by an AI agent (true) or manually created by the user (false). Defaults to false if not specified.

Example:

true

default_available
boolean
default:false

Whether this secret should be exposed by default at task runtime for its scope. Defaults to false if not specified.

Example:

false

project_id
string<uuid>

Optional project ID to create a project-scoped secret. If provided, the secret will be shared with all project members. Requires project membership to create.

Response

Secret created successfully

default_available
boolean
default:false
required

Whether this secret is exposed by default at task runtime for its scope. If false, it is only exposed when explicitly selected in task requests.

Example:

false

id
string<uuid>
required

Unique identifier for the secret

Example:

"550e8400-e29b-41d4-a716-446655440000"

masked_value
string
required

Masked representation of the secret value for display purposes. Shows first 3 and last 4 characters with bullets (•) in between.

Example:

"ghp_xx••••••••xxxx"

name
string
required

Secret name (used as environment variable name when injected into agent execution). Should follow UPPER_SNAKE_CASE convention.

Example:

"GITHUB_TOKEN"

created_at
string<date-time>

When the secret was created

created_by_agent
boolean

Indicates whether this secret was automatically created by an AI agent (true) or manually created by the user (false).

Example:

true

project_id
string<uuid>

Project ID if this is a project-scoped secret. Null/absent for personal secrets.

updated_at
string<date-time>

When the secret was last updated