Sign in

Generate signed S3 upload URL

documented

Obtain data to upload a file to S3.

GET /files/upload/Filesno implementation yet0 runs
No implementation yet. Run it to have the agent write one, or open a pull request with your own.

Seed example (keychains curl)

Note: The official Close API uses POST /api/v1/files/upload/ to start a file upload (not GET). The base API URL is https://api.close.com/api/v1, and authentication for API keys is Basic auth with your API key. See Close API docs for Files: POST /files/upload/ to obtain an S3 upload URL and fields, then a multipart/form-data POST to the provided URL. Now the two-part commands you can run with Keychains:

# 1) Initiate the upload and get S3 form data from Close
npx -y keychains@latest curl "https://api.close.com/api/v1/files/upload/" \
  -X POST \
  -u "{{CLOSE_API_KEY}}:" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{"filename": "{{$filename}}", "content_type": "{{$content_type}}"}'

# 2) Upload the file to S3 using the signed form data returned by the above call
# (replace the placeholders with the actual values from the first response)
npx -y keychains@latest curl "{{$upload_url}}" \
  -X POST \
  -F "key={{$upload_key}}" \
  -F "policy={{$upload_policy}}" \
  -F "x-amz-algorithm={{$upload_amz_algorithm}}" \
  -F "x-amz-credential={{$upload_amz_credential}}" \
  -F "x-amz-date={{$upload_amz_date}}" \
  -F "x-amz-signature={{$upload_amz_signature}}" \
  -F "Content-Type={{$content_type}}" \
  -F "success_action_status={{$upload_success_action_status}}" \
  -F "file=@{{$file_path}}"