Restore a revoked or expired key (api_keys.manage, recent authentication): creates a NEW key with the same configuration. The revoked one is not reactivated.
POST
/v1/orgs/{org}/api-keys/{key}/restore
const url = 'https://api.replifier.com/v1/orgs/org_01hx0000000000000000000000/api-keys/key_01hx0000000000000000000000/restore';const options = {method: 'POST'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.replifier.com/v1/orgs/org_01hx0000000000000000000000/api-keys/key_01hx0000000000000000000000/restoreA revoked key never works again (its secret may have leaked). The new one keeps the name, scopes and brand, and expires with the same validity period as the original (not exceeding the current organization maximum). An active key cannot be restored (409 api_key_action_not_applicable): use regenerate.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”org
required
string
Example
org_01hx0000000000000000000000key
required
string
Example
key_01hx0000000000000000000000Responses
Section titled “Responses”New key
Media typeapplication/json
object
id
required
string
name
required
string
brandId
required
string
scopes
required
Array<string>
last4
required
string
createdBy
required
string
createdAt
required
string
expiresAt
required
string
lastUsedAt
required
string
revokedAt
required
string
status
required
string
key
required
The full key. Shown only in this response; Replifier does not store it.
string
Example
{ "scopes": [ "contacts.read" ], "status": "active"}Invalid data
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string
Example
{ "error": { "code": "not_found" }}No session, expired session, or invalid, expired or revoked API key
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string
Example
{ "error": { "code": "not_found" }}Not allowed, API key missing the scope, IP not allowed, or request rejected (csrf_rejected)
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string
Example
{ "error": { "code": "not_found" }}Does not exist or is not visible to you
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string
Example
{ "error": { "code": "not_found" }}Conflict
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string
Example
{ "error": { "code": "not_found" }}Internal error
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string
Example
{ "error": { "code": "not_found" }}