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

# List contents

> Returns a paginated list of published content (posts, videos, and documents), newest first, optionally filtered by search term, tag, or DOI



## OpenAPI

````yaml https://api.zapnito.com/api/docs/v1/swagger.json get /api/v1/contents
openapi: 3.0.1
info:
  title: API V1
  version: v1
  description: Zapnito API Documentation
servers:
  - url: https://{host}
    description: Your community domain
    variables:
      host:
        default: your-community.com
        description: Your community domain, for example your-community.com
security: []
tags:
  - name: Health Check
    description: Check that the API is reachable and that your API key is valid
  - name: Identity
    description: Find out which community your API key belongs to
  - name: Users
    description: >-
      Look up the people in your community, update their profile and choose
      which notifications they receive
  - name: Organisations
    description: >-
      Create and update the organisations in your community and manage who
      belongs to them
  - name: Groups
    description: Create groups and manage which users belong to them
  - name: Invitations
    description: Invite people to join your community
  - name: Posts
    description: Create, read and update posts on behalf of your community members
  - name: Contents
    description: >-
      Read the published content of your community and publish, schedule or
      unpublish it
  - name: Channels
    description: List the channels in your community and the content published in each
  - name: Rooms
    description: Create and read the rooms where your community members meet
  - name: Tags
    description: Create tags and apply them to content
  - name: Badges
    description: Create badges and award them to content or to users
  - name: Custom Fields
    description: Read the custom profile fields your community asks its members to fill in
  - name: Third-Party Resources
    description: >-
      Link to resources hosted outside your community so they appear alongside
      your content
  - name: Rest Hooks
    description: >-
      Subscribe a URL to events in your community, so you are told when they
      happen
paths:
  /api/v1/contents:
    get:
      tags:
        - Contents
      summary: List contents
      description: >-
        Returns a paginated list of published content (posts, videos, and
        documents), newest first, optionally filtered by search term, tag, or
        DOI
      operationId: listContents
      parameters:
        - name: page
          in: query
          required: false
          description: 'Page number (default: 1)'
          schema:
            type: integer
        - name: per_page
          in: query
          required: false
          description: 'Number of items per page (default: 10)'
          schema:
            type: integer
        - name: query
          in: query
          required: false
          description: Search term used to filter results
          schema:
            type: string
        - name: tag
          in: query
          required: false
          description: Filter by exact tag name. URL-encoded values are also accepted
          schema:
            type: string
        - name: doi
          in: query
          required: false
          description: >-
            Filter by DOI. Accepts a full DOI URL (for example
            `https://doi.org/10.1000/example`) or the DOI on its own (for
            example `10.1000/example`)
          schema:
            type: string
      responses:
        '200':
          description: A page of published content, newest first
          content:
            application/json:
              schema:
                type: object
                properties:
                  contents:
                    type: array
                    items:
                      $ref: '#/components/schemas/Content'
                required:
                  - contents
        '401':
          description: >-
            The API key is missing or invalid. The response body is the text
            `HTTP Token: Access denied.`
      security:
        - tokenAuth: []
components:
  schemas:
    Content:
      type: object
      properties:
        id:
          type: integer
          example: 1
        slug:
          type: string
          example: how-we-improved-onboarding
          description: >-
            The slug that identifies the content in its URL. Can be used in
            place of the id
        type:
          type: string
          example: Post
          enum:
            - Post
            - Video
            - Document
          description: The kind of content
        title:
          type: string
          example: How we improved onboarding
        introduction:
          type: string
          nullable: true
          example: A short summary of the content
        content:
          type: string
          nullable: true
          example: The full body of the content
        url:
          type: string
          example: https://example.com/posts/how-we-improved-onboarding
        canonical_url:
          type: string
          example: https://example.com/posts/how-we-improved-onboarding
        thumbnail_url:
          type: string
          nullable: true
          example: https://example.com/thumbnail.png
        published_at:
          type: string
          nullable: true
          format: date-time
          example: '2024-01-01T00:00:00Z'
          description: >-
            When the content was published. Null for a draft or scheduled
            content
        scheduled_at:
          type: string
          nullable: true
          format: date-time
          example: '2024-01-01T00:00:00Z'
          description: When the content will be published. Null unless it is scheduled
        created_at:
          type: string
          format: date-time
          example: '2024-01-01T00:00:00Z'
        updated_at:
          type: string
          format: date-time
          example: '2024-01-01T00:00:00Z'
        doi:
          type: string
          nullable: true
          example: https://doi.org/10.1000/example
        topic_ids:
          type: array
          items:
            type: integer
          example: []
        seo_title:
          type: string
          nullable: true
          example: How we improved onboarding
        seo_description:
          type: string
          nullable: true
          example: A short summary of the content
        author:
          type: object
          nullable: true
          properties:
            name:
              type: string
              example: Jane Doe
            title:
              type: string
              nullable: true
              example: Senior Engineer
        room:
          type: object
          nullable: true
          properties:
            id:
              type: integer
              example: 1
            name:
              type: string
              example: Cardiology
        topics:
          type: array
          items:
            type: object
        channels:
          type: array
          items:
            type: object
        badges:
          type: array
          items:
            type: object
        user:
          type: object
          nullable: true
          properties:
            id:
              type: integer
              example: 1
            name:
              type: string
              example: Jane Doe
            email:
              type: string
              format: email
              example: jane@example.com
      required:
        - id
        - slug
        - type
        - title
        - url
        - canonical_url
        - created_at
  securitySchemes:
    tokenAuth:
      type: apiKey
      name: Authorization
      in: header
      description: >-
        API authentication using your community API secret. The value below is
        sent as the Authorization header verbatim, so paste the whole header
        value including the prefix: Token token=<api-key>
      x-default: Token token=<api-key>

````

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