Import Dictionary CSV
This document explains how to import a dictionary CSV file, including the upload step and the import confirmation request.
Step 1 Upload the CSV file
POST /api/v1/upload/dictionary/{dictionaryUuid}
Authorization: Bearer {token}
Mailbox: {mailboxUuid}
Content-Type: multipart/form-datadictionaryUuid
Path
Yes
UUID of the target dictionary
Mailbox
Header
Yes
Current mailbox UUID
file
Form data
Yes
CSV file to import
curl --request POST \
--url "https://api.docstudio.com/api/v1/upload/dictionary/{dictionaryUuid}" \
--header "Authorization: Bearer {token}" \
--header "Mailbox: {mailboxUuid}" \
--form "file=@dictionary.csv"The endpoint returns 201 Created:
{
"uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}Response fields:
uuid
UUID
Upload task identifier
Use uuid as uploadUuid in the confirmation and status requests.
Status codes:
201 Created
CSV file uploaded successfully
Step 2 Confirm the import
Path parameters:
uploadUuid
UUID
Yes
Upload task identifier
Request body:
headerFirstRow
boolean
Yes
Indicates whether the first row contains column names
delimiter
string
Yes
CSV column delimiter
quote
string
Yes
CSV quote character
escape
string
Yes
CSV escape character
replace
boolean
Yes
Removes existing dictionary records before import
Set headerFirstRow to true when the first CSV row contains column names. Set replace to true to remove existing records before the import.
Step 3 Check the import status
Path parameters:
uploadUuid
UUID
Yes
Upload task identifier
Response example:
Response fields:
status
string
Current import task status
createdAt
datetime
Task creation time
errorMessage
string or null
Import error message
Check the task until status becomes COMPLETED. If it becomes FAILED, review errorMessage.
Related topics
Last updated
Was this helpful?
