Skip to main content
POST
/
v1
/
teams
/
{team_id}
/
secrets
Create Secret
curl --request POST \
  --url https://api.dataraven.io/v1/teams/{team_id}/secrets \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "secret_type": "s3",
  "auth_method": "s3_access_key",
  "description": "<string>",
  "credentials": {},
  "vault_connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "field_mappings": [
    {
      "field_name": "<string>",
      "reference": "<string>"
    }
  ]
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "description": "<string>",
  "secret_type": "s3",
  "auth_method": "s3_access_key",
  "created_at": "2023-11-07T05:31:56Z",
  "created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

team_id
string<uuid>
required

Body

application/json

Schema for creating a new secret.

Secrets can be created in two ways:

Option 1: Direct credentials (stored in AWS SSM Parameter Store) Provide credentials dict with provider-specific fields.

Option 2: External vault reference (1Password, Doppler, Infisical) Provide vault_connection_id and field_mappings to reference secrets stored in your external vault.

Provider-specific credential fields (for Option 1):

AWS S3: { "access_key_id": "string", "secret_access_key": "string" }

Azure Blob Storage (Option 1 - Account Name/Key): { "account_name": "string", "account_key": "string" }

Azure Blob Storage (Option 2 - SAS URL - Recommended): { "sas_url": "https://account.blob.core.windows.net/container?sp=racwdl&st=2024-01-01&se=2025-01-01&..." }

Google Cloud Storage: { "service_account_json": "string" # JSON key file as string }

Cloudflare R2: { "access_key_id": "string", "secret_access_key": "string" }

Backblaze B2: { "application_key_id": "string", "application_key": "string" }

Wasabi (requires endpoint_url in location config): { "access_key_id": "string", "secret_access_key": "string" }

Railway (S3-compatible): { "access_key_id": "string", "secret_access_key": "string" }

Oracle Object Storage (S3-compatible): { "access_key_id": "string", "secret_access_key": "string" }

name
string
required

Secret name

Required string length: 1 - 255
secret_type
enum<string>
required

Type of credentials (s3, azure_blob, gcs, etc.)

Available options:
s3,
azure_blob,
gcs,
r2,
b2,
wasabi,
railway,
oracle_object_storage_s3,
s3_compatible
auth_method
enum<string>
required

Authentication mechanism (e.g., azure_account_key, s3_access_key)

Available options:
s3_access_key,
r2_access_key,
wasabi_access_key,
railway_access_key,
oracle_object_storage_s3_access_key,
s3_compatible_access_key,
azure_account_key,
azure_sas_url,
gcs_service_account,
b2_application_key
description
string | null

Optional description

Maximum string length: 2000
credentials
Credentials · object

Provider-specific credentials (NEVER returned in responses)

vault_connection_id
string<uuid> | null

ID of the vault connection to use for resolving credentials

field_mappings
FieldMapping · object[] | null

Mappings from credential field names to external vault references

Response

Successful Response

Schema for secret metadata response (without credentials).

Credentials are NEVER returned in any API response.

id
string<uuid>
required
name
string
required
description
string | null
required
secret_type
enum<string>
required

Cloud storage provider types.

Available options:
s3,
azure_blob,
gcs,
r2,
b2,
wasabi,
railway,
oracle_object_storage_s3,
s3_compatible
auth_method
enum<string>
required

Authentication mechanism identifiers for cloud storage credentials.

Each provider may support one or more authentication methods. Explicit names ensure clarity and make it easy to add new methods.

Available options:
s3_access_key,
r2_access_key,
wasabi_access_key,
railway_access_key,
oracle_object_storage_s3_access_key,
s3_compatible_access_key,
azure_account_key,
azure_sas_url,
gcs_service_account,
b2_application_key
created_at
string<date-time>
required
created_by
string<uuid>
required