Neynar Notifications API

Operations related to notifications

OpenAPI Specification

neynar-notifications-api-openapi.yml Raw ↑
openapi: 3.0.4
info:
  contact:
    email: team@neynar.com
    name: Neynar
    url: https://neynar.com/
  description: The Neynar API allows you to interact with the Farcaster protocol among other things. See the [Neynar docs](https://docs.neynar.com/reference) for more details.
  title: Neynar Action Notifications API
  version: 3.176.0
servers:
- url: https://api.neynar.com
security:
- ApiKeyAuth: []
tags:
- description: Operations related to notifications
  externalDocs:
    description: More info about notifications
    url: https://docs.neynar.com/reference/notifications-operations
  name: Notifications
paths:
  /v2/farcaster/notifications/:
    get:
      description: Returns a list of notifications for a specific FID.
      externalDocs:
        url: https://docs.neynar.com/reference/fetch-all-notifications
      operationId: fetch-all-notifications
      parameters:
      - $ref: '#/components/parameters/NeynarExperimentalHeader'
      - description: FID of the user you you want to fetch notifications for. The response will respect this user's mutes and blocks.
        in: query
        name: fid
        required: true
        schema:
          minimum: 1
          type: integer
      - description: Notification type to fetch. Comma separated values of follows, recasts, likes, mentions, replies.
        in: query
        name: type
        schema:
          items:
            enum:
            - follows
            - recasts
            - likes
            - mentions
            - replies
            - quotes
            type: string
          type: array
      - description: Number of results to fetch
        in: query
        name: limit
        schema:
          default: 15
          example: 15
          format: int32
          maximum: 25
          minimum: 1
          type: integer
        x-is-limit-param: true
      - description: Pagination cursor.
        in: query
        name: cursor
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationsResponse'
          description: Success
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorRes'
          description: Bad Request
      summary: For user
      tags:
      - Notifications
  /v2/farcaster/notifications/channel/:
    get:
      description: Returns a list of notifications for a user in specific channels
      externalDocs:
        url: https://docs.neynar.com/reference/fetch-channel-notifications-for-user
      operationId: fetch-channel-notifications-for-user
      parameters:
      - $ref: '#/components/parameters/NeynarExperimentalHeader'
      - description: FID of the user you you want to fetch notifications for. The response will respect this user's mutes and blocks.
        in: query
        name: fid
        required: true
        schema:
          minimum: 1
          type: integer
      - description: Comma separated channel_ids (find list of all channels here - https://docs.neynar.com/reference/list-all-channels)
        in: query
        name: channel_ids
        required: true
        schema:
          example: neynar,farcaster
          type: string
          x-comma-separated: true
      - description: Number of results to fetch
        in: query
        name: limit
        schema:
          default: 15
          example: 15
          format: int32
          maximum: 25
          minimum: 1
          type: integer
        x-is-limit-param: true
      - description: Pagination cursor.
        in: query
        name: cursor
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationsResponse'
          description: Success
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorRes'
          description: Bad Request
      summary: For user by channel
      tags:
      - Notifications
  /v2/farcaster/notifications/parent_url/:
    get:
      description: Returns a list of notifications for a user in specific parent_urls
      externalDocs:
        url: https://docs.neynar.com/reference/fetch-notifications-by-parent-url-for-user
      operationId: fetch-notifications-by-parent-url-for-user
      parameters:
      - $ref: '#/components/parameters/NeynarExperimentalHeader'
      - description: FID of the user you you want to fetch notifications for. The response will respect this user's mutes and blocks.
        in: query
        name: fid
        required: true
        schema:
          minimum: 1
          type: integer
      - description: Comma separated parent_urls
        in: query
        name: parent_urls
        required: true
        schema:
          example: chain://eip155:1/erc721:0xd4498134211baad5846ce70ce04e7c4da78931cc
          type: string
          x-comma-separated: true
      - description: Number of results to fetch
        in: query
        name: limit
        schema:
          default: 15
          example: 15
          format: int32
          maximum: 25
          minimum: 1
          type: integer
        x-is-limit-param: true
      - description: Pagination cursor.
        in: query
        name: cursor
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationsResponse'
          description: Success
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorRes'
          description: Bad Request
      summary: For user by parent_urls
      tags:
      - Notifications
  /v2/farcaster/notifications/seen/:
    post:
      description: "Mark notifications as seen.\nYou can choose one of two authorization methods, either:\n  1. Provide a valid signer_uuid in the request body (Most common)\n  2. Provide a valid, signed \"Bearer\" token in the request's `Authorization` header similar to the\n     approach described [here](https://docs.farcaster.xyz/reference/warpcast/api#authentication)"
      externalDocs:
        url: https://docs.neynar.com/reference/mark-notifications-as-seen
      operationId: mark-notifications-as-seen
      parameters:
      - $ref: '#/components/parameters/AuthorizationHeader'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MarkNotificationsAsSeenReqBody'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OperationResponse'
          description: Success
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorRes'
          description: Bad Request
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorRes'
          description: Server Error
      summary: Mark as seen
      tags:
      - Notifications
components:
  schemas:
    ChannelUserContext:
      description: Adds context on the viewer's or author's role in the channel.
      properties:
        following:
          description: Indicates if the user is following the channel.
          type: boolean
        role:
          $ref: '#/components/schemas/ChannelMemberRole'
      required:
      - following
      title: ChannelUserContext
      type: object
    Follower:
      properties:
        app:
          $ref: '#/components/schemas/UserDehydrated'
        object:
          enum:
          - follower
          type: string
        user:
          $ref: '#/components/schemas/User'
      required:
      - object
      - user
      title: Follower
      type: object
    CastEmbedded:
      properties:
        app:
          allOf:
          - $ref: '#/components/schemas/UserDehydrated'
          nullable: true
        author:
          $ref: '#/components/schemas/UserDehydrated'
        channel:
          allOf:
          - $ref: '#/components/schemas/ChannelDehydrated'
          nullable: true
        embeds:
          items:
            $ref: '#/components/schemas/EmbedDeep'
          type: array
        hash:
          type: string
        parent_author:
          properties:
            fid:
              allOf:
              - $ref: '#/components/schemas/Fid'
              nullable: true
          required:
          - fid
          type: object
        parent_hash:
          nullable: true
          type: string
        parent_url:
          nullable: true
          type: string
        root_parent_url:
          nullable: true
          type: string
        text:
          type: string
        timestamp:
          format: date-time
          type: string
      required:
      - hash
      - parent_hash
      - parent_url
      - root_parent_url
      - parent_author
      - author
      - text
      - timestamp
      - embeds
      - channel
      title: CastEmbedded
      type: object
    OperationResponse:
      properties:
        message:
          type: string
        success:
          type: boolean
      title: OperationResponse
      type: object
    SolAddress:
      description: Solana address
      pattern: ^[1-9A-HJ-NP-Za-km-z]{32,44}$
      title: SolAddress
      type: string
    FrameV1:
      description: Mini app v1 object
      properties:
        buttons:
          items:
            $ref: '#/components/schemas/FrameActionButton'
          type: array
        frames_url:
          description: Launch URL of the mini app
          type: string
        image:
          description: URL of the image
          type: string
        image_aspect_ratio:
          type: string
        input:
          properties:
            text:
              description: Input text for the mini app
              type: string
          type: object
        post_url:
          description: Post URL to take an action on this mini app
          type: string
        state:
          properties:
            serialized:
              description: State for the mini app in a serialized format
              type: string
          type: object
        title:
          type: string
        version:
          description: Version of the mini app, 'next' for v2, 'vNext' for v1
          type: string
      required:
      - version
      - image
      - frames_url
      title: FrameV1
      type: object
    Notification:
      properties:
        cast:
          $ref: '#/components/schemas/Cast'
        count:
          description: The number of notifications of this(follows, likes, recast) type bundled in a single notification.
          format: int32
          type: integer
        follows:
          items:
            $ref: '#/components/schemas/Follower'
          type: array
        most_recent_timestamp:
          format: date-time
          type: string
        object:
          enum:
          - notification
          type: string
        reactions:
          items:
            $ref: '#/components/schemas/ReactionWithUserInfo'
          type: array
        seen:
          type: boolean
        type:
          enum:
          - follows
          - recasts
          - likes
          - mention
          - reply
          - quote
          type: string
      required:
      - object
      - most_recent_timestamp
      - type
      - seen
      title: Notification
      type: object
    FrameButtonActionType:
      description: The action type of a mini app button. Action types "mint" & "link" are to be handled on the client side only and so they will produce a no/op for POST /farcaster/frame/action.
      enum:
      - post
      - post_redirect
      - tx
      - link
      - mint
      title: FrameButtonActionType
      type: string
    User:
      properties:
        auth_addresses:
          items:
            properties:
              address:
                $ref: '#/components/schemas/EthAddress'
              app:
                $ref: '#/components/schemas/UserDehydrated'
            required:
            - address
            - app
            type: object
          type: array
        custody_address:
          $ref: '#/components/schemas/EthAddress'
        display_name:
          nullable: true
          type: string
        experimental:
          properties:
            deprecation_notice:
              type: string
            neynar_user_score:
              description: Score that represents the probability that the account is not spam.
              format: double
              type: number
          required:
          - neynar_user_score
          type: object
        fid:
          $ref: '#/components/schemas/Fid'
        follower_count:
          description: The number of followers the user has.
          format: int32
          type: integer
        following_count:
          description: The number of users the user is following.
          format: int32
          type: integer
        object:
          enum:
          - user
          type: string
        pfp_url:
          description: The URL of the user's profile picture
          nullable: true
          type: string
        pro:
          properties:
            expires_at:
              format: date-time
              type: string
            status:
              description: The subscription status of the user
              enum:
              - subscribed
              - unsubscribed
              type: string
            subscribed_at:
              format: date-time
              type: string
          required:
          - status
          - subscribed_at
          - expires_at
          type: object
        profile:
          properties:
            banner:
              properties:
                url:
                  description: The URL of the user's banner image
                  format: uri
                  type: string
              type: object
            bio:
              properties:
                mentioned_channels:
                  items:
                    $ref: '#/components/schemas/ChannelDehydrated'
                  type: array
                mentioned_channels_ranges:
                  description: 'Positions within the text (inclusive start, exclusive end) where each mention occurs.

                    Each index within this list corresponds to the same-numbered index in the mentioned_channels list.'
                  items:
                    $ref: '#/components/schemas/TextRange'
                  type: array
                mentioned_profiles:
                  items:
                    $ref: '#/components/schemas/UserDehydrated'
                  type: array
                mentioned_profiles_ranges:
                  description: 'Positions within the text (inclusive start, exclusive end) where each mention occurs.

                    Each index within this list corresponds to the same-numbered index in the mentioned_profiles list.'
                  items:
                    $ref: '#/components/schemas/TextRange'
                  type: array
                text:
                  type: string
              required:
              - text
              type: object
            live_at:
              properties:
                is_live:
                  type: boolean
                updated_at:
                  format: date-time
                  type: string
                url:
                  description: The URL of the user's current live activity
                  type: string
              required:
              - url
              - updated_at
              - is_live
              type: object
            location:
              $ref: '#/components/schemas/Location'
          required:
          - bio
          type: object
        registered_at:
          format: date-time
          type: string
        score:
          description: Score that represents the probability that the account is not spam.
          format: double
          type: number
        username:
          type: string
        verifications:
          items:
            $ref: '#/components/schemas/EthAddress'
          type: array
        verified_accounts:
          items:
            description: Verified accounts of the user on other platforms, currently only X is supported.
            properties:
              platform:
                enum:
                - x
                - github
                type: string
              username:
                type: string
            type: object
          type: array
        verified_addresses:
          properties:
            eth_addresses:
              description: List of verified Ethereum addresses of the user sorted by oldest to most recent.
              items:
                $ref: '#/components/schemas/EthAddress'
              type: array
            primary:
              properties:
                eth_address:
                  allOf:
                  - $ref: '#/components/schemas/EthAddress'
                  nullable: true
                sol_address:
                  allOf:
                  - $ref: '#/components/schemas/SolAddress'
                  nullable: true
              required:
              - eth_address
              - sol_address
              type: object
            sol_addresses:
              description: List of verified Solana addresses of the user sorted by oldest to most recent.
              items:
                $ref: '#/components/schemas/SolAddress'
              type: array
          required:
          - eth_addresses
          - sol_addresses
          - primary
          type: object
        viewer_context:
          $ref: '#/components/schemas/UserViewerContext'
      required:
      - object
      - fid
      - username
      - custody_address
      - registered_at
      - profile
      - follower_count
      - following_count
      - verifications
      - auth_addresses
      - verified_addresses
      - verified_accounts
      title: User
      type: object
    Embed:
      anyOf:
      - $ref: '#/components/schemas/EmbedCast'
      - $ref: '#/components/schemas/EmbedUrl'
      title: Embed
    ChannelMemberRole:
      description: The role of a channel member
      enum:
      - member
      - moderator
      - owner
      title: ChannelMemberRole
      type: string
    OembedVideoData:
      description: Video OEmbed data
      properties:
        author_name:
          description: The name of the author/owner of the resource.
          nullable: true
          type: string
        author_url:
          description: A URL for the author/owner of the resource.
          nullable: true
          type: string
        cache_age:
          description: The suggested cache lifetime for this resource, in seconds. Consumers may choose to use this value or not.
          nullable: true
          type: string
        height:
          description: The height in pixels required to display the HTML.
          nullable: true
          type: number
        html:
          description: The HTML required to embed a video player. The HTML should have no padding or margins. Consumers may wish to load the HTML in an off-domain iframe to avoid XSS vulnerabilities.
          nullable: true
          type: string
        provider_name:
          description: The name of the resource provider.
          nullable: true
          type: string
        provider_url:
          description: The url of the resource provider.
          nullable: true
          type: string
        thumbnail_height:
          description: The height of the optional thumbnail. If this parameter is present, thumbnail_url and thumbnail_width must also be present.
          nullable: true
          type: number
        thumbnail_url:
          description: A URL to a thumbnail image representing the resource. The thumbnail must respect any maxwidth and maxheight parameters. If this parameter is present, thumbnail_width and thumbnail_height must also be present.
          nullable: true
          type: string
        thumbnail_width:
          description: The width of the optional thumbnail. If this parameter is present, thumbnail_url and thumbnail_height must also be present.
          nullable: true
          type: number
        title:
          description: A text title, describing the resource.
          nullable: true
          type: string
        type:
          enum:
          - video
          type: string
        version:
          nullable: true
          type: string
        width:
          description: The width in pixels required to display the HTML.
          nullable: true
          type: number
      required:
      - type
      - version
      - html
      title: OembedVideoData
      type: object
    UserViewerContext:
      description: Adds context on the viewer's follow relationship with the user.
      properties:
        blocked_by:
          description: Indicates if the viewer is blocked by the user.
          type: boolean
        blocking:
          description: Indicates if the viewer is blocking the user.
          type: boolean
        followed_by:
          description: Indicates if the viewer is followed by the user.
          type: boolean
        following:
          description: Indicates if the viewer is following the user.
          type: boolean
      required:
      - following
      - followed_by
      - blocking
      - blocked_by
      title: UserViewerContext
      type: object
    EmbedUrl:
      properties:
        metadata:
          $ref: '#/components/schemas/EmbedUrlMetadata'
        url:
          type: string
      required:
      - url
      title: EmbedUrl
      type: object
    CastDehydrated:
      properties:
        app:
          allOf:
          - $ref: '#/components/schemas/UserDehydrated'
          nullable: true
        author:
          $ref: '#/components/schemas/UserDehydrated'
        hash:
          type: string
        object:
          enum:
          - cast_dehydrated
          type: string
      required:
      - object
      - hash
      title: CastDehydrated
      type: object
    FarcasterManifest:
      properties:
        account_association:
          $ref: '#/components/schemas/EncodedJsonFarcasterSignature'
        frame:
          properties:
            button_title:
              type: string
            description:
              description: Detailed description of the configuration
              type: string
            hero_image_url:
              description: URL of the hero image displayed for the configuration
              format: uri
              type: string
            home_url:
              type: string
            icon_url:
              type: string
            image_url:
              type: string
            name:
              type: string
            noindex:
              description: Whether search engines should not index this configuration
              type: boolean
            og_description:
              description: Description used for Open Graph previews
              type: string
            og_image_url:
              description: Image URL used for Open Graph previews
              format: uri
              type: string
            og_title:
              description: Title used for Open Graph previews
              type: string
            primary_category:
              description: Primary category the configuration belongs to
              type: string
            screenshot_urls:
              description: URLs of screenshots showcasing the configuration
              items:
                format: uri
                type: string
              type: array
            splash_background_color:
              type: string
            splash_image_url:
              type: string
            subtitle:
              description: Short subtitle for the configuration
              type: string
            tagline:
              description: Short tagline for the configuration
              type: string
            tags:
              description: Tags associated with the configuration
              items:
                type: string
              type: array
            version:
              enum:
              - '1'
              - 0.0.0
              - 0.0.1
              - next
              type: string
            webhook_url:
              type: string
          required:
          - version
          - name
          - home_url
          - icon_url
          type: object
        miniapp:
          properties:
            button_title:
              type: string
            description:
              description: Detailed description of the configuration
              type: string
            hero_image_url:
              description: URL of the hero image displayed for the configuration
              format: uri
              type: string
            home_url:
              type: string
            icon_url:
              type: string
            image_url:
              type: string
            name:
              type: string
            noindex:
              description: Whether search engines should not index this configuration
              type: boolean
            og_description:
              description: Description used for Open Graph previews
              type: string
            og_image_url:
              description: Image URL used for Open Graph previews
              format: uri
              type: string
            og_title:
              description: Title used for Open Graph previews
              type: string
            primary_category:
              description: Primary category the configuration belongs to
              type: string
            screenshot_urls:
              description: URLs of screenshots showcasing the configuration
              items:
                format: uri
                type: string
              type: array
            splash_background_color:
              type: string
            splash_image_url:
              type: string
            subtitle:
              description: Short subtitle for the configuration
              type: string
            tagline:
              description: Short tagline for the configuration
              type: string
            tags:
              description: Tags associated with the configuration
              items:
                type: string
              type: array
            version:
              enum:
              - '1'
              - 0.0.0
              - 0.0.1
              - next
              type: string
            webhook_url:
              type: string
          required:
          - version
          - name
          - home_url
          - icon_url
          type: object
      required:
      - account_association
      title: FarcasterManifest
      type: object
    EthAddress:
      description: Ethereum address
      example: '0x5a927ac639636e534b678e81768ca19e2c6280b7'
      pattern: ^0x[a-fA-F0-9]{40}$
      title: EthAddress
      type: string
    OembedRichData:
      description: Rich OEmbed data
      properties:
        author_name:
          description: The name of the author/owner of the resource.
          nullable: true
          type: string
        author_url:
          description: A URL for the author/owner of the resource.
          nullable: true
          type: string
        cache_age:
          description: The suggested cache lifetime for this resource, in seconds. Consumers may choose to use this value or not.
          nullable: true
          type: string
        height:
          description: The height in pixels required to display the HTML.
          nullable: true
          type: number
        html:
          description: The HTML required to display the resource. The HTML should have no padding or margins. Consumers may wish to load the HTML in an off-domain iframe to avoid XSS vulnerabilities. The markup should be valid XHTML 1.0 Basic.
          nullable: true
          type: string
        provider_name:
          description: The name of the resource provider.
          nullable: true
          type: string
        provider_url:
          description: The url of the resource provider.
          nullable: true
          type: string
        thumbnail_height:
          description: The height of the optional thumbnail. If this parameter is present, thumbnail_url and thumbnail_width must also be present.
          nullable: true
          type: number
        thumbnail_url:
          description: A URL to a thumbnail image representing the resource. The thumbnail must respect any maxwidth and maxheight parameters. If this parameter is present, thumbnail_width and thumbnail_height must also be present.
          nullable: true
          type: string
        thumbnail_width:
          description: The width of the optional thumbnail. If this parameter is present, thumbnail_url and thumbnail_height must also be present.
          nullable: true
          type: number
        title:
          description: A text title, describing the resource.
          nullable: true
          type: string
        type:
          enum:
          - rich
          type: string
        version:
          nullable: true
          type: string
        width:
          description: The width in pixels required to display the HTML.
          nullable: true
          type: number
      required:
      - type
      - version
      - html
      title: OembedRichData
      type: object
    Location:
      description: Coordinates and place names for a location
      properties:
        address:
          $ref: '#/components/schemas/LocationAddress'
        latitude:
          format: double
          maximum: 90
          minimum: -90
          type: number
        longitude:
          format: double
          maximum: 180
          minimum: -180
          type: number
        radius:
          description: The radius in meters for the location search. Any location within this radius will be returned.
          minimum: 0
          type: number
      required:
      - latitude
      - longitude
      title: Location
      type: object
    ImageObject:
      properties:
        alt:
          type: string
        height:
          type: string
        type:
          type: string
        url:
          type: string
        width:
          type: string
      required:
      - url
      title: ImageObject
      type: object
    ChannelOrChannelDehydrated:
      discriminator:
        mapping:
          channel: '#/components/schemas/Channel'
          channel_dehydrated: '#/components/schemas/ChannelDehydrated'
        propertyName: object
      oneOf:
      - $ref: '#/components/schemas/Channel'
      - $ref: '#/components/schemas/ChannelDehydrated'
      title: ChannelOrChannelDehydrated
      type: object
    UserDehydrated:
      properties:
        custody_address:
          $ref: '#/components/schemas/EthAddress'
        display_name:
          nullable: true
          type: string
        fid:
          $ref: '#/components/schemas/Fid'
        object:
          enum:
          - user_dehydrated
          type: string
        pfp_url:
          nullable: true
          type: string
        score:
          type: number
        username:
          type: string
      required:
      - object
      - fid
      title: UserDehydrated
      type: object
    FrameV2:
      description: Mini app v2 object
      properties:
        author:
          $ref: '#/components/schemas/UserDehydrated'
        frames_url:
          description: Launch URL of the mini app
          type: string
        image:
          description: URL of the image
          type: string
        manifest:
          $ref: '#/components/schemas/FarcasterManifest'
        metadata:
          properties:
            html:
              $ref: '#/components/schemas/HtmlMetadata'
          required:
          - html
          type: object
        title:
          description: Button title of a mini app
          type: string
        version:
          description: Version of the mini app, 'next' for v2, 'vNext' for v1
          type: string
      required:
      - version
      - image
      - frames_url
      title: FrameV2
      type: object
    ChannelDehydrated:
      properties:
        id

# --- truncated at 32 KB (53 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/api-evangelist-neynar/refs/heads/main/openapi/neynar-notifications-api-openapi.yml