GET /api/v2/secret/{identifier}/status

Checks whether a secret exists and returns its current state without consuming it. Returns the secret's metadata including expiration details, or a state of "unknown" if the secret does not exist.

Path parameters

  • identifier string Required

    The identifier parameter

Responses

  • 200 application/json

    Successful response

    Any of:
  • 401 application/json

    Unauthorized - Authentication required

    Hide response attributes Show response attributes object
    • error string

      Error type identifier (e.g., "FormError")

    • message string Required

      Human-readable error message

    • field string

      Field that caused the error, if applicable

    • error_id string

      Unique error tracking identifier

  • 403 application/json

    Forbidden - Insufficient permissions

    Hide response attributes Show response attributes object
    • error string

      Error type identifier (e.g., "FormError")

    • message string Required

      Human-readable error message

    • field string

      Field that caused the error, if applicable

    • error_id string

      Unique error tracking identifier

  • 404 application/json

    Not Found - Resource does not exist

    Hide response attributes Show response attributes object
    • error string

      Error type identifier (e.g., "FormError")

    • message string Required

      Human-readable error message

    • field string

      Field that caused the error, if applicable

    • error_id string

      Unique error tracking identifier

  • 500 application/json

    Internal Server Error - Something went wrong

    Hide response attributes Show response attributes object
    • error string

      Error type identifier (e.g., "FormError")

    • message string Required

      Human-readable error message

    • field string

      Field that caused the error, if applicable

    • error_id string

      Unique error tracking identifier

GET /api/v2/secret/{identifier}/status
curl \
 --request GET 'https://uk.onetimesecret.com/api/v2/secret/{identifier}/status' \
 --user "username:password"
Response examples (200)
{
  "record": {
    "state": "unknown"
  }
}
{
  "record": {
    "identifier": "string",
    "created": "string",
    "updated": "string",
    "key": "string",
    "shortid": "string",
    "state": "new",
    "has_passphrase": "string",
    "verification": "string",
    "secret_value": "string",
    "is_previewed": "string",
    "is_revealed": "string",
    "secret_ttl": "string",
    "lifespan": "string",
    "is_viewed": "string",
    "is_received": "string"
  },
  "details": {
    "current_expiration": 42.0
  }
}
Response examples (401)
{
  "error": "string",
  "message": "string",
  "field": "string",
  "error_id": "string"
}
Response examples (403)
{
  "error": "string",
  "message": "string",
  "field": "string",
  "error_id": "string"
}
Response examples (404)
{
  "error": "string",
  "message": "string",
  "field": "string",
  "error_id": "string"
}
Response examples (500)
{
  "error": "string",
  "message": "string",
  "field": "string",
  "error_id": "string"
}