| name | repairshopr-user-device |
| description | Register and manage user mobile devices for notifications in RepairShopr |
| license | MIT |
| compatibility | opencode |
| metadata | {"audience":"integrators, mobile app developers","api":"POST /user_devices, GET /user_devices/{id}, PUT /user_devices/{id}"} |
What I do
I manage registered mobile devices for push notifications. These devices are used to send RepairShopr notifications (e.g., ticket assignments, alerts) to users' phones/tablets via Firebase Cloud Messaging (FCM) or similar. I support creating device registrations, retrieving device info, and updating registration tokens.
When to use me
Use this when:
- Building a mobile app that needs RepairShopr push notifications
- Registering a user's device for the first time
- Updating the device's push notification token (FCM token rotates)
- Checking device registration status
- Removing/disabled a device (via update)
How to use
Required API base URL:
VITE_REPAIRSHOPR_SUBDOMAIN
VITE_REPAIRSHOPR_API_KEY
No special permissions beyond being authenticated as a user.
Create Device (POST /user_devices)
Body:
device_uuid (string) - Unique device identifier (e.g., iOS UDID or Android ID)
device_name (string, optional) - Human-readable device name
registration_token_gcm (string, optional) - FCM registration token for push notifications
system_name (string, optional) - OS name (e.g., "iOS", "Android")
model (string, optional) - Device model (e.g., "iPhone 14")
screen_size (string, optional) - Screen size
user_id - Not in body? Probably inferred from auth; but response returns user_id
Get Device (GET /user_devices/{id})
id (integer) - Device UUID? The docs say "User Device UUID" for the path param; suggests using the device's UUID as ID.
Update Device (PUT /user_devices/{id})
id (integer) - Device UUID
Body: typically registration_token_gcm to refresh token
Example call:
const device = await skill({ name: "repairshopr-user-device" }, {
device_uuid: "A1B2-C3D4-E5F6",
device_name: "John's iPhone 15",
registration_token_gcm: "fcm_token_abc123xyz",
system_name: "iOS",
model: "iPhone 15",
screen_size: "6.1 inch"
}, { method: 'POST' })
await skill({ name: "repairshopr-user-device" }, {
registration_token_gcm: "new_fcm_token_456"
}, { id: device.user_device.id, method: 'PUT' })
Response includes:
- Device object:
user_id, registration_token_gcm, id, device_uuid, device_name, system_name, model, screen_size, disabled, created_at, updated_at
Important
device_uuid is used as the identifier for GET/PUT/DELETE operations (the docs say id in path is "User Device UUID")
- The field
registration_token_gcm is the push token; update when it changes
disabled flag indicates if device is blocked from notifications
- These registrations tie a device to a user account (via authenticated user context during creation)
- Missing
device_uuid returns 422 error
Related skills
repairshopr-user - For user information
- (Notification delivery not covered by these skills)