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

# Create a Witness

> Creates a new witness. Only available for members or API keys of the organization.



## OpenAPI

````yaml post /witness
openapi: 3.0.1
info:
  title: Plumaa ID API
  version: 1.0.0
  description: Generated by SOFA
servers:
  - url: https://api.plumaa.id/rest/v1
    description: Production
  - url: https://api.staging.plumaa.id/rest/v1
    description: Staging
security:
  - apiKey: []
tags:
  - name: ApiKey
    description: ApiKey related operations
  - name: Certificate
    description: Certificate related operations
  - name: Issuer
    description: Issuer related operations
  - name: Organization
    description: Organization related operations
  - name: OrganizationLink
    description: OrganizationLink related operations
  - name: OrganizationMember
    description: OrganizationMember related operations
  - name: SignatureRequestInvite
    description: SignatureRequestInvite related operations
  - name: SignatureRequest
    description: SignatureRequest related operations
  - name: Subject
    description: Subject related operations
  - name: Witness
    description: Witness related operations
  - name: Other
    description: Other operations
  - name: Timeseries
    description: Timeseries related operations
  - name: PriceOracle
    description: Aggregated indexed price data
  - name: Wallet
    description: Wallet related operations
  - name: Endorsable
    description: Endorsable related operations
  - name: EndorseEvent
    description: Endorsable transfer event related operations
paths:
  /witness:
    post:
      tags:
        - Witness
      description: >-
        Creates a new witness. Only available for members or API keys of the
        organization.
      parameters:
        - name: input
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/CreateWitnessInput'
        - name: createWitness_endorsable_endorsable_owner_owner_endorsables_where
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/EndorsableFilter'
        - name: createWitness_endorsable_endorsable_owner_owner_endorsables_orderBy
          in: query
          required: false
          schema:
            type: string
        - name: >-
            createWitness_endorsable_endorsable_owner_owner_endorsables_orderDirection
          in: query
          required: false
          schema:
            type: string
        - name: createWitness_endorsable_endorsable_owner_owner_endorsables_before
          in: query
          required: false
          schema:
            type: string
        - name: createWitness_endorsable_endorsable_owner_owner_endorsables_after
          in: query
          required: false
          schema:
            type: string
        - name: createWitness_endorsable_endorsable_owner_owner_endorsables_limit
          in: query
          required: false
          schema:
            type: integer
            format: int32
        - name: >-
            createWitness_endorsable_endorsable_owner_owner_endorseFromEvents_where
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/EndorseEventFilter'
        - name: >-
            createWitness_endorsable_endorsable_owner_owner_endorseFromEvents_orderBy
          in: query
          required: false
          schema:
            type: string
        - name: >-
            createWitness_endorsable_endorsable_owner_owner_endorseFromEvents_orderDirection
          in: query
          required: false
          schema:
            type: string
        - name: >-
            createWitness_endorsable_endorsable_owner_owner_endorseFromEvents_before
          in: query
          required: false
          schema:
            type: string
        - name: >-
            createWitness_endorsable_endorsable_owner_owner_endorseFromEvents_after
          in: query
          required: false
          schema:
            type: string
        - name: >-
            createWitness_endorsable_endorsable_owner_owner_endorseFromEvents_limit
          in: query
          required: false
          schema:
            type: integer
            format: int32
        - name: >-
            createWitness_endorsable_endorsable_owner_owner_endorseToEvents_where
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/EndorseEventFilter'
        - name: >-
            createWitness_endorsable_endorsable_owner_owner_endorseToEvents_orderBy
          in: query
          required: false
          schema:
            type: string
        - name: >-
            createWitness_endorsable_endorsable_owner_owner_endorseToEvents_orderDirection
          in: query
          required: false
          schema:
            type: string
        - name: >-
            createWitness_endorsable_endorsable_owner_owner_endorseToEvents_before
          in: query
          required: false
          schema:
            type: string
        - name: >-
            createWitness_endorsable_endorsable_owner_owner_endorseToEvents_after
          in: query
          required: false
          schema:
            type: string
        - name: >-
            createWitness_endorsable_endorsable_owner_owner_endorseToEvents_limit
          in: query
          required: false
          schema:
            type: integer
            format: int32
        - name: createWitness_endorsable_endorsable_endorseEvents_where
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/EndorseEventFilter'
        - name: createWitness_endorsable_endorsable_endorseEvents_orderBy
          in: query
          required: false
          schema:
            type: string
        - name: createWitness_endorsable_endorsable_endorseEvents_orderDirection
          in: query
          required: false
          schema:
            type: string
        - name: createWitness_endorsable_endorsable_endorseEvents_before
          in: query
          required: false
          schema:
            type: string
        - name: createWitness_endorsable_endorsable_endorseEvents_after
          in: query
          required: false
          schema:
            type: string
        - name: createWitness_endorsable_endorsable_endorseEvents_limit
          in: query
          required: false
          schema:
            type: integer
            format: int32
        - name: >-
            createWitness_endorsable_endorsable_endorseEvents_endorseEvents_items_items_from_from_endorsables_where
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/EndorsableFilter'
        - name: >-
            createWitness_endorsable_endorsable_endorseEvents_endorseEvents_items_items_from_from_endorsables_orderBy
          in: query
          required: false
          schema:
            type: string
        - name: >-
            createWitness_endorsable_endorsable_endorseEvents_endorseEvents_items_items_from_from_endorsables_orderDirection
          in: query
          required: false
          schema:
            type: string
        - name: >-
            createWitness_endorsable_endorsable_endorseEvents_endorseEvents_items_items_from_from_endorsables_before
          in: query
          required: false
          schema:
            type: string
        - name: >-
            createWitness_endorsable_endorsable_endorseEvents_endorseEvents_items_items_from_from_endorsables_after
          in: query
          required: false
          schema:
            type: string
        - name: >-
            createWitness_endorsable_endorsable_endorseEvents_endorseEvents_items_items_from_from_endorsables_limit
          in: query
          required: false
          schema:
            type: integer
            format: int32
        - name: >-
            createWitness_endorsable_endorsable_endorseEvents_endorseEvents_items_items_to_to_endorsables_where
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/EndorsableFilter'
        - name: >-
            createWitness_endorsable_endorsable_endorseEvents_endorseEvents_items_items_to_to_endorsables_orderBy
          in: query
          required: false
          schema:
            type: string
        - name: >-
            createWitness_endorsable_endorsable_endorseEvents_endorseEvents_items_items_to_to_endorsables_orderDirection
          in: query
          required: false
          schema:
            type: string
        - name: >-
            createWitness_endorsable_endorsable_endorseEvents_endorseEvents_items_items_to_to_endorsables_before
          in: query
          required: false
          schema:
            type: string
        - name: >-
            createWitness_endorsable_endorsable_endorseEvents_endorseEvents_items_items_to_to_endorsables_after
          in: query
          required: false
          schema:
            type: string
        - name: >-
            createWitness_endorsable_endorsable_endorseEvents_endorseEvents_items_items_to_to_endorsables_limit
          in: query
          required: false
          schema:
            type: integer
            format: int32
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                input:
                  $ref: '#/components/schemas/CreateWitnessInput'
                createWitness_endorsable_endorsable_owner_owner_endorsables_where:
                  $ref: '#/components/schemas/EndorsableFilter'
                createWitness_endorsable_endorsable_owner_owner_endorsables_orderBy:
                  type: string
                createWitness_endorsable_endorsable_owner_owner_endorsables_orderDirection:
                  type: string
                createWitness_endorsable_endorsable_owner_owner_endorsables_before:
                  type: string
                createWitness_endorsable_endorsable_owner_owner_endorsables_after:
                  type: string
                createWitness_endorsable_endorsable_owner_owner_endorsables_limit:
                  type: integer
                  format: int32
                createWitness_endorsable_endorsable_owner_owner_endorseFromEvents_where:
                  $ref: '#/components/schemas/EndorseEventFilter'
                createWitness_endorsable_endorsable_owner_owner_endorseFromEvents_orderBy:
                  type: string
                createWitness_endorsable_endorsable_owner_owner_endorseFromEvents_orderDirection:
                  type: string
                createWitness_endorsable_endorsable_owner_owner_endorseFromEvents_before:
                  type: string
                createWitness_endorsable_endorsable_owner_owner_endorseFromEvents_after:
                  type: string
                createWitness_endorsable_endorsable_owner_owner_endorseFromEvents_limit:
                  type: integer
                  format: int32
                createWitness_endorsable_endorsable_owner_owner_endorseToEvents_where:
                  $ref: '#/components/schemas/EndorseEventFilter'
                createWitness_endorsable_endorsable_owner_owner_endorseToEvents_orderBy:
                  type: string
                createWitness_endorsable_endorsable_owner_owner_endorseToEvents_orderDirection:
                  type: string
                createWitness_endorsable_endorsable_owner_owner_endorseToEvents_before:
                  type: string
                createWitness_endorsable_endorsable_owner_owner_endorseToEvents_after:
                  type: string
                createWitness_endorsable_endorsable_owner_owner_endorseToEvents_limit:
                  type: integer
                  format: int32
                createWitness_endorsable_endorsable_endorseEvents_where:
                  $ref: '#/components/schemas/EndorseEventFilter'
                createWitness_endorsable_endorsable_endorseEvents_orderBy:
                  type: string
                createWitness_endorsable_endorsable_endorseEvents_orderDirection:
                  type: string
                createWitness_endorsable_endorsable_endorseEvents_before:
                  type: string
                createWitness_endorsable_endorsable_endorseEvents_after:
                  type: string
                createWitness_endorsable_endorsable_endorseEvents_limit:
                  type: integer
                  format: int32
                createWitness_endorsable_endorsable_endorseEvents_endorseEvents_items_items_from_from_endorsables_where:
                  $ref: '#/components/schemas/EndorsableFilter'
                createWitness_endorsable_endorsable_endorseEvents_endorseEvents_items_items_from_from_endorsables_orderBy:
                  type: string
                createWitness_endorsable_endorsable_endorseEvents_endorseEvents_items_items_from_from_endorsables_orderDirection:
                  type: string
                createWitness_endorsable_endorsable_endorseEvents_endorseEvents_items_items_from_from_endorsables_before:
                  type: string
                createWitness_endorsable_endorsable_endorseEvents_endorseEvents_items_items_from_from_endorsables_after:
                  type: string
                createWitness_endorsable_endorsable_endorseEvents_endorseEvents_items_items_from_from_endorsables_limit:
                  type: integer
                  format: int32
                createWitness_endorsable_endorsable_endorseEvents_endorseEvents_items_items_to_to_endorsables_where:
                  $ref: '#/components/schemas/EndorsableFilter'
                createWitness_endorsable_endorsable_endorseEvents_endorseEvents_items_items_to_to_endorsables_orderBy:
                  type: string
                createWitness_endorsable_endorsable_endorseEvents_endorseEvents_items_items_to_to_endorsables_orderDirection:
                  type: string
                createWitness_endorsable_endorsable_endorseEvents_endorseEvents_items_items_to_to_endorsables_before:
                  type: string
                createWitness_endorsable_endorsable_endorseEvents_endorseEvents_items_items_to_to_endorsables_after:
                  type: string
                createWitness_endorsable_endorsable_endorseEvents_endorseEvents_items_items_to_to_endorsables_limit:
                  type: integer
                  format: int32
              required:
                - input
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Witness'
components:
  schemas:
    CreateWitnessInput:
      type: object
      required:
        - hash
        - algorithm
        - organization
      properties:
        hash:
          description: Leaf hash of the document.
        algorithm:
          type: string
          enum:
            - SHA256
          description: >-
            The algorithm to be used for both the leaf double-hashing and to
            compute internal nodes.
        organization:
          description: The organization that created the witness.
    EndorsableFilter:
      type: object
      properties:
        AND:
          type: array
          items:
            type: object
        OR:
          type: array
          items:
            type: object
        id:
          description: >-
            The `BigInt` scalar type represents non-fractional signed whole
            numeric values.
        id_not:
          description: >-
            The `BigInt` scalar type represents non-fractional signed whole
            numeric values.
        id_in:
          type: array
          items:
            description: >-
              The `BigInt` scalar type represents non-fractional signed whole
              numeric values.
        id_not_in:
          type: array
          items:
            description: >-
              The `BigInt` scalar type represents non-fractional signed whole
              numeric values.
        id_gt:
          description: >-
            The `BigInt` scalar type represents non-fractional signed whole
            numeric values.
        id_lt:
          description: >-
            The `BigInt` scalar type represents non-fractional signed whole
            numeric values.
        id_gte:
          description: >-
            The `BigInt` scalar type represents non-fractional signed whole
            numeric values.
        id_lte:
          description: >-
            The `BigInt` scalar type represents non-fractional signed whole
            numeric values.
        ownerId:
          type: string
        ownerId_not:
          type: string
        ownerId_in:
          type: array
          items:
            type: string
        ownerId_not_in:
          type: array
          items:
            type: string
        ownerId_gt:
          type: string
        ownerId_lt:
          type: string
        ownerId_gte:
          type: string
        ownerId_lte:
          type: string
        timestamp:
          type: integer
          format: int32
        timestamp_not:
          type: integer
          format: int32
        timestamp_in:
          type: array
          items:
            type: integer
            format: int32
        timestamp_not_in:
          type: array
          items:
            type: integer
            format: int32
        timestamp_gt:
          type: integer
          format: int32
        timestamp_lt:
          type: integer
          format: int32
        timestamp_gte:
          type: integer
          format: int32
        timestamp_lte:
          type: integer
          format: int32
        network:
          type: integer
          format: int32
        network_not:
          type: integer
          format: int32
        network_in:
          type: array
          items:
            type: integer
            format: int32
        network_not_in:
          type: array
          items:
            type: integer
            format: int32
        network_gt:
          type: integer
          format: int32
        network_lt:
          type: integer
          format: int32
        network_gte:
          type: integer
          format: int32
        network_lte:
          type: integer
          format: int32
    EndorseEventFilter:
      type: object
      properties:
        AND:
          type: array
          items:
            type: object
        OR:
          type: array
          items:
            type: object
        id:
          type: string
        id_not:
          type: string
        id_in:
          type: array
          items:
            type: string
        id_not_in:
          type: array
          items:
            type: string
        id_contains:
          type: string
        id_not_contains:
          type: string
        id_starts_with:
          type: string
        id_ends_with:
          type: string
        id_not_starts_with:
          type: string
        id_not_ends_with:
          type: string
        timestamp:
          type: integer
          format: int32
        timestamp_not:
          type: integer
          format: int32
        timestamp_in:
          type: array
          items:
            type: integer
            format: int32
        timestamp_not_in:
          type: array
          items:
            type: integer
            format: int32
        timestamp_gt:
          type: integer
          format: int32
        timestamp_lt:
          type: integer
          format: int32
        timestamp_gte:
          type: integer
          format: int32
        timestamp_lte:
          type: integer
          format: int32
        fromId:
          type: string
        fromId_not:
          type: string
        fromId_in:
          type: array
          items:
            type: string
        fromId_not_in:
          type: array
          items:
            type: string
        fromId_gt:
          type: string
        fromId_lt:
          type: string
        fromId_gte:
          type: string
        fromId_lte:
          type: string
        toId:
          type: string
        toId_not:
          type: string
        toId_in:
          type: array
          items:
            type: string
        toId_not_in:
          type: array
          items:
            type: string
        toId_gt:
          type: string
        toId_lt:
          type: string
        toId_gte:
          type: string
        toId_lte:
          type: string
        digest:
          description: >-
            The `BigInt` scalar type represents non-fractional signed whole
            numeric values.
        digest_not:
          description: >-
            The `BigInt` scalar type represents non-fractional signed whole
            numeric values.
        digest_in:
          type: array
          items:
            description: >-
              The `BigInt` scalar type represents non-fractional signed whole
              numeric values.
        digest_not_in:
          type: array
          items:
            description: >-
              The `BigInt` scalar type represents non-fractional signed whole
              numeric values.
        digest_gt:
          description: >-
            The `BigInt` scalar type represents non-fractional signed whole
            numeric values.
        digest_lt:
          description: >-
            The `BigInt` scalar type represents non-fractional signed whole
            numeric values.
        digest_gte:
          description: >-
            The `BigInt` scalar type represents non-fractional signed whole
            numeric values.
        digest_lte:
          description: >-
            The `BigInt` scalar type represents non-fractional signed whole
            numeric values.
        network:
          type: integer
          format: int32
        network_not:
          type: integer
          format: int32
        network_in:
          type: array
          items:
            type: integer
            format: int32
        network_not_in:
          type: array
          items:
            type: integer
            format: int32
        network_gt:
          type: integer
          format: int32
        network_lt:
          type: integer
          format: int32
        network_gte:
          type: integer
          format: int32
        network_lte:
          type: integer
          format: int32
    Witness:
      type: object
      required:
        - id
        - hash
        - algorithm
        - organization
        - createdAt
        - updatedAt
      properties:
        id:
          description: >-
            A field whose value conforms with the standard mongodb object ID as
            described here:
            https://docs.mongodb.com/manual/reference/method/ObjectId/#ObjectId.
            Example: 5e5677d71bdc2ae76344968c
        hash:
          description: Hash of the document to witness.
        algorithm:
          type: string
          enum:
            - SHA256
          description: The algorithm used for hashing the document.
        initialOwner:
          $ref: '#/components/schemas/Subject'
          description: >-
            Subject designed as the first in the endorsement chain. Only a
            member of the operating organization can set this field.

            Once set, our on-chain relayer will submit a proof of endorsement to
            the Witness contract so that the corresponding

            token can be minted by the user later on the application.
        claiming:
          $ref: '#/components/schemas/Claiming'
          description: >-
            Information required to claim a document in the Endorser contract.
            It is only present if the witness is processed and restricted

            to the initial owner.
        claimed:
          type: boolean
          description: If the witness has been claimed by the initial owner.
        signatureRequest:
          $ref: '#/components/schemas/SignatureRequest'
          description: |-
            Signature Request the witness is associated with.
            May not be present if the witness was via the API.
        organization:
          $ref: '#/components/schemas/Organization'
          description: Organization that created the witness.
        nom151:
          $ref: '#/components/schemas/NOM151Strategy'
          description: Individual NOM151 conservation strategy.
        merkleized:
          $ref: '#/components/schemas/MerkleizedNOM151Strategy'
          description: Combined merkleized conservation strategy.
        witnessCo:
          $ref: '#/components/schemas/WitnessCoStrategy'
          description: '[Witness](https://witness.co/) conservation strategy.'
        timestampedAt:
          description: >-
            Earliest date when the hash was witnessed by any strategy.
            Unspecified if the witness is not processed.
        createdAt:
          description: >-
            A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant
            with the `date-time` format outlined in section 5.6 of the RFC 3339
            profile of the ISO 8601 standard for representation of dates and
            times using the Gregorian calendar.
        updatedAt:
          description: >-
            A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant
            with the `date-time` format outlined in section 5.6 of the RFC 3339
            profile of the ISO 8601 standard for representation of dates and
            times using the Gregorian calendar.
        endorsable:
          $ref: '#/components/schemas/Endorsable'
      description: >-
        A witness is an entity representing a proof that a document existed at
        the time.

        It is used to comply with the law requirement of data conservation.
    Subject:
      type: object
      required:
        - id
        - commonName
        - serialNumber
        - RFC
        - EVMAddress
        - createdAt
        - updatedAt
      properties:
        id:
          description: >-
            A field whose value conforms with the standard mongodb object ID as
            described here:
            https://docs.mongodb.com/manual/reference/method/ObjectId/#ObjectId.
            Example: 5e5677d71bdc2ae76344968c
        commonName:
          type: string
          description: Name of the subject.
        serialNumber:
          type: string
          description: CURP of the subject. It is a unique identifier for people in Mexico.
        country:
          description: Country of the subject.
        RFC:
          type: string
          description: >-
            RFC of the subject. It is a unique identifier for persons and
            organizations in Mexico.
        emailAddress:
          description: Email address of the subject.
        certificate:
          $ref: '#/components/schemas/Certificate'
          description: Certificate of the subject.
        termsInvite:
          $ref: '#/components/schemas/SignatureRequestInvite'
          description: Invite for the subject to sign Plumaa own terms and conditions.
        pushNotificationToken:
          type: string
          description: >-
            The push notification token associated with the certificate. Used
            for sending notifications to the user.
        EVMAddress:
          description: >-
            EVM address of the subject.


            Each account is a smart account that includes a single signer
            contract deterministically created from a factory deployed through
            [xdeployer](https://github.com/pcaversaccio/xdeployer)

            so that every signer contract has the same address in all EVM
            networks. This signer contract is an implementation of a custom
            ERC-1271 interface that allows

            the RSA key to sign on-chain. Signers can be deployed trustlessly by
            anyone since they're controlled by the account owner.


            The smart account is created from the
            [Safe{Wallet}](https://github.com/safe-global/safe-deployments/blob/main/src/assets/v1.4.1)
            factory and includes a setup call to the RSA signer factory,

            deploying the signer contract who'll own the account. The account
            factory is already deployed on all networks with the same address so
            that the account can be created deterministically

            in all EVM networks too


            This setup allows the following properties:


            * The signer contract factory can create the same signer contract in
            all EVM chains for the same RSA key

            * The account can be created deterministically in all EVM chains
            because it depends on the signer contract address and the RSA public
            key


            In this way, the EVM address is completely abstracted from the EVM
            network, so we just need to keep a single address.
        createdAt:
          description: >-
            A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant
            with the `date-time` format outlined in section 5.6 of the RFC 3339
            profile of the ISO 8601 standard for representation of dates and
            times using the Gregorian calendar.
        updatedAt:
          description: >-
            A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant
            with the `date-time` format outlined in section 5.6 of the RFC 3339
            profile of the ISO 8601 standard for representation of dates and
            times using the Gregorian calendar.
        wallet:
          $ref: '#/components/schemas/Wallet'
      description: >-
        A subject is a person or an organization ("persona física o moral" in
        Spanish)

        identified by a certificate.
    Claiming:
      type: object
      required:
        - id
        - authorizer
        - signature
        - claimer
        - network
        - createdAt
        - updatedAt
      properties:
        id:
          description: >-
            A field whose value conforms with the standard mongodb object ID as
            described here:
            https://docs.mongodb.com/manual/reference/method/ObjectId/#ObjectId.
            Example: 5e5677d71bdc2ae76344968c
        authorizer:
          description: |-
            The address that signed the authorization to claim the document.
            Needs to have privileges within Plumaa ID's AccessManager contract.
        signature:
          description: >-
            Authorization signature. It's an EIP-712 signature of the hash of
            the claim and the initial claiming address.

            * Domain Separator: `EIP712Domain(string name,string version,uint256
            chainId,address verifyingContract)`

            * EIP-712 Type: `MintRequest(bytes32 leaf,address to)`
        claimer:
          description: Address of the initial claiming subject.
        network:
          description: The chain ID where the claim is authorized.
        createdAt:
          description: >-
            A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant
            with the `date-time` format outlined in section 5.6 of the RFC 3339
            profile of the ISO 8601 standard for representation of dates and
            times using the Gregorian calendar.
        updatedAt:
          description: >-
            A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant
            with the `date-time` format outlined in section 5.6 of the RFC 3339
            profile of the ISO 8601 standard for representation of dates and
            times using the Gregorian calendar.
      description: Information required to claim a document in the Endorser contract.
    SignatureRequest:
      type: object
      required:
        - id
        - draft
        - finalized
        - name
        - content
        - anonymousKey
        - organization
        - witness
        - invites
        - signed
        - pending
        - rejected
        - createdAt
        - updatedAt
      properties:
        id:
          description: >-
            A field whose value conforms with the standard mongodb object ID as
            described here:
            https://docs.mongodb.com/manual/reference/method/ObjectId/#ObjectId.
            Example: 5e5677d71bdc2ae76344968c
        draft:
          type: boolean
          description: >-
            Whether the document is a draft or not.

            A draft signature request won't allow invites to sign and will skip
            processing notifications.
        finalized:
          type: boolean
          description: >-
            Whether the document is finalized or not.

            A finalized request won't allow new invites and won't process any
            new notifications.
        name:
          type: string
          description: Custom name for the signature request.
        content:
          oneOf:
            - $ref: '#/components/schemas/RawContent'
            - $ref: '#/components/schemas/IOUContent'
            - $ref: '#/components/schemas/JSONContent'
            - $ref: '#/components/schemas/PDFContent'
          description: The content data to be signed.
        anonymousKey:
          type: string
          description: >-
            Key for sharing the sharing the signature request. Can be used to
            access the signature request without authentication.
        organization:
          $ref: '#/components/schemas/Organization'
          description: The organization requesting the signature.
        witness:
          $ref: '#/components/schemas/Witness'
          description: Witness that attest the content using a merkle proof
        invites:
          type: array
          items:
            $ref: '#/components/schemas/SignatureRequestInvite'
          description: Invites to sign the content.
        signed:
          description: Amount of invites that have signed the content.
        pending:
          description: Amount of invites that have not signed the content.
        rejected:
          description: Amount of invites that have rejected the content.
        rejectedAt:
          description: >-
            Date when the signature request was rejected. Only present if
            rejected.
        createdAt:
          description: >-
            A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant
            with the `date-time` format outlined in section 5.6 of the RFC 3339
            profile of the ISO 8601 standard for representation of dates and
            times using the Gregorian calendar.
        updatedAt:
          description: >-
            A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant
            with the `date-time` format outlined in section 5.6 of the RFC 3339
            profile of the ISO 8601 standard for representation of dates and
            times using the Gregorian calendar.
      description: >-
        A signature request is an entity that represents a piece of data that
        needs to be signed by a user.
    Organization:
      type: object
      required:
        - id
        - name
        - logo
        - emailAddress
        - createdAt
        - updatedAt
      properties:
        id:
          description: >-
            A field whose value conforms with the standard mongodb object ID as
            described here:
            https://docs.mongodb.com/manual/reference/method/ObjectId/#ObjectId.
            Example: 5e5677d71bdc2ae76344968c
        name:
          type: string
          description: >-
            The name of the Organization. This is the name that will be
            displayed to

            users when interacting with signature requests from this
            organization.
        logo:
          description: >-
            The logo of the Organization. This is the logo that will be
            displayed to

            users when interacting with signature requests from this
            organization.
        emailAddress:
          description: >-
            Email address of the organization. Updates and notifications will be
            sent to this address, as well as the billing information.
        quota:
          $ref: '#/components/schemas/Quota'
          description: Quotas of the Organization.
        policies:
          $ref: '#/components/schemas/Policies'
          description: Policies of the Organization.
        createdAt:
          description: >-
            A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant
            with the `date-time` format outlined in section 5.6 of the RFC 3339
            profile of the ISO 8601 standard for representation of dates and
            times using the Gregorian calendar.
        updatedAt:
          description: >-
            A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant
            with the `date-time` format outlined in section 5.6 of the RFC 3339
            profile of the ISO 8601 standard for representation of dates and
            times using the Gregorian calendar.
      description: >-
        An Organization represents an tenant in the Plumaa infrastructure. All
        paid

        resources are associated with an Organization. Organizations can have
        multiple

        certificate members.
    NOM151Strategy:
      type: object
      required:
        - createdAt
        - updatedAt
      properties:
        provider:
          type: string
          enum:
            - CINCEL
          description: The provider that issued the timestamp.
        createdAt:
          description: >-
            A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant
            with the `date-time` format outlined in section 5.6 of the RFC 3339
            profile of the ISO 8601 standard for representation of dates and
            times using the Gregorian calendar.
        updatedAt:
          description: >-
            A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant
            with the `date-time` format outlined in section 5.6 of the RFC 3339
            profile of the ISO 8601 standard for representation of dates and
            times using the Gregorian calendar.
      description: Individual NOM151 conservation strategy.
    MerkleizedNOM151Strategy:
      type: object
      required:
        - createdAt
        - updatedAt
      properties:
        txHash:
          description: >-
            The transaction hash. Any transaction that includes an operation
            with this hash is valid.

            It could be either a transaction to another service (eg. The Witness
            contract), but it may be upgraded

            in the future.
        network:
          description: The transaction chain ID.
        merkleProof:
          type: array
          items:
            description: >-
              A field whose value is a hexadecimal:
              https://en.wikipedia.org/wiki/Hexadecimal.
          description: The proof that the root existed at the time of the transaction.
        merkleRoot:
          description: >-
            Merkle root included in the transaction. It should be the same as
            the one

            computed from the merkle proof and the leaf hash.
        nom151Provider:
          type: string
          enum:
            - CINCEL
          description: The NOM 151 provider that issued the timestamp for the merkle root.
        algorithm:
          type: string
          enum:
            - SHA256
          description: >-
            Algorithm for hashing the internal nodes. The document hash is also
            re hashed using this algorithm to avoid

            second pre-image attacks. See
            https://en.wikipedia.org/wiki/Merkle_tree#Second_preimage_attack
        createdAt:
          description: >-
            A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant
            with the `date-time` format outlined in section 5.6 of the RFC 3339
            profile of the ISO 8601 standard for representation of dates and
            times using the Gregorian calendar.
        updatedAt:
          description: >-
            A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant
            with the `date-time` format outlined in section 5.6 of the RFC 3339
            profile of the ISO 8601 standard for representation of dates and
            times using the Gregorian calendar.
      description: Combined merkleized conservation strategy.
    WitnessCoStrategy:
      type: object
      required:
        - timestamp
        - leafIndex
        - leftHashes
        - rightHashes
        - targetRootHash
        - createdAt
        - updatedAt
      properties:
        timestamp:
          description: The timestamp issued by the provider.
        leafIndex:
          description: The index of the leaf to be verified in the tree.
        leftHashes:
          type: array
          items:
            description: >-
              A field whose value is a hexadecimal:
              https://en.wikipedia.org/wiki/Hexadecimal.
          description: The left range of the proof.
        rightHashes:
          type: array
          items:
            description: >-
              A field whose value is a hexadecimal:
              https://en.wikipedia.org/wiki/Hexadecimal.
          description: The right range of the proof.
        targetRootHash:
          description: The root of the tree the proof is being verified against.
        createdAt:
          description: >-
            A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant
            with the `date-time` format outlined in section 5.6 of the RFC 3339
            profile of the ISO 8601 standard for representation of dates and
            times using the Gregorian calendar.
        updatedAt:
          description: >-
            A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant
            with the `date-time` format outlined in section 5.6 of the RFC 3339
            profile of the ISO 8601 standard for representation of dates and
            times using the Gregorian calendar.
    Endorsable:
      type: object
      required:
        - id
        - ownerId
        - timestamp
        - network
        - owner
      properties:
        id:
          description: >-
            The `BigInt` scalar type represents non-fractional signed whole
            numeric values.
        ownerId:
          type: string
        timestamp:
          type: integer
          format: int32
        network:
          type: integer
          format: int32
        owner:
          $ref: '#/components/schemas/Wallet'
        endorseEvents:
          $ref: '#/components/schemas/EndorseEventPage'
        witness:
          $ref: '#/components/schemas/Witness'
    Certificate:
      type: object
      required:
        - id
        - serialNumber
        - issuer
        - notBefore
        - notAfter
        - subject
        - publicKey
        - version
        - hash
        - certificatePem
        - revoked
        - createdAt
        - updatedAt
      properties:
        id:
          description: >-
            A field whose value conforms with the standard mongodb object ID as
            described here:
            https://docs.mongodb.com/manual/reference/method/ObjectId/#ObjectId.
            Example: 5e5677d71bdc2ae76344968c
        serialNumber:
          description: >-
            The certificate's serial number, as a hexadecimal string. This is a
            unique

            identifier for the certificate, and is assigned by the issuer.
        issuer:
          $ref: '#/components/schemas/Issuer'
          description: >-
            The certificate's issuer. This is the entity that issued the
            certificate, and

            is a Certificate Authority certified by Banxico.
        notBefore:
          description: The earliest date at which the certificate is valid.
        notAfter:
          description: The latest date at which the certificate is valid.
        subject:
          $ref: '#/components/schemas/Subject'
          description: >-
            The certificate's subject. This is the entity that the certificate
            is

            attesting to, and is typically a person or organization ("persona
            física o

            moral" in spanish).
        publicKey:
          $ref: '#/components/schemas/PublicKey'
          description: >-
            The certificate's public key. This is the public key that identifies
            messages

            signed by its corresponding private key.
        version:
          description: The version of the X.509 standard that the certificate conforms to.
        hash:
          description: SHA256 message digest of the issuer's certificate.
        certificatePem:
          type: string
          description: AWS S3 URI path to the certificate's PEM data.
        revoked:
          type: boolean
          description: Whether the certificate has been revoked by the issuer.
        createdAt:
          description: >-
            A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant
            with the `date-time` format outlined in section 5.6 of the RFC 3339
            profile of the ISO 8601 standard for representation of dates and
            times using the Gregorian calendar.
        updatedAt:
          description: >-
            A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant
            with the `date-time` format outlined in section 5.6 of the RFC 3339
            profile of the ISO 8601 standard for representation of dates and
            times using the Gregorian calendar.
      description: >-
        A certificate is a digitally signed statement from one entity (the
        issuer) that

        another entity (the subject) has a given identity. The issuer is a

        Certificate Authority certified by Banxico, and the subject is typically
        a

        person or organization ("persona física o moral" in Spanish).
    SignatureRequestInvite:
      type: object
      required:
        - id
        - signatureRequest
        - subject
        - status
        - createdAt
        - updatedAt
      properties:
        id:
          description: >-
            A field whose value conforms with the standard mongodb object ID as
            described here:
            https://docs.mongodb.com/manual/reference/method/ObjectId/#ObjectId.
            Example: 5e5677d71bdc2ae76344968c
        signatureRequest:
          $ref: '#/components/schemas/SignatureRequest'
          description: The signature request this invite is linked to.
        subject:
          $ref: '#/components/schemas/Subject'
          description: The subject this invite is linked to.
        certificate:
          $ref: '#/components/schemas/Certificate'
          description: The certificate this invite was signed with.
        signature:
          description: The signature from the certificate as a hexadecimal string.
        ocspResponse:
          description: |-
            The OCSP response from checking the certificate against the CA.
            ASN1 encoded as a hexadecimal string.
        witness:
          $ref: '#/components/schemas/Witness'
          description: Witness that attest the signature using a merkle proof
        status:
          type: string
          enum:
            - PENDING
            - SIGNED
            - WITNESSED
            - REJECTED
          description: The status of the signature request invite.
        rejectedAt:
          description: >-
            Date at which the signature request invite was rejected. Only
            present if rejected.
        signedAt:
          description: >-
            Date at which the signature request invite was signed. Only present
            if signed.
        createdAt:
          description: >-
            A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant
            with the `date-time` format outlined in section 5.6 of the RFC 3339
            profile of the ISO 8601 standard for representation of dates and
            times using the Gregorian calendar.
        updatedAt:
          description: >-
            A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant
            with the `date-time` format outlined in section 5.6 of the RFC 3339
            profile of the ISO 8601 standard for representation of dates and
            times using the Gregorian calendar.
      description: >-
        A signature request invite is an invite to sign a signature request.

        It links a signature request to a subject and it stores its
        corresponding

        signature and the link to the certificate that the signature belongs to.
    Wallet:
      type: object
      required:
        - id
      properties:
        id:
          type: string
        endorsables:
          $ref: '#/components/schemas/EndorsablePage'
        endorseFromEvents:
          $ref: '#/components/schemas/EndorseEventPage'
        endorseToEvents:
          $ref: '#/components/schemas/EndorseEventPage'
        subject:
          $ref: '#/components/schemas/Subject'
    RawContent:
      type: object
      required:
        - id
        - raw
      properties:
        id:
          description: >-
            A field whose value conforms with the standard mongodb object ID as
            described here:
            https://docs.mongodb.com/manual/reference/method/ObjectId/#ObjectId.
            Example: 5e5677d71bdc2ae76344968c
        raw:
          description: The raw content.
      description: Raw content is a string that can be signed.
    IOUContent:
      type: object
      required:
        - id
        - latitude
        - longitude
        - amount
        - currency
        - debtor
        - creditor
        - raw
      properties:
        id:
          description: >-
            A field whose value conforms with the standard mongodb object ID as
            described here:
            https://docs.mongodb.com/manual/reference/method/ObjectId/#ObjectId.
            Example: 5e5677d71bdc2ae76344968c
        latitude:
          description: Latitude coordinates where the IOU is created.
        longitude:
          description: Longitude coordinates where the IOU is created.
        amount:
          description: The amount of the IOU.
        currency:
          description: The currency of the IOU.
        debtor:
          $ref: '#/components/schemas/Subject'
          description: The debtor of the IOU.
        creditor:
          $ref: '#/components/schemas/Subject'
          description: The creditor of the IOU.
        raw:
          description: An AWS S3 URL to the IOU.
      description: IOU content is a string that represents an IOU.
    JSONContent:
      type: object
      required:
        - id
        - json
      properties:
        id:
          description: >-
            A field whose value conforms with the standard mongodb object ID as
            described here:
            https://docs.mongodb.com/manual/reference/method/ObjectId/#ObjectId.
            Example: 5e5677d71bdc2ae76344968c
        json:
          description: An AWS S3 URL to the JSON.
      description: JSON content is a JSON object that can be signed.
    PDFContent:
      type: object
      required:
        - id
        - pdf
      properties:
        id:
          description: >-
            A field whose value conforms with the standard mongodb object ID as
            described here:
            https://docs.mongodb.com/manual/reference/method/ObjectId/#ObjectId.
            Example: 5e5677d71bdc2ae76344968c
        pdf:
          description: An AWS S3 URL to the PDF.
      description: PDF content is a PDF document that can be signed.
    Quota:
      type: object
      required:
        - id
        - API
        - groupedNOM151
        - nom151
      properties:
        id:
          description: >-
            A field whose value conforms with the standard mongodb object ID as
            described here:
            https://docs.mongodb.com/manual/reference/method/ObjectId/#ObjectId.
            Example: 5e5677d71bdc2ae76344968c
        API:
          type: boolean
          description: API is enabled for the organization.
        groupedNOM151:
          type: integer
          format: int32
          description: >-
            The amount of grouped NOM151 certificates available to the
            organization.
        nom151:
          type: integer
          format: int32
          description: The amount of NOM151 certificates available to the organization.
      description: Quota defines the resource limits for an organization.
    Policies:
      type: object
      required:
        - signatureRequest
      properties:
        signatureRequest:
          $ref: '#/components/schemas/SignatureRequestPolicies'
          description: Defines the policies for signatureRequests.
      description: Policies define the behavior of the resources in the organization.
    EndorseEventPage:
      type: object
      required:
        - items
        - pageInfo
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/EndorseEvent'
        pageInfo:
          $ref: '#/components/schemas/PageInfo'
    Issuer:
      type: object
      required:
        - id
        - hash
        - commonName
        - publicKey
        - certificatePem
        - createdAt
        - updatedAt
      properties:
        id:
          description: >-
            A field whose value conforms with the standard mongodb object ID as
            described here:
            https://docs.mongodb.com/manual/reference/method/ObjectId/#ObjectId.
            Example: 5e5677d71bdc2ae76344968c
        RFC:
          type: string
          description: RFC of the issuer.
        hash:
          description: The hash of the issuer's certificate.
        commonName:
          type: string
          description: The name of the certificate authority.
        organization:
          type: string
          description: |-
            Name of the organization or company.
            "Razón Social" in Spanish.
        organizationalUnitName:
          type: string
          description: |-
            Name of the unit within the organization.
            "Unidad Organizacional" in Spanish.
        emailAddress:
          description: Email address of the issuer.
        streetAddress:
          type: string
          description: Street address of the issuer.
        postalCode:
          type: integer
          format: int32
          description: Postal code of the issuer.
        country:
          description: '"Country" of the issuer.'
        stateOrProvinceName:
          type: string
          description: '"Entidad Federativa" of the issuer.'
        localityName:
          type: string
          description: '"Municipio/Delegación" of the issuer.'
        publicKey:
          $ref: '#/components/schemas/PublicKey'
          description: >-
            The issuer's certificate public key. This is the public key that
            identifies messages the issuer has signed

            a certificate for a subject.
        certificatePem:
          type: string
          description: AWS S3 URI path to the issuer certificate's PEM data.
        createdAt:
          description: >-
            A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant
            with the `date-time` format outlined in section 5.6 of the RFC 3339
            profile of the ISO 8601 standard for representation of dates and
            times using the Gregorian calendar.
        updatedAt:
          description: >-
            A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant
            with the `date-time` format outlined in section 5.6 of the RFC 3339
            profile of the ISO 8601 standard for representation of dates and
            times using the Gregorian calendar.
      description: |-
        An Issuer is a Certificate Authority certified by Banxico to
        issue digital signature certificates to Mexican citizens.
    PublicKey:
      type: object
      required:
        - exponent
        - modulus
      properties:
        exponent:
          description: The public key's modulus, as a hexadecimal string.
        modulus:
          description: The public key's exponent, as a hexadecimal string.
      description: An RSA public key, as defined in RFC 3447.
    EndorsablePage:
      type: object
      required:
        - items
        - pageInfo
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/Endorsable'
        pageInfo:
          $ref: '#/components/schemas/PageInfo'
    SignatureRequestPolicies:
      type: object
      required:
        - conservation
      properties:
        conservation:
          type: string
          enum:
            - NOM151
            - MERKLEIZED
            - WITNESS_CO
          description: >-
            Type of conservation strategy to use by default at signature request
            readiness (ie. when draft is false).
      description: SignatureRequestPolicies defines the policies for signatureRequests.
    EndorseEvent:
      type: object
      required:
        - id
        - timestamp
        - fromId
        - toId
        - digest
        - network
        - from
        - to
        - token
      properties:
        id:
          type: string
        timestamp:
          type: integer
          format: int32
        fromId:
          type: string
        toId:
          type: string
        digest:
          description: >-
            The `BigInt` scalar type represents non-fractional signed whole
            numeric values.
        network:
          type: integer
          format: int32
        from:
          $ref: '#/components/schemas/Wallet'
        to:
          $ref: '#/components/schemas/Wallet'
        token:
          $ref: '#/components/schemas/Endorsable'
    PageInfo:
      type: object
      required:
        - hasNextPage
        - hasPreviousPage
      properties:
        hasNextPage:
          type: boolean
        hasPreviousPage:
          type: boolean
        startCursor:
          type: string
        endCursor:
          type: string
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer

````