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

# Upload a Document

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

Assign the session ID to the header parameter `Authorization`. 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 {#request}

```
curl -X POST -H "Authorization: {SESSION_ID}" \
-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 session ID 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 {#response}

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

```

<aside class="notice">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.</aside>

### Next Steps {#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:** [Authenticate to Vault API](/regulatory/vault-api/getting-started/authenticating)  
**Next:** [Guides](/regulatory/vault-api/guides)