Delighted Unsubscribes API

Manage unsubscribe lists

OpenAPI Specification

delighted-unsubscribes-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Delighted Autopilot Unsubscribes API
  description: REST API for the Delighted customer satisfaction platform. Enables sending surveys, retrieving and adding survey responses, accessing NPS and CSAT metrics, managing Autopilot drip campaigns, handling webhooks for real-time events, and managing people records including unsubscribes and bounces. Authentication is via HTTP Basic Auth using per-project API keys.
  version: v1
  contact:
    name: Delighted Support
    url: https://app.delighted.com/docs/api
  termsOfService: https://delighted.com/terms
  license:
    name: Proprietary
    url: https://delighted.com/terms
servers:
- url: https://api.delighted.com/v1
  description: Delighted API v1
security:
- basicAuth: []
tags:
- name: Unsubscribes
  description: Manage unsubscribe lists
paths:
  /unsubscribes.json:
    post:
      operationId: unsubscribePerson
      summary: Unsubscribe person
      description: Adds a person to the unsubscribe list, preventing them from receiving further survey emails. Does not remove their previous survey responses.
      tags:
      - Unsubscribes
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - person_email
              properties:
                person_email:
                  type: string
                  format: email
                  description: Email of the person to unsubscribe.
      responses:
        '200':
          description: Person unsubscribed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OkResponse'
        '401':
          description: Unauthorized
        '404':
          description: Person not found
        '429':
          description: Rate limit exceeded
    get:
      operationId: listUnsubscribedPeople
      summary: List unsubscribed people
      description: Returns a paginated list of people who have unsubscribed from surveys.
      tags:
      - Unsubscribes
      parameters:
      - name: per_page
        in: query
        description: Number of results per page. Default is 20, maximum is 100.
        schema:
          type: integer
          default: 20
          maximum: 100
      - name: page
        in: query
        description: Page number to return. Default is 1.
        schema:
          type: integer
          default: 1
      - name: since
        in: query
        description: Unix timestamp to filter unsubscribes on or after this date.
        schema:
          type: integer
      - name: until
        in: query
        description: Unix timestamp to filter unsubscribes on or before this date.
        schema:
          type: integer
      responses:
        '200':
          description: List of unsubscribed people
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/UnsubscribedPerson'
        '401':
          description: Unauthorized
        '429':
          description: Rate limit exceeded
components:
  schemas:
    UnsubscribedPerson:
      type: object
      description: A person who has unsubscribed from surveys.
      properties:
        person_id:
          type: string
          description: Unique identifier for the person.
        email:
          type: string
          format: email
          description: Email address of the unsubscribed person.
        name:
          type: string
          nullable: true
          description: Name of the person.
        unsubscribed_at:
          type: integer
          description: Unix timestamp when the unsubscription occurred.
    OkResponse:
      type: object
      description: Simple success response.
      properties:
        ok:
          type: boolean
          description: Indicates the operation was successful.
          example: true
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: Use your Delighted API key as the username. Leave the password empty. The API key is found in your project settings.