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

# Get enrollment generation

> Check agentic enrollment progress.

## Overview

Use the generation ID returned by [Create enrollment](https://docs.unifygtm.com/developers/api/sequences/enrollments/create.md)
for an agentic sequence. Poll while its status is `IN_PROGRESS`.

When the status is `COMPLETED`, `enrollment_id` identifies the generated enrollment.
If `is_draft_approval_pending` is true, review the messages and
[approve the enrollment](https://docs.unifygtm.com/developers/api/sequences/enrollments/approve.md) before
it can start. For a failed generation, inspect `failure_reason` and
`failure_message` before creating another request.


## OpenAPI

````yaml GET /sequences/v1/enrollments/generations/{id}
openapi: 3.1.0
info:
  title: Unify Sequences API
  summary: Interact with sequences and sequence enrollments within 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.unifygtm.com
    variables: {}
security:
  - ApiKeyAuth: []
tags:
  - name: Sequences
  - name: Sequence Enrollment Steps
  - name: Sequence Enrollments
paths:
  /sequences/v1/enrollments/generations/{id}:
    get:
      tags:
        - Sequences
        - Sequence Enrollments
      description: |-
        Get an enrollment generation by its ID. Generations are returned by
        `create_sequence_enrollment` for `AGENTIC` sequences.
      operationId: get_sequence_enrollment_generation
      parameters:
        - name: id
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/uuid'
      responses:
        '200':
          description: Response returned when fetching an enrollment generation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetEnrollmentGenerationResponse'
        '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 generation cannot be found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnrollmentGenerationNotFoundResponse'
        '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.
components:
  schemas:
    uuid:
      type: string
      format: uuid
      description: String UUID value.
    GetEnrollmentGenerationResponse:
      type: object
      allOf:
        - $ref: '#/components/schemas/EnrollmentGeneration'
      description: Response returned when fetching an enrollment generation.
    UResponses.BadRequestError:
      type: object
      required:
        - code
      properties:
        code:
          type: string
        path:
          type: array
          items:
            anyOf:
              - type: string
              - type: integer
        object_api_name:
          type: string
        attribute_api_name:
          type: string
      allOf:
        - type: object
          unevaluatedProperties: {}
      description: Validation error detail returned for bad request responses.
    EnrollmentGenerationNotFoundResponse:
      type: object
      allOf:
        - type: object
          required:
            - status
            - message
          properties:
            status:
              type: string
              enum:
                - not_found
            message:
              type: string
          description: Response for any operation that results in a not found error.
      description: Response returned when an enrollment generation cannot be found.
    EnrollmentGeneration:
      type: object
      required:
        - id
        - created_at
        - updated_at
        - sequence_id
        - person_id
        - status
        - enrollment_id
        - is_draft_approval_pending
        - failure_reason
        - failure_message
        - ended_at
      properties:
        id:
          $ref: '#/components/schemas/uuid'
        created_at:
          $ref: '#/components/schemas/datetime'
        updated_at:
          $ref: '#/components/schemas/datetime'
        sequence_id:
          $ref: '#/components/schemas/uuid'
        person_id:
          $ref: '#/components/schemas/uuid'
        status:
          $ref: '#/components/schemas/EnrollmentGenerationStatus'
        enrollment_id:
          anyOf:
            - $ref: '#/components/schemas/uuid'
            - type: 'null'
          description: >-
            ID of the created enrollment. Set once the generation is
            `COMPLETED`.
        is_draft_approval_pending:
          type: boolean
          description: |-
            True when the generation completed as a draft that needs
            `approve_sequence_enrollment` before it starts sending.
        failure_reason:
          anyOf:
            - $ref: '#/components/schemas/EnrollmentGenerationFailureReason'
            - type: 'null'
          description: Set when the generation is `FAILED`.
        failure_message:
          anyOf:
            - type: string
            - type: 'null'
        ended_at:
          anyOf:
            - $ref: '#/components/schemas/datetime'
            - type: 'null'
      description: >-
        Copy generation for one person's enrollment in an `AGENTIC` sequence.
        The

        enrollment exists once the generation is `COMPLETED`.
    datetime:
      type: string
      format: date-time
      description: String value representing an RFC 3339 datetime.
    EnrollmentGenerationStatus:
      type: string
      enum:
        - IN_PROGRESS
        - COMPLETED
        - FAILED
        - CANCELED
      description: Status of an enrollment generation.
    EnrollmentGenerationFailureReason:
      type: string
      enum:
        - CONCURRENT_ENROLLMENT_CONFLICT
        - FAILED
        - INVALID_GENERATED_CONTENT
        - MAILBOX_NOT_FOUND
        - NO_GENERATABLE_CONTENT
        - OUT_OF_CREDITS
        - PERSON_ALREADY_ENROLLED
        - PERSON_DO_NOT_EMAIL
        - PERSON_EXCLUDED
        - PERSON_NOT_FOUND
        - PERSON_OPTED_OUT
        - PERSON_RECENTLY_ENROLLED
        - PREVIOUS_ENROLLMENT_SHUTDOWN_IN_PROGRESS
        - RULES_OF_ENGAGEMENT_BLOCKED
        - SEQUENCE_NOT_FOUND
        - SEQUENCE_NOT_AGENTIC
        - SEQUENCE_NOT_PUBLISHED
      description: Reason an enrollment generation failed.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````

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