openapi: 3.0.3
info:
title: Sponge public Agents Secrets API
version: 1.0.0
description: Public REST endpoints for agents, wallets, transfers, payments, cards, MPP, trading, and fiat onramps.
servers:
- url: https://api.wallet.paysponge.com
description: Production
security:
- bearerAuth: []
tags:
- name: Secrets
paths:
/api/agent-keys:
post:
operationId: postApiAgentKeys
tags:
- Secrets
summary: Store a service key
description: Store an encrypted non-card service key for this agent. Use /api/credit-cards for card details.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AgentKeyRequest'
example:
service: openai
key: sk-...
label: primary
responses:
'200':
description: Successful response.
get:
operationId: getApiAgentKeys
tags:
- Secrets
summary: List stored keys
description: List stored key metadata for the agent. Values are not returned.
parameters:
- name: agentId
in: query
required: false
schema:
type: string
description: Required when not authenticating with an agent API key.
- name: service
in: query
required: false
schema:
type: string
description: Optional service filter.
responses:
'200':
description: Successful response.
delete:
operationId: deleteApiAgentKeys
tags:
- Secrets
summary: Delete a stored key
description: Delete a stored non-card service key by service. Credit cards are stored as agent payment methods.
parameters:
- name: service
in: query
required: true
schema:
type: string
description: Service name.
- name: agentId
in: query
required: false
schema:
type: string
description: Required when not authenticating with an agent API key.
responses:
'200':
description: Successful response.
/api/agent-keys/value:
get:
operationId: getApiAgentKeysValue
tags:
- Secrets
summary: Get a stored key value
description: Retrieve one decrypted non-card key value. Credit cards are stored as agent payment methods and are not returned from this endpoint.
parameters:
- name: service
in: query
required: true
schema:
type: string
description: Service name.
- name: agentId
in: query
required: false
schema:
type: string
description: Required when not authenticating with an agent API key.
responses:
'200':
description: Successful response.
components:
schemas:
AgentKeyRequest:
type: object
required:
- service
- key
properties:
service:
type: string
key:
type: string
label:
type: string
metadata:
type: object
additionalProperties: true
agentId:
type: string
description: Required when not authenticating with an agent API key.
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: API Key