POST
/
v1
/
data-entities

Two-step process

This endpoint is a two-step process. First, you create the data entity’s URL, and then you upload the file to the signed URL.

  • Step 1: POST https://api.getmetal.io/v1/data-entities
  • Step 2: PUT to the signed URL

Step 1: Request URL for the File

Auth Headers

x-metal-api-key
string
required

An API key for your org.

x-metal-client-id
string
required

A Client ID for your org.

Body

datasource
ObjectID
required

The datasource ID.

name
string
required

The name of the data entity.

metadata
object

An object of metdatadata keys/values. The key is the field key and the value is the field value for this entity.

sourceType
string
required

The type of the source (e.g., β€œPDF”, β€œText”).

Response

data
Data Entity Object

Step 2: Upload the File to the Signed URL

# Example Request
curl --location --request PUT '<preSignedUrl>' \
--header 'Content-Type: application/pdf' \
--upload-file '/path/to/your/example.pdf'