> ## Documentation Index
> Fetch the complete documentation index at: https://viewerdocs.planpoint.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Portal reporting and uploads

> List buyers and activity, record buyer events, and upload files.

Read the [access labels](https://viewerdocs.planpoint.io/api-documentation/portal/overview.md#base-url-and-credentials) first: GET and POST on the events path use different identities.

## List Portal users

`GET /api/portal/users` — **Customer dashboard**

| Query field | Required | Description |
| - | - | - |
| `projectId` | No | List buyers for one project. |
| `groupId` | No | List buyers registered to one group. Use one scope at a time. |

With neither field, returns buyers from projects accessible to the signed-in customer, not all group-scoped buyers.

```bash theme={null}
curl 'https://app.planpoint.io/api/portal/users?projectId=000000000000000000000001' \
  -H 'Authorization: Bearer <DASHBOARD_TOKEN>'
```

```json Response (200) theme={null}
{ "portalUsers": [] }
```

Entries contain `_id`, `email`, `data`, project/group association, and timestamps. Passwords, reset tokens, favorites, reservations, and the document version are excluded. If `data.contactNumber` exists and `data.phone` does not, the response adds `data.phone`. Account-wide results also include `projectId` and `projectName`.

Results are newest first. Requests identified as Zapier polling are capped at 100 results; this is not a general `limit` or pagination parameter.

For a scoped request, the customer must be the entity owner, an entity administrator/editor, or an administrator/editor on the owner's team. Errors: `401` without a customer identity, `403` for denied access, `404` for a missing entity, and `500` on failure.

## List Portal events

`GET /api/portal/events` — **Customer dashboard**

Optional query `projectId` or `groupId` selects the scope. With neither, returns events for accessible projects. Access checks match the scoped buyer-list permissions.

A group query collects events from the group's projects; it is **not** a list of events stored only against `groupId`. Account-wide Zapier polling is capped at 100; scoped event queries do not apply that cap.

```json Response (200) theme={null}
{ "actions": [] }
```

Each event includes `_id`, `userId` (or `null`), `email` (or `null`), `userName`, `description`, `createdAt`, and project/group context. Account-wide results add `projectName`. Results are newest first.

`action` is inferred from the description: `favorite`, `payment`, `reservation`, `download`, `waitlist`, `button_click`, `view`, `remove`, `cart`, or `other`. It is a reporting label, **not verified payment evidence**. Errors: `401`, `403`, `404`, or `500`.

## Record a Portal event

`POST /api/portal/events` — **Portal buyer**

Send nonempty `userName` and `description`. Optional `projectId` associates an action with a particular project, including a project being viewed from a group. Omit it to use the session's project or, for a group-only event, its group. Only submit the current Viewer's actual context.

```json Request theme={null}
{
  "userName": "Example Buyer",
  "description": "Viewed unit A-101",
  "projectId": "000000000000000000000001"
}
```

```json Response (201) theme={null}
{
  "_id": "000000000000000000000005",
  "userName": "Example Buyer",
  "description": "Viewed unit A-101",
  "userId": "000000000000000000000003",
  "projectId": "000000000000000000000001",
  "createdAt": "2026-11-27T12:00:00.000Z",
  "__v": 0
}
```

Returns the saved event directly; it does not include GET's derived `action` field. Missing fields/context return `400`, invalid sessions return `401`, and save failures return `500`. Avoid recording secrets or unnecessary personal information in descriptions.

## Upload a file

`POST /api/portal/upload` — **Customer dashboard**, not Portal buyer

Send `multipart/form-data` with one file field named `file`. Let your HTTP client set the multipart boundary.

```bash theme={null}
curl 'https://app.planpoint.io/api/portal/upload' \
  -H 'Authorization: Bearer <DASHBOARD_TOKEN>' \
  -F 'file=@example.pdf'
```

```json Response (201) theme={null}
{ "publicUrl": "https://storage.googleapis.com/example-bucket/example.pdf" }
```

The URL above is illustrative. The API generates the stored filename and returns the actual URL. Supported extensions are `png`, `jpg`, `jpeg`, `jfif`, `webp`, `gif`, `avif`, `bmp`, `svg`, `ico`, `tif`, `tiff`, `heic`, `heif`, `mp4`, `webm`, `mov`, `m4v`, `ogv`, `mkv`, `avi`, `mp3`, `wav`, `m4a`, `ogg`, `pdf`, `glb`, and `gltf`.

No file returns `400` with `{ "error": "No file uploaded" }`. Missing dashboard authentication returns `404` with `{ "message": "You are not authorized." }`. Upload failures, including rejected file types, return `500` with `{ "error": "Upload failed" }`.

Only POST is supported for integrations; there is no implemented delete-upload operation on this route. Treat uploaded content as publicly addressable, not private buyer-document storage.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.