brevo Folders API

Organize contact lists into folders for better management.

OpenAPI Specification

brevo-folders-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Brevo Contacts Agent Status Folders API
  description: The Brevo Contacts API provides programmatic access to contact management features including creating, updating, and deleting contacts. Developers can organize contacts into lists, apply attributes and tags, import contacts in bulk, and build audience segments for targeted campaigns. The API also supports managing folders, contact attributes, and custom fields to structure contact data according to business needs.
  version: '3.0'
  contact:
    name: Brevo Support
    url: https://help.brevo.com
  termsOfService: https://www.brevo.com/legal/termsofuse/
servers:
- url: https://api.brevo.com/v3
  description: Brevo Production API Server
security:
- apiKeyAuth: []
tags:
- name: Folders
  description: Organize contact lists into folders for better management.
paths:
  /contacts/folders:
    get:
      operationId: listFolders
      summary: Get all folders
      description: Retrieves all folders used to organize contact lists.
      tags:
      - Folders
      parameters:
      - $ref: '#/components/parameters/limitParam'
      - $ref: '#/components/parameters/offsetParam'
      responses:
        '200':
          description: Folders retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FolderList'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      operationId: createFolder
      summary: Create a folder
      description: Creates a new folder for organizing contact lists.
      tags:
      - Folders
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - name
              properties:
                name:
                  type: string
                  description: Name for the new folder.
      responses:
        '201':
          description: Folder created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                    format: int64
                    description: Unique identifier of the newly created folder.
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  parameters:
    offsetParam:
      name: offset
      in: query
      description: Number of results to skip for pagination.
      schema:
        type: integer
        format: int64
        default: 0
    limitParam:
      name: limit
      in: query
      description: Maximum number of results to return per request.
      schema:
        type: integer
        format: int64
        default: 50
  schemas:
    FolderList:
      type: object
      properties:
        count:
          type: integer
          format: int64
          description: Total number of folders.
        folders:
          type: array
          description: List of folder records.
          items:
            type: object
            properties:
              id:
                type: integer
                format: int64
                description: Unique identifier of the folder.
              name:
                type: string
                description: Name of the folder.
              totalSubscribers:
                type: integer
                format: int64
                description: Total subscribers across all lists in the folder.
              totalBlacklisted:
                type: integer
                format: int64
                description: Total blacklisted contacts across all lists.
              uniqueSubscribers:
                type: integer
                format: int64
                description: Unique subscribers across all lists in the folder.
    ErrorResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code identifying the type of error.
        message:
          type: string
          description: Human-readable description of the error.
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: api-key
      description: Brevo API key passed in the api-key request header for authentication.
externalDocs:
  description: Brevo Contacts Documentation
  url: https://developers.brevo.com/docs/how-it-works