PagoPA Signature Request API

The Signature Request API from PagoPA — 5 operation(s) for signature request.

Operations 5

POST /signature-requests Create a Signature Request #
GET /signature-requests/{signatureRequestId} Get a Signature Request by Id #
PUT /signature-requests/{signatureRequestId}/status Set the status of a Signature Request #
GET /signature-requests/{signatureRequestId}/documents/{documentId}/upload_url Get the Upload Url for the specified document #
PUT /signature-requests/{signatureRequestId}/notification Send a signature request notification to user via IO message #

Specifications

Schemas & Data

📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-ct-receipt-model-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-cart-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-get-cart-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-get-mbd-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-get-mdb-receipt-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-create-mbd-request-v2-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-single-flow-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-paginated-payments-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-paginated-flows-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-create-flow-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-single-flow-created-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-paginated-flows-published-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-paginated-flows-created-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-payment-position-model-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-payments-model-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-payment-position-model-base-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-payment-positions-info-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-app-info-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-already-paid-payment-option-model-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-file-id-list-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-upload-report-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-upload-status-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-update-transfer-iban-massive-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-payment-position-model-v3-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-payment-position-model-response-v3-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-payment-positions-info-v3-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-flow-list-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-upload-report-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-receipts-info-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-broker-institutions-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-ciibans-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-payment-options-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-new-debt-position-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-debt-position-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-get-generation-request-status-resource-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-template-resource-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-notice-generation-request-item-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-notice-generation-massive-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-notice-generation-massive-resource-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-get-signed-url-resource-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-transaction-result-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-transaction-result-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-eservice-descriptor-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-purpose-template-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-purpose-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-problem-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-eservice-template-version-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-agreement-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-verification-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-input-message-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-success-response-signature-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-verifica-organization-id-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-pseudonymization-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-data-preparation-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-datapreparation-template-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-richiesta-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-verifica-codice-fiscale-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-submit-tracing-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-get-tracing-errors-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-recover-tracing-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-signal-pull-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-signal-payload-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-signal-push-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-signature-request-detail-view-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-dossier-detail-view-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-create-signature-request-body-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-create-dossier-body-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-signature-request-list-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-signature-field-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-citizen-consent-response-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-access-control-allow-origin-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-list-citizen-consent-response-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-retry-after-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-rate-limit-limit-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-rate-limit-reset-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-retrieval-response-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-retrieval-request-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-retrieva-id-response-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-tpp-network-connection-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-notification-payload-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-auth-request-dynamic-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-token-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-auth-payment-response-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-preview-payment-response-v2-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-transaction-bar-code-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-auth-bar-code-payment-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-preview-payment-request-v2-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-invoice-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-new-notification-request-v26-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-new-notification-request-v25-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-new-notification-request-v24-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-new-notification-request-v21-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-new-notification-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-new-notification-request-v23-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-asynchronous-sepa-request-to-pay-response-resource-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/pagopa/refs/heads/main/json-schema/pagopa-sepa-request-to-pay-cancellation-response-resource-schema.json

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/pagopa:pagopa-signature-request-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

pagopa-signature-request-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Pagopa Signature Request API
  version: 1.2.1
  description: 'Operations tagged Signature Request across 2 of this provider''s published API definitions: io-sign-issuer.yaml, pagopa-firma-con-io-issuer-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.io.pagopa.it/api/v1/sign
  description: production
- url: http://localhost:7071/api/v1/sign
  description: local
security:
- SubscriptionKey: []
tags:
- name: Signature Request
paths:
  /signature-requests:
    post:
      operationId: createSignatureRequest
      tags:
      - Signature Request
      summary: Create a Signature Request
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSignatureRequestBody'
      responses:
        '201':
          description: The Signature Request detail
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SignatureRequestDetailView'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '422':
          $ref: '#/components/responses/UnprocessableContent'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        default:
          $ref: '#/components/responses/Unexpected'
    servers:
    - url: https://api.io.pagopa.it/api/v1/sign
      description: production
    - url: http://localhost:7071/api/v1/sign
      description: local
  /signature-requests/{signatureRequestId}:
    get:
      operationId: getSignatureRequest
      tags:
      - Signature Request
      summary: Get a Signature Request by Id
      parameters:
      - in: path
        name: signatureRequestId
        required: true
        schema:
          $ref: '#/components/schemas/Id'
      responses:
        '200':
          description: The Signature Request detail
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SignatureRequestDetailView'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        default:
          $ref: '#/components/responses/Unexpected'
    servers:
    - url: https://api.io.pagopa.it/api/v1/sign
      description: production
    - url: http://localhost:7071/api/v1/sign
      description: local
  /signature-requests/{signatureRequestId}/status:
    put:
      operationId: setSignatureRequestStatus
      tags:
      - Signature Request
      summary: Set the status of a Signature Request
      parameters:
      - in: path
        name: signatureRequestId
        required: true
        schema:
          $ref: '#/components/schemas/Id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetSignatureRequestStatusBody'
      responses:
        '204':
          description: Signature Request status successfully set
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/UnprocessableContent'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        default:
          $ref: '#/components/responses/Unexpected'
    servers:
    - url: https://api.io.pagopa.it/api/v1/sign
      description: production
    - url: http://localhost:7071/api/v1/sign
      description: local
  /signature-requests/{signatureRequestId}/documents/{documentId}/upload_url:
    get:
      operationId: getDocumentUploadUrl
      tags:
      - Signature Request
      summary: Get the Upload Url for the specified document
      parameters:
      - in: path
        name: signatureRequestId
        required: true
        schema:
          $ref: '#/components/schemas/Id'
      - in: path
        name: documentId
        required: true
        schema:
          $ref: '#/components/schemas/Id'
      responses:
        '200':
          description: The Upload Url
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadUrl'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        default:
          $ref: '#/components/responses/Unexpected'
    servers:
    - url: https://api.io.pagopa.it/api/v1/sign
      description: production
    - url: http://localhost:7071/api/v1/sign
      description: local
  /signature-requests/{signatureRequestId}/notification:
    put:
      operationId: sendNotification
      tags:
      - Signature Request
      summary: Send a signature request notification to user via IO message
      parameters:
      - in: path
        name: signatureRequestId
        required: true
        schema:
          $ref: '#/components/schemas/Id'
      responses:
        '201':
          description: The notification detail
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationDetailView'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        default:
          $ref: '#/components/responses/Unexpected'
    servers:
    - url: https://api.io.pagopa.it/api/v1/sign
      description: production
    - url: http://localhost:7071/api/v1/sign
      description: local
components:
  schemas:
    DocumentReady:
      allOf:
      - $ref: '#/components/schemas/Document'
      - type: object
        properties:
          status:
            type: string
            enum:
            - READY
          uploaded_at:
            $ref: '#/components/schemas/Timestamp'
          url:
            type: string
            format: uri
        required:
        - status
        - uploaded_at
        - url
    DocumentMetadataList:
      type: array
      items:
        $ref: '#/components/schemas/DocumentMetadata'
      minLength: 1
    DocumentDetailView:
      oneOf:
      - $ref: '#/components/schemas/DocumentToBeUploaded'
      - $ref: '#/components/schemas/DocumentToBeValidated'
      - $ref: '#/components/schemas/DocumentReady'
      - $ref: '#/components/schemas/DocumentRejected'
    SetSignatureRequestStatusBody:
      type: string
      x-extensible-enum:
      - READY
      - CANCELLED
    CreateSignatureRequestBody:
      type: object
      properties:
        dossier_id:
          $ref: '#/components/schemas/Id'
        signer_id:
          $ref: '#/components/schemas/Id'
        expires_at:
          $ref: '#/components/schemas/Timestamp'
        documents_metadata:
          $ref: '#/components/schemas/DocumentMetadataList'
      required:
      - dossier_id
      - signer_id
    SignatureFieldToBeCreatedAttrs:
      type: object
      properties:
        coordinates:
          type: object
          properties:
            x:
              type: number
            y:
              type: number
          required:
          - x
          - y
        page:
          type: number
          minimum: 0
        size:
          type: object
          properties:
            w:
              type: number
              minimum: 0
            h:
              type: number
              minimum: 0
          required:
          - w
          - h
      required:
      - coordinates
      - page
      - size
    Clause:
      type: object
      properties:
        title:
          type: string
          minLength: 5
          maxLength: 80
        type:
          type: string
          enum:
          - REQUIRED
          - UNFAIR
          - OPTIONAL
      required:
      - title
      - type
    Document:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/Id'
        metadata:
          $ref: '#/components/schemas/DocumentMetadata'
        created_at:
          $ref: '#/components/schemas/Timestamp'
        updated_at:
          $ref: '#/components/schemas/Timestamp'
      required:
      - id
      - metadata
      - created_at
      - updated_at
    DocumentToBeValidated:
      allOf:
      - $ref: '#/components/schemas/Document'
      - type: object
        properties:
          status:
            type: string
            enum:
            - WAIT_FOR_VALIDATION
          uploaded_at:
            $ref: '#/components/schemas/Timestamp'
        required:
        - status
        - uploaded_at
    SignatureField:
      type: object
      properties:
        attrs:
          $ref: '#/components/schemas/SignatureFieldAttrs'
        clause:
          $ref: '#/components/schemas/Clause'
      required:
      - attrs
      - clause
    SignatureRequestDetailView:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/Id'
        status:
          $ref: '#/components/schemas/SignatureRequestStatus'
        dossier_id:
          $ref: '#/components/schemas/Id'
        signer_id:
          $ref: '#/components/schemas/Id'
        expires_at:
          $ref: '#/components/schemas/Timestamp'
        documents:
          type: array
          items:
            $ref: '#/components/schemas/DocumentDetailView'
        notification:
          $ref: '#/components/schemas/NotificationDetailView'
        created_at:
          $ref: '#/components/schemas/Timestamp'
        updated_at:
          $ref: '#/components/schemas/Timestamp'
        signed_at:
          $ref: '#/components/schemas/Timestamp'
        rejected_at:
          $ref: '#/components/schemas/Timestamp'
        reject_reason:
          type: string
        qr_code_url:
          type: string
          format: uri
        cancelled_at:
          $ref: '#/components/schemas/Timestamp'
      required:
      - id
      - status
      - dossier_id
      - signer_id
      - expires_at
      - documents
      - created_at
      - updated_at
    UploadUrl:
      type: string
      format: uri
    DocumentToBeUploaded:
      allOf:
      - $ref: '#/components/schemas/Document'
      - type: object
        properties:
          status:
            type: string
            enum:
            - WAIT_FOR_UPLOAD
        required:
        - status
    DocumentMetadata:
      type: object
      properties:
        title:
          type: string
          minLength: 3
          maxLength: 60
        signature_fields:
          type: array
          items:
            $ref: '#/components/schemas/SignatureField'
      required:
      - title
    Timestamp:
      type: string
      format: UTCISODateFromString
      description: A date-time field in ISO-8601 format and UTC timezone.
      x-import: '@pagopa/ts-commons/lib/dates'
      example: '2018-10-13T00:00:00.000Z'
    ProblemDetail:
      type: object
      properties:
        type:
          type: string
          format: uri
          description: 'An absolute URI that identifies the problem type. When dereferenced,

            it SHOULD provide human-readable documentation for the problem type

            (e.g., using HTML).'
          default: about:blank
          example: https://example.com/problem/constraint-violation
        title:
          type: string
          description: 'A short, summary of the problem type. Written in english and readable

            for engineers (usually not suited for non technical stakeholders and

            not localized); example: Service Unavailable'
        status:
          type: integer
          format: int32
          description: The HTTP status code generated by the origin server for this occurrence of the problem.
          minimum: 100
          example: 200
          exclusiveMaximum: 600
        detail:
          type: string
          description: 'A human readable explanation specific to this occurrence of the

            problem.'
          example: There was an error processing the request
        instance:
          type: string
          format: uri
          description: An absolute URI that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
    SignatureRequestStatus:
      type: string
      x-extensible-enum:
      - DRAFT
      - READY
      - WAIT_FOR_SIGNATURE
      - SIGNED
      - REJECTED
      - CANCELLED
    Id:
      type: string
      description: Entity Id
      format: NonEmptyString
      example: 01ARZ3NDEKTSV4RRFFQ69G5FAV
      x-import: '@pagopa/ts-commons/lib/strings'
    SignatureFieldAttrs:
      oneOf:
      - $ref: '#/components/schemas/ExistingSignatureFieldAttrs'
      - $ref: '#/components/schemas/SignatureFieldToBeCreatedAttrs'
    ExistingSignatureFieldAttrs:
      type: object
      properties:
        unique_name:
          type: string
      required:
      - unique_name
    NotificationDetailView:
      type: object
      properties:
        io_message_id:
          type: string
      required:
      - io_message_id
    DocumentRejected:
      allOf:
      - $ref: '#/components/schemas/Document'
      - type: object
        properties:
          status:
            type: string
            enum:
            - REJECTED
          uploaded_at:
            $ref: '#/components/schemas/Timestamp'
          rejected_at:
            $ref: '#/components/schemas/Timestamp'
          reject_reason:
            type: string
        required:
        - status
        - uploaded_at
        - rejected_at
        - reject_reason
  responses:
    Forbidden:
      description: You don't have enough privileges to perform this action
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    UnprocessableContent:
      description: Unprocessable Content
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    Unexpected:
      description: Unexpected error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    BadRequest:
      description: Validation error on body
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    NotFound:
      description: The specified resource was not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    TooManyRequests:
      description: Too Many Requests
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
  securitySchemes:
    SubscriptionKey:
      type: apiKey
      name: Ocp-Apim-Subscription-Key
      in: header
      description: The API key can be obtained from the reserved area
x-refined-from:
- io-sign-issuer.yaml
- pagopa-firma-con-io-issuer-openapi.yml