Scrive Attachments API

The Attachments API from Scrive — 9 operation(s) for attachments.

OpenAPI Specification

scrive-attachments-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Scrive Document Access Control Attachments 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: Attachments
paths:
  /documents/{document_id}/setattachments:
    post:
      tags:
      - Attachments
      operationId: setAttachments
      summary: Set author attachments on a document
      parameters:
      - $ref: '#/components/parameters/DocumentId'
      responses:
        '200':
          description: Attachments set.
  /documents/{document_id}/{signatory_id}/setfiletosignatory:
    post:
      tags:
      - Attachments
      operationId: setFileToSignatory
      summary: Attach a file to a signatory
      parameters:
      - $ref: '#/components/parameters/DocumentId'
      - $ref: '#/components/parameters/SignatoryId'
      responses:
        '200':
          description: File attached to signatory.
  /documents/{document_id}/files/main/{filename}:
    get:
      tags:
      - Attachments
      operationId: getMainFile
      summary: Download the main file
      parameters:
      - $ref: '#/components/parameters/DocumentId'
      - name: filename
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: PDF file.
          content:
            application/pdf: {}
  /documents/{document_id}/files/zip/{filename}:
    get:
      tags:
      - Attachments
      operationId: getZip
      summary: Download all files as a ZIP
      parameters:
      - $ref: '#/components/parameters/DocumentId'
      - name: filename
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ZIP archive.
          content:
            application/zip: {}
  /attachments/list:
    get:
      tags:
      - Attachments
      operationId: listAttachments
      summary: List reusable attachments
      responses:
        '200':
          description: A list of attachments.
  /attachments/new:
    post:
      tags:
      - Attachments
      operationId: newAttachment
      summary: Create a reusable attachment
      responses:
        '201':
          description: Attachment created.
  /attachments/{attachment_id}/download:
    get:
      tags:
      - Attachments
      operationId: downloadAttachment
      summary: Download an attachment
      parameters:
      - $ref: '#/components/parameters/AttachmentId'
      responses:
        '200':
          description: Attachment file.
  /attachments/{attachment_id}/share:
    post:
      tags:
      - Attachments
      operationId: shareAttachment
      summary: Share or unshare an attachment
      parameters:
      - $ref: '#/components/parameters/AttachmentId'
      responses:
        '200':
          description: Share state updated.
  /attachments/{attachment_id}:
    delete:
      tags:
      - Attachments
      operationId: deleteAttachment
      summary: Delete an attachment
      parameters:
      - $ref: '#/components/parameters/AttachmentId'
      responses:
        '200':
          description: Attachment deleted.
components:
  parameters:
    AttachmentId:
      name: attachment_id
      in: path
      required: true
      schema:
        type: string
    SignatoryId:
      name: signatory_id
      in: path
      required: true
      schema:
        type: string
    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).