# Service Requests

Submit and manage platform improvement requests. Designed for AI agents to report missing capabilities, suggest new features, and flag issues with the MCP, API, or platform. Supports listing, filtering, note threads, inline note editing, and two-way ticket linking.

**Base URL:** `https://api.trustpager.com/functions/v1/api/v1`

## Endpoints

### GET /service-requests

List service requests for the authenticated company. Supports cursor pagination and multiple filters. Returns requests in reverse-chronological order with full note threads and related_ids.

**Scopes:** `service-requests:read` — [full detail](./service-requests/get-service-requests.md)

### GET /service-requests/:id

Get a single service request by ID. Returns the full record including notes array, related_ids, context JSON, and slack_message_ts.

**Scopes:** `service-requests:read` — [full detail](./service-requests/get-service-requests-id.md)

### POST /service-requests

Submit a platform improvement request. Stores the request, sends a Slack notification to the engineering team, and returns the created record. Now accepts an optional related_ids array to link this request to existing requests at creation time (two-way symmetry is maintained automatically).

**Scopes:** `service-requests:write` — [full detail](./service-requests/post-service-requests.md)

### POST /service-requests/search

Semantic search across the workspace's service requests using vector embeddings (Voyage voyage-3, 1024 dimensions). Returns results ranked by cosine similarity. Useful for: finding duplicate requests before filing, grouping related open tickets, retrieving historical resolutions. Scoped per-workspace -- cross-company search is only available via the internal agent-write webhook.

**Scopes:** `service-requests:read` — [full detail](./service-requests/post-service-requests-search.md)

### POST /service-requests/:id/notes

Add a note to an existing service request. Notes are appended to a JSONB array on the record. Each note stores a UUID, the user_id of the API key owner, the content text, and a created_at timestamp. Does NOT change the request status. Max content length raised to 20000 chars.

**Scopes:** `service-requests:write` — [full detail](./service-requests/post-service-requests-id-notes.md)

### PATCH /service-requests/:id/notes/:noteId

Edit an existing note on a service request. Only the original note author (matched by user_id of the API key owner) can edit their own notes. Adds an edited_at timestamp to the note object on success. Does NOT change the request status.

**Scopes:** `service-requests:write` — [full detail](./service-requests/patch-service-requests-id-notes-noteId.md)

### POST /service-requests/:id/links

Add or remove related service request links. Both directions are maintained automatically (two-way symmetry). A request cannot link to itself. All IDs must belong to the same company -- cross-company linking is rejected.

**Scopes:** `service-requests:write` — [full detail](./service-requests/post-service-requests-id-links.md)
