Skip to main content

List Secrets

Returns all secrets for a recipient. Secret values are never included in list responses — only metadata such as name, status, and expiration.
GET /v1/recipients/:recipientId/secrets

Path Parameters

ParameterTypeDescription
recipientIdstringThe recipient ID

Example Request

curl https://api.docyard.io/v1/recipients/rcp_01HQ3N.../secrets \
  -H "Authorization: Bearer dk_live_a1b2c3d4..."

Response

[
  {
    "id": "sec_01HQ5A...",
    "name": "production-api-key",
    "status": "ACTIVE",
    "expiresAt": "2025-04-15T11:00:00.000Z",
    "rotatedAt": null,
    "createdAt": "2025-01-15T11:00:00.000Z"
  },
  {
    "id": "sec_01HQ5B...",
    "name": "staging-api-key",
    "status": "ROTATED",
    "expiresAt": null,
    "rotatedAt": "2025-01-20T09:00:00.000Z",
    "createdAt": "2025-01-10T08:00:00.000Z"
  },
  {
    "id": "sec_01HQ5C...",
    "name": "deprecated-key",
    "status": "REVOKED",
    "expiresAt": null,
    "rotatedAt": null,
    "createdAt": "2024-12-01T00:00:00.000Z"
  }
]

Error Handling

StatusCondition
401Missing or invalid API key
404Recipient not found
Secret values are never returned in list or retrieve operations. The plaintext secret is only shown once at generation time. Use the status field to understand the lifecycle: ACTIVE, ROTATED, or REVOKED.