> ## 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.

# Get notification settings

> Your boxes and the workspace's Slack, Discord and Telegram channels.

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

What Settings → Notifications shows, in one answer:

* `preferences`: your own boxes, one row per event: whether it reaches you in the app, by email, on Telegram and by push. A box with `locked: true` always stays on; one with `available: false` can't be turned on.
* `destinations`: the workspace's Slack, Discord and Telegram channels, with the events each gets. Their connection details are never shown.
* `slack_installations`: the Slack workspaces connected to this workspace, for [List Slack channels](https://docs.postsyncer.com/api-reference/notifications/slack-channels.md).
* `team_chat_events`: the events a channel can get, and whether a new one gets each.

Webhook endpoints have their own routes: see [List webhooks](https://docs.postsyncer.com/api-reference/webhooks/list.md).

## 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

* [Update notification settings](https://docs.postsyncer.com/api-reference/notifications/update-settings.md)
* [Create a connect link](https://docs.postsyncer.com/api-reference/notifications/connect-link.md): add a Slack, Discord or Telegram channel.


## OpenAPI

````yaml GET /notification-settings
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:
  /notification-settings:
    get:
      tags:
        - Notifications
      summary: Get notification settings
      description: >-
        Needs `notifications:read`. Everyone in the workspace can read them.
        Your own boxes (which events reach you in the app, by email, on Telegram
        and by push, as Settings → Notifications shows them), the workspace's
        Slack, Discord and Telegram channels with the events each gets, its
        connected Slack workspaces, and the events a channel can get. Webhook
        endpoints are under [Webhooks](/api-reference/webhooks/list).
      operationId: getNotificationSettings
      parameters:
        - name: workspace_id
          in: query
          required: true
          description: The workspace. It must be one the key can reach.
          schema:
            type: integer
            example: 12
      responses:
        '200':
          description: Your settings.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationSettings'
              examples:
                default:
                  summary: Halden Coffee's settings
                  value:
                    workspace_id: 12
                    preferences:
                      - event: post.failed
                        label: Post failed
                        description: No account went live.
                        group: Posts
                        scope: workspace
                        needs_action: true
                        in_app:
                          enabled: true
                          locked: true
                        email:
                          enabled: true
                          available: true
                        telegram:
                          enabled: false
                          available: false
                        push:
                          enabled: false
                          available: false
                      - event: approval.requested
                        label: Approval requested
                        description: A post was sent for review.
                        group: Approvals
                        scope: workspace
                        needs_action: true
                        in_app:
                          enabled: true
                          locked: false
                        email:
                          enabled: true
                          available: true
                        telegram:
                          enabled: false
                          available: false
                        push:
                          enabled: true
                          available: true
                    destinations:
                      - id: 51
                        workspace_id: 12
                        kind: slack
                        name: '#launches'
                        channel:
                          id: C07LAUNCH
                          name: launches
                          is_private: false
                        team_name: Halden Coffee
                        approve_buttons: true
                        events:
                          - post.failed
                          - approval.requested
                        account_ids: null
                        workspace_ids: null
                        active: true
                        failing_since: null
                        disabled_reason: null
                        created_at: '2030-03-01T10:00:00+00:00'
                        updated_at: '2030-03-01T10:00:00+00:00'
                        stats_7d:
                          sent: 3
                          failed: 0
                          daily:
                            - date: '2030-03-09'
                              sent: 0
                              failed: 0
                            - date: '2030-03-10'
                              sent: 0
                              failed: 0
                            - date: '2030-03-11'
                              sent: 0
                              failed: 0
                            - date: '2030-03-12'
                              sent: 0
                              failed: 0
                            - date: '2030-03-13'
                              sent: 0
                              failed: 0
                            - date: '2030-03-14'
                              sent: 0
                              failed: 0
                            - date: '2030-03-15'
                              sent: 3
                              failed: 0
                        last_delivery_at: '2030-03-15T09:00:02+00:00'
                      - id: 52
                        workspace_id: 12
                        kind: discord
                        name: Discord channel
                        approve_buttons: true
                        events:
                          - post.failed
                        account_ids: null
                        workspace_ids: null
                        active: true
                        failing_since: null
                        disabled_reason: null
                        created_at: '2030-03-02T11:30:00+00:00'
                        updated_at: '2030-03-02T11:30:00+00:00'
                        stats_7d:
                          sent: 1
                          failed: 0
                          daily:
                            - date: '2030-03-09'
                              sent: 0
                              failed: 0
                            - date: '2030-03-10'
                              sent: 0
                              failed: 0
                            - date: '2030-03-11'
                              sent: 0
                              failed: 0
                            - date: '2030-03-12'
                              sent: 0
                              failed: 0
                            - date: '2030-03-13'
                              sent: 0
                              failed: 0
                            - date: '2030-03-14'
                              sent: 0
                              failed: 0
                            - date: '2030-03-15'
                              sent: 1
                              failed: 0
                        last_delivery_at: '2030-03-15T09:00:02+00:00'
                      - id: 53
                        workspace_id: 12
                        kind: telegram
                        name: Halden Coffee team
                        chat:
                          id: '-1002233445566'
                          title: Halden Coffee team
                          type: supergroup
                        approve_buttons: true
                        events:
                          - post.failed
                          - approval.requested
                        account_ids: null
                        workspace_ids: null
                        active: true
                        failing_since: null
                        disabled_reason: null
                        created_at: '2030-03-03T08:15:00+00:00'
                        updated_at: '2030-03-03T08:15:00+00:00'
                        stats_7d:
                          sent: 3
                          failed: 0
                          daily:
                            - date: '2030-03-09'
                              sent: 0
                              failed: 0
                            - date: '2030-03-10'
                              sent: 0
                              failed: 0
                            - date: '2030-03-11'
                              sent: 0
                              failed: 0
                            - date: '2030-03-12'
                              sent: 0
                              failed: 0
                            - date: '2030-03-13'
                              sent: 0
                              failed: 0
                            - date: '2030-03-14'
                              sent: 0
                              failed: 0
                            - date: '2030-03-15'
                              sent: 3
                              failed: 0
                        last_delivery_at: '2030-03-15T09:00:02+00:00'
                    slack_installations:
                      - id: 7
                        team_id: T01HALDEN
                        team_name: Halden Coffee
                    team_chat_events:
                      - key: post.failed
                        label: Post failed
                        description: No account went live.
                        group: Posts
                        needs_action: true
                        team_default: 'on'
                      - key: approval.requested
                        label: Approval requested
                        description: A post was sent for review.
                        group: Approvals
                        needs_action: true
                        team_default: 'on'
                      - key: account.disconnected
                        label: Account disconnected
                        description: An account was removed.
                        group: Accounts
                        needs_action: false
                        team_default: 'off'
        '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/notification-settings?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/notification-settings?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/notification-settings?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/notification-settings?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:
    NotificationSettings:
      type: object
      description: Your notification settings in a workspace.
      required:
        - workspace_id
        - preferences
        - destinations
        - slack_installations
        - team_chat_events
      properties:
        workspace_id:
          type: integer
        preferences:
          type: array
          items:
            $ref: '#/components/schemas/NotificationPreference'
          description: Your own boxes, one row per event.
        destinations:
          type: array
          items:
            $ref: '#/components/schemas/NotificationDestination'
          description: >-
            The workspace's Slack, Discord and Telegram channels. Webhook
            endpoints are under [Webhooks](/api-reference/webhooks/list).
        slack_installations:
          type: array
          description: The Slack workspaces connected to this workspace.
          items:
            type: object
            required:
              - id
              - team_id
              - team_name
            properties:
              id:
                type: integer
                description: Use it with List Slack channels and Add a Slack channel.
              team_id:
                type: string
              team_name:
                type: string
                nullable: true
        team_chat_events:
          type: array
          description: The events a Slack, Discord or Telegram channel can get.
          items:
            type: object
            required:
              - key
              - label
              - description
              - group
              - needs_action
              - team_default
            properties:
              key:
                type: string
              label:
                type: string
              description:
                type: string
              group:
                type: string
              needs_action:
                type: boolean
              team_default:
                type: string
                enum:
                  - 'on'
                  - 'off'
                description: Whether a new channel gets it.
    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
    NotificationPreference:
      type: object
      description: >-
        One event, and whether it reaches you in the app, by email, on Telegram
        and by push.
      required:
        - event
        - label
        - description
        - group
        - scope
        - needs_action
        - in_app
        - email
        - telegram
        - push
      properties:
        event:
          type: string
        label:
          type: string
        description:
          type: string
        group:
          type: string
        scope:
          type: string
          enum:
            - workspace
            - account
          description: >-
            `account` for an event that is the same in every workspace, like
            billing.
        needs_action:
          type: boolean
        in_app:
          type: object
          required:
            - enabled
            - locked
          properties:
            enabled:
              type: boolean
            locked:
              type: boolean
              description: True when it always stays on in the app.
        email:
          type: object
          required:
            - enabled
            - available
          properties:
            enabled:
              type: boolean
            available:
              type: boolean
              description: False when there is no email for it.
        telegram:
          type: object
          required:
            - enabled
            - available
          properties:
            enabled:
              type: boolean
            available:
              type: boolean
              description: False until you connect your own Telegram.
        push:
          type: object
          required:
            - enabled
            - available
          properties:
            enabled:
              type: boolean
            available:
              type: boolean
              description: False when there is no push for it.
    NotificationDestination:
      type: object
      description: >-
        A Slack, Discord or Telegram channel that gets the workspace's
        notifications. Its connection details are never shown.
      required:
        - id
        - workspace_id
        - kind
        - name
        - approve_buttons
        - events
        - account_ids
        - workspace_ids
        - active
        - failing_since
        - disabled_reason
        - created_at
        - updated_at
      properties:
        id:
          type: integer
        workspace_id:
          type: integer
          description: The workspace it belongs to.
        kind:
          type: string
          enum:
            - slack
            - discord
            - telegram
        name:
          type: string
          maxLength: 100
        channel:
          type: object
          description: 'Slack only: the channel.'
          required:
            - id
            - name
            - is_private
          properties:
            id:
              type: string
            name:
              type: string
              nullable: true
            is_private:
              type: boolean
        chat:
          type: object
          description: 'Telegram only: the chat.'
          required:
            - id
            - title
            - type
          properties:
            id:
              type: string
            title:
              type: string
              nullable: true
            type:
              type: string
              nullable: true
              description: '`private`, `group`, `supergroup` or `channel`.'
        team_name:
          type: string
          nullable: true
          description: 'Slack only: the Slack workspace.'
        approve_buttons:
          type: boolean
          description: Whether approval requests carry Approve and Reject buttons.
        events:
          type: array
          items:
            type: string
          description: 'The events it gets: any of `team_chat_events`.'
        account_ids:
          type: array
          nullable: true
          items:
            type: integer
          description: Only events about these accounts; null for every account.
        workspace_ids:
          type: array
          nullable: true
          items:
            oneOf:
              - type: integer
              - type: string
                enum:
                  - '*'
          description: >-
            The other workspaces it gets events from, or `["*"]` for every
            workspace the owner has; null for its own workspace alone.
        active:
          type: boolean
          description: 'False when it is paused: nothing is sent to it.'
        failing_since:
          type: string
          format: date-time
          nullable: true
          description: When its deliveries started failing; null while they work.
        disabled_reason:
          type: string
          nullable: true
          description: Why PostSyncer turned it off; null otherwise.
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        stats_7d:
          type: object
          description: >-
            Deliveries over the last 7 days: today and the six days before,
            oldest first.
          required:
            - sent
            - failed
            - daily
          properties:
            sent:
              type: integer
            failed:
              type: integer
            daily:
              type: array
              items:
                type: object
                required:
                  - date
                  - sent
                  - failed
                properties:
                  date:
                    type: string
                    format: date
                  sent:
                    type: integer
                  failed:
                    type: integer
        last_delivery_at:
          type: string
          format: date-time
          nullable: true
          description: When the latest delivery was made; null before the first.
    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.