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

Register push token

PUT
https://test.diveraid.com/api/v1/profile/push-token
Profile
Maintainer:Not configured

Overview#

Registers the device's push token for the authenticated session, so RAID can send push notifications to the app.
The registration is bound to the personal access token used for the call: there is one push token per access token. Calling the endpoint again with the same access token replaces the previous registration instead of adding a second one.
Controller: App\Http\Controllers\Api\V1\Profile\PushTokenController::store()
Route name: api.v1.profile.push-token.store

Authentication#

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

Request#

Method: PUT
Path: /api/v1/profile/push-token
Content-Type: application/json

Body#

{
  "provider": "expo",
  "token": "ExponentPushToken[xxxxxxxxxxxxxxxxxxxxxx]",
  "platform": "ios",
  "app_version": "1.2.3"
}
FieldTypeRequiredValidationDescription
providerstringYesrequired|enumPush provider. Only expo is accepted
tokenstringYesrequired|string|max:255, plus regex when provider is expoExpo token, in the form ExponentPushToken[...] or ExpoPushToken[...]
platformstringYesrequired|enumios or android
app_versionstringNonullable|string|max:32Version of the app that registered the token
Validated by App\Http\Requests\Api\V1\Profile\StorePushTokenRequest.

Example request#


Response 200 OK#

{
  "success": true,
  "status": "success",
  "message": "OK",
  "data": {
    "provider": "expo",
    "platform": "ios",
    "app_version": "1.2.3",
    "updated_at": "2026-10-14T09:30:00.000000Z"
  }
}
The token value itself is not echoed back. app_version is null when it was not sent.

Errors#

401 Unauthorized#

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

403 Forbidden#

The account is suspended. Every token of the account is revoked at the same time.
{
  "success": false,
  "status": "error",
  "message": "Account suspended"
}

422 Unprocessable Entity - validation#

{
  "success": false,
  "status": "error",
  "message": "Validation failed",
  "errors": {
    "token": ["The token field format is invalid."],
    "platform": ["The selected platform is invalid."]
  }
}

Notes#

One push token per access token. A second PUT with the same access token replaces the first, including when the token value or the platform changes.
A device belongs to one account at a time. If the token value is already registered under a different access token (of any user), that other registration is removed first. A phone now used by user B therefore never notifies user A.
The registration disappears with its access token. It is deleted automatically on logout, password reset, revocation of the token, account suspension and expiry pruning. The app must register again after every login.
Use DELETE /api/v1/profile/push-token to stop notifications without logging out.

Push payload#

Notifications carry a data.type that tells the app what happened. The values the app can receive:
data.typeExtra fieldsMeaning
certification_issuedlog_codeA certification was issued to the diver. log_code is the certification identifier used by the diver routes certifications/{log_code}/...
course_openedlog_codeA course was opened for the diver. log_code is the course log identifier
document_rejecteddocument_id, document_typeOne of the diver's documents was rejected. document_id is the document identifier, document_type its type value. The rejection reason is not in the payload: the app shows it after opening the document
renewal_approvednoneThe diver's professional renewal request was approved
course_level_up_openedlog_codeA level-up was opened for the diver. log_code is the course log identifier
course_extendedlog_codeThe diver's course was extended. log_code is the course log identifier
dive_center_removednoneThe diver was removed from a dive center
certification_revokedlog_codeA certification was revoked. log_code is the certification identifier. The certification is no longer available, so the app should not try to open it
award_obtainednoneThe diver received a new award. The payload carries no identifier, the app can refresh the awards list
classroom_createdclassroom_idA classroom was created for the instructor. classroom_id is the classroom identifier used by GET /api/v1/professional/classroom/{classroom}
classrooms_creatednoneSeveral classrooms were created for the instructor in one accreditation; there is no single classroom to open
course_expiringlog_codeThe diver's course is about to expire (30 and 7 days before). log_code is the course log identifier
certification_expiringlog_codeThe diver's certification is about to expire (30 and 7 days before). log_code is the certification identifier
professional_status_expiringnoneThe professional status is about to expire (30 and 7 days before). The payload carries no identifier

Source: docs/api/profile/PUT_push_token.md

Request

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

Examples

Responses

🟢200
application/json
Push token registered
Bodyapplication/json

🟠401
🟠403
🟠422
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PUT 'https://test.diveraid.com/api/v1/profile/push-token' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "provider": "expo",
    "token": "string",
    "platform": "ios",
    "app_version": "string"
}'
Response Response Example
200 - Example 1
{
    "status": "success",
    "message": "string",
    "data": {
        "provider": "expo",
        "platform": "ios",
        "app_version": "string",
        "updated_at": "2019-08-24T14:15:22.123Z"
    }
}
Modified at 2026-11-05 14:28:57
Previous
Update profile
Next
Update password
Built with