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.
GET
/api/v2/secret/{identifier}/status
curl \
--request GET 'https://nz.onetimesecret.com/api/v2/secret/{identifier}/status' \
--user "username:password"
Response examples (200)
Object-1
{
"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"
}