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

# Unsubscribe from external event subscription



## OpenAPI

````yaml /api-reference/membrane-api.json post /external-event-subscriptions/{id}/unsubscribe
openapi: 3.0.0
info:
  title: Membrane API
  description: API documentation for Membrane Engine
  version: '1.0'
  contact: {}
servers:
  - url: https://api.getmembrane.com
security:
  - bearer: []
tags: []
paths:
  /external-event-subscriptions/{id}/unsubscribe:
    post:
      tags:
        - ExternalEventSubscriptions
      summary: Unsubscribe from external event subscription
      operationId: unsubscribeFromExternalEventSubscription
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalEventSubscriptionApiResponseDto'
components:
  schemas:
    ExternalEventSubscriptionApiResponseDto:
      type: object
      properties:
        userId:
          type: string
        tenantId:
          type: string
        ownerName:
          type: string
          nullable: true
        id:
          type: string
        name:
          type: string
        description:
          type: string
        connectionId:
          type: string
        integrationId:
          type: string
        externalEventTypeId:
          type: string
        config:
          type: object
          properties:
            type:
              type: string
              enum:
                - data-record-created
                - data-record-updated
                - data-record-deleted
                - connector-event
            dataSource:
              type: object
              properties:
                key:
                  type: object
                collectionKey:
                  type: object
                collectionParameters:
                  type: object
                pullUpdatesIntervalSeconds:
                  type: number
                fullSyncIntervalSeconds:
                  type: number
            eventKey:
              type: string
            eventParameters:
              type: object
          required:
            - type
        status:
          type: string
          enum:
            - subscribed
            - unsubscribed
            - error
        error:
          $ref: >-
            #/components/schemas/ExternalEventSubscriptionApiResponseDto__schema0
        state:
          type: string
          enum:
            - BUILDING
            - CLIENT_ACTION_REQUIRED
            - CONFIGURATION_ERROR
            - SETUP_FAILED
            - READY
            - DISCONNECTING
        buildingAgentSessionId:
          type: string
        isRealTime:
          type: boolean
        requiresPull:
          type: boolean
        requiresFullSync:
          type: boolean
        createdAt:
          type: string
        archivedAt:
          type: string
        isDeactivated:
          type: boolean
        stateData:
          type: object
        nextPullEventsTimestamp:
          type: number
        pullUpdatesIntervalSeconds:
          type: number
        fullSyncIntervalSeconds:
          type: number
        nextRefreshTimestamp:
          type: number
        incomingWebhookUri:
          type: string
        subscribedWebhookUri:
          type: string
        lastReceivedAt:
          type: string
        lastEventAt:
          type: string
        webhookUri:
          type: string
        logoUri:
          description: >-
            Resolved app logo for this element (integration -> connector ->
            external app -> favicon).
          type: string
      required:
        - userId
        - id
    ExternalEventSubscriptionApiResponseDto__schema0:
      type: object
      properties:
        type:
          type: string
          enum:
            - bad_request
            - connection
            - configuration
            - dependency_error
            - flow_run
            - flow_instance_setup
            - concurrency
            - internal
            - action_run
            - action_instance_setup
            - unit_run
            - custom_code
            - insufficient_credit
            - openrouter_not_configured
        key:
          type: string
        message:
          type: string
        data:
          type: object
        stack:
          type: object
        causedByError:
          $ref: >-
            #/components/schemas/ExternalEventSubscriptionApiResponseDto__schema0
        logs:
          type: array
          items:
            type: object
      required:
        - message
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````