{
  "openapi": "3.1.0",
  "info": {
    "title": "SignlyPDF API",
    "version": "1.0.0",
    "description": "Create documents, collect signatures and record clickwrap consent. Guides, embedding and examples: https://signlypdf.com/developers",
    "contact": {
      "name": "SignlyPDF support",
      "email": "support@signlypdf.com",
      "url": "https://signlypdf.com/developers"
    }
  },
  "servers": [
    {
      "url": "https://signlypdf.com/api",
      "description": "Production. Test mode uses the same URL with a test key."
    }
  ],
  "security": [
    {
      "AuthToken": []
    }
  ],
  "tags": [
    {
      "name": "User"
    },
    {
      "name": "Templates"
    },
    {
      "name": "Submissions"
    },
    {
      "name": "Submitters"
    },
    {
      "name": "Clickwrap"
    },
    {
      "name": "Events"
    },
    {
      "name": "Tools"
    },
    {
      "name": "Webhooks"
    }
  ],
  "paths": {
    "/user": {
      "get": {
        "operationId": "getUser",
        "summary": "The user the API key belongs to",
        "tags": [
          "User"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/templates": {
      "get": {
        "operationId": "listTemplates",
        "summary": "List templates",
        "tags": [
          "Templates"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Template"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Search by name."
          },
          {
            "name": "external_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Your id for the template."
          },
          {
            "name": "folder",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Folder name."
          },
          {
            "name": "archived",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "true lists archived templates."
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/after"
          },
          {
            "$ref": "#/components/parameters/before"
          }
        ]
      },
      "post": {
        "operationId": "createTemplate",
        "summary": "Create a template from a document",
        "tags": [
          "Templates"
        ],
        "responses": {
          "201": {
            "description": "Created",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Template"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/Unprocessable"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TemplateCreate"
              }
            }
          }
        }
      }
    },
    "/templates/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "integer"
          },
          "description": "Template id."
        }
      ],
      "get": {
        "operationId": "getTemplate",
        "summary": "Get a template",
        "tags": [
          "Templates"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Template"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "put": {
        "operationId": "updateTemplate",
        "summary": "Update or archive a template",
        "tags": [
          "Templates"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/Unprocessable"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TemplateUpdate"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteTemplate",
        "summary": "Archive a template",
        "tags": [
          "Templates"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "archived_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "parameters": [
          {
            "name": "permanently",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "true deletes the template instead of archiving it."
          }
        ]
      }
    },
    "/templates/{id}/clone": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "integer"
          },
          "description": "Template id."
        }
      ],
      "post": {
        "operationId": "cloneTemplate",
        "summary": "Copy a template",
        "tags": [
          "Templates"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Template"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/Unprocessable"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "external_id": {
                    "type": "string"
                  },
                  "folder_name": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/templates/{id}/pdf": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "integer"
          },
          "description": "Template id."
        }
      ],
      "get": {
        "operationId": "getTemplatePdf",
        "summary": "Download links for the template documents",
        "tags": [
          "Templates"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "name": {
                      "type": "string"
                    },
                    "pdf_url": {
                      "type": "string"
                    },
                    "filename": {
                      "type": "string"
                    },
                    "documents": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TemplateDocument"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/templates/{id}/submissions": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "integer"
          },
          "description": "Template id."
        }
      ],
      "get": {
        "operationId": "listTemplateSubmissions",
        "summary": "List submissions of a template",
        "tags": [
          "Submissions"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Submission"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/after"
          },
          {
            "$ref": "#/components/parameters/before"
          }
        ]
      }
    },
    "/submissions": {
      "get": {
        "operationId": "listSubmissions",
        "summary": "List submissions",
        "tags": [
          "Submissions"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Submission"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "parameters": [
          {
            "name": "template_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Only this template."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/SubmissionStatus"
            },
            "description": "Only this status."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Search."
          },
          {
            "name": "created_at_from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Created on or after."
          },
          {
            "name": "created_at_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Created on or before."
          },
          {
            "name": "completed_at_from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Completed on or after."
          },
          {
            "name": "completed_at_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Completed on or before."
          },
          {
            "name": "archived",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "true lists archived submissions."
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/after"
          },
          {
            "$ref": "#/components/parameters/before"
          }
        ]
      },
      "post": {
        "operationId": "createSubmission",
        "summary": "Send a template for signature",
        "tags": [
          "Submissions"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Submitter"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/Unprocessable"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "description": "Returns one object per signer, each with an embed_src for embedded signing.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmissionCreate"
              }
            }
          }
        }
      }
    },
    "/submissions/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "integer"
          },
          "description": "Submission id."
        }
      ],
      "get": {
        "operationId": "getSubmission",
        "summary": "Get a submission",
        "tags": [
          "Submissions"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Submission"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "delete": {
        "operationId": "deleteSubmission",
        "summary": "Archive a submission",
        "tags": [
          "Submissions"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "envelope_id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "archived_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "parameters": [
          {
            "name": "permanently",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "true deletes the submission instead of archiving it."
          }
        ]
      }
    },
    "/submissions/{id}/documents": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "integer"
          },
          "description": "Submission id."
        }
      ],
      "get": {
        "operationId": "getSubmissionDocuments",
        "summary": "Document links, including previews while signing is in progress",
        "tags": [
          "Submissions"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "documents": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SubmitterDocument"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/submissions/{id}/pdf": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "integer"
          },
          "description": "Submission id."
        }
      ],
      "get": {
        "operationId": "getSubmissionPdf",
        "summary": "Signed PDF links once every signer has completed",
        "tags": [
          "Submissions"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "envelope_id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "pdf_url": {
                      "type": "string"
                    },
                    "filename": {
                      "type": "string"
                    },
                    "documents": {
                      "type": "array"
                    },
                    "combined_document_url": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "audit_log_url": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/Unprocessable"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/submitters": {
      "get": {
        "operationId": "listSubmitters",
        "summary": "List signers",
        "tags": [
          "Submitters"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Submitter"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "parameters": [
          {
            "name": "submission_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Only this submission."
          },
          {
            "name": "external_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Your id for the signer."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Search."
          },
          {
            "name": "completed_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Completed after this time."
          },
          {
            "name": "completed_before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Completed before this time."
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/after"
          },
          {
            "$ref": "#/components/parameters/before"
          }
        ]
      }
    },
    "/submitters/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "integer"
          },
          "description": "Submitter id."
        }
      ],
      "get": {
        "operationId": "getSubmitter",
        "summary": "Get a signer",
        "tags": [
          "Submitters"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Submitter"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "put": {
        "operationId": "updateSubmitter",
        "summary": "Update a signer",
        "tags": [
          "Submitters"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Submitter"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/Unprocessable"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "description": "A signer who has completed can no longer be changed (422).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitterUpdate"
              }
            }
          }
        }
      }
    },
    "/clickwraps": {
      "get": {
        "operationId": "listClickwraps",
        "summary": "List clickwraps",
        "tags": [
          "Clickwrap"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Clickwrap"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/after"
          },
          {
            "$ref": "#/components/parameters/before"
          }
        ]
      },
      "post": {
        "operationId": "createClickwrap",
        "summary": "Create a clickwrap",
        "tags": [
          "Clickwrap"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Clickwrap"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/Unprocessable"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClickwrapInput"
              }
            }
          }
        }
      }
    },
    "/clickwraps/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "integer"
          },
          "description": "Clickwrap id."
        }
      ],
      "get": {
        "operationId": "getClickwrap",
        "summary": "Get a clickwrap",
        "tags": [
          "Clickwrap"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Clickwrap"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "put": {
        "operationId": "updateClickwrap",
        "summary": "Update a clickwrap",
        "tags": [
          "Clickwrap"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Clickwrap"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/Unprocessable"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClickwrapInput"
              }
            }
          }
        }
      }
    },
    "/clickwraps/{id}/publish": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "integer"
          },
          "description": "Clickwrap id."
        }
      ],
      "post": {
        "operationId": "publishClickwrap",
        "summary": "Publish the current draft as a new version",
        "tags": [
          "Clickwrap"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Clickwrap"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/Unprocessable"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/clickwraps/{id}/consents": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "integer"
          },
          "description": "Clickwrap id."
        }
      ],
      "get": {
        "operationId": "listConsents",
        "summary": "Consents collected for a clickwrap",
        "tags": [
          "Clickwrap"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Consent"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/after"
          },
          {
            "$ref": "#/components/parameters/before"
          }
        ]
      },
      "post": {
        "operationId": "createConsent",
        "summary": "Record a consent collected in your own UI",
        "tags": [
          "Clickwrap"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Consent"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/Unprocessable"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "description": "The clickwrap must be published. Required name, email and checkboxes are not checked here, and no certificate is created.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConsentInput"
              }
            }
          }
        }
      }
    },
    "/consents/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "integer"
          },
          "description": "Consent id."
        }
      ],
      "get": {
        "operationId": "getConsent",
        "summary": "Get a consent",
        "tags": [
          "Clickwrap"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Consent"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/events/form/completed": {
      "get": {
        "operationId": "listFormCompletedEvents",
        "summary": "Completed signers, in webhook format",
        "tags": [
          "Events"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FormEvent"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "description": "after and before are Unix timestamps of completed_at: before=T returns events completed after T, after=T those completed before T.",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Unix time; events completed before it."
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Unix time; events completed after it."
          }
        ]
      }
    },
    "/tools/merge": {
      "post": {
        "operationId": "mergePdfs",
        "summary": "Merge two or more PDFs",
        "tags": [
          "Tools"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MergeResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/Unprocessable"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MergeRequest"
              }
            }
          }
        }
      }
    },
    "/tools/verify": {
      "post": {
        "operationId": "verifyPdf",
        "summary": "Check a signed PDF",
        "tags": [
          "Tools"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VerifyResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/Unprocessable"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VerifyRequest"
              }
            }
          }
        }
      }
    }
  },
  "webhooks": {
    "form.viewed": {
      "post": {
        "summary": "form.viewed",
        "description": "The signer opened the form. Sent on every visit. Headers on every delivery: X-Signly-Event-Id, X-Signly-Event-Type, X-Signly-Timestamp and, when the endpoint has a secret, X-Signly-Signature = \"v1=\" + hex(HMAC-SHA256(secret value, \"<timestamp>.<raw body>\")). Answer with any 2xx within 30 seconds.",
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEnvelope"
                  },
                  {
                    "properties": {
                      "data": {
                        "$ref": "#/components/schemas/WebhookSubmitter"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx acknowledges the delivery."
          }
        }
      }
    },
    "form.started": {
      "post": {
        "summary": "form.started",
        "description": "The signer saved their first field. Headers on every delivery: X-Signly-Event-Id, X-Signly-Event-Type, X-Signly-Timestamp and, when the endpoint has a secret, X-Signly-Signature = \"v1=\" + hex(HMAC-SHA256(secret value, \"<timestamp>.<raw body>\")). Answer with any 2xx within 30 seconds.",
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEnvelope"
                  },
                  {
                    "properties": {
                      "data": {
                        "$ref": "#/components/schemas/WebhookSubmitter"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx acknowledges the delivery."
          }
        }
      }
    },
    "form.completed": {
      "post": {
        "summary": "form.completed",
        "description": "The signer finished. Headers on every delivery: X-Signly-Event-Id, X-Signly-Event-Type, X-Signly-Timestamp and, when the endpoint has a secret, X-Signly-Signature = \"v1=\" + hex(HMAC-SHA256(secret value, \"<timestamp>.<raw body>\")). Answer with any 2xx within 30 seconds.",
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEnvelope"
                  },
                  {
                    "properties": {
                      "data": {
                        "$ref": "#/components/schemas/WebhookSubmitter"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx acknowledges the delivery."
          }
        }
      }
    },
    "form.declined": {
      "post": {
        "summary": "form.declined",
        "description": "The signer declined; see decline_reason. Headers on every delivery: X-Signly-Event-Id, X-Signly-Event-Type, X-Signly-Timestamp and, when the endpoint has a secret, X-Signly-Signature = \"v1=\" + hex(HMAC-SHA256(secret value, \"<timestamp>.<raw body>\")). Answer with any 2xx within 30 seconds.",
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEnvelope"
                  },
                  {
                    "properties": {
                      "data": {
                        "$ref": "#/components/schemas/WebhookSubmitter"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx acknowledges the delivery."
          }
        }
      }
    },
    "submission.created": {
      "post": {
        "summary": "submission.created",
        "description": "A submission was created. Headers on every delivery: X-Signly-Event-Id, X-Signly-Event-Type, X-Signly-Timestamp and, when the endpoint has a secret, X-Signly-Signature = \"v1=\" + hex(HMAC-SHA256(secret value, \"<timestamp>.<raw body>\")). Answer with any 2xx within 30 seconds.",
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEnvelope"
                  },
                  {
                    "properties": {
                      "data": {
                        "$ref": "#/components/schemas/Submission"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx acknowledges the delivery."
          }
        }
      }
    },
    "submission.completed": {
      "post": {
        "summary": "submission.completed",
        "description": "Every signer has completed. Headers on every delivery: X-Signly-Event-Id, X-Signly-Event-Type, X-Signly-Timestamp and, when the endpoint has a secret, X-Signly-Signature = \"v1=\" + hex(HMAC-SHA256(secret value, \"<timestamp>.<raw body>\")). Answer with any 2xx within 30 seconds.",
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEnvelope"
                  },
                  {
                    "properties": {
                      "data": {
                        "$ref": "#/components/schemas/Submission"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx acknowledges the delivery."
          }
        }
      }
    },
    "submission.expired": {
      "post": {
        "summary": "submission.expired",
        "description": "It expired before everyone signed. Headers on every delivery: X-Signly-Event-Id, X-Signly-Event-Type, X-Signly-Timestamp and, when the endpoint has a secret, X-Signly-Signature = \"v1=\" + hex(HMAC-SHA256(secret value, \"<timestamp>.<raw body>\")). Answer with any 2xx within 30 seconds.",
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEnvelope"
                  },
                  {
                    "properties": {
                      "data": {
                        "$ref": "#/components/schemas/Submission"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx acknowledges the delivery."
          }
        }
      }
    },
    "template.created": {
      "post": {
        "summary": "template.created",
        "description": "A template was created or cloned. Headers on every delivery: X-Signly-Event-Id, X-Signly-Event-Type, X-Signly-Timestamp and, when the endpoint has a secret, X-Signly-Signature = \"v1=\" + hex(HMAC-SHA256(secret value, \"<timestamp>.<raw body>\")). Answer with any 2xx within 30 seconds.",
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEnvelope"
                  },
                  {
                    "properties": {
                      "data": {
                        "$ref": "#/components/schemas/Template"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx acknowledges the delivery."
          }
        }
      }
    },
    "template.updated": {
      "post": {
        "summary": "template.updated",
        "description": "A template was changed. Headers on every delivery: X-Signly-Event-Id, X-Signly-Event-Type, X-Signly-Timestamp and, when the endpoint has a secret, X-Signly-Signature = \"v1=\" + hex(HMAC-SHA256(secret value, \"<timestamp>.<raw body>\")). Answer with any 2xx within 30 seconds.",
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEnvelope"
                  },
                  {
                    "properties": {
                      "data": {
                        "$ref": "#/components/schemas/Template"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx acknowledges the delivery."
          }
        }
      }
    },
    "submission.archived": {
      "post": {
        "summary": "submission.archived",
        "description": "A submission was archived. Headers on every delivery: X-Signly-Event-Id, X-Signly-Event-Type, X-Signly-Timestamp and, when the endpoint has a secret, X-Signly-Signature = \"v1=\" + hex(HMAC-SHA256(secret value, \"<timestamp>.<raw body>\")). Answer with any 2xx within 30 seconds.",
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEnvelope"
                  },
                  {
                    "properties": {
                      "data": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer"
                          },
                          "slug": {
                            "type": "string"
                          },
                          "archived_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx acknowledges the delivery."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "AuthToken": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Auth-Token",
        "description": "Your API key from the API settings page. Use it from your server only."
      }
    },
    "parameters": {
      "limit": {
        "name": "limit",
        "in": "query",
        "required": false,
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100,
          "default": 10
        },
        "description": "Records per page."
      },
      "after": {
        "name": "after",
        "in": "query",
        "required": false,
        "schema": {
          "type": "integer"
        },
        "description": "Return records older than this id (pagination.next)."
      },
      "before": {
        "name": "before",
        "in": "query",
        "required": false,
        "schema": {
          "type": "integer"
        },
        "description": "Return records newer than this id (pagination.prev)."
      }
    },
    "headers": {
      "X-RateLimit-Limit": {
        "description": "Requests allowed for this key per 5-minute window (600 by default).",
        "schema": {
          "type": "integer"
        }
      },
      "X-RateLimit-Remaining": {
        "description": "Requests left in the window.",
        "schema": {
          "type": "integer"
        }
      },
      "X-RateLimit-Reset": {
        "description": "Unix time when the window resets.",
        "schema": {
          "type": "integer"
        }
      },
      "Retry-After": {
        "description": "Seconds until the window resets.",
        "schema": {
          "type": "integer"
        }
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "The API key is missing, wrong or revoked.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Forbidden": {
        "description": "API access is not enabled for the account, or the record belongs to another account.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "NotFound": {
        "description": "No record with that id.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Unprocessable": {
        "description": "The request was invalid; the message says why.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "TooManyRequests": {
        "description": "Rate limit reached.",
        "headers": {
          "Retry-After": {
            "$ref": "#/components/headers/Retry-After"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string",
            "description": "What was wrong with the request."
          }
        }
      },
      "Pagination": {
        "type": "object",
        "required": [
          "count",
          "next",
          "prev"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "description": "Items in this page."
          },
          "next": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Pass as `after` for the next (older) page."
          },
          "prev": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Pass as `before` to look for newer records."
          }
        }
      },
      "User": {
        "type": "object",
        "required": [
          "id",
          "email"
        ],
        "properties": {
          "id": {
            "type": "integer"
          },
          "first_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": "string"
          }
        }
      },
      "Author": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "id": {
            "type": "integer"
          },
          "email": {
            "type": "string"
          },
          "first_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_name": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Area": {
        "type": "object",
        "required": [
          "x",
          "y",
          "w",
          "h",
          "page"
        ],
        "description": "Position on the page. x, y, w and h are fractions of the page from 0 to 1.",
        "properties": {
          "x": {
            "type": "number"
          },
          "y": {
            "type": "number"
          },
          "w": {
            "type": "number"
          },
          "h": {
            "type": "number"
          },
          "page": {
            "type": "integer",
            "description": "Page number. Starts at 1 in responses and in POST /templates documents[].fields; starts at 0 in PUT /templates/{id}."
          },
          "attachment_uuid": {
            "type": "string"
          },
          "cell_w": {
            "type": "number"
          },
          "option_uuid": {
            "type": "string"
          }
        }
      },
      "FieldType": {
        "type": "string",
        "enum": [
          "text",
          "signature",
          "initials",
          "date",
          "number",
          "checkbox",
          "radio",
          "select",
          "multiple",
          "image",
          "file",
          "stamp",
          "cells",
          "phone",
          "heading",
          "strikethrough",
          "datenow",
          "payment",
          "verification"
        ]
      },
      "Field": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string"
          },
          "submitter_uuid": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/FieldType"
          },
          "required": {
            "type": "boolean"
          },
          "readonly": {
            "type": "boolean"
          },
          "default_value": {},
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "preferences": {
            "type": "object"
          },
          "options": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "value": {
                  "type": "string"
                },
                "uuid": {
                  "type": "string"
                }
              }
            }
          },
          "areas": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Area"
            }
          }
        }
      },
      "Role": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "uuid": {
            "type": "string"
          }
        }
      },
      "TemplateDocument": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "uuid": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "description": "Signed link, expires after 40 minutes."
          },
          "preview_image_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "filename": {
            "type": "string"
          }
        }
      },
      "Template": {
        "type": "object",
        "required": [
          "id",
          "name",
          "slug",
          "fields",
          "submitters",
          "documents"
        ],
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "external_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "application_key": {
            "type": [
              "string",
              "null"
            ]
          },
          "folder_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "folder_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "shared_link": {
            "type": "boolean"
          },
          "archived_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "author_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "author": {
            "$ref": "#/components/schemas/Author"
          },
          "preferences": {
            "type": "object"
          },
          "schema": {
            "type": "array"
          },
          "submitters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Role"
            }
          },
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Field"
            }
          },
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TemplateDocument"
            }
          }
        }
      },
      "TemplateDocumentInput": {
        "type": "object",
        "required": [
          "file"
        ],
        "properties": {
          "file": {
            "type": "string",
            "description": "A public https:// URL we download, or the file content as base64 (optionally a data: URI). PDF, images, DOCX, DOC, ODT, RTF, XLSX, XLS, PPTX and PPT are accepted; office files are converted to PDF."
          },
          "name": {
            "type": "string"
          },
          "filename": {
            "type": "string",
            "description": "File name with extension; helps us detect the file type."
          },
          "fields": {
            "type": "array",
            "description": "Fields to place. If left out, the PDF's own form fields are used; a PDF without form fields gives a template with no fields.",
            "items": {
              "type": "object",
              "required": [
                "areas"
              ],
              "properties": {
                "name": {
                  "type": "string"
                },
                "type": {
                  "$ref": "#/components/schemas/FieldType"
                },
                "role": {
                  "type": "string",
                  "description": "Signer role. A role that does not exist yet is created."
                },
                "required": {
                  "type": "boolean",
                  "default": true
                },
                "readonly": {
                  "type": "boolean"
                },
                "default_value": {},
                "title": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "preferences": {
                  "type": "object"
                },
                "options": {
                  "type": "array"
                },
                "areas": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Area"
                  }
                }
              }
            }
          }
        }
      },
      "TemplateCreate": {
        "type": "object",
        "required": [
          "documents"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "external_id": {
            "type": "string"
          },
          "folder_name": {
            "type": "string"
          },
          "shared_link": {
            "type": "boolean"
          },
          "documents": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/TemplateDocumentInput"
            }
          }
        }
      },
      "TemplateUpdate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "external_id": {
            "type": "string"
          },
          "folder_name": {
            "type": "string"
          },
          "shared_link": {
            "type": "boolean"
          },
          "archived": {
            "type": "boolean",
            "description": "true archives the template, false restores it. Must be a JSON boolean."
          },
          "roles": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "submitters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Role"
            }
          },
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Field"
            },
            "description": "areas[].page starts at 0 here."
          }
        }
      },
      "SubmitterValue": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "value": {}
        }
      },
      "SubmitterDocument": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        }
      },
      "Submitter": {
        "type": "object",
        "required": [
          "id",
          "submission_id",
          "slug",
          "status"
        ],
        "properties": {
          "id": {
            "type": "integer"
          },
          "submission_id": {
            "type": "integer"
          },
          "slug": {
            "type": "string"
          },
          "uuid": {
            "type": "string"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "role": {
            "type": "string"
          },
          "external_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "application_key": {
            "type": [
              "string",
              "null"
            ]
          },
          "metadata": {
            "type": "object"
          },
          "status": {
            "type": "string",
            "enum": [
              "awaiting",
              "sent",
              "opened",
              "completed",
              "declined"
            ]
          },
          "sent_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "opened_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "completed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "declined_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "preferences": {
            "type": "object"
          },
          "values": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SubmitterValue"
            }
          },
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SubmitterDocument"
            }
          },
          "embed_src": {
            "type": "string",
            "description": "URL for embedded signing. Returned by create and update."
          },
          "template": {
            "type": "object"
          },
          "submission_events": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "SubmissionStatus": {
        "type": "string",
        "enum": [
          "pending",
          "completed",
          "declined",
          "expired"
        ]
      },
      "Submission": {
        "type": "object",
        "required": [
          "id",
          "slug",
          "status",
          "submitters"
        ],
        "properties": {
          "id": {
            "type": "integer"
          },
          "envelope_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "slug": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "submitters_order": {
            "type": "string"
          },
          "expire_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "archived_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "completed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "status": {
            "$ref": "#/components/schemas/SubmissionStatus"
          },
          "template": {
            "type": [
              "object",
              "null"
            ]
          },
          "created_by_user": {
            "$ref": "#/components/schemas/Author"
          },
          "variables": {
            "type": "object"
          },
          "submission_events": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "submitter_id": {
                  "type": "integer"
                },
                "event_type": {
                  "type": "string"
                },
                "event_timestamp": {
                  "type": "string",
                  "format": "date-time"
                },
                "data": {
                  "type": "object",
                  "description": "For decline_form events, `reason` holds the decline reason."
                }
              }
            }
          },
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SubmitterDocument"
            }
          },
          "audit_log_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "combined_document_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "submitters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Submitter"
            }
          }
        }
      },
      "Message": {
        "type": "object",
        "required": [
          "body"
        ],
        "properties": {
          "subject": {
            "type": "string"
          },
          "body": {
            "type": "string"
          }
        }
      },
      "SubmitterInput": {
        "type": "object",
        "description": "Needs at least one of email, phone or name.",
        "properties": {
          "role": {
            "type": "string",
            "description": "Template role, matched case-insensitively. Without it, roles are filled in order."
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "phone": {
            "type": "string",
            "pattern": "^\\+\\d+$"
          },
          "name": {
            "type": "string"
          },
          "values": {
            "type": "object",
            "description": "Prefilled values keyed by field name."
          },
          "readonly_fields": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "external_id": {
            "type": "string"
          },
          "metadata": {
            "type": "object"
          },
          "completed": {
            "type": "boolean"
          },
          "send_email": {
            "type": "boolean"
          },
          "reply_to": {
            "type": "string",
            "format": "email"
          },
          "completed_redirect_url": {
            "type": "string"
          },
          "message": {
            "$ref": "#/components/schemas/Message"
          }
        }
      },
      "SubmissionCreate": {
        "type": "object",
        "required": [
          "template_id",
          "submitters"
        ],
        "properties": {
          "template_id": {
            "type": "integer"
          },
          "send_email": {
            "type": "boolean",
            "default": true,
            "description": "Email each signer an invitation. Use false for embedded signing."
          },
          "order": {
            "type": "string",
            "enum": [
              "preserved",
              "random"
            ],
            "default": "preserved"
          },
          "completed_redirect_url": {
            "type": "string",
            "description": "We append ?event=completed or ?event=declined."
          },
          "expire_at": {
            "type": "string",
            "format": "date-time"
          },
          "reply_to": {
            "type": "string",
            "format": "email"
          },
          "bcc_completed": {
            "type": "string",
            "format": "email",
            "description": "Gets the completed documents once every signer has finished, unless send_email is false."
          },
          "message": {
            "$ref": "#/components/schemas/Message"
          },
          "name": {
            "type": "string"
          },
          "variables": {
            "type": "object"
          },
          "submitters": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/SubmitterInput"
            }
          }
        }
      },
      "SubmitterUpdate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "phone": {
            "type": "string"
          },
          "values": {
            "type": "object"
          },
          "metadata": {
            "type": "object"
          },
          "external_id": {
            "type": "string"
          },
          "readonly_fields": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "completed": {
            "type": "boolean",
            "description": "Mark the signer as completed."
          },
          "send_email": {
            "type": "boolean",
            "description": "Send the invitation, only if none was sent yet."
          },
          "reply_to": {
            "type": "string",
            "format": "email"
          },
          "completed_redirect_url": {
            "type": "string"
          },
          "message": {
            "$ref": "#/components/schemas/Message"
          }
        }
      },
      "Checkbox": {
        "type": "object",
        "required": [
          "text"
        ],
        "properties": {
          "text": {
            "type": "string"
          },
          "required": {
            "type": "boolean"
          }
        }
      },
      "Clickwrap": {
        "type": "object",
        "required": [
          "id",
          "name",
          "kind",
          "slug",
          "published"
        ],
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "no_document",
              "view_only",
              "requires_signature"
            ]
          },
          "slug": {
            "type": "string"
          },
          "template_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "content": {
            "type": [
              "string",
              "null"
            ]
          },
          "button_text": {
            "type": [
              "string",
              "null"
            ]
          },
          "checkboxes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Checkbox"
            }
          },
          "require_name": {
            "type": "boolean"
          },
          "require_email": {
            "type": "boolean"
          },
          "require_scroll_to_bottom": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "published": {
            "type": "boolean"
          },
          "active_version_number": {
            "type": [
              "integer",
              "null"
            ]
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Hosted agreement page; null until published."
          }
        }
      },
      "ClickwrapInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "no_document",
              "view_only",
              "requires_signature"
            ],
            "default": "view_only"
          },
          "template_id": {
            "type": "integer",
            "description": "Required for view_only and requires_signature."
          },
          "content": {
            "type": "string",
            "description": "Agreement text for no_document, as plain text."
          },
          "button_text": {
            "type": "string"
          },
          "require_name": {
            "type": "boolean"
          },
          "require_email": {
            "type": "boolean"
          },
          "require_scroll_to_bottom": {
            "type": "boolean"
          },
          "checkboxes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Checkbox"
            }
          },
          "publish": {
            "type": "boolean",
            "description": "Publish as a new version right away."
          }
        }
      },
      "Consent": {
        "type": "object",
        "required": [
          "id",
          "clickwrap_id",
          "agreed_at"
        ],
        "properties": {
          "id": {
            "type": "integer"
          },
          "clickwrap_id": {
            "type": "integer"
          },
          "clickwrap_version_number": {
            "type": "integer"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "external_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "ip": {
            "type": [
              "string",
              "null"
            ]
          },
          "user_agent": {
            "type": [
              "string",
              "null"
            ]
          },
          "agreed_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "certificate_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "PDF certificate; created for consents given on the hosted page."
          }
        }
      },
      "ConsentInput": {
        "type": "object",
        "description": "Consent collected in your own UI. Send the user's IP and browser, not your server's.",
        "properties": {
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "external_id": {
            "type": "string"
          },
          "ip": {
            "type": "string"
          },
          "user_agent": {
            "type": "string"
          }
        }
      },
      "FormEvent": {
        "type": "object",
        "required": [
          "event_type",
          "timestamp",
          "data"
        ],
        "properties": {
          "event_type": {
            "const": "form.completed"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "data": {
            "$ref": "#/components/schemas/WebhookSubmitter"
          }
        }
      },
      "WebhookSubmitter": {
        "type": "object",
        "required": [
          "id",
          "submission_id",
          "status"
        ],
        "properties": {
          "id": {
            "type": "integer"
          },
          "submission_id": {
            "type": "integer"
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "role": {
            "type": "string"
          },
          "ip": {
            "type": [
              "string",
              "null"
            ],
            "description": "Set when the signer used the signing form in a browser."
          },
          "ua": {
            "type": [
              "string",
              "null"
            ],
            "description": "Set when the signer used the signing form in a browser."
          },
          "status": {
            "type": "string"
          },
          "external_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "application_key": {
            "type": [
              "string",
              "null"
            ]
          },
          "metadata": {
            "type": "object"
          },
          "preferences": {
            "type": "object"
          },
          "sent_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "opened_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "completed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "declined_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "decline_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "signer_order": {
            "type": [
              "integer",
              "null"
            ]
          },
          "total_signers": {
            "type": [
              "integer",
              "null"
            ]
          },
          "link_slug": {
            "type": [
              "string",
              "null"
            ]
          },
          "values": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SubmitterValue"
            }
          },
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SubmitterDocument"
            }
          },
          "audit_log_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "submission_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "template": {
            "type": "object"
          },
          "submission": {
            "type": "object"
          }
        }
      },
      "WebhookEnvelope": {
        "type": "object",
        "required": [
          "event_type",
          "timestamp",
          "data"
        ],
        "properties": {
          "event_id": {
            "type": "string",
            "description": "Stable across retries. Use it to deduplicate."
          },
          "event_type": {
            "type": "string"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "data": {
            "type": "object"
          }
        }
      },
      "MergeRequest": {
        "type": "object",
        "required": [
          "files"
        ],
        "properties": {
          "files": {
            "type": "array",
            "minItems": 2,
            "items": {
              "type": "string",
              "description": "PDF as base64."
            }
          }
        }
      },
      "MergeResponse": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "string",
            "description": "Merged PDF as base64."
          }
        }
      },
      "VerifyRequest": {
        "type": "object",
        "required": [
          "file"
        ],
        "properties": {
          "file": {
            "type": "string",
            "description": "Signed PDF as base64."
          }
        }
      },
      "VerifyResponse": {
        "type": "object",
        "properties": {
          "checksum_status": {
            "type": "string",
            "enum": [
              "verified",
              "not_found"
            ]
          },
          "signatures": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "verification_result": {},
                "signer_name": {
                  "type": "string"
                },
                "signing_reason": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "signing_time": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "signature_type": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  }
}
