New Light partners with Amesto GlobalLight partners with Amesto Global Read the announcement

Create attachment

POST
https://api.light.inc/v1/attachments

Creates a new attachment record

Permissions checked: vendors/portal-forms:update (COMPANY_ADMIN, VENDOR_MANAGEMENT) and whatever editing the record it belongs to needs, such as a bill. What a call needs depends on the caller, the record and the request.

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

  • documentKey string

  • fileName string

  • contentType string

  • metadata object

    • type string

      ⚠️ This enum is not exhaustive; new values may be added in the future.

      One of AP AR VENDOR_PORTAL

    • shouldAttachToEmail boolean

Response

  • id string · uuid

  • companyId string · uuid

  • resourceId string · uuid

  • documentKey string

  • fileName string

  • contentType string

  • createdBy string · uuid

  • metadata object

    • type string

      ⚠️ This enum is not exhaustive; new values may be added in the future.

      One of AP AR VENDOR_PORTAL

  • createdAt string · date-time

  • updatedAt string · date-time

  • status string

    ARCHIVED once the attachment was archived. Who archived it and when is on the record's activity log.

    ⚠️ This enum is not exhaustive; new values may be added in the future.

    One of ACTIVE ARCHIVED