{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/signatureapi-com/json-schema/signatureapi-com-upload-permanent-upload-schema.json",
  "title": "Permanent Upload",
  "description": "A permanent upload stored in SignatureAPI indefinitely. Permanent uploads are created through the dashboard library and can be reused across multiple envelopes. Each permanent upload has a unique `key` for identification.\n",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/signatureapi-com-uploads-api-openapi.yml#/components/schemas/Upload.PermanentUpload",
  "x-schema-role": "model",
  "x-schema-direction": "output",
  "type": "object",
  "properties": {
    "id": {
      "$ref": "#/$defs/Upload.Id"
    },
    "retention": {
      "allOf": [
        {
          "$ref": "#/$defs/Upload.Retention"
        },
        {
          "const": "permanent"
        }
      ]
    },
    "key": {
      "$ref": "#/$defs/Upload.Key"
    },
    "url": {
      "$ref": "#/$defs/Upload.Url"
    },
    "sha_256": {
      "$ref": "#/$defs/Upload.Sha256"
    },
    "size": {
      "$ref": "#/$defs/Upload.Size"
    },
    "format": {
      "$ref": "#/$defs/Upload.Format"
    },
    "created_at": {
      "$ref": "#/$defs/Upload.CreatedAt"
    }
  },
  "required": [
    "id",
    "retention",
    "key",
    "url",
    "sha_256",
    "size",
    "format",
    "created_at"
  ],
  "$defs": {
    "Upload.CreatedAt": {
      "x-schema-role": "property",
      "x-schema-direction": "output",
      "title": "Created At",
      "description": "The date and time when the upload was created, in ISO 8601 format.",
      "type": "string",
      "format": "date-time"
    },
    "Upload.Format": {
      "x-schema-role": "property",
      "x-schema-direction": "output",
      "type": "string",
      "title": "Format",
      "description": "The file format of the upload.\n\n- `pdf` -- A PDF file (`application/pdf`).\n- `docx` -- A DOCX file (`application/vnd.openxmlformats-officedocument.wordprocessingml.document`).\n- `png` -- A PNG image (`image/png`).\n",
      "enum": [
        "pdf",
        "docx",
        "png"
      ]
    },
    "Upload.Id": {
      "x-schema-role": "property",
      "x-schema-direction": "output",
      "type": "string",
      "title": "Upload ID",
      "description": "The unique identifier of the upload."
    },
    "Upload.Key": {
      "x-schema-role": "property",
      "x-schema-direction": "any",
      "title": "Upload Key",
      "description": "A unique key that identifies the permanent upload within your account. Only lowercase letters, numbers, hyphens, and underscores are allowed. Maximum 100 characters.\n",
      "pattern": "^[a-z0-9_-]+$",
      "maxLength": 100,
      "type": "string"
    },
    "Upload.Retention": {
      "x-schema-role": "property",
      "x-schema-direction": "output",
      "title": "Retention",
      "description": "The retention type of the upload.\n\n- `temporary` -- The file is automatically deleted after 24 hours. Created through the API.\n- `permanent` -- The file is stored indefinitely. Created through the dashboard library.\n",
      "type": "string",
      "enum": [
        "temporary",
        "permanent"
      ]
    },
    "Upload.Sha256": {
      "x-schema-role": "property",
      "x-schema-direction": "output",
      "title": "SHA-256 Hash",
      "description": "The SHA-256 hash of the uploaded file in hexadecimal format.",
      "type": "string"
    },
    "Upload.Size": {
      "x-schema-role": "property",
      "x-schema-direction": "output",
      "title": "Size",
      "description": "The size of the uploaded file in bytes. Maximum 5 MB (5,242,880 bytes).",
      "type": "integer"
    },
    "Upload.Url": {
      "x-schema-role": "property",
      "x-schema-direction": "output",
      "title": "URL",
      "description": "A URL used to reference the uploaded file.\n\nThis internal URL can be used as input in other fields, like `document.url`.\n\nThe file's content cannot be retrieved directly via this URL.\n",
      "type": "string",
      "format": "uri"
    }
  }
}