POST
/api/packageAuth requiredPush data from your system to personnel and assets in the field.
Headers
| Name | Value |
|---|---|
Content-Type | application/json |
Authorization | Bearer <token> or Basic <username>:<password> |
x-api-key | <api-key> |
Body — exactly one of message, location, waypoint, or data:
Message
A text message, delivered to one person in a Workspace.
curl https://api.somewear.co/api/package \ -H "Content-Type: application/json" \ -H "x-api-key: <YOUR_API_KEY>" \ -d '{ "sourceUserId": "1", "workspaceId": "1", "targetUserId": "1", "message": { "content": "Hello space!", "phone": "+15555555555", "email": "somewear@example.com", "timestamp": "2023-07-17T22:45:06Z" } }'{ "sourceUserId": "1", "workspaceId": "1", "targetUserId": "1", "message": { "content": "Hello space!", "phone": "+15555555555", "email": "somewear@example.com", "timestamp": "2023-07-17T22:45:06Z" }}Location
A position report.
curl https://api.somewear.co/api/package \ -H "Content-Type: application/json" \ -H "x-api-key: <YOUR_API_KEY>" \ -d '{ "sourceUserId": "1", "workspaceId": "1", "location": { "latitude": "37.781001", "longitude": "-122.393456", "timestamp": "2023-07-17T22:45:06Z" } }'{ "sourceUserId": "1", "workspaceId": "1", "location": { "latitude": "37.781001", "longitude": "-122.393456", "timestamp": "2023-07-17T22:45:06Z" }}Waypoint
A point of interest.
curl https://api.somewear.co/api/package \ -H "Content-Type: application/json" \ -H "x-api-key: <YOUR_API_KEY>" \ -d '{ "sourceUserId": "1", "workspaceId": "1", "waypoint": { "latitude": "37.819466", "longitude": "-122.478628", "timestamp": "2023-07-17T22:45:06Z", "name": "Golden Gate Bridge" } }'{ "sourceUserId": "1", "workspaceId": "1", "waypoint": { "latitude": "37.819466", "longitude": "-122.478628", "timestamp": "2023-07-17T22:45:06Z", "name": "Golden Gate Bridge" }}Data
Raw bytes, base64-encoded — for formats outside Somewear’s own.
curl https://api.somewear.co/api/package \ -H "Content-Type: application/json" \ -H "x-api-key: <YOUR_API_KEY>" \ -d '{ "sourceUserId": "1", "workspaceId": "1", "data": { "payload": "SGVsbG8gc3BhY2UgZnJvbSBhIG5vbi1Tb21ld2VhciBkYXRhIGZvcm1hdA==" } }'{ "sourceUserId": "1", "workspaceId": "1", "data": { "payload": "SGVsbG8gc3BhY2UgZnJvbSBhIG5vbi1Tb21ld2VhciBkYXRhIGZvcm1hdA==" }}Response
Success, empty body.
Unauthorized — fix your credentials.
Forbidden — you don’t have permission to call this endpoint, or to send data to the target.
Too many requests. See the Retry-After response header for the backoff time, in seconds.