Skip to main content
POST
/
v1
/
entities
/
{entityTypeName}
/
{entityId}
/
uploads
/
{propertyName}
Create as Entity Property
curl --request POST \
  --url https://api.us.lexful.app/v1/entities/{entityTypeName}/{entityId}/uploads/{propertyName} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-Account-ID: <api-key>' \
  --data '
{
  "name": "<string>",
  "original_name": "<string>",
  "file_extension": "<string>",
  "mime_type": "<string>",
  "size": 1,
  "property_name": "<string>",
  "is_public": false,
  "data": {}
}
'
{
  "file": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "original_name": "<string>",
    "file_extension": "<string>",
    "mime_type": "<string>",
    "size": 123,
    "is_public": true,
    "s3_key": "<string>",
    "upload_status": "pending",
    "entity_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "property_name": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "created_by": "<string>",
    "updated_by": "<string>",
    "data": {}
  },
  "presignedUploadUrl": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer token

X-Account-ID
string
header
required

Account ID

Path Parameters

entityTypeName
string
required

Entity type name

entityId
string<uuid>
required

Entity ID

propertyName
string
required

Property name

Body

application/json
name
string
required

File name

Minimum string length: 1
original_name
string
required

Original filename

Minimum string length: 1
file_extension
string
required

File extension

Pattern: ^\.?[a-zA-Z0-9]+$
mime_type
string
required

MIME type (e.g., image/jpeg, application/pdf)

size
number
required

File size in bytes

Required range: x >= 0
property_name
string

Property name (for property files)

is_public
boolean
default:false

Whether file is publicly accessible

data
object

Additional metadata

Response

Default Response

file
object
required
presignedUploadUrl
string<uri>
required

Presigned URL for uploading file to S3