Skip to content

Add new file to signing session

Request

Add a new file to an existing signing session. If index is provided, the file is inserted at that zero-based position in the files array. If index is omitted, the file is appended to the end of the files array. If the signing session is in state started, no new files can be added and the endpoint returns 409 Conflict.

The file can be provided either by URL or uploaded directly:

  • JSON request (application/json): provide the file as a URL reference.
  • Multipart request (multipart/form-data): upload the file content directly as a binary part.
Security
APIKey
Path
session_idstring, (uuid)required

The UUID of the signing session.

Example:0196ae5b-2e9d-729f-aba5-fa4db6f881fd
Headers
Acceptstringrequired

Specify the response format.

Value:"application/json"
Bodyrequired
namestringrequired
Example:"Appendix A - Terms.pdf"
urlstring, (uri)required
Example:"https://example.com/files/appendix-a-terms.pdf"
indexinteger, >= 0

Optional zero-based index where the file is inserted in the session files array. If omitted, the file is appended to the end.

Example:1
curl -i -X POST \
  https://api.embed.docue.com/sign/sessions/0196ae5b-2e9d-729f-aba5-fa4db6f881fd/files \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer <YOUR_API Key_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Appendix A - Terms.pdf",
    "url": "https://example.com/files/appendix-a-terms.pdf",
    "index": 1
  }'

Responses

Successfully created the file.

Bodyapplication/json
dataArray of objects(SigningSessionFile)required

Response body. Null when there is nothing to return.

metaobjectrequired
Response
{ "data": [ { … }, { … } ], "meta": { "status": { … } } }