Update one-time token status

PUT /api/one-time-tokens/{id}/status

Update the status of a one-time token by its ID. This can be used to mark the token as consumed or expired.

Path parameters

  • id string Required

    The unique identifier of the one time token.

application/json

Body Required

  • status string Required

    The new status of the one-time token.

    Values are active, consumed, revoked, or expired.

Responses

  • 200 application/json

    The one-time token status was updated successfully.

    Hide response attributes Show response attributes object
    • tenantId string Required

      Maximum length is 21.

    • id string Required

      Minimum length is 1, maximum length is 21.

    • email string Required

      Minimum length is 1, maximum length is 128.

    • token string Required

      Minimum length is 1, maximum length is 256.

    • context object Required
      Hide context attribute Show context attribute object
    • status string Required

      Values are active, consumed, revoked, or expired.

    • createdAt number Required
    • expiresAt number Required
  • Bad Request

  • Unauthorized

  • Forbidden

  • Not Found

PUT /api/one-time-tokens/{id}/status
curl \
 --request PUT 'https://[tenant_id].logto.app/api/one-time-tokens/{id}/status' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"status":"active"}'
Request examples
{
  "status": "active"
}
Response examples (200)
{
  "tenantId": "string",
  "id": "string",
  "email": "string",
  "token": "string",
  "context": {
    "jitOrganizationIds": [
      "string"
    ]
  },
  "status": "active",
  "createdAt": 42.0,
  "expiresAt": 42.0
}