You need an API key to access the Writer API. Get an API key by following the steps in the API quickstart.We recommend setting the API key as an environment variable in a
.env file with the name WRITER_API_KEY.Upload a file
Endpoint:POST /v1/files
A file persists in your account until you delete it.
graphId query parameter to associate the uploaded file with a Knowledge Graph during upload.
Query parameters
Request body
Response format
If you provide a
graphId during upload, the file is associated with that Knowledge Graph. However, the graph_ids field in the upload response is an empty list. The association is visible in the graph_ids list when you retrieve the file using the Get a file endpoint.List all files
Endpoint:GET /v1/files
Query parameters
In addition to the pagination parameters, this endpoint supports the following query parameters:Response format
The response has the following structure:Get a file
Endpoint:GET /v1/files/{fileId}
Response format
Delete a file
Endpoint:DELETE /v1/files/{fileId}