**Source URL:** https://limited.veevavault.dev/vault-api/getting-started/upload-document

# Upload a Document

Now that you have an access token, you can upload a document to your Vault using the **Documents API**. In this example, you will create an unclassified document.

Assign the access token value you obtained to the `Authorization` header parameter preceded by the `Bearer` keyword. Specify the source file in the `file` body parameter. Since you will upload the document as unclassified, assign the values `Unclassified` and `Inbox` to the body parameters `type__v` and `lifecycle__v` respectively.

Prior to 21R1.3 (API v21.2), the `Unclassified` document type and `Inbox` lifecycle were known as the `Undefined` document type and `Unclassified` lifecycle. We recommend updating existing configurations with these new labels in Vaults created before 21R1.3.

#### Request

```bash
curl -X POST -H "Authorization: Bearer veeva-vault-019e9338..." \
-H "Content-Type: multipart/form-data" \
-F file=@document.txt \
-F "name__v=myDocument" \
-F "type__v=Unclassified" \
-F "lifecycle__v=Inbox" \
https://{server}/api/{version}/objects/documents
```

If your request contains all the required metadata and your access token is valid, the response includes a unique document ID. The file `document.txt` must reside in the directory from which the curl command is being executed.

#### Response

```json
{
    "responseStatus": "SUCCESS",
    "responseMessage": "successfully created document",
    "id": 776
}
```

On some application Vaults you may have to set other parameters aside from `type__v` and `lifecycle__v` to successfully upload an unclassified document. If this is the case the API call will throw an exception and prompt you for the required fields.

### Next Steps

Congratulations! You’ve successfully created your first document using Vault API. Once you’re ready, you can move on to the next tutorial where you’ll learn about [document and object field metadata](/vault-api/guides/understanding-metadata/).

---

**Previous:** [Generate an API Access Token](/vault-api/getting-started/authenticating)  
**Next:** [Guides](/vault-api/guides)