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

# List notifications

> Your own notifications in a workspace, as the bell shows them.

> [!NOTE]
>
> Needs `notifications:read`. See [Permissions](https://docs.postsyncer.com/essentials/authentication.md#permissions).

The same items as the bell and the notifications page in the app: yours alone, newest first, 30 a page. Notifications that belong to no workspace (your credits or your plan) come with every workspace.

* `tab` picks a folder: `needs` (asks you to do something), `activity`, `unread`, `all` (the default) or `done` (dismissed).
* `group` and `account_id` narrow it to one kind, or to one social account.
* `unread_count` and `needs_you_count` are for the whole bell, not the page.

Pass `next_cursor` back as `cursor` for the next page. It is `null` on the last page.

## Errors

| Status | When | Retry? |
| - | - | - |
| 401 | No API key, or not a valid one. | No: fix the key. |
| 403 | The key lacks `notifications:read`, or its user is inactive. | No: grant it in Settings → API. |
| 422 | No `workspace_id`, or not one the key can reach. | No. |
| 429 | More than 60 requests a minute. | Yes, after `Retry-After` seconds. |

## Related

* [Mark notifications](https://docs.postsyncer.com/api-reference/notifications/mark.md): read, unread or dismissed.


## OpenAPI

````yaml GET /notifications
openapi: 3.0.3
info:
  title: PostSyncer API
  description: >-
    Post to 12 social networks from your code: posts, media, comments,
    analytics, webhooks and more.
  version: 1.0.0
servers:
  - url: https://postsyncer.com/api/v1
security:
  - bearerAuth: []
tags:
  - name: Workspaces
    description: The workspaces the key can reach.
  - name: Accounts
    description: Connected social accounts, links to connect more, and disconnecting them.
  - name: Posts
    description: Drafts, scheduled and published posts, approvals and a post's history.
  - name: Post settings
    description: A post's auto-plug, comment moderation and contact collection.
  - name: Media
    description: >-
      The media library: file uploads, URL imports, and reading videos and
      social posts' files.
  - name: Folders
    description: Folders that organise the media library.
  - name: Comments
    description: >-
      Comments on your posts: reading, replying, editing, hiding, deleting and
      syncing them.
  - name: Reviews
    description: Google Business Profile reviews and your replies to them.
  - name: Analytics
    description: Workspace, account and post performance.
  - name: Brand
    description: >-
      A workspace's brand: identity, voice, look, accounts, competitors,
      learnings and rules.
  - name: Labels
    description: Labels used to tag posts.
  - name: Campaigns
    description: Campaigns used to group posts.
  - name: Snippets
    description: Saved snippets and hashtag groups to drop into posts.
  - name: Webhooks
    description: Signed webhook endpoints that get your notification events.
  - name: Billing
    description: >-
      The owner's plan, invoices and the links that pay for, change or cancel
      it.
  - name: Team
    description: A workspace's teammates and invitations, and their roles.
  - name: Notifications
    description: >-
      Your bell and notification settings, and the workspace's Slack, Discord
      and Telegram channels.
  - name: Blog-to-social
    description: Blog feeds that turn a workspace's new articles into posts.
  - name: Products
    description: Products the workspace's posts can promote.
  - name: Contacts
    description: People who commented on the workspace's posts, and the lists they are on.
  - name: Profile
    description: 'The key''s user: their name and sign-in email.'
  - name: API keys
    description: 'Your API keys: listing and deleting them.'
  - name: Agent sign-up
    description: >-
      An AI agent signs a person up with a code emailed to them, and gets their
      first key. No key needed.
paths:
  /notifications:
    get:
      tags:
        - Notifications
      summary: List notifications
      description: >-
        Needs `notifications:read`. Your own notifications in a workspace, the
        same as the bell and the notifications page in the app: newest first, 30
        a page, with your notifications that belong to no workspace too.
        `unread_count` and `needs_you_count` are for the whole bell, not the
        page. Pass `next_cursor` back as `cursor` for the next page; it is null
        on the last.
      operationId: listNotifications
      parameters:
        - name: workspace_id
          in: query
          required: true
          description: The workspace. It must be one the key can reach.
          schema:
            type: integer
            example: 12
        - name: tab
          in: query
          required: false
          description: >-
            `needs` (asks you to do something), `activity`, `unread`, `all` (the
            default) or `done` (dismissed).
          schema:
            type: string
            enum:
              - needs
              - activity
              - unread
              - all
              - done
        - name: group
          in: query
          required: false
          description: Only one kind of notification.
          schema:
            type: string
            enum:
              - Posts
              - Approvals
              - Accounts
              - Engagement
              - Media
              - Brand
              - Billing
              - Team
        - name: account_id
          in: query
          required: false
          description: Only notifications about this social account.
          schema:
            type: integer
        - name: cursor
          in: query
          required: false
          description: The `next_cursor` of the page before.
          schema:
            type: string
      responses:
        '200':
          description: A page of notifications.
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - next_cursor
                  - unread_count
                  - needs_you_count
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/NotificationItem'
                  next_cursor:
                    type: string
                    nullable: true
                    description: >-
                      Pass it as `cursor` for the next page; null on the last
                      page.
                  unread_count:
                    type: integer
                  needs_you_count:
                    type: integer
                    description: Unread notifications that ask you to do something.
              examples:
                default:
                  summary: The first page
                  value:
                    data:
                      - id: 8812
                        type: post.failed
                        needs_action: true
                        title: Your post to Instagram failed
                        body: >-
                          Instagram didn't take the video: it is longer than 90
                          seconds.
                        meta:
                          post_id: 5120
                          account_id: 77
                        read_at: null
                        resolved_at: null
                        resolution: null
                        dismissed_at: null
                        created_at: '2030-03-15T09:00:00+00:00'
                        updated_at: '2030-03-15T09:00:00+00:00'
                        workspace_id: 12
                      - id: 8809
                        type: approval.requested
                        needs_action: true
                        title: Maya sent a post for review
                        body: Spring menu launch, for Instagram and Facebook.
                        meta:
                          post_id: 5117
                        read_at: '2030-03-14T16:20:00+00:00'
                        resolved_at: null
                        resolution: null
                        dismissed_at: null
                        created_at: '2030-03-14T16:05:00+00:00'
                        updated_at: '2030-03-14T16:05:00+00:00'
                        workspace_id: 12
                    next_cursor: null
                    unread_count: 1
                    needs_you_count: 1
        '401':
          $ref: '#/components/responses/Unauthorized401'
        '403':
          $ref: '#/components/responses/Forbidden403'
        '422':
          description: No `workspace_id`, or not one the key can reach.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
              examples:
                invalid_workspace:
                  summary: The workspace isn't one the key can reach
                  value:
                    message: Invalid workspace ID.
                    errors:
                      workspace_id:
                        - Invalid workspace ID.
        '429':
          $ref: '#/components/responses/RateLimited429'
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://postsyncer.com/api/v1/notifications?workspace_id=12' \
              --header 'Authorization: Bearer <token>'
        - lang: javascript
          label: JavaScript
          source: >-
            const options = {method: 'GET', headers: {Authorization: 'Bearer
            <token>'}};


            fetch('https://postsyncer.com/api/v1/notifications?workspace_id=12',
            options)
              .then(res => res.json())
              .then(res => console.log(res))
              .catch(err => console.error(err));
        - lang: python
          label: Python
          source: |-
            import requests

            url = "https://postsyncer.com/api/v1/notifications?workspace_id=12"

            headers = {"Authorization": "Bearer <token>"}

            response = requests.get(url, headers=headers)

            print(response.text)
        - lang: php
          label: PHP
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://postsyncer.com/api/v1/notifications?workspace_id=12",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer <token>"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
components:
  schemas:
    NotificationItem:
      type: object
      description: One notification in your bell.
      required:
        - id
        - type
        - needs_action
        - title
        - body
        - meta
        - read_at
        - resolved_at
        - resolution
        - dismissed_at
        - created_at
        - updated_at
        - workspace_id
      properties:
        id:
          type: integer
        type:
          type: string
          description: The event, like `post.failed` or `approval.requested`.
        needs_action:
          type: boolean
          description: True when it asks you to do something.
        title:
          type: string
        body:
          type: string
          nullable: true
        meta:
          type: object
          additionalProperties: true
          description: What it is about, like `post_id` or `account_id`.
        read_at:
          type: string
          format: date-time
          nullable: true
          description: When you read it; null while unread.
        resolved_at:
          type: string
          format: date-time
          nullable: true
          description: When what it asked for was done.
        resolution:
          type: string
          nullable: true
          description: How it was settled, like `approved`.
        dismissed_at:
          type: string
          format: date-time
          nullable: true
          description: When it was dismissed (the `done` tab).
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        workspace_id:
          type: integer
          nullable: true
          description: Null for your own notifications that belong to no workspace.
    ValidationError:
      type: object
      description: '422: the request didn''t pass validation, and nothing changed.'
      required:
        - message
        - errors
      properties:
        message:
          type: string
          description: >-
            The first error and, when there are more, how many: `(and 1 more
            error)`, `(and 2 more errors)`.
        errors:
          type: object
          description: >-
            The messages, by field. A field inside a list is named with dots:
            `accounts.0.id`.
          additionalProperties:
            type: array
            items:
              type: string
    Error:
      type: object
      description: >-
        An error answer. Every one has `message`, in plain words; some add an
        `error` code and fields of their own.
      required:
        - message
      properties:
        message:
          type: string
          description: What went wrong and what to do about it.
        error:
          type: string
          description: >-
            A code a few errors add, such as `rate_limited`. See [Handle
            errors](/essentials/error-handling#answers-with-an-error-code).
  responses:
    Unauthorized401:
      description: No API key, or not a valid one.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            unauthenticated:
              summary: No valid API key
              value:
                message: Unauthenticated.
    Forbidden403:
      description: >-
        The key doesn't have the permission this needs (`message` names it), or
        the key's user is inactive.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            missing_permission:
              summary: The key lacks a permission
              value:
                message: >-
                  This API key does not have the "posts:create" permission. Edit
                  the key in PostSyncer under Settings → API to grant it.
            inactive_account:
              summary: The key's user is inactive
              value:
                message: Your account is inactive.
    RateLimited429:
      description: >-
        More than 60 requests in a minute from this key's user (the API and the
        MCP server share the count). Wait `Retry-After` seconds.
      headers:
        Retry-After:
          description: Seconds until requests are allowed again.
          schema:
            type: integer
        X-RateLimit-Limit:
          description: Requests allowed a minute.
          schema:
            type: integer
        X-RateLimit-Remaining:
          description: Requests left this minute.
          schema:
            type: integer
        X-RateLimit-Reset:
          description: When requests are allowed again, as a Unix timestamp.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            too_many_attempts:
              summary: Too many requests
              value:
                message: Too Many Attempts.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

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