Skip to main content

Device App Register

The Device App Register API enables applications to register themselves with the backend system. This endpoint is typically used during app initialization or onboarding processes to establish a connection between client applications and the server infrastructure.

Base URL: https://gate.zequenze.com/api/v1

Authentication: All endpoints require a Bearer token:

Authorization: Bearer <your-api-token>

Overview

The Device App Register API category provides functionality for applications to register themselves with the backend system. This is a crucial step in the application lifecycle that establishes the connection between client applications (mobile apps, desktop software, IoT devices, etc.) and the server infrastructure.

When an application starts up for the first time or needs to re-establish its connection with the backend, it uses this registration endpoint to:

  • Authenticate the application with the server
  • Provide device/application metadata for tracking and management
  • Receive configuration data or tokens for future API calls
  • Enable the backend to track and manage connected applications

This registration process is essential for applications that need to maintain persistent connections or receive push notifications, updates, or other server-initiated communications. The registration data helps administrators monitor connected applications and manage device policies across their infrastructure.


Endpoints

POST /device_app_register/

Description: Registers a new application instance with the backend system. This endpoint accepts application metadata and device information to establish a registered session between the client application and the server. Use this endpoint when your application starts up for the first time, after a fresh installation, or when re-establishing connection after extended offline periods.

Use Cases:

  • Initial app registration during first-time setup
  • Re-registration after app reinstallation or major updates
  • Establishing connection for IoT devices joining the network
  • Registering applications that need to receive push notifications or real-time updates

Full URL Example:

https://gate.zequenze.com/api/v1/device_app_register/

Parameters:

Parameter Type In Required Description
data string body Yes JSON string containing application and device registration information including app version, device type, platform details, and unique identifiers

cURL Example:

curl -X POST "https://gate.zequenze.com/api/v1/device_app_register/" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "app_name": "MyMobileApp",
    "app_version": "2.1.0",
    "platform": "iOS",
    "device_id": "ABC123-DEF456-GHI789",
    "device_model": "iPhone 14 Pro",
    "os_version": "16.4.1",
    "push_token": "fcm_token_abc123def456",
    "installation_id": "unique-install-uuid-here"
  }'

Example Response:

{
  "registration_id": "reg_12345abcdef",
  "status": "registered",
  "app_config": {
    "api_refresh_interval": 300,
    "push_enabled": true,
    "feature_flags": {
      "new_dashboard": true,
      "beta_features": false
    }
  },
  "device_token": "device_token_xyz789",
  "registration_timestamp": "2024-01-15T10:30:00Z",
  "expires_at": "2024-07-15T10:30:00Z"
}

Response Codes:

Status Description
201 Created - Application successfully registered
400 Bad Request - Invalid registration data format
401 Unauthorized - Invalid or missing authentication token
409 Conflict - Application already registered with this device ID
429 Too Many Requests - Registration rate limit exceeded

Common Use Cases

Use Case 1: Mobile App First Launch

When a user installs and opens your mobile application for the first time, call this endpoint to register the app instance. Include the device's unique identifier, push notification token, and app version to enable full functionality.

Use Case 2: IoT Device Onboarding

For IoT devices joining your network, use this endpoint during the initial setup process to register the device with your backend system. This enables remote monitoring, configuration updates, and command delivery.

Use Case 3: Application Re-authentication

After major app updates or when authentication tokens expire, re-register the application to refresh credentials and receive updated configuration settings.

Use Case 4: Multi-Device User Accounts

When users install your app on multiple devices, register each device separately to enable device-specific notifications and track usage across different platforms.


Best Practices

  • Include Unique Identifiers: Always provide stable, unique device identifiers that persist across app restarts but change on reinstallation for privacy compliance
  • Handle Registration Expiry: Monitor the expires_at field in responses and re-register before expiration to maintain uninterrupted service
  • Implement Retry Logic: Network issues during registration are common; implement exponential backoff retry logic with reasonable limits
  • Secure Data Transmission: Never include sensitive user data in registration payloads; focus on device and application metadata only
  • Rate Limiting Awareness: Respect registration rate limits to avoid temporary blocks; cache successful registration responses locally
  • Version Tracking: Always include current app version in registration data to enable backend compatibility checks and update notifications
  • Error Handling: Gracefully handle registration failures and provide fallback functionality when possible, but ensure core features requiring registration are properly gated