> ## Documentation Index
> Fetch the complete documentation index at: https://ekacare-fix-ts-sdk-github-npm-links.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Consent Form Events

> When a consent form or medical certificate is created or updated, a webhook is sent to the registered endpoint containing the Doctor Id, Patient Id, Consent form url, **type(represents whether it is a medical certificate or consent form)** etc.
The receiving system can use these details as per their need.



## OpenAPI

````yaml post /registered_url_for_consent_form
openapi: 3.1.0
info:
  title: Transaction Status API
  version: 1.0.0
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: https://{partner_host}
    variables:
      partner_host:
        default: api.example.com
        description: Partner API host
security: []
paths:
  /registered_url_for_consent_form:
    post:
      tags:
        - Doctor Webhooks
      summary: Consent Form Events
      description: >-
        When a consent form or medical certificate is created or updated, a
        webhook is sent to the registered endpoint containing the Doctor Id,
        Patient Id, Consent form url, **type(represents whether it is a medical
        certificate or consent form)** etc.

        The receiving system can use these details as per their need.
      operationId: McertEventsWebhook
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              type: object
              required:
                - event
                - event_time
                - timestamp
                - client_id
                - business_id
                - data
              properties:
                event:
                  type: string
                  enum:
                    - mcert.created
                    - mcert.updated
                  example: mcert.created
                  description: Type of event
                event_time:
                  type: integer
                  example: 1730189586
                  description: Event occurred timestamp
                timestamp:
                  type: integer
                  example: 1730189586
                  description: Timestamp of the event
                client_id:
                  type: string
                  example: 67978400352a61001d64e9fb
                  description: Client ID for the schedule
                business_id:
                  type: string
                  example: '174159057718553'
                  description: Business ID for the schedule
                data:
                  type: object
                  required:
                    - docid
                    - id
                    - owner
                    - patientid
                    - sendurlpdf
                    - url
                    - type
                  properties:
                    docid:
                      type: string
                      example: '174159057723920'
                      description: Identifier for the respective doctor in Eka
                    id:
                      type: string
                      example: eaaf7c24-ebcd-4340-975a-851d6e31478f
                      description: Unique identifier for the consent form
                    owner:
                      type: string
                      example: '174159057723925'
                      description: Business Id
                    patientid:
                      type: string
                      example: '175465638609726'
                      description: Unique identifier for the patient.
                    sendurlpdf:
                      type: string
                      example: >-
                        https://mcertificate.dev.eka.care/b-161467756044203/eaaf7c24-ebcd-4340-975a-851d6e31478f.pdf
                      description: Consent form url which is sent on whatsapp
                    url:
                      type: string
                      example: >-
                        https://mcertificate.dev.eka.care/b-161467756044203/eaaf7c24-ebcd-4340-975a-851d6e31478f.pdf
                      description: Consent form url
                    type:
                      type: string
                      example: mcert
                      description: >-
                        Type of document. 

                        Possible values: **mcert** (for medical certificate),
                        **consent** (for consent form).
      deprecated: false

````