Notifications keep users informed of activity within Tourify. The push token endpoint stores an Expo device token against the user’s account so the backend can deliver push notifications. In-app notification records are fetched, and individually or bulk-marked as read, via the endpoints below. All notifications endpoints require authentication.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/astrxnomo/tourify/llms.txt
Use this file to discover all available pages before exploring further.
POST /api/push-token
Registers an Expo push token on the authenticated user’s account (stored inusers.push_token). Call this endpoint once after the user grants notification permissions in the mobile app, and again whenever the token is refreshed by Expo.
This endpoint requires authentication. Include your bearer token in the
Authorization header.auth:sanctum).
Request Body
The Expo push token for the device (e.g.,
ExponentPushToken[xxxxxxxxxxxxxxxxxxxxxx]).Response Fields
A confirmation message. Value:
"Token registrado."Example request
GET /api/notifications
Returns all in-app notifications for the authenticated user, sorted by most recent first.This endpoint requires authentication. Include your bearer token in the
Authorization header.auth:sanctum).
Response Fields
Returns a JSON array of notification objects.Unique identifier of the notification.
ID of the user the notification belongs to.
ID of the related resource (e.g., an event or place), or
null if the notification has no linked resource.Morph type of the related resource (e.g.,
App\Models\Event), or null.Short notification title displayed in the app.
Body text of the notification, or
null if no message was set.true if the notification has been marked as read, false otherwise.Timestamp when the notification was created.
Timestamp when the notification was last updated.
Example request
PATCH /api/notifications//read
Marks a single notification as read by settingis_read to true. Returns HTTP 403 if the notification belongs to a different user.
This endpoint requires authentication. Include your bearer token in the
Authorization header.auth:sanctum).
Path Parameters
The ID of the notification to mark as read.
Response Fields
Returns the updated notification object.Unique identifier of the notification.
ID of the owning user.
ID of the related resource, or
null.Morph type of the related resource, or
null.Short notification title.
Body text of the notification, or
null.Always
true after a successful call to this endpoint.Timestamp when the notification was created.
Timestamp when the notification was last updated (will reflect the time of this request).
Example request
PATCH /api/notifications/read-all
Marks every unread notification belonging to the authenticated user as read in a single bulk operation.This endpoint requires authentication. Include your bearer token in the
Authorization header.auth:sanctum).
Only notifications where
is_read is false are updated — already-read notifications are left untouched.Response Fields
A confirmation message. Value:
"Todas las notificaciones marcadas como leídas."Example request