Skip to main content
POST
cURL

Authorizations

x-api-key
string
header
required

Your Leap API key. Send it in the x-api-key header: x-api-key: leap_live_....

Query Parameters

application_id
integer
required

Application ID that the attachment belongs to. The application must belong to your organization.

Body

application/json

Attachment commit request. Note: application_id comes from query parameter, not body.

attachment_type
enum<string>
required

Type of attachment

Available options:
INVOICE_EQUIPMENT,
INVOICE_INSTALL,
PERMIT,
PHOTO_NAMEPLATE,
PHOTO_INSTALL,
PHOTO_METER,
AHRI_CERT,
NEAT_REPORT,
INCOME_FORM,
W9,
OTHER,
MODEL_TECH_SPECS,
VEHICLE_PURCHASE,
UTILITY_BILL,
VEHICLE_REGISTRATION,
SIGNATURE,
TARIFF_CONFIRMATION
Example:

"INVOICE_EQUIPMENT"

path
string
required

Object path returned from the create step (uses app-{application_id}/ prefix)

Example:

"app-123/a1b2c3d4-e5f6-7890-abcd-ef1234567890-invoice.pdf"

makePublic
boolean
default:false

If true, generates a public URL (default: false)

Response

Successfully committed attachment

ok
boolean
Example:

true

requestId
string
Example:

"c3d4e5f6-a7b8-9012-cdef-123456789012"

id
integer

Database record ID of the attachment

Example:

789

file_url
string<uri>

Storage URL (storage://... or public HTTP URL if makePublic=true)

Example:

"https://<storage-host>/attachments/app-123/a1b2c3d4-e5f6-7890-abcd-ef1234567890-invoice.pdf"

bucket
string
Example:

"attachments"

path
string

Object path

Example:

"app-123/a1b2c3d4-e5f6-7890-abcd-ef1234567890-invoice.pdf"