Loading...

POST /api/devices

To identify a tracker’s reports in Plaspy, its device record must use the same identifier the unit transmits. When fitting a tracker to a van, for example, you can register that identifier and give the device the name your dispatchers use for the van.

If you administer the account’s devices, send the identifier and name to create the record. Keep the deviceId from the response. You can use it to look up the device and request its last location once the unit starts reporting.

Request Details

POST /api/devices

During the account’s free month, the tracker identifier must be new. A previously used identifier can be available and still be rejected.

Request Parameters

JSON body parameters

ParameterTypeRequiredDescription
deviceIdStringRequiredStringYesIMEI or identifier reported by the tracker. It must be available and at least four characters long after normalisation.
nameStringRequiredStringYesDisplay name of the device. A nonempty name is required.
minStringOptionalStringNoTracker phone number, with at least ten digits and an optional leading plus sign.
descriptionStringOptionalStringNoDescription of the device.
tagsString mapOptionalString mapNoTags as string key/value pairs. On update, send the complete set or {} to clear it.
licenseTypeIntegerOptionalIntegerNoLicence type from the licence catalogue. The account must have licence capacity available to register the tracker.

Authentication Required

You need access to the devices page and must be an account administrator. Demo users cannot make changes.

Send a valid bearer token in the Authorization header. See Authentication.

Example Request

POST /api/devices HTTP/1.1 Host: api.plaspy.com Authorization: Bearer {token} Content-Type: application/json

Example Request Body

{ "deviceId": "123456789012345", "name": "Unit North", "tags": { "fleet": "North" } }

Response Parameters

A successful registration returns success: true and deviceId.

FieldTypePresenceDescription
deviceIdStringAlwaysStringAlwaysIdentifier of the tracker for this operation.
successBooleanAlwaysBooleanAlwaysIn a successful response, true confirms the operation.
apiUsageIntegerAlwaysIntegerAlwaysUnits charged for this request.
apiDailyUsageIntegerAlwaysIntegerAlwaysDaily usage before the units for this request are added.

Example HTTP 200 response

{ "success": true, "apiUsage": 1, "apiDailyUsage": 24, "deviceId": "123456789012345" }

Errors

FieldTypePresenceDescription
successBooleanDepends on the errorBooleanDepends on the errorIn the operation errors shown here, the value is false.
errorStringDepends on the errorStringDepends on the errorMessage explaining why the request was rejected.
errorsObjectIn field validation errorsObjectIn field validation errorsIn a validation response, maps fields to their messages. The response shape depends on the error.

HTTP 400 if the name is missing, the identifier is in use, the phone number is invalid, or the device allowance is exhausted. Validation errors identify the field in errors. HTTP 403 if the user cannot create devices.

Example error

{ "success": false, "error": "Your user does not have permission to do this." }
Index
Questions?

We answer all support request within 24 business hours approximately, If you have a question that needs an immediate resolution, please contact us by other way.

We answer you in business hours, as soon as possible. We are located in Bogotá, Colombia, time zone (GMT-5).

Last modification: 2026-11-30 11:49:35