List notifications - Spacefast Docs

List notifications

Returns the notifications addressed to the signed-in user, newest first. Page with cursor. Set unread to return only the ones with no readAt. Only a dashboard session can call this.

GET /v1/notifications

Authorization

Authorization Bearer token · header required

Authorization: Bearer <token> with an API key (sfa_ prefix), an OAuth access token, a session token, or a Space machine credential (sfm_ prefix).

Query parameters

Responses

200 Response for status 200

$schema string
Canonical JSON Schema URL for this response body. The server also sends it in the Link: rel="describedby" response header.

data object[] required

Array of object

pagination object required

Error Response

$schema string
Canonical JSON Schema URL for this response body.

Try it

Server

Base URL https://api.spacefast.com

Authorization

Bearer token

Parameters

Request Examples

cURL

curl -X GET "https://api.spacefast.com/v1/notifications?limit=20&unread=false" \
  -H "Authorization: Bearer YOUR_TOKEN"

JavaScript

const response = await fetch("https://api.spacefast.com/v1/notifications?limit=20&unread=false", {
  method: "GET",
  headers: {
    "Authorization": "Bearer YOUR_TOKEN"
  }
});

Python

import requests

response = requests.get(
    "https://api.spacefast.com/v1/notifications?limit=20&unread=false",
    headers={
        "Authorization": "Bearer YOUR_TOKEN"
    },
)

Response 200 default

{
  "$schema": "http://example.com",
  "data": [
    {
      "id": "string",
      "kind": "comment.created",
      "teamId": "string",
      "spaceId": "string",
      "threadId": "string",
      "title": "string",
      "body": "string",
      "actor": {
        "name": "string",
        "avatarUrl": "string",
        "color": "string"
      },
      "path": "string",
      "versionId": "string",
      "link": "string",
      "readAt": "2019-08-24T14:15:22Z",
      "createdAt": "2019-08-24T14:15:22Z"
    }
  ],
  "pagination": {
    "nextCursor": "string",
    "hasMore": true
  }
}

Error Response Schema

{
  "$schema": "http://example.com",
  "type": "string",
  "title": "string",
  "status": -9007199254740991,
  "detail": "string",
  "code": "string",
  "pointer": "string",
  "details": {
    "property1": null,
    "property2": null
  },
  "suggestions": [
    "string"
  ],
  "next": [
    "string"
  ],
  "requestId": "string"
}