Skip to main content
POST
/
api
/
signature-process-templates
Criar template
curl --request POST \
  --url https://api.valid.com/api/signature-process-templates \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "name": "<string>",
  "numbers_signers": 123,
  "numbers_pages": 123,
  "show_signatures_page_at_end": true,
  "show_manifest_at_end": true,
  "show_process_history_in_document": true,
  "force_all_signatures_to_end_page": true,
  "active": true,
  "signers": [
    {
      "queue_order": 123,
      "current_page": 123,
      "initialLeft": 123,
      "initialTop": 123,
      "position_left": 123,
      "position_top": 123
    }
  ]
}
'
import requests

url = "https://api.valid.com/api/signature-process-templates"

payload = {
    "name": "<string>",
    "numbers_signers": 123,
    "numbers_pages": 123,
    "show_signatures_page_at_end": True,
    "show_manifest_at_end": True,
    "show_process_history_in_document": True,
    "force_all_signatures_to_end_page": True,
    "active": True,
    "signers": [
        {
            "queue_order": 123,
            "current_page": 123,
            "initialLeft": 123,
            "initialTop": 123,
            "position_left": 123,
            "position_top": 123
        }
    ]
}
headers = {
    "x-api-key": "<api-key>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
  method: 'POST',
  headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    name: '<string>',
    numbers_signers: 123,
    numbers_pages: 123,
    show_signatures_page_at_end: true,
    show_manifest_at_end: true,
    show_process_history_in_document: true,
    force_all_signatures_to_end_page: true,
    active: true,
    signers: [
      {
        queue_order: 123,
        current_page: 123,
        initialLeft: 123,
        initialTop: 123,
        position_left: 123,
        position_top: 123
      }
    ]
  })
};

fetch('https://api.valid.com/api/signature-process-templates', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.valid.com/api/signature-process-templates",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'name' => '<string>',
    'numbers_signers' => 123,
    'numbers_pages' => 123,
    'show_signatures_page_at_end' => true,
    'show_manifest_at_end' => true,
    'show_process_history_in_document' => true,
    'force_all_signatures_to_end_page' => true,
    'active' => true,
    'signers' => [
        [
                'queue_order' => 123,
                'current_page' => 123,
                'initialLeft' => 123,
                'initialTop' => 123,
                'position_left' => 123,
                'position_top' => 123
        ]
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "Content-Type: application/json",
    "x-api-key: <api-key>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.valid.com/api/signature-process-templates"

	payload := strings.NewReader("{\n  \"name\": \"<string>\",\n  \"numbers_signers\": 123,\n  \"numbers_pages\": 123,\n  \"show_signatures_page_at_end\": true,\n  \"show_manifest_at_end\": true,\n  \"show_process_history_in_document\": true,\n  \"force_all_signatures_to_end_page\": true,\n  \"active\": true,\n  \"signers\": [\n    {\n      \"queue_order\": 123,\n      \"current_page\": 123,\n      \"initialLeft\": 123,\n      \"initialTop\": 123,\n      \"position_left\": 123,\n      \"position_top\": 123\n    }\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("x-api-key", "<api-key>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.valid.com/api/signature-process-templates")
  .header("x-api-key", "<api-key>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"<string>\",\n  \"numbers_signers\": 123,\n  \"numbers_pages\": 123,\n  \"show_signatures_page_at_end\": true,\n  \"show_manifest_at_end\": true,\n  \"show_process_history_in_document\": true,\n  \"force_all_signatures_to_end_page\": true,\n  \"active\": true,\n  \"signers\": [\n    {\n      \"queue_order\": 123,\n      \"current_page\": 123,\n      \"initialLeft\": 123,\n      \"initialTop\": 123,\n      \"position_left\": 123,\n      \"position_top\": 123\n    }\n  ]\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.valid.com/api/signature-process-templates")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"<string>\",\n  \"numbers_signers\": 123,\n  \"numbers_pages\": 123,\n  \"show_signatures_page_at_end\": true,\n  \"show_manifest_at_end\": true,\n  \"show_process_history_in_document\": true,\n  \"force_all_signatures_to_end_page\": true,\n  \"active\": true,\n  \"signers\": [\n    {\n      \"queue_order\": 123,\n      \"current_page\": 123,\n      \"initialLeft\": 123,\n      \"initialTop\": 123,\n      \"position_left\": 123,\n      \"position_top\": 123\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body

Request Body

name
string
required
Nome do template. Exemplo: Template Contrato Padrão
numbers_signers
integer
Número de signatários. Exemplo: 2
numbers_pages
integer
Número de páginas. Exemplo: 5
show_signatures_page_at_end
boolean
Mostrar página de assinaturas no final. Exemplo: true
show_manifest_at_end
boolean
Mostrar manifesto no final. Exemplo: true
show_process_history_in_document
boolean
Mostrar histórico do processo no documento. Exemplo: true
force_all_signatures_to_end_page
boolean
Forçar todas as assinaturas para a página final. Exemplo: false
active
boolean
Status do template. Exemplo: true
signers
array
Lista de posições dos signatários no template.