Skip to main content
POST
/
custom-reference-data
/
sources
/
{sourceId}
/
files
Create a file record and get presigned upload URL
curl --request POST \
  --url https://api.artu.ai/custom-reference-data/sources/{sourceId}/files \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-Environment: <api-key>' \
  --data '
{
  "filename": "<string>",
  "contentType": "<string>",
  "size": 0,
  "sheetName": "<string>"
}
'
{
  "file": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "sourceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "filename": "<string>",
    "contentType": "<string>",
    "size": 123,
    "sheetName": "<string>",
    "rowCount": 0,
    "errorMessage": "<string>",
    "snapshotAt": "2023-11-07T05:31:56Z",
    "analysisResult": {
      "headerRow": 4503599627370495,
      "dataStartRow": 4503599627370495,
      "dataEndRow": 4503599627370495,
      "skipRows": [
        4503599627370495
      ],
      "columns": [
        {
          "originalName": "<string>",
          "key": "<string>",
          "label": "<string>",
          "description": "<string>",
          "ignored": false,
          "transform": "<string>"
        }
      ],
      "sampleRows": [
        {}
      ],
      "confidence": 0.5,
      "estimatedRowCount": 4503599627370495
    },
    "availableSheets": [
      "<string>"
    ],
    "conversationHistory": [
      {
        "content": "<string>"
      }
    ],
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  },
  "uploadUrl": "<string>"
}

Authorizations

Authorization
string
header
required

API key authentication. Obtain your API key from the dashboard.

X-Environment
string
header
required

Target environment for the request. Must be "test" or "live".

Path Parameters

sourceId
string<uuid>
required

Body

application/json
filename
string
required
Required string length: 1 - 255
contentType
string
required
Minimum string length: 1
size
integer
required
Required range: -9007199254740991 < x <= 9007199254740991
sheetName
string
Minimum string length: 1

Response

200 - application/json

OK

file
object
required
uploadUrl
string
required