user

Register the calling device

Labels the device that owns the API key used to make this request, so it appears under the user's connected devices in the web app and can be revoked individually. The mobile app calls it right after pairing with the key obtained from the QR-code flow. Must be called with an API key in the Authorization header (a session gets 400). The key is marked as a mobile-device key, which removes it from the user's programmatic API-key list, so do not call this with a key used for server integrations. Safe to repeat.

post/user/register-mobile-device

Request

  • Base URL
    https://vetnio.com/api/v2
  • URL
    https://vetnio.com/api/v2/user/register-mobile-device
  • Auth
    HTTP bearer

Request body

deviceNamestring

Name the device reports for itself, 1-60 characters after trimming. Applied only while the key still has the default name New device; a name the user typed in the web app when pairing always wins. Omit to keep the current name.

platformstring

Free-text platform label shown next to the device, up to 40 characters, for example ios or android. Omitting it or sending an empty string clears the stored platform.

Example request

{
  "deviceName": "Alex's iPhone",
  "platform": "ios"
}

Response

Device registered.

successboolean required

Always true when the device details were saved.

Example response

{
  "success": true
}

Changes

No recorded changes to this operation across all 1 revision of this API.