curl --request PUT \
--url https://my.flowsign.app/api/v1/templates/{templateId}/fields \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"documentId": "<string>",
"ops": [
{
"type": "add",
"field": {
"id": "<string>",
"pageNumber": 1,
"position": {
"x": 123,
"y": 123
},
"size": {
"width": 123,
"height": 123
},
"isRequired": true,
"placeholder": "<string>",
"dropdownOptions": [
"<string>"
],
"radioGroup": "<string>",
"roleId": "<string>"
}
}
]
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
documentId: '<string>',
ops: [
{
type: 'add',
field: {
id: '<string>',
pageNumber: 1,
position: {x: 123, y: 123},
size: {width: 123, height: 123},
isRequired: true,
placeholder: '<string>',
dropdownOptions: ['<string>'],
radioGroup: '<string>',
roleId: '<string>'
}
}
]
})
};
fetch('https://my.flowsign.app/api/v1/templates/{templateId}/fields', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.flowsign.app/api/v1/templates/{templateId}/fields"
payload = {
"documentId": "<string>",
"ops": [
{
"type": "add",
"field": {
"id": "<string>",
"pageNumber": 1,
"position": {
"x": 123,
"y": 123
},
"size": {
"width": 123,
"height": 123
},
"isRequired": True,
"placeholder": "<string>",
"dropdownOptions": ["<string>"],
"radioGroup": "<string>",
"roleId": "<string>"
}
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://my.flowsign.app/api/v1/templates/{templateId}/fields");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"documentId\": \"<string>\",\n \"ops\": [\n {\n \"type\": \"add\",\n \"field\": {\n \"id\": \"<string>\",\n \"pageNumber\": 1,\n \"position\": {\n \"x\": 123,\n \"y\": 123\n },\n \"size\": {\n \"width\": 123,\n \"height\": 123\n },\n \"isRequired\": true,\n \"placeholder\": \"<string>\",\n \"dropdownOptions\": [\n \"<string>\"\n ],\n \"radioGroup\": \"<string>\",\n \"roleId\": \"<string>\"\n }\n }\n ]\n}", false);
var response = await client.PutAsync(request);
Console.WriteLine("{0}", response.Content);
{
"data": {
"templateId": "<string>"
}
}{
"error": "<string>",
"details": {}
}{
"error": "<string>",
"details": {}
}{
"error": "<string>",
"details": {}
}{
"error": "<string>",
"details": {}
}{
"error": "<string>",
"details": {}
}Save a template document's fields
Applies ops to the fields of one template document, in order and all or nothing. add and update write the field with the given id, creating it when it does not exist; remove deletes it. roleId assigns the field to one of the template’s roles (from GET /api/v1/templates/:templateId); an unknown role is a 400, and an id that belongs to another document is a 404. position is the field’s top left and size its extent, both as 0 to 1 fractions of the page’s width and height. Requires CREATE template access.
curl --request PUT \
--url https://my.flowsign.app/api/v1/templates/{templateId}/fields \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"documentId": "<string>",
"ops": [
{
"type": "add",
"field": {
"id": "<string>",
"pageNumber": 1,
"position": {
"x": 123,
"y": 123
},
"size": {
"width": 123,
"height": 123
},
"isRequired": true,
"placeholder": "<string>",
"dropdownOptions": [
"<string>"
],
"radioGroup": "<string>",
"roleId": "<string>"
}
}
]
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
documentId: '<string>',
ops: [
{
type: 'add',
field: {
id: '<string>',
pageNumber: 1,
position: {x: 123, y: 123},
size: {width: 123, height: 123},
isRequired: true,
placeholder: '<string>',
dropdownOptions: ['<string>'],
radioGroup: '<string>',
roleId: '<string>'
}
}
]
})
};
fetch('https://my.flowsign.app/api/v1/templates/{templateId}/fields', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.flowsign.app/api/v1/templates/{templateId}/fields"
payload = {
"documentId": "<string>",
"ops": [
{
"type": "add",
"field": {
"id": "<string>",
"pageNumber": 1,
"position": {
"x": 123,
"y": 123
},
"size": {
"width": 123,
"height": 123
},
"isRequired": True,
"placeholder": "<string>",
"dropdownOptions": ["<string>"],
"radioGroup": "<string>",
"roleId": "<string>"
}
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://my.flowsign.app/api/v1/templates/{templateId}/fields");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"documentId\": \"<string>\",\n \"ops\": [\n {\n \"type\": \"add\",\n \"field\": {\n \"id\": \"<string>\",\n \"pageNumber\": 1,\n \"position\": {\n \"x\": 123,\n \"y\": 123\n },\n \"size\": {\n \"width\": 123,\n \"height\": 123\n },\n \"isRequired\": true,\n \"placeholder\": \"<string>\",\n \"dropdownOptions\": [\n \"<string>\"\n ],\n \"radioGroup\": \"<string>\",\n \"roleId\": \"<string>\"\n }\n }\n ]\n}", false);
var response = await client.PutAsync(request);
Console.WriteLine("{0}", response.Content);
{
"data": {
"templateId": "<string>"
}
}{
"error": "<string>",
"details": {}
}{
"error": "<string>",
"details": {}
}{
"error": "<string>",
"details": {}
}{
"error": "<string>",
"details": {}
}{
"error": "<string>",
"details": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
The workspace to act in, from GET /api/v1/workspaces. Omit to act in the organisation's default workspace. A workspace the key's user cannot act in is treated as omitted.
Path Parameters
Body
Response
Success
Show child attributes
Show child attributes
Was this page helpful?

