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

# Subscribe to a resource updates

> You can only subscribe to the same resource and the same target once. A status 409 will be returned if you attempt to send duplicate subscription.



## OpenAPI

````yaml post /api/2.0/app/subscriptions/
openapi: 3.1.0
info:
  contact:
    name: Elation Health
    url: https://www.elationhealth.com/
  description: Elation Health API v2.0
  title: Event Subscription API
  version: 2.0.0
servers:
  - description: Sandbox Server
    url: https://sandbox.elationemr.com
  - description: Production Server
    url: https://api.app.elationemr.com
security: []
paths:
  /api/2.0/app/subscriptions/:
    post:
      tags:
        - Event Subscriptions
      summary: Subscribe to a resource updates
      description: >-
        You can only subscribe to the same resource and the same target once. A
        status 409 will be returned if you attempt to send duplicate
        subscription.
      operationId: app_subscriptions_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Subscription'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Subscription'
          description: ''
      security:
        - oauth2: []
components:
  schemas:
    Subscription:
      properties:
        created_date:
          format: date-time
          readOnly: true
          type: string
        deleted_date:
          format: date-time
          readOnly: true
          type:
            - string
            - 'null'
        id:
          readOnly: true
          type: integer
        properties:
          description: Properties specific to this subscription.
          oneOf:
            - {}
            - type: 'null'
        resource:
          description: The resource name.
          maxLength: 50
          type: string
        signing_pub_key:
          readOnly: true
          type: string
        target:
          description: Target URL where we would send the POST request on new events.
          format: uri
          type: string
      required:
        - resource
        - target
      type: object
  securitySchemes:
    oauth2:
      flows:
        clientCredentials:
          scopes:
            act_as_user: >-
              Impersonate a provider via X-On-Behalf-Of (combinable with apiv2
              or system scopes)
            apiv2: Full access to the API
            system/{resource_name}.read: Read access to a specific resource
            system/{resource_name}.write: Write access to a specific resource
          tokenUrl: /api/2.0/oauth2/token/
      type: oauth2

````