Skip to main content

Reset Sessions

Invalidates all open JWT sessions for a specified user, forcing them to re-authenticate on their next request.

Endpoint

POST /v2/users/reset/{id}

Path Parameters

ParameterTypeRequiredDescription
idintegerYesThe User ID whose sessions should be invalidated

This endpoint is particularly useful for security incidents — for example, if a user's credentials are suspected to be compromised, calling this endpoint immediately revokes all active bearer tokens without requiring an API key rotation.

Response

Returns a boolean indicating whether the session reset was successful.

{
"success": true,
"data": true
}

Code Examples

curl -X POST "https://rest.ecgrid.io/v2/users/reset/$ID" \
-H "X-API-Key: $ECGRID_API_KEY"

See Also