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

# Sign Consent



## OpenAPI

````yaml post /v1/consents
openapi: 3.1.0
info:
  title: ClinikAPI
  version: 1.0.0
  description: >
    ClinikAPI is a managed healthcare infrastructure platform providing a
    developer-friendly REST API

    for storing, querying, and managing clinical data using the FHIR R4
    standard.


    ## Authentication

    All endpoints (except `/v1/metadata` and `/health`) require an API key via
    the `x-api-key` header.

    - Production keys: `clk_live_*`

    - Test/sandbox keys: `clk_test_*`


    ## Response Format

    All responses are wrapped in `{ data: T, meta: { requestId, timestamp,
    status, rateLimitTotal, rateLimitRemaining, rateLimitReset } }`.


    ## Rate Limits

    Rate limits are plan-based and returned in response headers:

    - `X-RateLimit-Limit` — total requests allowed per window

    - `X-RateLimit-Remaining` — requests remaining

    - `X-RateLimit-Reset` — seconds until window resets


    ## Overages

    Requests beyond your plan limit are charged at $0.003/request.
  contact:
    name: ClinikAPI Support
    email: support@clinikapi.com
    url: https://clinikapi.com
  license:
    name: Proprietary
servers:
  - url: https://api.clinikapi.com
    description: Production
  - url: http://localhost:3000
    description: Local development
security:
  - ApiKeyAuth: []
tags:
  - name: System
    description: Health check and metadata
  - name: Patients
    description: Patient demographics and records
  - name: Practitioners
    description: Healthcare providers and clinicians
  - name: PractitionerRoles
    description: Practitioner roles, specialties, and availability
  - name: Encounters
    description: Clinical visits and interactions
  - name: Observations
    description: Vitals, lab values, and clinical measurements
  - name: Medications
    description: Drug catalog entries
  - name: Appointments
    description: Scheduling and booking
  - name: Prescriptions
    description: Medication orders (MedicationRequest)
  - name: Intakes
    description: Questionnaire responses and intake forms
  - name: Consents
    description: Privacy and treatment consent directives
  - name: Labs
    description: Diagnostic reports and lab results
  - name: Notes
    description: Clinical notes and documents (DocumentReference)
  - name: Assessments
    description: Clinical impressions and evaluations
  - name: Documents
    description: Structured clinical documents (Composition)
  - name: Devices
    description: Medical devices, equipment, and implantable hardware
  - name: DeviceRequests
    description: Orders and proposals for device use
  - name: DeviceUseStatements
    description: Records of device use on patients
  - name: Goals
    description: Patient care goals and targets
  - name: Invoices
    description: Healthcare billing invoices
  - name: MedicationDispenses
    description: Pharmacy medication dispensing records
  - name: MedicationKnowledge
    description: Drug reference data and formulary information
  - name: MedicationStatements
    description: Patient-reported medication usage records
  - name: PaymentNotices
    description: Payment status notifications between payers and providers
  - name: PaymentReconciliations
    description: Detailed payment settlement information with line-item breakdowns
  - name: Specimens
    description: Biological samples collected from patients for laboratory testing
  - name: ImagingStudies
    description: Radiology and diagnostic imaging exams with series-level detail
  - name: EnrollmentRequests
    description: Insurance enrollment requests for patients
  - name: EnrollmentResponses
    description: Insurer responses to enrollment requests
  - name: ImmunizationEvaluations
    description: Evaluation of immunization events against protocol requirements
  - name: Media
    description: Clinical images, videos, and audio recordings
  - name: AuditEvents
    description: Security-relevant event records for compliance and audit trails
  - name: Measures
    description: Quality measures and clinical performance metric definitions
  - name: MeasureReports
    description: Results of evaluating quality measures against populations or patients
  - name: ImmunizationRecommendations
    description: Patient-specific vaccine recommendations based on immunization history
  - name: Bulk
    description: Bulk import and export operations
  - name: FHIR Passthrough
    description: Raw FHIR R4 access with tenant isolation
paths:
  /v1/consents:
    post:
      tags:
        - Consents
      summary: Sign consent
      operationId: signConsent
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConsentCreate'
      responses:
        '201':
          description: Consent signed
components:
  schemas:
    ConsentCreate:
      type: object
      required:
        - patientId
        - scope
        - category
      properties:
        patientId:
          type: string
        status:
          type: string
          enum:
            - draft
            - proposed
            - active
            - rejected
            - inactive
        scope:
          type: string
          description: patient-privacy, research, treatment, adr
        category:
          oneOf:
            - type: string
            - type: array
              items:
                type: string
        dateTime:
          type: string
          format: date-time
        performerId:
          type: string
          description: Who is agreeing (practitioner, patient)
        organizationId:
          type: string
          description: Custodian organization
        policyUri:
          type: string
          description: Policy URI the consent references
        policies:
          type: array
          description: Multiple policies with authority
          items:
            type: object
            properties:
              authority:
                type: string
              uri:
                type: string
        policyRule:
          type: string
          description: Regulation that this consents to
        sourceAttachment:
          type: object
          description: Source document (attachment)
          properties:
            contentType:
              type: string
            data:
              type: string
            url:
              type: string
            title:
              type: string
        sourceReferenceId:
          type: string
          description: Source document reference ID
        verification:
          type: array
          description: Verification details (supports multiple)
          items:
            type: object
            required:
              - verified
            properties:
              verified:
                type: boolean
              verifiedWith:
                type: string
              verificationDate:
                type: string
        provision:
          type: object
          description: Provision rules (permit/deny) with nested exceptions
          properties:
            type:
              type: string
              enum:
                - deny
                - permit
            period:
              type: object
              properties:
                start:
                  type: string
                end:
                  type: string
            actor:
              type: array
              items:
                type: object
                properties:
                  role:
                    type: string
                  reference:
                    type: string
            action:
              type: array
              items:
                type: object
                properties:
                  system:
                    type: string
                  code:
                    type: string
                  display:
                    type: string
            securityLabel:
              type: array
              items:
                type: object
                properties:
                  system:
                    type: string
                  code:
                    type: string
                  display:
                    type: string
            purpose:
              type: array
              items:
                type: object
                properties:
                  system:
                    type: string
                  code:
                    type: string
                  display:
                    type: string
            class:
              type: array
              items:
                type: object
                properties:
                  system:
                    type: string
                  code:
                    type: string
                  display:
                    type: string
            dataPeriod:
              type: object
              properties:
                start:
                  type: string
                end:
                  type: string
            data:
              type: array
              description: Specific data references controlled by this rule
              items:
                type: object
                required:
                  - meaning
                  - reference
                properties:
                  meaning:
                    type: string
                    enum:
                      - instance
                      - related
                      - dependents
                      - authoredby
                  reference:
                    type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Your ClinikAPI secret key (clk_live_* or clk_test_*)

````