Flatfile · Capability
API Reference — subpackage_secrets
API Reference — subpackage_secrets. 3 operations. Lead operation: List secrets. Self-contained Naftiko capability covering one Flatfile business surface.
What You Can Do
GET
List
— List secrets
/v1/secrets
POST
Upsert
— Upsert a Secret
/v1/secrets
DELETE
Delete
— Delete a secret by it's Id
/v1/secrets/{secretid}
MCP Tools
list-secrets
List secrets
read-only
idempotent
upsert-secret
Upsert a Secret
delete-secret-it-s-id
Delete a secret by it's Id
idempotent
Capability Spec
naftiko: 1.0.0-alpha2
info:
label: API Reference — subpackage_secrets
description: 'API Reference — subpackage_secrets. 3 operations. Lead operation: List secrets. Self-contained Naftiko capability
covering one Flatfile business surface.'
tags:
- Flatfile
- subpackage_secrets
created: '2026-05-19'
modified: '2026-05-19'
binds:
- namespace: env
keys:
FLATFILE_API_KEY: FLATFILE_API_KEY
capability:
consumes:
- type: http
namespace: flatfile-subpackage-secrets
baseUri: https://api.x.flatfile.com/v1
description: API Reference — subpackage_secrets business capability. Self-contained, no shared references.
resources:
- name: secrets
path: /secrets
operations:
- name: list
method: GET
description: List secrets
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: environmentId
in: query
type: string
description: The Environment of the secret.
- name: spaceId
in: query
type: string
description: The Space of the secret.
- name: actorId
in: query
type: string
description: The Actor of the secret.
- name: Authorization
in: header
type: string
description: Bearer authentication
required: true
- name: X-Disable-Hooks
in: header
type: string
required: true
- name: upsert
method: POST
description: Upsert a Secret
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: Authorization
in: header
type: string
description: Bearer authentication
required: true
- name: X-Disable-Hooks
in: header
type: string
required: true
- name: body
in: body
type: object
description: Request body (JSON).
required: false
- name: secrets-secretId
path: /secrets/{secretId}
operations:
- name: delete
method: DELETE
description: Delete a secret by it's Id
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: secretId
in: path
type: string
description: The ID of the secret.
required: true
- name: Authorization
in: header
type: string
description: Bearer authentication
required: true
- name: X-Disable-Hooks
in: header
type: string
required: true
authentication:
type: bearer
token: '{{env.FLATFILE_API_KEY}}'
exposes:
- type: rest
namespace: flatfile-subpackage-secrets-rest
port: 8080
description: REST adapter for API Reference — subpackage_secrets. One Spectral-compliant resource per consumed operation,
prefixed with /v1.
resources:
- path: /v1/secrets
name: secrets
description: REST surface for secrets.
operations:
- method: GET
name: list
description: List secrets
call: flatfile-subpackage-secrets.list
with:
environmentId: rest.environmentId
spaceId: rest.spaceId
actorId: rest.actorId
Authorization: rest.Authorization
X-Disable-Hooks: rest.X-Disable-Hooks
outputParameters:
- type: object
mapping: $.
- method: POST
name: upsert
description: Upsert a Secret
call: flatfile-subpackage-secrets.upsert
with:
Authorization: rest.Authorization
X-Disable-Hooks: rest.X-Disable-Hooks
body: rest.body
outputParameters:
- type: object
mapping: $.
- path: /v1/secrets/{secretid}
name: secrets-secretid
description: REST surface for secrets-secretId.
operations:
- method: DELETE
name: delete
description: Delete a secret by it's Id
call: flatfile-subpackage-secrets.delete
with:
secretId: rest.secretId
Authorization: rest.Authorization
X-Disable-Hooks: rest.X-Disable-Hooks
outputParameters:
- type: object
mapping: $.
- type: mcp
namespace: flatfile-subpackage-secrets-mcp
port: 9090
transport: http
description: MCP adapter for API Reference — subpackage_secrets. One tool per consumed operation, routed inline through
this capability's consumes block.
tools:
- name: list-secrets
description: List secrets
hints:
readOnly: true
destructive: false
idempotent: true
call: flatfile-subpackage-secrets.list
with:
environmentId: tools.environmentId
spaceId: tools.spaceId
actorId: tools.actorId
Authorization: tools.Authorization
X-Disable-Hooks: tools.X-Disable-Hooks
outputParameters:
- type: object
mapping: $.
- name: upsert-secret
description: Upsert a Secret
hints:
readOnly: false
destructive: false
idempotent: false
call: flatfile-subpackage-secrets.upsert
with:
Authorization: tools.Authorization
X-Disable-Hooks: tools.X-Disable-Hooks
body: tools.body
outputParameters:
- type: object
mapping: $.
- name: delete-secret-it-s-id
description: Delete a secret by it's Id
hints:
readOnly: false
destructive: true
idempotent: true
call: flatfile-subpackage-secrets.delete
with:
secretId: tools.secretId
Authorization: tools.Authorization
X-Disable-Hooks: tools.X-Disable-Hooks
outputParameters:
- type: object
mapping: $.