# \DraftApi
All URIs are relative to */api*
[**get_draft_for_user**](DraftApi.md#get_draft_for_user) | **GET** /w/{workspace}/drafts/get/{kind}/{path} | fetch a single draft's content by workspace username (or the legacy workspace-level row)
[**list_drafts**](DraftApi.md#list_drafts) | **GET** /w/{workspace}/drafts/list | list every draft the current user has in this workspace, across all kinds
[**update_draft**](DraftApi.md#update_draft) | **POST** /w/{workspace}/drafts/update/{kind}/{path} | upsert (or clear) the current user's draft at a path
## get_draft_for_user
> models::GetDraftForUser200Response get_draft_for_user(workspace, kind, path, username)
fetch a single draft's content by workspace username (or the legacy workspace-level row)
### Parameters
**workspace** | **String** | | [required] |
**kind** | [**UserDraftItemKind**](.md) | | [required] |
**path** | **String** | | [required] |
**username** | Option<**String**> | Workspace username of the draft owner. Omit to fetch the legacy workspace-level (NULL email) row. | |
### Return type
[**models::GetDraftForUser200Response**](getDraftForUser_200_response.md)
### Authorization
[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## list_drafts
> Vec<models::ListDrafts200ResponseInner> list_drafts(workspace)
list every draft the current user has in this workspace, across all kinds
### Parameters
**workspace** | **String** | | [required] |
### Return type
[**Vec<models::ListDrafts200ResponseInner>**](listDrafts_200_response_inner.md)
### Authorization
[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## update_draft
> models::UpdateDraft200Response update_draft(workspace, kind, path, update_draft_request)
upsert (or clear) the current user's draft at a path
### Parameters
**workspace** | **String** | | [required] |
**kind** | [**UserDraftItemKind**](.md) | | [required] |
**path** | **String** | | [required] |
**update_draft_request** | [**UpdateDraftRequest**](UpdateDraftRequest.md) | | [required] |
### Return type
[**models::UpdateDraft200Response**](updateDraft_200_response.md)
### Authorization
[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)