SwiftGoma.SwiftGoma

Search endpoints

Jump to any API endpoint by name, method, or path

Two-Factor (TOTP)

Regenerate backup codes

POST/api/v1/auth/totp/regenerate-backup-codes

Invalidates all existing backup codes and issues a fresh set.

Requires Authorization
Authenticated action

Body parameters

codestringrequired
A current 6-digit code or an unused backup code.
localestring
en or fr.
Request
curl --request POST \
  --url https://api.swiftgoma.com/api/v1/auth/totp/regenerate-backup-codes \
  --header 'Authorization: Bearer <access_token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "code": "482913",
  "locale": "fr"
}'
200Example response
{
  "success": true,
  "data": {
    "backupCodes": [
      "3F9K-1QLM",
      "A6DP-8ZRT",
      "Y2WX-4NHC",
      "B7VE-0JGS",
      "Q5UM-6KFA"
    ]
  }
}