{
  "swagger": "2.0",
  "info": {
    "version": "1.0.0",
    "title": "Showcase Workshop",
    "description": "Showcase Workshop turns your devices into powerful sales, presentation, and training toolkits.",
    "contact": {
      "name": "Showcase Support",
      "url": "https://support.showcaseworkshop.com",
      "email": "helpdesk@showcaseworkshop.com"
    }
  },
  "host": "app.showcaseworkshop.com",
  "basePath": "/",
  "schemes": [
    "https"
  ],
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "paths": {
    "/main/integrations/ms_create_webhook/share_send_email": {
      "x-ms-notification-content": {
        "description": "Details for Webhook invocation",
        "schema": {
          "$ref": "#/definitions/WebhookEventShareSendEmail"
        }
      },
      "post": {
        "description": "Creates a Showcase Workshop webhook",
        "summary": "Triggers when a sharing email is sent",
        "operationId": "ShowcaseShareSendEmail",
        "x-ms-trigger": "single",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "workshop_uid",
            "x-ms-summary": "Workshop UID",
            "description": "The unique id of the workshop",
            "type": "string",
            "required": true
          },
          {
            "in": "query",
            "name": "event_name",
            "description": "The events to call the webhook on",
            "type": "string",
            "required": true,
            "default": "share_send_email",
            "x-ms-visibility": "internal"
          },
          {
            "name": "Request body of webhook",
            "in": "body",
            "required": true,
            "description": "This is the request body of the Webhook",
            "schema": {
              "type": "object",
              "required": [
                "callback_url"
              ],
              "properties": {
                "callback_url": {
                  "type": "string",
                  "description": "Webhook URl to call",
                  "title": "Webhook URl to call",
                  "x-ms-notification-url": true,
                  "x-ms-visibility": "internal"
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created"
          }
        }
      }
    },
    "/main/integrations/ms_create_webhook/shared_page_view": {
      "x-ms-notification-content": {
        "description": "Details for Webhook invocation",
        "schema": {
          "$ref": "#/definitions/WebhookEventSharedPageView"
        }
      },
      "post": {
        "description": "Creates a Showcase Workshop webhook",
        "summary": "Triggers when shared content page is viewed",
        "operationId": "ShowcaseSharedPageView",
        "x-ms-trigger": "single",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "workshop_uid",
            "x-ms-summary": "Workshop UID",
            "description": "The unique id of the workshop",
            "type": "string",
            "required": true
          },
          {
            "in": "query",
            "name": "event_name",
            "description": "The events to call the webhook on",
            "type": "string",
            "required": true,
            "default": "shared_page_view",
            "x-ms-visibility": "internal"
          },
          {
            "name": "Request body of webhook",
            "in": "body",
            "required": true,
            "description": "This is the request body of the Webhook",
            "schema": {
              "type": "object",
              "required": [
                "callback_url"
              ],
              "properties": {
                "callback_url": {
                  "type": "string",
                  "description": "Webhook URl to call",
                  "title": "Webhook URl to call",
                  "x-ms-notification-url": true,
                  "x-ms-visibility": "internal"
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created"
          }
        }
      }
    },
    "/main/integrations/ms_create_webhook/shared_page_download": {
      "x-ms-notification-content": {
        "description": "Details for Webhook invocation",
        "schema": {
          "$ref": "#/definitions/WebhookEventSharedPageDownload"
        }
      },
      "post": {
        "description": "Creates a Showcase Workshop webhook",
        "summary": "Trigger when file shared via email is downloaded",
        "operationId": "ShowcaseSharedPageDownload",
        "x-ms-trigger": "single",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "workshop_uid",
            "x-ms-summary": "Workshop UID",
            "description": "The unique id of the workshop",
            "type": "string",
            "required": true
          },
          {
            "in": "query",
            "name": "event_name",
            "description": "The events to call the webhook on",
            "type": "string",
            "required": true,
            "default": "shared_page_download",
            "x-ms-visibility": "internal"
          },
          {
            "name": "Request body of webhook",
            "in": "body",
            "required": true,
            "description": "This is the request body of the Webhook",
            "schema": {
              "type": "object",
              "required": [
                "callback_url"
              ],
              "properties": {
                "callback_url": {
                  "type": "string",
                  "description": "Webhook URl to call",
                  "title": "Webhook URl to call",
                  "x-ms-notification-url": true,
                  "x-ms-visibility": "internal"
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created"
          }
        }
      }
    },
    "/main/integrations/ms_delete_webhook/{hook_id}": {
      "delete": {
        "x-ms-visibility": "internal",
        "description": "Deletes Showcase Workshop webhook config",
        "summary": "Delete Webhook config from Showcase",
        "operationId": "DeleteTrigger",
        "parameters": [
          {
            "name": "hook_id",
            "in": "path",
            "description": "ID of the Hook being deleted",
            "required": true,
            "type": "string",
            "x-ms-url-encoding": "single"
          }
        ],
        "responses": {
          "default": {
            "description": "default"
          }
        }
      }
    }
  },
  "definitions": {
    "WebhookRequestBody": {
      "type": "object",
      "required": [
        "callback_url"
      ],
      "properties": {
        "callback_url": {
          "type": "string",
          "description": "Webhook URl to call",
          "title": "Webhook URl to call",
          "x-ms-notification-url": true,
          "x-ms-visibility": "internal"
        }
      }
    },
    "WebhookEventShareSendEmail": {
      "type": "object",
      "required": [
        "event_summary",
        "event_datetime",
        "shared_by_email",
        "share_recipient_email"
      ],
      "properties": {
        "event_summary": {
          "type": "string",
          "x-ms-summary": "Event summary"
        },
        "event_datetime": {
          "type": "string",
          "x-ms-summary": "Event date and time (in ISO8601 format)"
        },
        "shared_by_name": {
          "type": "string",
          "x-ms-summary": "Sharing user's name"
        },
        "shared_by_email": {
          "type": "string",
          "x-ms-summary": "Sharing user's email address"
        },
        "share_recipient_name": {
          "type": "string",
          "x-ms-summary": "Recipient's name"
        },
        "share_recipient_email": {
          "type": "string",
          "x-ms-summary": "Recipient's email address"
        },
        "shared_email_subject": {
          "type": "string",
          "x-ms-summary": "Shared email subject"
        },
        "shared_email_note": {
          "type": "string",
          "x-ms-summary": "Shared email note"
        },
        "shared_content_summary": {
          "type": "string",
          "x-ms-summary": "List of content shared"
        }
      }
    },
    "WebhookEventSharedPageView": {
      "type": "object",
      "required": [
        "event_summary",
        "event_datetime",
        "shared_by_email",
        "share_recipient_email"
      ],
      "properties": {
        "event_summary": {
          "type": "string",
          "x-ms-summary": "Event summary"
        },
        "event_datetime": {
          "type": "string",
          "x-ms-summary": "Event date and time (in ISO8601 format)"
        },
        "shared_by_name": {
          "type": "string",
          "x-ms-summary": "Sharing user's name"
        },
        "shared_by_email": {
          "type": "string",
          "x-ms-summary": "Sharing user's email address"
        },
        "share_recipient_name": {
          "type": "string",
          "x-ms-summary": "Recipient's name"
        },
        "share_recipient_email": {
          "type": "string",
          "x-ms-summary": "Recipient's email address"
        },
        "shared_content_summary": {
          "type": "string",
          "x-ms-summary": "List of content shared"
        }
      }
    },
    "WebhookEventSharedPageDownload": {
      "type": "object",
      "required": [
        "event_summary",
        "event_datetime",
        "shared_by_email",
        "share_recipient_email"
      ],
      "properties": {
        "event_summary": {
          "type": "string",
          "x-ms-summary": "Event summary"
        },
        "event_datetime": {
          "type": "string",
          "x-ms-summary": "Event date and time (in ISO8601 format)"
        },
        "shared_by_name": {
          "type": "string",
          "x-ms-summary": "Sharing user's name"
        },
        "shared_by_email": {
          "type": "string",
          "x-ms-summary": "Sharing user's email address"
        },
        "share_recipient_name": {
          "type": "string",
          "x-ms-summary": "Recipient's name"
        },
        "share_recipient_email": {
          "type": "string",
          "x-ms-summary": "Recipient's email address"
        },
        "file_downloaded_name": {
          "type": "string",
          "x-ms-summary": "Downloaded file name"
        }
      }
    }
  },
  "parameters": {},
  "responses": {},
  "securityDefinitions": {
    "ApiKeyAuth": {
      "type": "apiKey",
      "in": "query",
      "name": "access_token",
      "description": "Developer Key",
      "x-ms-summary": "Developer Key"
    }
  },
  "security": [],
  "tags": [],
  "x-ms-connector-metadata": [
    {
      "propertyName": "Website",
      "propertyValue": "https://showcaseworkshop.com"
    },
    {
      "propertyName": "Privacy policy",
      "propertyValue": "https://showcaseworkshop.com/privacy"
    },
    {
      "propertyName": "Categories",
      "propertyValue": "Productivity"
    }
  ]
}