---
updatedAt: 2026-07-13T10:41:05.000Z
agentTools:
  projectIndex: https://developer.dottedsign.com/llms.txt
---

# Sign a Task and Upload Attachments

This section will explain how to upload attachments during signing a task. The following steps assume that the task owner also requests OTP verification. If no verification is required, please remove `verify_info` from the request body.

# 1. Request Sign a Task API

When requesting the [Sign a Task](https://dottedsign-api.readme.io/reference/signsigntask) API, include the `attachment_infos` fields and set the `uploaded` parameter to `false` to indicate that the attachment has not yet been uploaded.

Additionally, make sure to include the `verify_info` as described in the [Verify Identity with OTP](https://developer.dottedsign.com/docs/05-quick-start-scenarios-05-read-a-task-with-otp-verification) section, if identity verification is required.

The request body should be structured as follows:

```json
{
  "sign_infos": [
    {
      "field_object_id": "DottedSignAPI_gwf793298fgh8",
      "field_type": "textfield",
      "field_value": "My Name"
    },
    {
      "field_object_id": "DottedSignAPI_902j3d0hf92fd2",
      "field_type": "signature",
      "field_value": "555",
      "field_value_type": "signature"
      }
  ],
  "attachment_infos": [
    {
      "attachment_id": "attachment_1688_1",
      "attachment_type": "png",
      "uploaded": "false"
    },
    {
      "attachment_id": "attachment_1688_2",
      "attachment_type": "pdf",
      "uploaded": "false"
    }
  ],
  "verify_info": {
    "uuid": "138bdac7-1e81-4662-be08-de68a8346a95",
    "verify_data": "123123"
  }
}
```

# 2. Retrieve the Attachment Upload Links from `attachment_not_ready` Error

```json
{
  "error_code": 400051,
  "error_message": "attachment not ready: attachment_not_ready",
  "error_key": "attachment_not_ready",
  "attachment_upload_link": {
    "attachment_49417_1": {
      "mission_id": 228629,
      "upload_link": "https://dotted-sign.s3-accelerate.amazonaws.com/xxxxxx"
    },
    "attachment_49417_2": {
      "mission_id": 228630,
      "upload_link": "https://dotted-sign.s3-accelerate.amazonaws.com/xxxxxx"
    }
  },
  "identity_verify_token": "eyJhbGciOiJIUzUxMiJ9.eyJzdGFnZV90eXBlIjoiU2lnblN0YWdlIiwic3RhZ2VfaWQiOjQ5NDE3LCJ2ZXJpZnlfZm9yIjoiaWRlbnRpdHlfdmVyaWZ5IiwiY2xpZW50Ijoid2ViIiwiaXBfYWRkcmVzcyI6IjI0MDI6NzUwMDphNWY6ZDUzOmU5MmE6Njg4NTo2OGIxOjM2YzYiLCJ3b3JrX2lkIjoiZTNiNjQ2YjBhYTU1ZTJmOWJkMjc0ZDFlZDU2ZjQxY2Y2OTY5ZjU4Y2Y1OWE5NGIyYjc5ZjM1NDE2YmFlODg2MyIsInZlcmlmeV9hdCI6MTcxOTc2NTc2NSwidmVyaWZ5X3NvdXJjZSI6eyJFbWFpbCI6InJ5YW4ubGluK2d1ZXN0QGtkYW5tb2JpbGUuY29tIn0sInZlcmlmeV9vY2Nhc3Npb24iOiJzaWduIiwiZXhwaXJlZF9hdCI6MTcxOTc5NDU2NX0.ClQ2DWUIc2dmVVnnHUZKNhWkiJNoG9J3bLx2SxcgKcBcqmXAOq7cjjNFGMnq1u-xmnPwUeJU9HWasWxdavTxbQ"
}
```

# 3. Upload Attachments

Use the upload links (PUT method) and include the file (binary) in the request body to upload the respective attachment files.

For example:

```bash
curl -X PUT -H "Content-Type: application/pdf" --upload-file file.pdf https://dotted-sign.s3-accelerate.amazonaws.com/xxxxxxxxxx
```

> 🚧 Notice
>
> The `Content-Type` header is required when uploading attachments. DottedSign will reject and delete files with unsupported or incorrect content types.

# 4. Complete Signing a Task

Use the same request body as in the second step, but set the `uploaded` parameter to `true`. Then, request the [Sign a Task](https://dottedsign-api.readme.io/reference/signsigntask) API again to complete the signing process for this stage.

**Note**: Signing tasks that involve uploading attachments will be completed asynchronously.