> For the complete documentation index, see [llms.txt](https://docs.somewear.app/developer-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.somewear.app/developer-docs/server-rest-api/send-package.md).

# Send Package

<mark style="color:green;">`POST`</mark> `/api/package`

**Headers**

| Name          | Value                                                                                |
| ------------- | ------------------------------------------------------------------------------------ |
| Content-Type  | `application/json`                                                                   |
| Authorization | <p><code>Bearer \<token></code></p><p><code>Basic \<username>:\<password></code></p> |
| x-api-key     | \<api-key>                                                                           |

**Body**

<details>

<summary>Message</summary>

```json
{
    "sourceUserId": "1",
    "workspaceId": "1",
    "targetUserId": "1",
    "message": {
        "content": "Hello space!",
        "phone": "+15555555555",
        "email": "somewear@example.com",
        "timestamp": "2023-07-17T22:45:06Z"
    }
}
```

</details>

<details>

<summary>Location</summary>

```json
{
    "sourceUserId": "1",
    "workspaceId": "1",
    "location": {
        "latitude": "37.781001",
        "longitude": "-122.393456",
        "timestamp": "2023-07-17T22:45:06Z"
    }
}
```

</details>

<details>

<summary>Waypoint</summary>

```json
{
    "sourceUserId": "1",
    "workspaceId": "1",
    "waypoint": {
        "latitude": "37.819466",
        "longitude": "-122.478628",
        "timestamp": "2023-07-17T22:45:06Z",
        "name": "Golden Gate Bridge"
    }
}
```

</details>

<details>

<summary>Data</summary>

```json
{
    "sourceUserId": "1",
    "workspaceId": "1",
    "data": {
        "payload": "SGVsbG8gc3BhY2UgZnJvbSBhIG5vbi1Tb21ld2VhciBkYXRhIGZvcm1hdA=="
    }
}
```

</details>

**Response**

**200:** Success, empty body

**401:** Unauthorized - You need to fix your credentials.

**403:** Forbidden - You do not have permissions to call this endpoint or send data to the target.

**429:** Too Many Requests - You're too noisy. See `Retry-After` response header for your backoff time in seconds.
