RAID API
  1. Profile
  • DiveRAID frontend public API
    • Search divers
      POST
    • Search instructors
      POST
    • Search dive centers
      POST
    • Search dive centers by country
      GET
  • DiveRAID rest API V1
    • Auth
      • Register a new user
      • Login and get a Sanctum token
      • Send password reset email
      • Reset password using token
      • Logout and revoke the current token
      • Resend email verification
      • Complete a two-factor login and get a Sanctum token
    • Profile
      • The user resource
      • Get authenticated user profile
        GET
      • Update profile
        PATCH
      • Register push token
        PUT
      • Update password
        PATCH
      • Remove push token
        DELETE
      • Rotate exam unlock code
        POST
      • Delete account
        DELETE
      • Update dive center association
        PATCH
    • Diver
      • Shared diver resources
      • Courses
        • List active courses
        • Get exam result
        • Submit course exam
        • Sign skills (diver)
        • Get course detail
        • Submit module quiz
        • List expired courses
        • Get quiz result
        • Get skills progress
      • Free Learnings
        • List enrolled free learnings
        • Get free learning quiz result
        • List available free learning courses
        • Submit free learning module quiz
        • Get free learning detail
        • Enroll in a free learning course
      • Certifications
        • Get certification history
        • Get certification quiz result
        • Get certification exam result
        • Get certification skills
        • List diver certifications
      • Dive Logs
        • Delete dive log
        • Create dive log
        • Update dive log
        • List loggable courses
        • List dive logs (paginated)
        • Get dive log
      • Awards
        • List the recognition cards issued to the user
      • Documents
        • Upload own medical certificate or insurance
        • List own medical certificates and insurance
        • List diver documents
      • Forms
        • List diver forms
      • Medical
        • Get medical questionnaire structure
        • Submit medical questionnaire
      • Store
        • List courses available for purchase
        • Get order status
    • Professional
      • Students
        • List students
        • Get student progress
        • Sign student skills
        • Get student exam result
        • Get student quiz result
        • Get student skills progress
      • Certifications
        • Get certification history
        • Get certification quiz result
        • Get certification exam result
        • Get certification skills
        • List all professional certifications
        • List diver-level certifications
        • List examiner certifications
        • List professional certifications
        • List specialty certifications
        • List trainer certifications
      • Classroom
        • List classrooms
        • Get classroom progress (all students)
        • Get classroom student progress
        • Sign classroom student skills
        • Get classroom student exam result
        • Get classroom student quiz result
        • Get classroom student skills
      • Renewals
        • List renewal courses
        • Get renewal exam result
        • Submit renewal exam
        • Sign renewal skills
        • Renewal status
        • Get renewal progress
        • Submit renewal module quiz
        • Get renewal quiz result
        • Get renewal skills progress
      • Dive Logs
        • Get student dive log
        • Sign student dive log
        • List student dive logs for a course
    • Sync
      • Download full course data for offline use
      • Upload offline operations
      • Get sync status
    • Public
      • List all countries
      • Dive-log enum values with labels in the response language
      • Get country data
      • Get country divisions (states/provinces)
      • List time zone identifiers, optionally narrowed to one country
      • List, search, and radius-search publicly visible dive centres
      • Every publicly visible, geolocated dive centre as a map marker
      • Countries with at least one publicly visible dive centre
      • Full detail of one publicly visible dive centre
    • Library
      • List the RAID document library
      • List the current RAID standards
  • Schemas
    • Frontend API Schema
      • DiverSearch
    • SuccessResponse
    • DiverCertification
    • ValidationErrorResponse
    • TwoFactorChallengeResponse
    • TokenResponse
    • IssuedCertification
    • ErrorResponse
    • DiveLog
    • ExamResult
    • QuizResult
    • CourseLogDetail
    • CourseLog
    • UserProfile
    • SkillProgress
    • Certification
    • PaginatedDiveLogs
    • StoreItem
    • PaymentIntentResponse
    • OrderConfirmResponse
    • OrderStatusResponse
    • InstructorSearch
    • DiveCenterSearch
  1. Profile

Update password

PATCH
https://test.diveraid.com/api/v1/profile/password
Profile
Maintainer:Not configured

Overview#

Changes the authenticated user's password. The caller must prove knowledge of the current one.
On success, every other token on the account is revoked. The token used to make the call survives: it has just proved knowledge of the current password, so the device stays signed in.
Controller: App\Http\Controllers\Api\V1\Profile\ProfileController::updatePassword()
Route name: api.v1.profile.password

Authentication#

Type: Bearer Token
Header: Authorization: Bearer {token}

Request#

Method: PATCH
Path: /api/v1/profile/password
Content-Type: application/json

Body#

{
  "current_password": "OldSecurePass123!",
  "password": "NewSecurePass456!",
  "password_confirmation": "NewSecurePass456!"
}
FieldTypeRequiredValidationDescription
current_passwordstringYesrequired|current_password:apiChecked against the stored hash on the api guard
passwordstringYesrequired|different:current_password|string|confirmed plus the password policyMust differ from the current one
password_confirmationstringYesrequired|same:password
Validated by App\Http\Requests\Api\V1\Profile\UpdatePasswordRequest.

Password policy#

Built from config('app.password_validation'): minimum length 8, mixed case, numbers and symbols required; letters and breach-list checking not enforced. The policy is configuration-driven and can change without a code release, so treat the 422 response as authoritative.

Example request#


Response 200 OK#

{
  "success": true,
  "status": "success",
  "message": "Password updated successfully"
}
No data key, and no token. This is a change from the previous authentication scheme, which returned a fresh JWT here. Keep using the token you already have: it remains valid.

Errors#

401 Unauthorized#

Standard shape. message is one of Unauthenticated, Invalid token, Token expired.

422 Unprocessable Entity — validation#

{
  "success": false,
  "status": "error",
  "message": "Validation failed",
  "errors": {
    "current_password": ["The current password is incorrect."],
    "password": ["The password field must be different from current password."]
  }
}
A wrong current_password is a validation failure, not a 401.

429 Too Many Requests#

{
  "success": false,
  "status": "error",
  "message": "Too many requests"
}
Retry-After header present. The route allows 6 requests per minute per user (throttle:profile-write, shared by PATCH /api/v1/profile and PATCH /api/v1/profile/password), counting successful and failed attempts alike, to limit guesses of current_password.

Notes#

Validation messages follow the response language (README §10). The field names inside them are translated with the user's stored default_language as is, so a legacy code (cn, kr, us) gets English field names.
Token effect: all other tokens deleted, caller's own kept. Every other device signed in to the account must log in again.
This differs from the forgot-password reset, which revokes every token including the caller's, because there the caller has proved nothing.

Source: docs/api/profile/PATCH_password.md

Request

Authorization
JWT Bearer
Add the parameter
Authorization
to Headers
Example:
Authorization: ********************
or
Body Params application/jsonRequired

Examples

Responses

🟢200
application/json
Password updated, new token issued
Bodyapplication/json

🟠401
🟠422
🟠429
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PATCH 'https://test.diveraid.com/api/v1/profile/password' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "current_password": "pa$$word",
    "password": "pa$$word",
    "password_confirmation": "pa$$word"
}'
Response Response Example
200 - Example 1
{
    "status": "success",
    "message": "string",
    "data": {
        "token": "string",
        "token_type": "Bearer",
        "expires_in": 0
    }
}
Modified at 2026-11-05 14:28:57
Previous
Register push token
Next
Remove push token
Built with