Example
Section titled “Example”The key is read from PORT_API_KEY, so the command never prints it.
Response
Section titled “Response”A 200 with the envelope every endpoint answers, and this endpoint's answer in data. Amounts and USD figures are strings.
What data looks like, with sample values: the shape is the schema's, checked when these pages are built, and the figures are made up, not anyone's port.
{ "alerts": [ { "id": "3f6c2a1e-8b7d-4e2f-9a1c-5d4b3e2f1a0c", "ruleId": null, "kind": "price", "body": "ETH fell 6.2% in an hour.", "scope": "ETH", "at": "2026-10-06T05:42:10.000Z", "readAt": null } ]}Field of data | Type | Always present |
|---|---|---|
alerts | array of object | yes |
The whole schema of data
As the OpenAPI document at https://getport.app/api/v1/openapi.json states it. Objects are left open, because a response only ever gains fields.
{ "type": "object", "properties": { "alerts": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "ruleId": { "type": [ "string", "null" ] }, "kind": { "type": "string" }, "body": { "type": "string" }, "scope": { "type": "string" }, "at": { "type": "string" }, "readAt": { "type": [ "string", "null" ] } }, "required": [ "id", "ruleId", "kind", "body", "scope", "at", "readAt" ] } } }, "required": [ "alerts" ]}From an agent
Section titled “From an agent”The MCP tool port_alerts answers the same question ("which of my alerts have fired") with the same figures, over the MCP server.
Refusals
Section titled “Refusals”Every endpoint shares three: 401 for a missing or dead key, 402 for an account whose plan has no API ("Agents, MCP and the API are on Pro+ and above."), and 429 past the minute or day limit. The errors section has each body.