Scrive Templates API

The Templates API from Scrive — 2 operation(s) for templates.

OpenAPI Specification

scrive-templates-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Scrive Document Access Control Templates API
  version: 2.0.0
  description: The Scrive Document API (eSign Online, Version 2) is a RESTful, JSON-over-HTTPS interface that creates, prepares, sends, and manages the full lifecycle of documents for electronic signing, with identity verification through Nordic and European e-ID methods (BankID, MitID, Freja, Smart-ID, and more). Document status changes are delivered to consumers via HTTP callback (webhook) URLs. Endpoints are grounded in the public documentation at https://apidocs.scrive.com/. Request and response schemas are modeled and should be verified against the live docs.
  contact:
    name: API Evangelist
    email: kin@apievangelist.com
  license:
    name: Proprietary
    url: https://www.scrive.com/
servers:
- url: https://scrive.com/api/v2
  description: Production
- url: https://api-testbed.scrive.com/api/v2
  description: API Testbed (development)
security:
- oauth2: []
- oauth1: []
tags:
- name: Templates
paths:
  /documents/newfromtemplate/{document_id}:
    post:
      tags:
      - Templates
      operationId: newFromTemplate
      summary: Create a new document from a template
      parameters:
      - $ref: '#/components/parameters/DocumentId'
      responses:
        '201':
          description: Document created from template.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Document'
  /documents/{document_id}/clone:
    post:
      tags:
      - Templates
      operationId: cloneDocument
      summary: Clone a document
      parameters:
      - $ref: '#/components/parameters/DocumentId'
      responses:
        '201':
          description: Cloned document.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Document'
components:
  schemas:
    Signatory:
      type: object
      properties:
        id:
          type: string
        is_author:
          type: boolean
        is_signatory:
          type: boolean
        fields:
          type: array
          items:
            type: object
        authentication_method_to_view:
          type: string
        authentication_method_to_sign:
          type: string
    Document:
      type: object
      properties:
        id:
          type: string
        title:
          type: string
        status:
          type: string
          enum:
          - preparation
          - pending
          - closed
          - canceled
          - timedout
          - rejected
          - document_error
        parties:
          type: array
          items:
            $ref: '#/components/schemas/Signatory'
        file:
          type: object
          nullable: true
        api_callback_url:
          type: string
          nullable: true
        ctime:
          type: string
          format: date-time
        mtime:
          type: string
          format: date-time
  parameters:
    DocumentId:
      name: document_id
      in: path
      required: true
      schema:
        type: string
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://oauth2.scrive.com/oauth2/authorization
          tokenUrl: https://oauth2.scrive.com/oauth2/token
          scopes:
            doc:create: Create documents
            doc:check: Read documents
            doc:send: Send documents
            full: Full access
            offline_access: Refresh tokens
            openid: OpenID Connect
    oauth1:
      type: apiKey
      in: header
      name: Authorization
      description: OAuth 1.0 or personal access credentials passed in the Authorization header using PLAINTEXT signatures (oauth_consumer_key, oauth_token, oauth_signature).