Saltar al contenido

Attach a document to an envelope

POST
/api/v1/envelopes/{id}/documents
curl --request POST \
--url https://sign-api.binarybridges.co/api/v1/envelopes/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "file": "binary" }'

Multipart. Only valid while the envelope is a draft — documents cannot change after it is sent, or the signature would not cover what the signer saw.

id
required
string format: uuid
Media typeapplication/json
object
file
required
string format: binary

Example generated

{
"file": "binary"
}

Created

Media type*/*
object
contentType
required
string
filename
required
string
id
required
string format: uuid

The request was malformed or failed validation.

Media typeapplication/json
object
code
required
string
error
required
string
message
required
string
path
required
string
quota
object
current
required
integer format: int64
dimension
required
string
limit
required
integer format: int64
status
required
integer format: int32
timestamp
required
string format: date-time
traceId
string

Example generated

{
"code": "example",
"error": "example",
"message": "example",
"path": "example",
"quota": {
"current": 1,
"dimension": "example",
"limit": 1
},
"status": 1,
"timestamp": "2026-04-15T12:00:00Z",
"traceId": "example"
}

No credentials, or a token this organisation’s credentials cannot present. Produced by the security filter chain, so there is no response body.

Authenticated, but the token lacks the role this operation requires. No response body.

No such resource, or it belongs to another organisation. Deliberately not a 403: a 403 across a tenant boundary confirms the id exists.

Media typeapplication/json
object
code
required
string
error
required
string
message
required
string
path
required
string
quota
object
current
required
integer format: int64
dimension
required
string
limit
required
integer format: int64
status
required
integer format: int32
timestamp
required
string format: date-time
traceId
string

Example generated

{
"code": "example",
"error": "example",
"message": "example",
"path": "example",
"quota": {
"current": 1,
"dimension": "example",
"limit": 1
},
"status": 1,
"timestamp": "2026-04-15T12:00:00Z",
"traceId": "example"
}

The resource is not in a state that allows this — for example sending an envelope that is already sent.

Media typeapplication/json
object
code
required
string
error
required
string
message
required
string
path
required
string
quota
object
current
required
integer format: int64
dimension
required
string
limit
required
integer format: int64
status
required
integer format: int32
timestamp
required
string format: date-time
traceId
string

Example generated

{
"code": "example",
"error": "example",
"message": "example",
"path": "example",
"quota": {
"current": 1,
"dimension": "example",
"limit": 1
},
"status": 1,
"timestamp": "2026-04-15T12:00:00Z",
"traceId": "example"
}

A domain rule rejected the request.

Media typeapplication/json
object
code
required
string
error
required
string
message
required
string
path
required
string
quota
object
current
required
integer format: int64
dimension
required
string
limit
required
integer format: int64
status
required
integer format: int32
timestamp
required
string format: date-time
traceId
string

Example generated

{
"code": "example",
"error": "example",
"message": "example",
"path": "example",
"quota": {
"current": 1,
"dimension": "example",
"limit": 1
},
"status": 1,
"timestamp": "2026-04-15T12:00:00Z",
"traceId": "example"
}

An organisation quota is exhausted.

Media typeapplication/json
object
code
required
string
error
required
string
message
required
string
path
required
string
quota
object
current
required
integer format: int64
dimension
required
string
limit
required
integer format: int64
status
required
integer format: int32
timestamp
required
string format: date-time
traceId
string

Example generated

{
"code": "example",
"error": "example",
"message": "example",
"path": "example",
"quota": {
"current": 1,
"dimension": "example",
"limit": 1
},
"status": 1,
"timestamp": "2026-04-15T12:00:00Z",
"traceId": "example"
}