Skip to main content
POST
/
v1
/
graphs
/
{graph_id}
/
file
cURL
curl --location --request POST https://api.writer.com/v1/graphs/{graph_id}/file \
 --header "Authorization: Bearer <token>" \
 --header "Content-Type: application/json" \
--data-raw '{"file_id":"string"}'
{
  "id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "name": "<string>",
  "graph_ids": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "status": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your Writer API key.

Path Parameters

graph_id
string<uuid>
required

The unique identifier of the Knowledge Graph.

Body

application/json
file_id
string
required

The unique identifier of the file.

Response

200 - application/json
id
string
required

A unique identifier of the file.

created_at
string<date-time>
required

The timestamp when the file was uploaded.

name
string
required

The name of the file.

graph_ids
string<uuid>[]
required

A list of Knowledge Graph IDs that the file is associated with.

If you provided 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 will be visible in the graph_ids list when you retrieve the file using the file retrieval endpoint.

status
string
required

The processing status of the file.