List message notifications for currently authenticated users
GET/api/v5/notifications
Request
Query Parameters
User authorization code; alternatively, authenticate using the Authorization: Bearer <access_token> request header.
Page number; Default: 1; Must be a positive integer
Items per page; Default 30; Range 1–100
Read status; unread: Unread only (default); read: Read only; all: All (including read)
Single-select message source; omitting this parameter indicates all types. pull_request: PR; issue: Issue; mention: @Me; invitation: Invitation messages; pipeline_alert: Pipeline alerts; system: System messages. Can be independently combined with state.
Retrieve only messages created strictly after this time; format yyyy-MM-dd'T'HH:mm:ssXXX; when used with 'before', must be earlier than 'before'; '+' in URL must be encoded as '%2B'
Only retrieve messages created strictly before this time; Format: yyyy-MM-dd'T'HH:mm:ssXXX; Encode '+' as %2B in URLs
Responses
- 200
Response Headers
- application/json
- Schema
- Example (auto)
Schema
- Array [
- ]
Total number of messages matching the filter criteria, consistent with the total_count in the response header.
list object[]required
Message notifications for the current page; empty array when no data.
Message ID
Message content, consistent with the message center, may contain HTML.
Message source: pull_request (PR), issue (Issue), mention (@me), invitation (Invitation), pipeline_alert (Pipeline Alert), system (System); other sources retain their original types.
Unread status; true indicates unread, false indicates read.
Message creation time. Fixed to Beijing Time, format yyyy-MM-dd'T'HH:mm:ssXXX, without milliseconds.
Resource Page URL for Triggered Message
actor object
The user who triggered the message; this field may be omitted for system messages.
User Object ID
username
User Avatar URL; omit if not provided
repository object
Associated Warehouse; this field may be omitted for non-warehouse messages.
Warehouse ID
Full repository path, e.g., owner/repo
Full Warehouse Display Name
Repository Page URL
{
"total": 0,
"list": [
{
"id": "string",
"content": "string",
"type": "string",
"unread": true,
"created_at": "2024-07-29T15:51:28.071Z",
"html_url": "string",
"actor": {
"id": "string",
"login": "string",
"avatar_url": "string"
},
"repository": {
"id": 0,
"full_name": "string",
"human_name": "string",
"url": "string"
}
}
]
}