# Products API

## Create or update a product

> Creates or updates a product with the provided details

```json
{"openapi":"3.0.0","info":{"title":"Integration API","version":"1.0.0"},"servers":[{"url":"https://integration-api.userflux.co"}],"security":[{"ProductReadWriteOnlyBearerAuth":[]}],"components":{"securitySchemes":{"ProductReadWriteOnlyBearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Your Integration API Product Read + Write API Key. Note: You must use the Product Read + Write API Key, not the Product Write Only API Key."}},"schemas":{"UpsertProductRequest":{"type":"object","required":["id","typeId","properties"],"properties":{"id":{"type":"string","description":"Unique identifier for the product"},"typeId":{"type":"string","description":"Type identifier for the product"},"properties":{"type":"object","description":"JSON object containing custom product properties","additionalProperties":true},"propertiesUpdateType":{"type":"string","description":"The type of update. Valid values are either FULL_UPDATE or INCREMENTAL_UPDATE. When using full update mode, any pre-existing properties not included in the request will be removed. Defaults to INCREMENTAL_UPDATE."},"aiPropertyOverrides":{"type":"object","description":"JSON object containing path-value pairs for AI property overrides","additionalProperties":true}}}}},"paths":{"/product":{"post":{"summary":"Create or update a product","description":"Creates or updates a product with the provided details","operationId":"upsertProduct","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertProductRequest"}}}},"responses":{"204":{"description":"Product created successfully (No Content)"},"400":{"description":"Bad Request - Invalid input parameters"},"401":{"description":"Unauthorized - Authentication credentials are missing or invalid"},"403":{"description":"Forbidden - Insufficient permissions to perform the operation"},"500":{"description":"Internal Server Error - Unexpected server error occurred"}}}}}}
```

## Delete a product

> Deletes a product with the provided details

```json
{"openapi":"3.0.0","info":{"title":"Integration API","version":"1.0.0"},"servers":[{"url":"https://integration-api.userflux.co"}],"security":[{"ProductReadWriteOnlyBearerAuth":[]}],"components":{"securitySchemes":{"ProductReadWriteOnlyBearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Your Integration API Product Read + Write API Key. Note: You must use the Product Read + Write API Key, not the Product Write Only API Key."}}},"paths":{"/product/{typeId}/{productId}":{"delete":{"summary":"Delete a product","description":"Deletes a product with the provided details","operationId":"deleteProduct","parameters":[{"name":"typeId","in":"path","description":"ID of the Product Type","required":true,"schema":{"type":"string"}},{"name":"productId","in":"path","description":"ID of the Product","required":true,"schema":{"type":"string"}}]}}}}
```

## The UpsertProductRequest object

```json
{"openapi":"3.0.0","info":{"title":"Integration API","version":"1.0.0"},"components":{"schemas":{"UpsertProductRequest":{"type":"object","required":["id","typeId","properties"],"properties":{"id":{"type":"string","description":"Unique identifier for the product"},"typeId":{"type":"string","description":"Type identifier for the product"},"properties":{"type":"object","description":"JSON object containing custom product properties","additionalProperties":true},"propertiesUpdateType":{"type":"string","description":"The type of update. Valid values are either FULL_UPDATE or INCREMENTAL_UPDATE. When using full update mode, any pre-existing properties not included in the request will be removed. Defaults to INCREMENTAL_UPDATE."},"aiPropertyOverrides":{"type":"object","description":"JSON object containing path-value pairs for AI property overrides","additionalProperties":true}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://userflux.gitbook.io/userflux-docs/apis/products-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
