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

# Remove Enrollment

> Cancel a live run, preserving all history. Paused and archived parents are allowed.

Stops further steps; does not recall an in-flight send.
Active, waiting, queued and stuck runs exit with operator_exit. Completed,
exited and suppressed runs return 404; retry and skip return 409 for those IDs.



## OpenAPI

````yaml /openapi/mio-openapi.json delete /api/v1/teams/{team_id}/hubs/{hub_id}/automations/{automation_id}/enrollments/{enrollment_id}
openapi: 3.1.0
info:
  description: >-
    Production API reference for Membership.io. Use the authored guides for
    workflows and the generated endpoint pages for exact parameters and schemas.
  title: Membership.io API
  version: 0.1.0
servers:
  - description: Production
    url: https://api.member.dev
security:
  - bearerAuth: []
paths:
  /api/v1/teams/{team_id}/hubs/{hub_id}/automations/{automation_id}/enrollments/{enrollment_id}:
    delete:
      tags:
        - automations
      summary: Remove Enrollment
      description: >-
        Cancel a live run, preserving all history. Paused and archived parents
        are allowed.


        Stops further steps; does not recall an in-flight send.

        Active, waiting, queued and stuck runs exit with operator_exit.
        Completed,

        exited and suppressed runs return 404; retry and skip return 409 for
        those IDs.
      operationId: >-
        automations.delete_automations_delete_teams_by_team_id_hubs_by_hub_id_automations_by_automation_id_enrollments_by_enrollment_id
      parameters:
        - in: path
          name: team_id
          required: true
          schema:
            title: Team Id
            type: string
        - in: path
          name: hub_id
          required: true
          schema:
            title: Hub Id
            type: string
        - in: path
          name: automation_id
          required: true
          schema:
            title: Automation Id
            type: string
        - in: path
          name: enrollment_id
          required: true
          schema:
            title: Enrollment Id
            type: string
      responses:
        '204':
          description: Successful Response
        '401':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Not authenticated
        '403':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Forbidden
        '404':
          content:
            application/vnd.api+json:
              examples:
                automation_enrollment_not_found:
                  value:
                    errors:
                      - code: automation_enrollment_not_found
                        detail: Automation enrollment not found.
                        meta:
                          request_id: request-id
                        status: '404'
                        title: Not Found
                automation_not_found:
                  value:
                    errors:
                      - code: automation_not_found
                        detail: Automation not found.
                        meta:
                          request_id: request-id
                        status: '404'
                        title: Not Found
                hub_not_found:
                  value:
                    errors:
                      - code: hub_not_found
                        detail: Hub not found.
                        meta:
                          request_id: request-id
                        status: '404'
                        title: Not Found
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Scoped hub, automation or enrollment not found
        '415':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Unsupported media type
        '422':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Invalid input
        '429':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Action rate limit exceeded (120/hour)
      security:
        - HTTPBearer: []
components:
  schemas:
    JsonApiErrorResponse:
      description: Error JSON:API response.
      properties:
        errors:
          items:
            $ref: '#/components/schemas/JsonApiError'
          title: Errors
          type: array
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
      required:
        - errors
      title: JsonApiErrorResponse
      type: object
    JsonApiError:
      properties:
        code:
          anyOf:
            - type: string
            - type: 'null'
          title: Code
        detail:
          anyOf:
            - type: string
            - type: 'null'
          title: Detail
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
        source:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Source
        status:
          title: Status
          type: string
        title:
          title: Title
          type: string
      required:
        - status
        - title
      title: JsonApiError
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT or mio_sk API key
      description: >-
        Send platform JWTs, contact JWTs, or team API keys as `Authorization:
        Bearer <token>`.
      scheme: bearer
      type: http
    HTTPBearer:
      scheme: bearer
      type: http

````

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