Buttondown Public API

The Public API from Buttondown — 1 operation(s) covering the unauthenticated public archive search.

OpenAPI Specification

buttondown-public-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Buttondown public API
  version: 1.0.0
  description: The Buttondown API lets you manage newsletters, subscribers, emails, and more. See [the documentation](https://docs.buttondown.com/api-introduction)
    for guides and examples.
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
- url: https://api.buttondown.com/v1
security:
- ApiKeyAuth: []
tags:
- name: public
paths:
  /public/emails/{username}:
    get:
      operationId: list_public_emails
      summary: Search public emails
      parameters:
      - in: path
        name: username
        schema:
          title: Username
          type: string
        required: true
      - in: query
        name: q
        schema:
          description: If provided, only return emails matching the given query.
          title: Q
          type: string
        required: false
        description: If provided, only return emails matching the given query.
      - in: query
        name: page
        schema:
          default: 1
          description: The page number to return.
          title: Page
          type: integer
        required: false
        description: The page number to return.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicEmailPage'
        '404':
          description: Not Found
        '429':
          description: Too Many Requests
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
            X-RateLimit-Limit:
              description: Requests permitted per minute.
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: Requests remaining in the current window.
              schema:
                type: integer
            X-RateLimit-Reset:
              description: Unix timestamp at which the window resets.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
      description: Search and list public emails for a newsletter. No authentication required.
      tags:
      - public
      security: []
components:
  schemas:
    ErrorMessage:
      properties:
        code:
          description: The error code.
          title: Code
          type: string
        detail:
          description: A human-readable description of the error.
          title: Detail
          type: string
        metadata:
          additionalProperties:
            type: string
          default: {}
          description: Additional context about the error. When present, a `documentation_url` key links to docs explaining
            how to resolve it.
          title: Metadata
          type: object
      required:
      - detail
      title: ErrorMessage
      type: object
    PublicEmail:
      description: Public email schema for email search results.
      properties:
        id:
          description: A unique TypeID associated with the object.
          title: Id
          type: string
        creation_date:
          description: The date and time at which the object was first created.
          format: date-time
          title: Creation Date
          type: string
        subject:
          title: Subject
          type: string
        slug:
          anyOf:
          - type: string
          - type: 'null'
          title: Slug
        publish_date:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Publish Date
        description:
          title: Description
          type: string
        absolute_url:
          title: Absolute Url
          type: string
      required:
      - id
      - creation_date
      - subject
      - description
      - absolute_url
      title: PublicEmail
      type: object
    PublicEmailPage:
      properties:
        results:
          description: The list of results for this page.
          items:
            $ref: '#/components/schemas/PublicEmail'
          title: Results
          type: array
        next:
          anyOf:
          - type: string
          - type: 'null'
          description: The URL to the next page of results, if any.
          title: Next
        previous:
          anyOf:
          - type: string
          - type: 'null'
          description: The URL to the previous page of results, if any.
          title: Previous
        count:
          description: The total number of results across all pages.
          title: Count
          type: integer
      required:
      - results
      - count
      title: Page[PublicEmail]
      type: object
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: API key passed as 'Token <your-api-key>' in the Authorization header.