---
title: "Upload context-scoped dataset file"
method: POST
path: "/agents/{agentId}/datasets/context/{contextKey}/{contextValue}"
tags: ["Datasets"]
---

# Upload context-scoped dataset file

`POST /agents/{agentId}/datasets/context/{contextKey}/{contextValue}`

Upload a dataset file scoped to a context value.
This file will be shared with all users who have this context value.
Requires User Context to be enabled and contextKey to be defined in the schema.

## Path parameters

- `agentId` string, required
- `contextKey` string, required
- `contextValue` string, required

## Response `201`

File uploaded successfully

- DatasetUploadResponse
  - `file` DatasetFile, required
    - `name` string, required
    - `path` string, required
    - `size` integer, required
  - `error` string

---

[API](https://skmtc.net/inconvoai/apis/inconvo-conversations-api.md) · [All operations](https://skmtc.net/inconvoai/apis/inconvo-conversations-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/inconvoai/inconvo-conversations-api/revisions/2524aa5bde1f/schema)
