POST
/
api
/
external
/
v2
/
ledger_attachments
Upload a file
curl --request POST \
  --url https://app.pennylane.com/api/external/v2/ledger_attachments \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'filename=Name of the file. If not provided, the default value will be the uploaded file name.' \
  --form file=@example-file
{
  "url": "<string>",
  "id": 123,
  "filename": "<string>"
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

multipart/form-data
file
file
required

The file you want to upload. Allowed content types:

  • image/png
  • image/jpeg
  • image/tiff
  • image/bmp
  • image/gif
  • application/pdf
filename
string
Example:

"Name of the file. If not provided, the default value will be the uploaded file name."

Response

Returns the created attachment

url
string
required
id
integer
required
filename
string
required