Read a CSV header
Read the first row of a CSV file in the project Library before importing it.
GET /projects/:projectid/databases/csv-header
Authentication
Send the project API key in the Authorization header, without a Bearer prefix. Requires library.read for the project Library. This endpoint does not require a database permission.
Request
| Query parameter | Type | Description |
|---|---|---|
docid | string, required | File ID of a CSV already uploaded to the project Library. |
Complete the Library upload before requesting the header. Supply the file ID, not a filename, storage path, or download URL.
Example
Use the environment variables from the database overview. Replace example IDs with your own.
curl --include --request GET \
--header "Authorization: ${INTELLECTIBLE_PROJECT_API_KEY}" \
--get \
--data-urlencode "docid=${INTELLECTIBLE_CSV_DOCUMENT_ID}" \
"${INTELLECTIBLE_PUBLIC_API_URL}/projects/${INTELLECTIBLE_PROJECT_ID}/databases/csv-header"
Response
200 OK
{
"columns": [
"Customer Name",
"Email",
"Signup Date"
]
}
columns preserves the CSV header order and text. It does not return inferred data types or preview rows. Use the exact header values as source entries in the import column mapping.
See Errors and safe retries for shared failure handling.