Aller au contenu

PUT /v1/signature/envelopes/{id}/fields

PUT
/v1/signature/envelopes/{id}/fields
curl --request PUT \
--url https://api.asap.cool/v1/signature/envelopes/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/fields \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "fields": [ { "anchor_kind": "example", "field_type": "example", "height": 1, "page": 1, "pos_x": 1, "pos_y": 1, "required": true, "signer_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "value": "example", "width": 1 } ] }'
id
required
string format: uuid

Envelope identifier.

Media type application/json

Body of PUT …/fields: the full field set to persist.

object
fields
required

The fields to place (replaces any existing set).

Array<object>

One positioned field in a PUT …/fields request.

The fractional geometry is persisted at 4-decimal precision (NUMERIC(6,4), i.e. ~10⁻⁴ of the page), so a coordinate with more decimals is rounded on store and the GET/response reflects the rounded value. 4 decimals is well below one pixel at any realistic page size.

object
anchor_kind

Auto-placement source, if any.

string | null
field_type
required

Field kind (signature/date/initials/text/checkbox/ signer_name/signer_email/mention/radio).

string
height
required

Height as a fraction of page height (0, 1].

number format: double
page
required

1-based page index.

integer format: int32
pos_x
required

Left edge as a fraction of page width [0, 1].

number format: double
pos_y
required

Top edge as a fraction of page height [0, 1].

number format: double
required

Whether the field is required (defaults to true).

boolean
signer_id
required

The signer this field is assigned to (must belong to the envelope).

string format: uuid
value

Optional default/typed value.

width
required

Width as a fraction of page width (0, 1].

number format: double
Example generated
{
"fields": [
{
"anchor_kind": "example",
"field_type": "example",
"height": 1,
"page": 1,
"pos_x": 1,
"pos_y": 1,
"required": true,
"signer_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"value": "example",
"width": 1
}
]
}

Fields replaced.

Media type application/json
Array<object>

Public projection of a [Field].

object
anchor_kind

Auto-placement source, if any.

string | null
field_type
required

Field kind.

string
height
required

Height fraction (0, 1].

number format: double
id
required

Stable identifier.

string format: uuid
page
required

1-based page index.

integer format: int32
pos_x
required

Left edge fraction [0, 1].

number format: double
pos_y
required

Top edge fraction [0, 1].

number format: double
required
required

Whether the field is required.

boolean
signer_id
required

The signer this field is assigned to.

string format: uuid
value

Optional default/typed value.

width
required

Width fraction (0, 1].

number format: double
Example generated
[
{
"anchor_kind": "example",
"field_type": "example",
"height": 1,
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"page": 1,
"pos_x": 1,
"pos_y": 1,
"required": true,
"signer_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"value": "example",
"width": 1
}
]

No active org.

Media type application/json

Generic error body returned by API handlers when they fail. code is a stable machine-readable token; message is human-friendly and meant for surfacing to end users.

object
code
required

Stable machine token (e.g. invalid_credentials).

string
field

Offending request field for validation errors, when known.

string | null
message
required

Human-readable message.

string
Example generated
{
"code": "example",
"field": "example",
"message": "example"
}

Missing signature:write scope.

Media type application/json

Generic error body returned by API handlers when they fail. code is a stable machine-readable token; message is human-friendly and meant for surfacing to end users.

object
code
required

Stable machine token (e.g. invalid_credentials).

string
field

Offending request field for validation errors, when known.

string | null
message
required

Human-readable message.

string
Example generated
{
"code": "example",
"field": "example",
"message": "example"
}

Not found or cross-org.

Media type application/json

Generic error body returned by API handlers when they fail. code is a stable machine-readable token; message is human-friendly and meant for surfacing to end users.

object
code
required

Stable machine token (e.g. invalid_credentials).

string
field

Offending request field for validation errors, when known.

string | null
message
required

Human-readable message.

string
Example generated
{
"code": "example",
"field": "example",
"message": "example"
}

Envelope is not a draft (signature_conflict).

Media type application/json

Generic error body returned by API handlers when they fail. code is a stable machine-readable token; message is human-friendly and meant for surfacing to end users.

object
code
required

Stable machine token (e.g. invalid_credentials).

string
field

Offending request field for validation errors, when known.

string | null
message
required

Human-readable message.

string
Example generated
{
"code": "example",
"field": "example",
"message": "example"
}

Invalid field geometry or signer.

Media type application/json

Generic error body returned by API handlers when they fail. code is a stable machine-readable token; message is human-friendly and meant for surfacing to end users.

object
code
required

Stable machine token (e.g. invalid_credentials).

string
field

Offending request field for validation errors, when known.

string | null
message
required

Human-readable message.

string
Example generated
{
"code": "example",
"field": "example",
"message": "example"
}