--- title: Creating an indexing pipeline extension with the API slug: '146' canonical_url: https://docs.coveo.com/en/146/ collection: index-content source_format: adoc --- # Creating an indexing pipeline extension with the API The following procedure describes how to create an [indexing pipeline extension (IPE)](https://docs.coveo.com/en/206/) for a [Coveo organization](https://docs.coveo.com/en/185/) using the [Extension API](https://docs.coveo.com/en/7/). On the [Coveo Administration Console](https://docs.coveo.com/en/183/) [**API Keys**](https://platform.cloud.coveo.com/admin/#/orgid/organization/api-access/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/organization/api-access/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/organization/api-access/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/organization/api-access/)) page, [create an API key](https://docs.coveo.com/en/1718#create-an-api-key) to which you grant the [privilege](https://docs.coveo.com/en/228/) to edit extensions (that is, the **Edit** access level for the [**Extensions** domain](https://docs.coveo.com/en/1707#extensions-domain)). See [Manage privileges](https://docs.coveo.com/en/3151/) for details. Create an extension for your organization. . Use the following API call: ```http POST https://platform.cloud.coveo.com/rest/organizations//extensions HTTP/1.1 ``` where you replace `` with its corresponding value. . Your call must include the following HTTP headers: [%header,cols="2"] |=== |Key |Value |`Authorization` |`Bearer ` |`Content-Type` |`application/json` |=== . The request body configures the extension, and it must include a name and description. See [Create extension](https://docs.coveo.com/en/7#operation/createExtension) for details on the accepted body parameters. For example: ```json { "apiVersion": "v2", <1> "content": "document.add_meta_data({'userId':'YOUR_USER_ID'})", <2> "description": "This extension adds metadata...", "name": "Adding the userId metadata" <3> } ``` <1> The `apiVersion` key specifies the [version of the API](https://docs.coveo.com/en/156#indexing-pipeline-extensions-api-versions) to use. <2> The `content` key specifies the body of your extension (user script), written in Python using the [`document` object](https://docs.coveo.com/en/34/). <3> Choose a meaningful name for your extension, such as the name of the task that you want to perform. . Send your request. It returns something like this: ```json { "content": "document.add_meta_data({'userId':'YOUR_USER_ID'})", "description": "This extension adds metadata...", "enabled": true, "id": "coveosearch-rlic35pr6jhvtx84ta855bdj5j", "lastModified": 2588768294677, "name": "Adding the userId metadata", "versionId": "e3AOSVbGdwYus82z3gduTVPRqbXzidJg", "status": { "durationHealth": { "healthIndicator": "UNKNOWN" }, "dailyStatistics": { "averageDurationInSeconds": 0, "numberOfExecutions": 0, "numberOfSkips": 0, "numberOfTimeouts": 0 }, "disabledStatus": {}, "timeoutHealth": { "healthIndicator": "UNKNOWN" } } } ``` where the `id` value is your unique extension identifier (`extensionId`). On the Administration Console [**Activity Browser**](https://platform.cloud.coveo.com/admin/#/orgid/activity/browser/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/activity/browser/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/activity/browser/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/activity/browser/)) page, validate that your extension was successfully created. . In the **Sections** [facet](https://docs.coveo.com/en/198/), select **Content**. . In the **Resource Types** facet that appears, select **Extensions**. . In the **Resources** facet, select your extension ID. . In the **Result** column, validate that your operation is successful. ## What's next? [Apply your extension to a source](https://docs.coveo.com/en/1936/).