# Sign Signs the submitted file. Endpoint: POST /api/v1/sign Version: 1.0.0 ## Query parameters: - `append` (string) - `countersign` (string) ## Request fields (multipart/form-data): - `file` (string) File to be signed. If this parameter is specified, leave url_in blank - `url_in` (string) Url to download the file to sign. If this parameter is specified, leave file_in blank - `url_out` (string) Url where to send the signed file - `urlback` (string) Url where to send log process informations - `env` (string) Reference environment for sandbox or production - sandbox - prod Enum: "prod", "sandbox" - `username` (string, required) Digital identity username - `password` (string, required) Digital identity password - `pin` (string, required) Digital identity PIN - `identifier` (string) Digital identity identifier - `certificate_check` (boolean) Verification of certificate validity status - `format` (string) Types of supported signature profiles: pades for PDF files xades for XML files cades for other files Enum: "pades", "xades", "cades" - `otp` (string) The OTP code previously sent to the user. This parameter is only required and available for specific digital identities - `sessionid` (string) The id of the session previously opened. This parameter is only required and available for specific digital identities - `level` (string) Specify the level of the signature - BASIC, T, LTV, LTVLITE, LTVA for pades - BASIC, T, EPES, XL for xades - BASIC, T, EPES for cades Enum: "BASIC", "T", "LTV", "LTVLITE", "LTVA" - `tsa_url` (string) Timestamp service URL. This field is required for signatures with levels T or LTV. Required only if not set at settings.toml file. - `tsa_user` (string) Timestamp service billing username. - `tsa_pass` (string) Timestamp service billing password. - `billing_username` (string, required) Billing account username - `billing_password` (string, required) Billing account password in base64 or plain text - `page` (integer) Page number where the image signature is placed. The first page starts in 0 - `signature_ids` (string) PDF signature field ids to sign (Example: signature1,signature2) - `signature_appearance` (string) Describes the signature appearance like an JSON object. The parameters are: - text This property controls the text that is going to be introduced. Through variables you retrieve information from the signer certificate. '%(CN)', '%(SUBJECT)s', '%(DATE)s', '%(E)s' can be used. - date Date formatting. An input example would be %d/%m/%Y %H:%M:%S - timezone Selected timezone for the graphic signature, default is UTC. You can list the time zones with the following linux command: timedatectl list-timezones - position The coordinates in points (pt) for signature image position and size, starting from bottom left corner (x1,y1,x2,y2). 1px = 0.75pt. - image The previously uploaded image id - b64_image the image in base64 - qrcode url used to build a qr - horizontal - page The document page where the signature will be placed. The first page starts at 0 - text_size Controls the text size. - text_align Controls the horizontal alignment of text - reason Reason about the signature - location Geographic location about the signature ```json { "text": [ "Firmado por: %(CN)s", "%(EMAIL)s %(L)s %(SUBJECT)s", "Fecha: %(DATE)s" ], "date": "%d/%m/%Y %H:%M:%S %z", "timezone": "America/Guatemala", "position": "30,100,165,150", "image": "be1cd133-8be5-4346-87de-d40afd90a3b9", "horizontal": true, "page": 0 } - `signature_subfilter` (string) Change the signature subfilter. Default ETSI.CAdES.detached Enum: "ETSI.CAdES.detached", "adbe.pkcs7.detached" - `useasync` (boolean) Enable the asyncronous flow. Default asynchronous ## Response 403 fields (application/json): - `error_code` (integer, required) - `detail` (any, required) ## Response 422 fields (application/json): - `error_code` (integer, required) - `detail` (any, required)