curl --request PUT \
--url https://my.flowsign.app/api/v1/packages/{packageId}/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>",
"recipientId": "<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>',
recipientId: '<string>'
}
}
]
})
};
fetch('https://my.flowsign.app/api/v1/packages/{packageId}/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/packages/{packageId}/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>",
"recipientId": "<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/packages/{packageId}/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 \"recipientId\": \"<string>\"\n }\n }\n ]\n}", false);
var response = await client.PutAsync(request);
Console.WriteLine("{0}", response.Content);
{
"data": {
"packageId": "<string>"
}
}{
"error": "<string>",
"details": {}
}{
"error": "<string>",
"details": {}
}{
"error": "<string>",
"details": {}
}{
"error": "<string>",
"details": {}
}{
"error": "<string>",
"details": {}
}Save a package document's fields
Applies ops to the fields of one document on a DRAFT package, in order and all or nothing; any other status is a 400. add and update write the field with the given id, creating it when it does not exist; remove deletes it. recipientId assigns the field to one of the package’s recipients (the ids POST /api/v1/packages returns); a recipient of another package 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 canSendPackages.
curl --request PUT \
--url https://my.flowsign.app/api/v1/packages/{packageId}/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>",
"recipientId": "<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>',
recipientId: '<string>'
}
}
]
})
};
fetch('https://my.flowsign.app/api/v1/packages/{packageId}/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/packages/{packageId}/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>",
"recipientId": "<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/packages/{packageId}/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 \"recipientId\": \"<string>\"\n }\n }\n ]\n}", false);
var response = await client.PutAsync(request);
Console.WriteLine("{0}", response.Content);
{
"data": {
"packageId": "<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?

