where you replace <organizationId> and <sourceId> with their real values (see Parameters and API Calls). The rebuild parameter determines whether to rebuild the source following the extension change. The default value is false.

Your call must include the following HTTP headers:

Key

Value

Authorization

Bearer <a_valid_API_key>

Content-Type

application/json

Build the body of your request.

Example:

Enter a JSON in a format similar to the following example to apply a postconversion extension to a source of a given type.

When you want to apply a preconversion extension, replace postConversionExtensions with preConversionExtensions.

Optionally, add a condition to your extension. The condition is part of the extension configuration, not in the extension Python script itself. This way, the Coveo Cloud indexing pipeline loads and executes the extension only for items for which the condition evaluates to True, allowing to optimize crawling performances.