REST /api/v1/device-tokens 5 endpoints
GET /api/v1/device-tokens/api/v1/device-tokens

List registered device tokens. Filter by user_id to get all tokens for a user.

Public

Response Example

{
  "data": [
    {
      "token_id": "c9d0e1f2-a3b4-5678-cdef-789012345678",
      "user_id": "coord_maya_patel",
      "fcm_token": "dGhpcyBpcyBhIHNhbXBsZSBGQ00gdG9rZW4gZm9yIGRlbW8gcHVycG9zZXM",
      "platform": "android",
      "is_active": true,
      "registered_at": "2026-01-15T10:30:00Z",
      "last_used_at": "2026-03-25T08:00:05Z"
    },
    {
      "token_id": "d0e1f2a3-b4c5-6789-defa-890123456789",
      "user_id": "mentor_sarah_chen",
      "fcm_token": "c2FtcGxlIEZDTSB0b2tlbiBmb3IgbWVudG9yIFNhcmFoIENoZW4gZGVtbw",
      "platform": "ios",
      "is_active": true,
      "registered_at": "2026-02-03T14:00:00Z",
      "last_used_at": "2026-03-16T08:00:08Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 2
  }
}
GET /api/v1/device-tokens/api/v1/device-tokens/:token_id

Get a specific registered device token.

Public

Response Example

{
  "token_id": "c9d0e1f2-a3b4-5678-cdef-789012345678",
  "user_id": "coord_maya_patel",
  "fcm_token": "dGhpcyBpcyBhIHNhbXBsZSBGQ00gdG9rZW4gZm9yIGRlbW8gcHVycG9zZXM",
  "platform": "android",
  "is_active": true,
  "registered_at": "2026-01-15T10:30:00Z",
  "last_used_at": "2026-03-25T08:00:05Z"
}
POST /api/v1/device-tokens/api/v1/device-tokens

Register a new device token for push notification delivery.

Public

Request Example

{
  "user_id": "mentor_priya_sharma",
  "fcm_token": "ZXhhbXBsZSBGQ00gdG9rZW4gZm9yIG5ld2x5IHJlZ2lzdGVyZWQgZGV2aWNl",
  "platform": "ios"
}

Response Example

{
  "token_id": "e1f2a3b4-c5d6-7890-efab-901234567890",
  "user_id": "mentor_priya_sharma",
  "fcm_token": "ZXhhbXBsZSBGQ00gdG9rZW4gZm9yIG5ld2x5IHJlZ2lzdGVyZWQgZGV2aWNl",
  "platform": "ios",
  "is_active": true,
  "registered_at": "2026-03-26T11:00:00Z",
  "last_used_at": null
}
PUT /api/v1/device-tokens/api/v1/device-tokens/:token_id

Update a device token (e.g., refresh FCM token after rotation).

Public

Request Example

{
  "fcm_token": "dXBkYXRlZCBGQ00gdG9rZW4gYWZ0ZXIgcm90YXRpb24gZm9yIGRlbW8",
  "is_active": true
}

Response Example

{
  "token_id": "c9d0e1f2-a3b4-5678-cdef-789012345678",
  "user_id": "coord_maya_patel",
  "fcm_token": "dXBkYXRlZCBGQ00gdG9rZW4gYWZ0ZXIgcm90YXRpb24gZm9yIGRlbW8",
  "platform": "android",
  "is_active": true,
  "registered_at": "2026-01-15T10:30:00Z",
  "last_used_at": "2026-03-26T11:05:00Z"
}
DELETE /api/v1/device-tokens/api/v1/device-tokens/:token_id

Remove a device token (user logout or token invalidation).

Public

Response Example

{
  "deleted": true,
  "token_id": "c9d0e1f2-a3b4-5678-cdef-789012345678"
}

Additional Metadata

{
  "contract_summary": {
    "total_contracts": 410,
    "total_endpoints": 2416,
    "api_styles_used": [
      "rest"
    ]
  },
  "generated_at": "2026-03-26T06:55:53.316Z"
}