Unify Sequence Enrollments API

The Sequence Enrollments API from Unify — 8 operation(s) for sequence enrollments.

OpenAPI Specification

unify-sequence-enrollments-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Unify Analytics Events Sequence Enrollments API
  summary: Send website and product analytics data into the Unify platform.
  version: '1'
  termsOfService: https://www.unifygtm.com/legal/terms-and-conditions
  contact:
    name: Unify Support
    url: https://www.unifygtm.com/support
    email: support@unifygtm.com
servers:
- url: https://api.unifyintent.com/analytics/v1
  variables: {}
security:
- BasicAuth: []
tags:
- name: Sequence Enrollments
paths:
  /enrollments:
    post:
      operationId: create_sequence_enrollment
      parameters: []
      responses:
        '201':
          description: Response returned when an enrollment is created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateEnrollmentSuccessResponse'
        '400':
          description: Response for any operation that results in a bad request error.
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                properties:
                  status:
                    type: string
                    enum:
                    - bad_request
                  errors:
                    type: array
                    items:
                      $ref: '#/components/schemas/UResponses.BadRequestError'
                  message:
                    type: string
                description: Response for any operation that results in a bad request error.
        '401':
          description: Response for any operation that results in an unauthorized error.
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                - message
                properties:
                  status:
                    type: string
                    enum:
                    - unauthorized
                  message:
                    type: string
                description: Response for any operation that results in an unauthorized error.
        '404':
          description: Response returned when an enrollment cannot be found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnrollmentNotFoundResponse'
        '409':
          description: Response returned when the person is already enrolled in an active sequence.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateEnrollmentConflictResponse'
        '429':
          description: Response for any operation that exceeds a rate limit.
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                - message
                properties:
                  status:
                    type: string
                    enum:
                    - rate_limited
                  message:
                    type: string
                description: Response for any operation that exceeds a rate limit.
        '500':
          description: Response for any operation that results in an internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                - message
                properties:
                  status:
                    type: string
                    enum:
                    - error
                  message:
                    type: string
                description: Response for any operation that results in an internal server error.
      tags:
      - Sequence Enrollments
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateEnrollmentRequest'
    get:
      operationId: list_sequence_enrollments
      parameters:
      - name: cursor
        in: query
        required: false
        schema:
          type: string
        explode: false
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        explode: false
      - name: sequence_id
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/uuid'
        explode: false
      - name: person_id
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/uuid'
        explode: false
      - name: mailbox_id
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/uuid'
        explode: false
      - name: status
        in: query
        required: false
        description: Repeat `status` to filter by multiple enrollment statuses.
        schema:
          type: array
          items:
            $ref: '#/components/schemas/SequenceEnrollmentStatus'
      - name: updated_after
        in: query
        required: false
        description: Inclusive lower bound on `updated_at`.
        schema:
          $ref: '#/components/schemas/datetime'
        explode: false
      - name: updated_before
        in: query
        required: false
        description: Inclusive upper bound on `updated_at`.
        schema:
          $ref: '#/components/schemas/datetime'
        explode: false
      responses:
        '200':
          description: Response returned when listing enrollments.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListEnrollmentsResponse'
        '400':
          description: Response for any operation that results in a bad request error.
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                properties:
                  status:
                    type: string
                    enum:
                    - bad_request
                  errors:
                    type: array
                    items:
                      $ref: '#/components/schemas/UResponses.BadRequestError'
                  message:
                    type: string
                description: Response for any operation that results in a bad request error.
        '401':
          description: Response for any operation that results in an unauthorized error.
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                - message
                properties:
                  status:
                    type: string
                    enum:
                    - unauthorized
                  message:
                    type: string
                description: Response for any operation that results in an unauthorized error.
        '429':
          description: Response for any operation that exceeds a rate limit.
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                - message
                properties:
                  status:
                    type: string
                    enum:
                    - rate_limited
                  message:
                    type: string
                description: Response for any operation that exceeds a rate limit.
        '500':
          description: Response for any operation that results in an internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                - message
                properties:
                  status:
                    type: string
                    enum:
                    - error
                  message:
                    type: string
                description: Response for any operation that results in an internal server error.
      tags:
      - Sequence Enrollments
  /enrollments/query-jobs:
    post:
      operationId: create_sequence_enrollment_query_job
      parameters: []
      responses:
        '201':
          description: Response returned when creating a Bulk API query job.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateBulkApiJobSuccessResponse'
        '400':
          description: Response for any operation that results in a bad request error.
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                properties:
                  status:
                    type: string
                    enum:
                    - bad_request
                  errors:
                    type: array
                    items:
                      $ref: '#/components/schemas/UResponses.BadRequestError'
                  message:
                    type: string
                description: Response for any operation that results in a bad request error.
        '401':
          description: Response for any operation that results in an unauthorized error.
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                - message
                properties:
                  status:
                    type: string
                    enum:
                    - unauthorized
                  message:
                    type: string
                description: Response for any operation that results in an unauthorized error.
        '429':
          description: Response for any operation that exceeds a rate limit.
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                - message
                properties:
                  status:
                    type: string
                    enum:
                    - rate_limited
                  message:
                    type: string
                description: Response for any operation that exceeds a rate limit.
        '500':
          description: Response for any operation that results in an internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                - message
                properties:
                  status:
                    type: string
                    enum:
                    - error
                  message:
                    type: string
                description: Response for any operation that results in an internal server error.
      tags:
      - Sequence Enrollments
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateBulkApiSequenceEnrollmentsJobRequest'
    get:
      operationId: list_sequence_enrollment_query_jobs
      parameters:
      - name: cursor
        in: query
        required: false
        schema:
          type: string
        explode: false
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
        explode: false
      - name: status
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/BulkApiJobStatus'
        explode: false
      responses:
        '200':
          description: Response returned when listing Bulk API jobs.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListBulkApiJobsSuccessResponse'
        '400':
          description: Response for any operation that results in a bad request error.
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                properties:
                  status:
                    type: string
                    enum:
                    - bad_request
                  errors:
                    type: array
                    items:
                      $ref: '#/components/schemas/UResponses.BadRequestError'
                  message:
                    type: string
                description: Response for any operation that results in a bad request error.
        '401':
          description: Response for any operation that results in an unauthorized error.
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                - message
                properties:
                  status:
                    type: string
                    enum:
                    - unauthorized
                  message:
                    type: string
                description: Response for any operation that results in an unauthorized error.
        '429':
          description: Response for any operation that exceeds a rate limit.
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                - message
                properties:
                  status:
                    type: string
                    enum:
                    - rate_limited
                  message:
                    type: string
                description: Response for any operation that exceeds a rate limit.
        '500':
          description: Response for any operation that results in an internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                - message
                properties:
                  status:
                    type: string
                    enum:
                    - error
                  message:
                    type: string
                description: Response for any operation that results in an internal server error.
      tags:
      - Sequence Enrollments
  /enrollments/query-jobs/{job_id}:
    get:
      operationId: get_sequence_enrollment_query_job
      parameters:
      - name: job_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Response returned when fetching a Bulk API job.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetBulkApiJobSuccessResponse'
        '400':
          description: Response for any operation that results in a bad request error.
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                properties:
                  status:
                    type: string
                    enum:
                    - bad_request
                  errors:
                    type: array
                    items:
                      $ref: '#/components/schemas/UResponses.BadRequestError'
                  message:
                    type: string
                description: Response for any operation that results in a bad request error.
        '401':
          description: Response for any operation that results in an unauthorized error.
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                - message
                properties:
                  status:
                    type: string
                    enum:
                    - unauthorized
                  message:
                    type: string
                description: Response for any operation that results in an unauthorized error.
        '404':
          description: Response returned when a Bulk API job cannot be found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetBulkApiJobNotFoundResponse'
        '429':
          description: Response for any operation that exceeds a rate limit.
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                - message
                properties:
                  status:
                    type: string
                    enum:
                    - rate_limited
                  message:
                    type: string
                description: Response for any operation that exceeds a rate limit.
        '500':
          description: Response for any operation that results in an internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                - message
                properties:
                  status:
                    type: string
                    enum:
                    - error
                  message:
                    type: string
                description: Response for any operation that results in an internal server error.
      tags:
      - Sequence Enrollments
  /enrollments/query-jobs/{job_id}/cancel:
    post:
      operationId: cancel_sequence_enrollment_query_job
      parameters:
      - name: job_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Response returned when canceling a Bulk API job.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelBulkApiJobSuccessResponse'
        '400':
          description: Response for any operation that results in a bad request error.
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                properties:
                  status:
                    type: string
                    enum:
                    - bad_request
                  errors:
                    type: array
                    items:
                      $ref: '#/components/schemas/UResponses.BadRequestError'
                  message:
                    type: string
                description: Response for any operation that results in a bad request error.
        '401':
          description: Response for any operation that results in an unauthorized error.
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                - message
                properties:
                  status:
                    type: string
                    enum:
                    - unauthorized
                  message:
                    type: string
                description: Response for any operation that results in an unauthorized error.
        '404':
          description: Response returned when a Bulk API job cannot be found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetBulkApiJobNotFoundResponse'
        '409':
          description: Response returned when a Bulk API job is not cancelable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelBulkApiJobNotCancelableResponse'
        '429':
          description: Response for any operation that exceeds a rate limit.
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                - message
                properties:
                  status:
                    type: string
                    enum:
                    - rate_limited
                  message:
                    type: string
                description: Response for any operation that exceeds a rate limit.
        '500':
          description: Response for any operation that results in an internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                - message
                properties:
                  status:
                    type: string
                    enum:
                    - error
                  message:
                    type: string
                description: Response for any operation that results in an internal server error.
      tags:
      - Sequence Enrollments
  /enrollments/query-jobs/{job_id}/results:
    get:
      operationId: get_sequence_enrollment_query_job_results
      description: 'Get Bulk API job results. By default this returns JSON. Send

        `Accept: application/x-ndjson` to stream newline-delimited JSON.'
      parameters:
      - name: job_id
        in: path
        required: true
        schema:
          type: string
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
        explode: false
      - name: page_size
        in: query
        required: false
        description: 'Maximum is 2,000 for JSON responses and 10,000 when `Accept` is

          `application/x-ndjson`.'
        schema:
          type: integer
          minimum: 1
          maximum: 10000
        explode: false
      responses:
        '200':
          description: Successful response returned when fetching completed Bulk API job results.
          headers:
            x-total:
              required: false
              description: Total result count. Present for NDJSON responses.
              schema:
                type: integer
            x-page:
              required: false
              description: Result page number. Present for NDJSON responses.
              schema:
                type: integer
            x-page-size:
              required: false
              description: Result page size. Present for NDJSON responses.
              schema:
                type: integer
          content:
            application/json:
              schema:
                type: object
                required:
                - total
                - page
                - page_size
                - data
                properties:
                  total:
                    type: integer
                  page:
                    type: integer
                  page_size:
                    type: integer
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/SequenceEnrollment'
                description: Successful response returned when fetching completed Bulk API job results.
            application/x-ndjson:
              schema:
                type: string
        '400':
          description: Response for any operation that results in a bad request error.
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                properties:
                  status:
                    type: string
                    enum:
                    - bad_request
                  errors:
                    type: array
                    items:
                      $ref: '#/components/schemas/UResponses.BadRequestError'
                  message:
                    type: string
                description: Response for any operation that results in a bad request error.
        '401':
          description: Response for any operation that results in an unauthorized error.
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                - message
                properties:
                  status:
                    type: string
                    enum:
                    - unauthorized
                  message:
                    type: string
                description: Response for any operation that results in an unauthorized error.
        '404':
          description: Response returned when a Bulk API job cannot be found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetBulkApiJobNotFoundResponse'
        '409':
          description: Response returned when Bulk API job results are not ready yet.
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/GetBulkApiJobResultsNotReadyResponse'
                - $ref: '#/components/schemas/GetBulkApiJobResultsFailedResponse'
                - $ref: '#/components/schemas/GetBulkApiJobResultsCanceledResponse'
        '410':
          description: Response returned when Bulk API job results have expired.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetBulkApiJobResultsExpiredResponse'
        '413':
          description: Response returned when a requested Bulk API results page is too large.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetBulkApiJobResultsPayloadTooLargeResponse'
        '429':
          description: Response for any operation that exceeds a rate limit.
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                - message
                properties:
                  status:
                    type: string
                    enum:
                    - rate_limited
                  message:
                    type: string
                description: Response for any operation that exceeds a rate limit.
        '500':
          description: Response for any operation that results in an internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                - message
                properties:
                  status:
                    type: string
                    enum:
                    - error
                  message:
                    type: string
                description: Response for any operation that results in an internal server error.
      tags:
      - Sequence Enrollments
  /enrollments/{id}:
    get:
      operationId: get_sequence_enrollment
      parameters:
      - name: id
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/uuid'
      responses:
        '200':
          description: Response returned when fetching an enrollment.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetEnrollmentResponse'
        '400':
          description: Response for any operation that results in a bad request error.
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                properties:
                  status:
                    type: string
                    enum:
                    - bad_request
                  errors:
                    type: array
                    items:
                      $ref: '#/components/schemas/UResponses.BadRequestError'
                  message:
                    type: string
                description: Response for any operation that results in a bad request error.
        '401':
          description: Response for any operation that results in an unauthorized error.
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                - message
                properties:
                  status:
                    type: string
                    enum:
                    - unauthorized
                  message:
                    type: string
                description: Response for any operation that results in an unauthorized error.
        '404':
          description: Response returned when an enrollment cannot be found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnrollmentNotFoundResponse'
        '429':
          description: Response for any operation that exceeds a rate limit.
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                - message
                properties:
                  status:
                    type: string
                    enum:
                    - rate_limited
                  message:
                    type: string
                description: Response for any operation that exceeds a rate limit.
        '500':
          description: Response for any operation that results in an internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                - message
                properties:
                  status:
                    type: string
                    enum:
                    - error
                  message:
                    type: string
                description: Response for any operation that results in an internal server error.
      tags:
      - Sequence Enrollments
    delete:
      operationId: delete_sequence_enrollment
      parameters:
      - name: id
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/uuid'
      responses:
        '200':
          description: Response returned when deleting an enrollment.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteEnrollmentSuccessResponse'
        '400':
          description: Response for any operation that results in a bad request error.
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                properties:
                  status:
                    type: string
                    enum:
                    - bad_request
                  errors:
                    type: array
                    items:
                      $ref: '#/components/schemas/UResponses.BadRequestError'
                  message:
                    type: string
                description: Response for any operation that results in a bad request error.
        '401':
          description: Response for any operation that results in an unauthorized error.
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                - message
                properties:
                  status:
                    type: string
                    enum:
                    - unauthorized
                  message:
                    type: string
                description: Response for any operation that results in an unauthorized error.
        '404':
          description: Response returned when an enrollment cannot be found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnrollmentNotFoundResponse'
        '429':
          description: Response for any operation that exceeds a rate limit.
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                - message
                properties:
                  status:
                    type: string
                    enum:
                    - rate_limited
                  message:
                  

# --- truncated at 32 KB (61 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/unify/refs/heads/main/openapi/unify-sequence-enrollments-api-openapi.yml