openapi: 3.0.1
servers:
  - url: https://cowin.gov.cin/cert/external
info:
  contact:
    name: Co-WIN by Ministry of Health and Family Welfare
    url: https://www.cowin.gov.in
  description: API to get Co-WIN vaccination certificate.
  termsOfService: https://www.cowin.gov.in/terms-condition
  title: Co-WIN Certificate API
  version: 1.0.0
  x-apisguru-categories:
    - open_data
  x-origin:
    - format: openapi
      url: https://apisetu.gov.in/api_specification_v8/cowincert.yaml
      version: "3.0"
  x-providerName: cowin.gov.cin
  x-serviceName: cowincert
tags:
  - description: Certificate api
    name: certificate
paths:
  /pdf/certificate:
    post:
      operationId: getCertificatePdf
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CertificateRequest"
        required: true
      responses:
        "400":
          content: {}
          description: Bad request
      security:
        - cert_auth:
            - read:cert
      summary: Download the certificate in pdf format
      tags:
        - certificate
      x-codegen-request-body-name: body
components:
  schemas:
    CertificateRequest:
      properties:
        beneficiaryId:
          type: string
        mobile:
          type: string
      type: object
  securitySchemes:
    api_key:
      in: header
      name: Authorization
      type: apiKey
    cert_auth:
      flows:
        authorizationCode:
          authorizationUrl: https://divoc.cowin.gov.in/realms/divoc/protocol/openid-connect/auth
          scopes:
            read:cert: read or download certificates
          tokenUrl: https://divoc.xiv.in/auth/realms/divoc/protocol/openid-connect/token
      type: oauth2
