Loading...

POST /api/groups

When several vehicles work for one branch or cover the same route, you can save their trackers as a group. The group has its own name and lets you select those vehicles on the map again without picking them one by one.

To create a group from your application, choose a name and send the IDs of one or more visible devices. For example, include only the trackers working at night when you create a “Night shift” group. Keep the group ID from the response to look up its members or update the shift later.

Request Details

POST /api/groups

The example identifiers are fictional. Use the identifiers returned by your account’s list for the resource you want to look up or change.

Request Parameters

JSON body parameters

ParameterTypeRequiredDescription
nameStringRequiredStringYesGroup name.
descriptionStringOptionalStringNoDescription to distinguish the group from others.
devicesString arrayRequiredString arrayYesInclude at least one visible device ID. Duplicates count once. When replacing the group, include every member you want to keep.

Authentication Required

Send the access token in the Authorization: Bearer <token> header. See Authentication.

You need access to Groups with a user who can make changes. Administrators manage the account’s groups and other authorised users manage their own. Demo users have read access only.

Example Request

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

Example Request Body

{ "name": "City deliveries", "description": "City routes", "devices": [ "123456789012345" ] }

Response Parameters

The response includes the group’s public id, name and saved device list. Use the ID to look up the group and its dates with GET /api/groups/{groupId}.

FieldTypePresenceDescription
idStringAlwaysStringAlwaysPublic group ID with the grp- prefix.
nameStringAlwaysStringAlwaysName of the group or special access option.
descriptionStringWhen setStringWhen setGroup description, when set.
devicesString arrayAlwaysString arrayAlwaysIDs of the trackers assigned to the group.
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

{ "id": "grp-JkLmNZpQvW", "name": "City deliveries", "description": "City routes", "devices": [ "123456789012345" ], "success": true, "apiUsage": 1, "apiDailyUsage": 24 }

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 401 if a valid Bearer token is missing.
  • HTTP 400 with errors if the name is missing, the list is empty, or the list contains a blank ID or a device outside the user’s view.
  • HTTP 403 if the user lacks the required permission. The reason appears in error.

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:48:07