New KPMG Agentic ERP, now available with KPMG in 140+ countries Read the announcement

Generate attachment upload URL

POST
https://api.light.inc/v1/attachments/upload-url

Generates a secure upload URL for attachment files

Authorization

Send one of these on every request. See Authentication for how to get credentials.

  • API key

    Basic authentication header of the form Basic <api_key>, where <api_key> is your api key.

  • Bearer token

Request body

application/json;charset=UTF-8

  • resourceId string · uuid

  • fileName string

  • contentType string

Response

  • uploadUrl string · url

  • key string

    Note

    Pass this as documentKey to POST /v1/attachments once the upload is done.

  • metadata object

    Note

    Send every entry as a request header on the PUT to uploadUrl, exactly as returned. They are signed into the URL; the upload is rejected without them.