---
title: "Creating a document by passing attribute values"
slug: "creating-a-document-by-passing-attribute-values"
abstract: "Use the Ingestion API for Sitecore Search to create an index document."
---
# Creating a document by passing attribute values

You can use the Ingestion API to create an index document by passing attribute values. This is useful when you want to quickly add content by passing attribute values, and you don't want to wait for the next scheduled recrawl.

> [!note]
> Alternatively, instead of passing attribute values, you can use the Ingestion API to create an index document from a URL or a file by passing attribute extraction logic. You can [use an existing document extractor](https://doc.sitecore.com/search/en/developers/search-developer-guide/using-the-ingestion-api-to-add-content-to-an-index/create-an-index-document/creating-an-index-document-by-using-an-existing-document-extractor.html "Creating an index document by using an existing document extractor") or [create a new document extractor](https://doc.sitecore.com/search/en/developers/search-developer-guide/using-the-ingestion-api-to-add-content-to-an-index/create-an-index-document/creating-an-index-document-by-passing-a-new-document-extractor.html "Creating an index document by passing a new document extractor").

To use the Ingestion API to create a document by passing attribute values, make a `POST` call to `{base-URL}/ingestion/v1/domains/{domain ID}/sources/{sourceID}/entities/{entityID}/documents?locale={locale}`

For the data model of this method and a description of objects and keys, see the [Ingestion API reference](https://doc.sitecore.com/search/en/developers/ingestion-api/index.html). You can [view your base URL](https://doc.sitecore.com/search/en/developers/search-developer-guide/the-sitecore-search-interface/the-api-access-tab.html "The API Access tab") in the **Developer Resources** section of Search.

> [!note]
> When you create an index document, you must pass all the attributes marked as required by the data model. You must also pass all attributes marked as *required* in **Administration** > **Domain Settings** > **Attributes** section of Sitecore Search.

For example, you want to create an index document with the *title*, *description*, *type*, and *url* fields.

Here's a sample POST CURL call:

```Shell
curl --location 'https://<base-url>/ingestion/v1/domains/<domainID>/sources/<sourceID>/entities/<entity>/documents?locale=<locale>' \
--header 'Content-Type: application/json' \
--header 'Authorization: <api-key>' \
--data '{
    "document": {
        "id": "test_id_123",
        "fields": {
            "title": "Test blog",
            "description": "This is an awesome blog",
            "type": "blog",
            "url": "www.someURL.com"
        }
    }
}'
```

If your request is successful, you get a `200` response with this body:

```csharp
{
    "enqueued": true
}
```

In the response, `enqueued` means that Search has added this document to its indexing queue. After an ingestion job is enqueued, it can take a few minutes for document updates to be reflected in the **Content Collection** section of Search. See [Ingestion timing](https://doc.sitecore.com/search/en/users/search-user-guide/en/keep-indexes-up-to-date.html#UUID-3cc54e65-d998-5944-3949-b361448447a8_section-id235405681779258) for more details.