Skip to content
EntitlerDocs

POST/v1/devices

Register a keypad device

Registers a keypad device of the environment with its external ID, its 32-hexadecimal-character key, sealed at rest, and an optional starting code and digit count. Needs customers:write.

curl -X POST 'https://api.entitler.co/v1/devices' \
  -H "Authorization: Bearer $ENTITLER_KEY" \
  -H "Content-Type: application/json" \
  -d '{"digits":"KEYPAD_DIGITS_UNSPECIFIED","externalId":"externalId","key":"key","startingCode":1,"target":{"environmentId":"environmentId","projectId":"projectId","teamId":"teamId"}}'

Credentials

Send any one of these:

  • Bearer token

Request body

object

  • digitsKeypadDigits

    One of KEYPAD_DIGITS_UNSPECIFIED, KEYPAD_DIGITS_FULL, KEYPAD_DIGITS_RESTRICTED.

  • externalIdstring
  • keystring
  • startingCodeinteger (int64)

    at least 0; at most 4294967295

  • targetProductTarget
    • environmentIdstring
    • projectIdstring
    • teamIdstring

Responses

200The RegisterDeviceResponse message.

RegisterDeviceResponse

  • deviceKeypadDevice
    • assignedAtinteger

      at least 0; at most 18446744073709552000

    • customerExternalIdstring
    • digitsKeypadDigitsrequired

      One of KEYPAD_DIGITS_UNSPECIFIED, KEYPAD_DIGITS_FULL, KEYPAD_DIGITS_RESTRICTED.

    • externalIdstringrequired
    • idstringrequired
    • productIdstring
    • registeredAtintegerrequired

      at least 0; at most 18446744073709552000

    • retiredAtinteger

      at least 0; at most 18446744073709552000

ErrorA refusal, with the HTTP status of its gRPC code.

Error

  • errorobjectrequired
    • codestringrequired
    • parametersobjectrequired

      Each value: string

    • reasonstringor nullrequired