---
title: "Create Attachment: Create Upload URL"
method: POST
path: "/analyze/v1/agreements/{id}/attachments"
tags: ["Analyze Attachments"]
---

# Create Attachment: Create Upload URL

`POST /analyze/v1/agreements/{id}/attachments`

Returns an AWS S3 URL upon success for subsequent file uploads. On a successful response, execute a PUT request to the AWS S3 URL with the file.

Knowledge Base Example: https://help.linksquares.com/hc/en-us/articles/10849398433559-Analyze-API-Sample-Use-Cases#01H7AP6S3SDSWKYEZPT4JCS1KZ

AWS Documentation: https://docs.aws.amazon.com/AmazonS3/latest/userguide/PresignedUrlUploadObject.html

## Path parameters

- `id` string, required

## Request body

- object
  - `file_name` string, required

## Response `200`

successful

- object
  - `attachment_upload_url` string, required

## Other responses

- `404` — agreement not found
- `422` — could not create agreement attachment
- `500` — could not create s3 url

---

[API](https://skmtc.net/linksquares/apis/linksquares-api.md) · [All operations](https://skmtc.net/linksquares/apis/linksquares-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/linksquares/linksquares-api/revisions/4d597e83cd78/schema)
