# CompletionConfig

## GET /api/v2/CompletionConfigs/{strToken}/{purpose}

> Gets a list of Completion Config objects allowed for the user.

````json
{"openapi":"3.0.1","info":{"title":"Memori.ai Web API V2","version":"v2"},"paths":{"/api/v2/CompletionConfigs/{strToken}/{purpose}":{"get":{"tags":["CompletionConfig"],"summary":"Gets a list of Completion Config objects allowed for the user.","operationId":"CompletionConfig-ListCompletionConfigs","parameters":[{"name":"strToken","in":"path","description":"The login token","required":true,"schema":{"type":"string"}},{"name":"purpose","in":"path","description":"Optional filter on Completion Config purpose (\"QA\" for Question Answering, \"IE\" for Import/Export, \"DT\" for Deep Thought).","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListCompletionConfigsResponse"}}}}}}}},"components":{"schemas":{"ListCompletionConfigsResponse":{"type":"object","properties":{"configs":{"type":"array","items":{"$ref":"#/components/schemas/CompletionConfigSpecs"},"description":"The list of Completion Config objects.","nullable":true},"requestID":{"type":"integer","description":"Progressive number of the request (since the Server started).\r\nUse this number, together with the RequestDateTime property,\r\nto report an anomalous reponse.","format":"int64"},"requestDateTime":{"type":"string","description":"Timestamp of the request.\r\nUse this timestamp, together with the RequestID property,\r\nto report an anomalous reponse.","format":"date-time"},"resultCode":{"type":"integer","description":"Result code. A code of ```0``` means no errors.\r\nWhen the request fails, its value is indicative of the actual\r\nerror.","format":"int32"},"resultMessage":{"type":"string","description":"Result message. A message of ```Ok``` means no errors.","nullable":true}},"additionalProperties":false,"description":"Response of a List Completion Configs request."},"CompletionConfigSpecs":{"type":"object","properties":{"completionConfigID":{"type":"string","description":"Completion Config object ID.\r\nReturned during Get operations.\r\nIgnored in other cases.","nullable":true},"configName":{"type":"string","description":"Completion Config unique name.\r\nRequired during Creation operations.\r\nUsed during Update operations.\r\nReturned during Get operations.","nullable":true},"description":{"type":"string","description":"Optional Completion Config description.\r\nUsed during Creation operations and Update.\r\nReturned during Get operations.","nullable":true},"provider":{"type":"string","description":"Name of the Completion Provider. Required during Creation operations. Used during Update operations. Returned during Get operations. <br> Currently possible values are:<ul> <li><code>OpenAI</code></li> <li><code>Anthropic</code></li> <li><code>Mistral</code></li> <li><code>Azure_OpenAI</code></li> <li><code>Custom_OpenAI</code></li> </ul>","nullable":true},"endPoint":{"type":"string","description":"URL of the Completion Provider API end-point.\r\nUsed during Creation operations and Update.\r\nReturned during Get operations.","nullable":true},"apiKey":{"type":"string","description":"API key of the Completion Provider API end-point.\r\nRequired during Creation operations (optional for Custom_OpenAI provider).\r\nUsed during Update operations.\r\nReturned during Get operations as an obfuscated value.","nullable":true},"model":{"type":"string","description":"Name of the Completion Model. This is provider-specific,\r\nand for some providers (e.g. Azure) it is also part of\r\nthe end-point URL.\r\nRequired during Creation operations.\r\nUsed during Update operations.\r\nReturned during Get operations.","nullable":true},"questionAnsweringEnabled":{"type":"boolean","description":"If True this configuration can be used for Question & Answer operations.\r\nIf not specified False is assumed. At least one use must be enabled.\r\nUsed during Creation operations and Update operations.\r\nReturned during Get operations.","nullable":true},"importExportEnabled":{"type":"boolean","description":"If True this configuration can be used for Import/Export operations. \r\nIf not specified False is assumed. At least one use must be enabled.\r\nUsed during Creation operations and Update operations.\r\nReturned during Get operations.","nullable":true},"deepThoughtEnabled":{"type":"boolean","description":"If True this configuration can be used for Deep Thought operations. \r\nIf not specified False is assumed. At least one use must be enabled.\r\nUsed during Creation operations and Update operations.\r\nReturned during Get operations.","nullable":true},"ownerUserID":{"type":"string","description":"ID of the User this Config belongs to.\r\nReturned during Get operations if the user is the owner or an administrator.\r\nIgnored in other cases.","nullable":true},"ownerUserName":{"type":"string","description":"Name of the User this Config belongs to.\r\nReturned during Get operations.\r\nIgnored in other cases.","nullable":true},"ownerTenantName":{"type":"string","description":"Name of the Tenant of the User this Config belongs to.\r\nReturned during Get operations.\r\nIgnored in other cases.","nullable":true},"visibleToTenantUsers":{"type":"boolean","description":"If True this configuration can be used by other users of the owner's Tenant.\r\nIf not specified False is assumed.\r\nUsed during Creation operations and Update operations.\r\nReturned during Get operations.","nullable":true},"visibleToOtherUsers":{"type":"boolean","description":"If True this configuration can be used by users of other Tenants.\r\nIf not specified False is assumed.\r\nUsed during Creation operations and Update operations.\r\nReturned during Get operations.","nullable":true},"useAsDefault":{"type":"boolean","description":"If True this configuration is used as the default (for the operations it is enabled for)\r\nwhen a new Memori is created. The use as default requires that the configuration is visible\r\nat least to the owner's Tenant users.\r\nUsed during Creation operations and Update operations.\r\nReturned during Get operations.","nullable":true},"chargeable":{"type":"boolean","description":"If True the use of this configuration is chargeable to the customer.","nullable":true},"applyTo":{"type":"string","description":"During Creation and Update operations, when set forces this configuration to be applied to the specified Memori objects and purposes. Ignored during Get operations. <br> Can be one of the following:<ul> <li><code>ONLY_USER_MEMORI_ON_DEFAULT_ONLY_QA_PURPOSE</code>: the configuration is applied to user's Memori objects with the default configuration, for Question &amp; Answer purpose only.</li> <li><code>ONLY_USER_MEMORI_ON_DEFAULT_ONLY_IE_PURPOSE</code>: the configuration is applied to user's Memori objects with the default configuration, for Import/Export purpose only.</li> <li><code>ONLY_USER_MEMORI_ON_DEFAULT_ONLY_DT_PURPOSE</code>: the configuration is applied to user's Memori objects with the default configuration, for Deep Thought purpose only.</li> <li><code>ONLY_USER_MEMORI_ON_DEFAULT_ALL_ENABLED_PURPOSES</code>: the configuration is applied to user's Memori objects with the default configuration, for all enabled purposes.</li> <li><code>ALL_USER_MEMORI_ONLY_QA_PURPOSE</code>: the configuration is applied to all user's Memori objects, for Question &amp; Answer purpose only.</li> <li><code>ALL_USER_MEMORI_ONLY_IE_PURPOSE</code>: the configuration is applied to all user's Memori objects, for Import/Export purpose only.</li> <li><code>ALL_USER_MEMORI_ONLY_DT_PURPOSE</code>: the configuration is applied to all user's Memori objects, for Deep Thought purpose only.</li> <li><code>ALL_USER_MEMORI_ALL_ENABLED_PURPOSES</code>: the configuration is applied to all user's Memori objects, for all enabled purposes.</li> <li><code>ONLY_TENANT_MEMORI_ON_DEFAULT_ONLY_QA_PURPOSE</code>: the configuration is applied to the Tenant's Memori objects with the default configuration, for Question &amp; Answer purpose only.</li> <li><code>ONLY_TENANT_MEMORI_ON_DEFAULT_ONLY_IE_PURPOSE</code>: the configuration is applied to the Tenant's Memori objects with the default configuration, for Import/Export purpose only.</li> <li><code>ONLY_TENANT_MEMORI_ON_DEFAULT_ONLY_DT_PURPOSE</code>: the configuration is applied to the Tenant's Memori objects with the default configuration, for Deep Thought purpose only.</li> <li><code>ONLY_TENANT_MEMORI_ON_DEFAULT_ALL_ENABLED_PURPOSES</code>: the configuration is applied to the Tenant's Memori objects with the default configuration, for all enabled purposes.</li> <li><code>ALL_TENANT_MEMORI_ONLY_QA_PURPOSE</code>: the configuration is applied to all the Tenant's Memori objects, for Question &amp; Answer purpose only.</li> <li><code>ALL_TENANT_MEMORI_ONLY_IE_PURPOSE</code>: the configuration is applied to all the Tenant's Memori objects, for Import/Export purpose only.</li> <li><code>ALL_TENANT_MEMORI_ONLY_DT_PURPOSE</code>: the configuration is applied to all the Tenant's Memori objects, for Deep Thought purpose only.</li> <li><code>ALL_TENANT_MEMORI_ALL_ENABLED_PURPOSES</code>: the configuration is applied to all the Tenant's Memori objects, for all enabled purposes.</li> </ul>","nullable":true}},"additionalProperties":false,"description":"Specifications of a Completion Config object."}}}}
````

## GET /api/v2/CompletionConfig/{strToken}/{strConfigID}

> Gets the details of a Completion Config of a specific object

````json
{"openapi":"3.0.1","info":{"title":"Memori.ai Web API V2","version":"v2"},"paths":{"/api/v2/CompletionConfig/{strToken}/{strConfigID}":{"get":{"tags":["CompletionConfig"],"summary":"Gets the details of a Completion Config of a specific object","operationId":"CompletionConfig-GetCompletionConfig","parameters":[{"name":"strToken","in":"path","description":"The login token","required":true,"schema":{"type":"string"}},{"name":"strConfigID","in":"path","description":"The Completion Config object ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCompletionConfigResponse"}}}}}}}},"components":{"schemas":{"GetCompletionConfigResponse":{"type":"object","properties":{"config":{"$ref":"#/components/schemas/CompletionConfigSpecs"},"requestID":{"type":"integer","description":"Progressive number of the request (since the Server started).\r\nUse this number, together with the RequestDateTime property,\r\nto report an anomalous reponse.","format":"int64"},"requestDateTime":{"type":"string","description":"Timestamp of the request.\r\nUse this timestamp, together with the RequestID property,\r\nto report an anomalous reponse.","format":"date-time"},"resultCode":{"type":"integer","description":"Result code. A code of ```0``` means no errors.\r\nWhen the request fails, its value is indicative of the actual\r\nerror.","format":"int32"},"resultMessage":{"type":"string","description":"Result message. A message of ```Ok``` means no errors.","nullable":true}},"additionalProperties":false,"description":"Response of a Get Completion Config request."},"CompletionConfigSpecs":{"type":"object","properties":{"completionConfigID":{"type":"string","description":"Completion Config object ID.\r\nReturned during Get operations.\r\nIgnored in other cases.","nullable":true},"configName":{"type":"string","description":"Completion Config unique name.\r\nRequired during Creation operations.\r\nUsed during Update operations.\r\nReturned during Get operations.","nullable":true},"description":{"type":"string","description":"Optional Completion Config description.\r\nUsed during Creation operations and Update.\r\nReturned during Get operations.","nullable":true},"provider":{"type":"string","description":"Name of the Completion Provider. Required during Creation operations. Used during Update operations. Returned during Get operations. <br> Currently possible values are:<ul> <li><code>OpenAI</code></li> <li><code>Anthropic</code></li> <li><code>Mistral</code></li> <li><code>Azure_OpenAI</code></li> <li><code>Custom_OpenAI</code></li> </ul>","nullable":true},"endPoint":{"type":"string","description":"URL of the Completion Provider API end-point.\r\nUsed during Creation operations and Update.\r\nReturned during Get operations.","nullable":true},"apiKey":{"type":"string","description":"API key of the Completion Provider API end-point.\r\nRequired during Creation operations (optional for Custom_OpenAI provider).\r\nUsed during Update operations.\r\nReturned during Get operations as an obfuscated value.","nullable":true},"model":{"type":"string","description":"Name of the Completion Model. This is provider-specific,\r\nand for some providers (e.g. Azure) it is also part of\r\nthe end-point URL.\r\nRequired during Creation operations.\r\nUsed during Update operations.\r\nReturned during Get operations.","nullable":true},"questionAnsweringEnabled":{"type":"boolean","description":"If True this configuration can be used for Question & Answer operations.\r\nIf not specified False is assumed. At least one use must be enabled.\r\nUsed during Creation operations and Update operations.\r\nReturned during Get operations.","nullable":true},"importExportEnabled":{"type":"boolean","description":"If True this configuration can be used for Import/Export operations. \r\nIf not specified False is assumed. At least one use must be enabled.\r\nUsed during Creation operations and Update operations.\r\nReturned during Get operations.","nullable":true},"deepThoughtEnabled":{"type":"boolean","description":"If True this configuration can be used for Deep Thought operations. \r\nIf not specified False is assumed. At least one use must be enabled.\r\nUsed during Creation operations and Update operations.\r\nReturned during Get operations.","nullable":true},"ownerUserID":{"type":"string","description":"ID of the User this Config belongs to.\r\nReturned during Get operations if the user is the owner or an administrator.\r\nIgnored in other cases.","nullable":true},"ownerUserName":{"type":"string","description":"Name of the User this Config belongs to.\r\nReturned during Get operations.\r\nIgnored in other cases.","nullable":true},"ownerTenantName":{"type":"string","description":"Name of the Tenant of the User this Config belongs to.\r\nReturned during Get operations.\r\nIgnored in other cases.","nullable":true},"visibleToTenantUsers":{"type":"boolean","description":"If True this configuration can be used by other users of the owner's Tenant.\r\nIf not specified False is assumed.\r\nUsed during Creation operations and Update operations.\r\nReturned during Get operations.","nullable":true},"visibleToOtherUsers":{"type":"boolean","description":"If True this configuration can be used by users of other Tenants.\r\nIf not specified False is assumed.\r\nUsed during Creation operations and Update operations.\r\nReturned during Get operations.","nullable":true},"useAsDefault":{"type":"boolean","description":"If True this configuration is used as the default (for the operations it is enabled for)\r\nwhen a new Memori is created. The use as default requires that the configuration is visible\r\nat least to the owner's Tenant users.\r\nUsed during Creation operations and Update operations.\r\nReturned during Get operations.","nullable":true},"chargeable":{"type":"boolean","description":"If True the use of this configuration is chargeable to the customer.","nullable":true},"applyTo":{"type":"string","description":"During Creation and Update operations, when set forces this configuration to be applied to the specified Memori objects and purposes. Ignored during Get operations. <br> Can be one of the following:<ul> <li><code>ONLY_USER_MEMORI_ON_DEFAULT_ONLY_QA_PURPOSE</code>: the configuration is applied to user's Memori objects with the default configuration, for Question &amp; Answer purpose only.</li> <li><code>ONLY_USER_MEMORI_ON_DEFAULT_ONLY_IE_PURPOSE</code>: the configuration is applied to user's Memori objects with the default configuration, for Import/Export purpose only.</li> <li><code>ONLY_USER_MEMORI_ON_DEFAULT_ONLY_DT_PURPOSE</code>: the configuration is applied to user's Memori objects with the default configuration, for Deep Thought purpose only.</li> <li><code>ONLY_USER_MEMORI_ON_DEFAULT_ALL_ENABLED_PURPOSES</code>: the configuration is applied to user's Memori objects with the default configuration, for all enabled purposes.</li> <li><code>ALL_USER_MEMORI_ONLY_QA_PURPOSE</code>: the configuration is applied to all user's Memori objects, for Question &amp; Answer purpose only.</li> <li><code>ALL_USER_MEMORI_ONLY_IE_PURPOSE</code>: the configuration is applied to all user's Memori objects, for Import/Export purpose only.</li> <li><code>ALL_USER_MEMORI_ONLY_DT_PURPOSE</code>: the configuration is applied to all user's Memori objects, for Deep Thought purpose only.</li> <li><code>ALL_USER_MEMORI_ALL_ENABLED_PURPOSES</code>: the configuration is applied to all user's Memori objects, for all enabled purposes.</li> <li><code>ONLY_TENANT_MEMORI_ON_DEFAULT_ONLY_QA_PURPOSE</code>: the configuration is applied to the Tenant's Memori objects with the default configuration, for Question &amp; Answer purpose only.</li> <li><code>ONLY_TENANT_MEMORI_ON_DEFAULT_ONLY_IE_PURPOSE</code>: the configuration is applied to the Tenant's Memori objects with the default configuration, for Import/Export purpose only.</li> <li><code>ONLY_TENANT_MEMORI_ON_DEFAULT_ONLY_DT_PURPOSE</code>: the configuration is applied to the Tenant's Memori objects with the default configuration, for Deep Thought purpose only.</li> <li><code>ONLY_TENANT_MEMORI_ON_DEFAULT_ALL_ENABLED_PURPOSES</code>: the configuration is applied to the Tenant's Memori objects with the default configuration, for all enabled purposes.</li> <li><code>ALL_TENANT_MEMORI_ONLY_QA_PURPOSE</code>: the configuration is applied to all the Tenant's Memori objects, for Question &amp; Answer purpose only.</li> <li><code>ALL_TENANT_MEMORI_ONLY_IE_PURPOSE</code>: the configuration is applied to all the Tenant's Memori objects, for Import/Export purpose only.</li> <li><code>ALL_TENANT_MEMORI_ONLY_DT_PURPOSE</code>: the configuration is applied to all the Tenant's Memori objects, for Deep Thought purpose only.</li> <li><code>ALL_TENANT_MEMORI_ALL_ENABLED_PURPOSES</code>: the configuration is applied to all the Tenant's Memori objects, for all enabled purposes.</li> </ul>","nullable":true}},"additionalProperties":false,"description":"Specifications of a Completion Config object."}}}}
````

## DELETE /api/v2/CompletionConfig/{strToken}/{strConfigID}

> Deletes an existing Completion Config object.> \
> A user can only delete a Completion Config object owned by him,> \
> unless it has administrative rights.

````json
{"openapi":"3.0.1","info":{"title":"Memori.ai Web API V2","version":"v2"},"paths":{"/api/v2/CompletionConfig/{strToken}/{strConfigID}":{"delete":{"tags":["CompletionConfig"],"summary":"Deletes an existing Completion Config object.\r\nA user can only delete a Completion Config object owned by him,\r\nunless it has administrative rights.","operationId":"CompletionConfig-DeleteCompletionConfig","parameters":[{"name":"strToken","in":"path","description":"The login token","required":true,"schema":{"type":"string"}},{"name":"strConfigID","in":"path","description":"The ID of the Completion Config object","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteCompletionConfigResponse"}}}}}}}},"components":{"schemas":{"DeleteCompletionConfigResponse":{"type":"object","properties":{"completionConfigChangeResults":{"type":"array","items":{"$ref":"#/components/schemas/CompletionConfigChangeResult"},"nullable":true},"requestID":{"type":"integer","description":"Progressive number of the request (since the Server started).\r\nUse this number, together with the RequestDateTime property,\r\nto report an anomalous reponse.","format":"int64"},"requestDateTime":{"type":"string","description":"Timestamp of the request.\r\nUse this timestamp, together with the RequestID property,\r\nto report an anomalous reponse.","format":"date-time"},"resultCode":{"type":"integer","description":"Result code. A code of ```0``` means no errors.\r\nWhen the request fails, its value is indicative of the actual\r\nerror.","format":"int32"},"resultMessage":{"type":"string","description":"Result message. A message of ```Ok``` means no errors.","nullable":true}},"additionalProperties":false},"CompletionConfigChangeResult":{"type":"object","properties":{"memoriId":{"type":"string","nullable":true},"memoriName":{"type":"string","nullable":true},"applied":{"type":"boolean"},"errorMessage":{"type":"string","nullable":true}},"additionalProperties":false}}}}
````

## PATCH /api/v2/CompletionConfig/{strToken}/{strConfigID}

> Updates an existing Completion Config object.> \
> A user can only update a Completion Config object owned by him,> \
> unless it has administrative rights.

````json
{"openapi":"3.0.1","info":{"title":"Memori.ai Web API V2","version":"v2"},"paths":{"/api/v2/CompletionConfig/{strToken}/{strConfigID}":{"patch":{"tags":["CompletionConfig"],"summary":"Updates an existing Completion Config object.\r\nA user can only update a Completion Config object owned by him,\r\nunless it has administrative rights.","operationId":"CompletionConfig-UpdateCompletionConfig","parameters":[{"name":"strToken","in":"path","description":"The login token","required":true,"schema":{"type":"string"}},{"name":"strConfigID","in":"path","description":"The ID of the Completion Config object","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The specifications of the Completion Config object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompletionConfigSpecs"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCompletionConfigResponse"}}}}}}}},"components":{"schemas":{"CompletionConfigSpecs":{"type":"object","properties":{"completionConfigID":{"type":"string","description":"Completion Config object ID.\r\nReturned during Get operations.\r\nIgnored in other cases.","nullable":true},"configName":{"type":"string","description":"Completion Config unique name.\r\nRequired during Creation operations.\r\nUsed during Update operations.\r\nReturned during Get operations.","nullable":true},"description":{"type":"string","description":"Optional Completion Config description.\r\nUsed during Creation operations and Update.\r\nReturned during Get operations.","nullable":true},"provider":{"type":"string","description":"Name of the Completion Provider. Required during Creation operations. Used during Update operations. Returned during Get operations. <br> Currently possible values are:<ul> <li><code>OpenAI</code></li> <li><code>Anthropic</code></li> <li><code>Mistral</code></li> <li><code>Azure_OpenAI</code></li> <li><code>Custom_OpenAI</code></li> </ul>","nullable":true},"endPoint":{"type":"string","description":"URL of the Completion Provider API end-point.\r\nUsed during Creation operations and Update.\r\nReturned during Get operations.","nullable":true},"apiKey":{"type":"string","description":"API key of the Completion Provider API end-point.\r\nRequired during Creation operations (optional for Custom_OpenAI provider).\r\nUsed during Update operations.\r\nReturned during Get operations as an obfuscated value.","nullable":true},"model":{"type":"string","description":"Name of the Completion Model. This is provider-specific,\r\nand for some providers (e.g. Azure) it is also part of\r\nthe end-point URL.\r\nRequired during Creation operations.\r\nUsed during Update operations.\r\nReturned during Get operations.","nullable":true},"questionAnsweringEnabled":{"type":"boolean","description":"If True this configuration can be used for Question & Answer operations.\r\nIf not specified False is assumed. At least one use must be enabled.\r\nUsed during Creation operations and Update operations.\r\nReturned during Get operations.","nullable":true},"importExportEnabled":{"type":"boolean","description":"If True this configuration can be used for Import/Export operations. \r\nIf not specified False is assumed. At least one use must be enabled.\r\nUsed during Creation operations and Update operations.\r\nReturned during Get operations.","nullable":true},"deepThoughtEnabled":{"type":"boolean","description":"If True this configuration can be used for Deep Thought operations. \r\nIf not specified False is assumed. At least one use must be enabled.\r\nUsed during Creation operations and Update operations.\r\nReturned during Get operations.","nullable":true},"ownerUserID":{"type":"string","description":"ID of the User this Config belongs to.\r\nReturned during Get operations if the user is the owner or an administrator.\r\nIgnored in other cases.","nullable":true},"ownerUserName":{"type":"string","description":"Name of the User this Config belongs to.\r\nReturned during Get operations.\r\nIgnored in other cases.","nullable":true},"ownerTenantName":{"type":"string","description":"Name of the Tenant of the User this Config belongs to.\r\nReturned during Get operations.\r\nIgnored in other cases.","nullable":true},"visibleToTenantUsers":{"type":"boolean","description":"If True this configuration can be used by other users of the owner's Tenant.\r\nIf not specified False is assumed.\r\nUsed during Creation operations and Update operations.\r\nReturned during Get operations.","nullable":true},"visibleToOtherUsers":{"type":"boolean","description":"If True this configuration can be used by users of other Tenants.\r\nIf not specified False is assumed.\r\nUsed during Creation operations and Update operations.\r\nReturned during Get operations.","nullable":true},"useAsDefault":{"type":"boolean","description":"If True this configuration is used as the default (for the operations it is enabled for)\r\nwhen a new Memori is created. The use as default requires that the configuration is visible\r\nat least to the owner's Tenant users.\r\nUsed during Creation operations and Update operations.\r\nReturned during Get operations.","nullable":true},"chargeable":{"type":"boolean","description":"If True the use of this configuration is chargeable to the customer.","nullable":true},"applyTo":{"type":"string","description":"During Creation and Update operations, when set forces this configuration to be applied to the specified Memori objects and purposes. Ignored during Get operations. <br> Can be one of the following:<ul> <li><code>ONLY_USER_MEMORI_ON_DEFAULT_ONLY_QA_PURPOSE</code>: the configuration is applied to user's Memori objects with the default configuration, for Question &amp; Answer purpose only.</li> <li><code>ONLY_USER_MEMORI_ON_DEFAULT_ONLY_IE_PURPOSE</code>: the configuration is applied to user's Memori objects with the default configuration, for Import/Export purpose only.</li> <li><code>ONLY_USER_MEMORI_ON_DEFAULT_ONLY_DT_PURPOSE</code>: the configuration is applied to user's Memori objects with the default configuration, for Deep Thought purpose only.</li> <li><code>ONLY_USER_MEMORI_ON_DEFAULT_ALL_ENABLED_PURPOSES</code>: the configuration is applied to user's Memori objects with the default configuration, for all enabled purposes.</li> <li><code>ALL_USER_MEMORI_ONLY_QA_PURPOSE</code>: the configuration is applied to all user's Memori objects, for Question &amp; Answer purpose only.</li> <li><code>ALL_USER_MEMORI_ONLY_IE_PURPOSE</code>: the configuration is applied to all user's Memori objects, for Import/Export purpose only.</li> <li><code>ALL_USER_MEMORI_ONLY_DT_PURPOSE</code>: the configuration is applied to all user's Memori objects, for Deep Thought purpose only.</li> <li><code>ALL_USER_MEMORI_ALL_ENABLED_PURPOSES</code>: the configuration is applied to all user's Memori objects, for all enabled purposes.</li> <li><code>ONLY_TENANT_MEMORI_ON_DEFAULT_ONLY_QA_PURPOSE</code>: the configuration is applied to the Tenant's Memori objects with the default configuration, for Question &amp; Answer purpose only.</li> <li><code>ONLY_TENANT_MEMORI_ON_DEFAULT_ONLY_IE_PURPOSE</code>: the configuration is applied to the Tenant's Memori objects with the default configuration, for Import/Export purpose only.</li> <li><code>ONLY_TENANT_MEMORI_ON_DEFAULT_ONLY_DT_PURPOSE</code>: the configuration is applied to the Tenant's Memori objects with the default configuration, for Deep Thought purpose only.</li> <li><code>ONLY_TENANT_MEMORI_ON_DEFAULT_ALL_ENABLED_PURPOSES</code>: the configuration is applied to the Tenant's Memori objects with the default configuration, for all enabled purposes.</li> <li><code>ALL_TENANT_MEMORI_ONLY_QA_PURPOSE</code>: the configuration is applied to all the Tenant's Memori objects, for Question &amp; Answer purpose only.</li> <li><code>ALL_TENANT_MEMORI_ONLY_IE_PURPOSE</code>: the configuration is applied to all the Tenant's Memori objects, for Import/Export purpose only.</li> <li><code>ALL_TENANT_MEMORI_ONLY_DT_PURPOSE</code>: the configuration is applied to all the Tenant's Memori objects, for Deep Thought purpose only.</li> <li><code>ALL_TENANT_MEMORI_ALL_ENABLED_PURPOSES</code>: the configuration is applied to all the Tenant's Memori objects, for all enabled purposes.</li> </ul>","nullable":true}},"additionalProperties":false,"description":"Specifications of a Completion Config object."},"UpdateCompletionConfigResponse":{"type":"object","properties":{"completionConfigChangeResults":{"type":"array","items":{"$ref":"#/components/schemas/CompletionConfigChangeResult"},"nullable":true},"config":{"$ref":"#/components/schemas/CompletionConfigSpecs"},"requestID":{"type":"integer","description":"Progressive number of the request (since the Server started).\r\nUse this number, together with the RequestDateTime property,\r\nto report an anomalous reponse.","format":"int64"},"requestDateTime":{"type":"string","description":"Timestamp of the request.\r\nUse this timestamp, together with the RequestID property,\r\nto report an anomalous reponse.","format":"date-time"},"resultCode":{"type":"integer","description":"Result code. A code of ```0``` means no errors.\r\nWhen the request fails, its value is indicative of the actual\r\nerror.","format":"int32"},"resultMessage":{"type":"string","description":"Result message. A message of ```Ok``` means no errors.","nullable":true}},"additionalProperties":false,"description":"Response of an Update Completion Config request."},"CompletionConfigChangeResult":{"type":"object","properties":{"memoriId":{"type":"string","nullable":true},"memoriName":{"type":"string","nullable":true},"applied":{"type":"boolean"},"errorMessage":{"type":"string","nullable":true}},"additionalProperties":false}}}}
````

## POST /api/v2/CompletionConfig/{strToken}

> Creates a new Completion Config object.> \
> The created Completion Config object is owned by the currently logged-in user.

````json
{"openapi":"3.0.1","info":{"title":"Memori.ai Web API V2","version":"v2"},"paths":{"/api/v2/CompletionConfig/{strToken}":{"post":{"tags":["CompletionConfig"],"summary":"Creates a new Completion Config object.\r\nThe created Completion Config object is owned by the currently logged-in user.","operationId":"CompletionConfig-AddCompletionConfig","parameters":[{"name":"strToken","in":"path","description":"The login token","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The specifications of the Completion Config object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompletionConfigSpecs"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddCompletionConfigResponse"}}}}}}}},"components":{"schemas":{"CompletionConfigSpecs":{"type":"object","properties":{"completionConfigID":{"type":"string","description":"Completion Config object ID.\r\nReturned during Get operations.\r\nIgnored in other cases.","nullable":true},"configName":{"type":"string","description":"Completion Config unique name.\r\nRequired during Creation operations.\r\nUsed during Update operations.\r\nReturned during Get operations.","nullable":true},"description":{"type":"string","description":"Optional Completion Config description.\r\nUsed during Creation operations and Update.\r\nReturned during Get operations.","nullable":true},"provider":{"type":"string","description":"Name of the Completion Provider. Required during Creation operations. Used during Update operations. Returned during Get operations. <br> Currently possible values are:<ul> <li><code>OpenAI</code></li> <li><code>Anthropic</code></li> <li><code>Mistral</code></li> <li><code>Azure_OpenAI</code></li> <li><code>Custom_OpenAI</code></li> </ul>","nullable":true},"endPoint":{"type":"string","description":"URL of the Completion Provider API end-point.\r\nUsed during Creation operations and Update.\r\nReturned during Get operations.","nullable":true},"apiKey":{"type":"string","description":"API key of the Completion Provider API end-point.\r\nRequired during Creation operations (optional for Custom_OpenAI provider).\r\nUsed during Update operations.\r\nReturned during Get operations as an obfuscated value.","nullable":true},"model":{"type":"string","description":"Name of the Completion Model. This is provider-specific,\r\nand for some providers (e.g. Azure) it is also part of\r\nthe end-point URL.\r\nRequired during Creation operations.\r\nUsed during Update operations.\r\nReturned during Get operations.","nullable":true},"questionAnsweringEnabled":{"type":"boolean","description":"If True this configuration can be used for Question & Answer operations.\r\nIf not specified False is assumed. At least one use must be enabled.\r\nUsed during Creation operations and Update operations.\r\nReturned during Get operations.","nullable":true},"importExportEnabled":{"type":"boolean","description":"If True this configuration can be used for Import/Export operations. \r\nIf not specified False is assumed. At least one use must be enabled.\r\nUsed during Creation operations and Update operations.\r\nReturned during Get operations.","nullable":true},"deepThoughtEnabled":{"type":"boolean","description":"If True this configuration can be used for Deep Thought operations. \r\nIf not specified False is assumed. At least one use must be enabled.\r\nUsed during Creation operations and Update operations.\r\nReturned during Get operations.","nullable":true},"ownerUserID":{"type":"string","description":"ID of the User this Config belongs to.\r\nReturned during Get operations if the user is the owner or an administrator.\r\nIgnored in other cases.","nullable":true},"ownerUserName":{"type":"string","description":"Name of the User this Config belongs to.\r\nReturned during Get operations.\r\nIgnored in other cases.","nullable":true},"ownerTenantName":{"type":"string","description":"Name of the Tenant of the User this Config belongs to.\r\nReturned during Get operations.\r\nIgnored in other cases.","nullable":true},"visibleToTenantUsers":{"type":"boolean","description":"If True this configuration can be used by other users of the owner's Tenant.\r\nIf not specified False is assumed.\r\nUsed during Creation operations and Update operations.\r\nReturned during Get operations.","nullable":true},"visibleToOtherUsers":{"type":"boolean","description":"If True this configuration can be used by users of other Tenants.\r\nIf not specified False is assumed.\r\nUsed during Creation operations and Update operations.\r\nReturned during Get operations.","nullable":true},"useAsDefault":{"type":"boolean","description":"If True this configuration is used as the default (for the operations it is enabled for)\r\nwhen a new Memori is created. The use as default requires that the configuration is visible\r\nat least to the owner's Tenant users.\r\nUsed during Creation operations and Update operations.\r\nReturned during Get operations.","nullable":true},"chargeable":{"type":"boolean","description":"If True the use of this configuration is chargeable to the customer.","nullable":true},"applyTo":{"type":"string","description":"During Creation and Update operations, when set forces this configuration to be applied to the specified Memori objects and purposes. Ignored during Get operations. <br> Can be one of the following:<ul> <li><code>ONLY_USER_MEMORI_ON_DEFAULT_ONLY_QA_PURPOSE</code>: the configuration is applied to user's Memori objects with the default configuration, for Question &amp; Answer purpose only.</li> <li><code>ONLY_USER_MEMORI_ON_DEFAULT_ONLY_IE_PURPOSE</code>: the configuration is applied to user's Memori objects with the default configuration, for Import/Export purpose only.</li> <li><code>ONLY_USER_MEMORI_ON_DEFAULT_ONLY_DT_PURPOSE</code>: the configuration is applied to user's Memori objects with the default configuration, for Deep Thought purpose only.</li> <li><code>ONLY_USER_MEMORI_ON_DEFAULT_ALL_ENABLED_PURPOSES</code>: the configuration is applied to user's Memori objects with the default configuration, for all enabled purposes.</li> <li><code>ALL_USER_MEMORI_ONLY_QA_PURPOSE</code>: the configuration is applied to all user's Memori objects, for Question &amp; Answer purpose only.</li> <li><code>ALL_USER_MEMORI_ONLY_IE_PURPOSE</code>: the configuration is applied to all user's Memori objects, for Import/Export purpose only.</li> <li><code>ALL_USER_MEMORI_ONLY_DT_PURPOSE</code>: the configuration is applied to all user's Memori objects, for Deep Thought purpose only.</li> <li><code>ALL_USER_MEMORI_ALL_ENABLED_PURPOSES</code>: the configuration is applied to all user's Memori objects, for all enabled purposes.</li> <li><code>ONLY_TENANT_MEMORI_ON_DEFAULT_ONLY_QA_PURPOSE</code>: the configuration is applied to the Tenant's Memori objects with the default configuration, for Question &amp; Answer purpose only.</li> <li><code>ONLY_TENANT_MEMORI_ON_DEFAULT_ONLY_IE_PURPOSE</code>: the configuration is applied to the Tenant's Memori objects with the default configuration, for Import/Export purpose only.</li> <li><code>ONLY_TENANT_MEMORI_ON_DEFAULT_ONLY_DT_PURPOSE</code>: the configuration is applied to the Tenant's Memori objects with the default configuration, for Deep Thought purpose only.</li> <li><code>ONLY_TENANT_MEMORI_ON_DEFAULT_ALL_ENABLED_PURPOSES</code>: the configuration is applied to the Tenant's Memori objects with the default configuration, for all enabled purposes.</li> <li><code>ALL_TENANT_MEMORI_ONLY_QA_PURPOSE</code>: the configuration is applied to all the Tenant's Memori objects, for Question &amp; Answer purpose only.</li> <li><code>ALL_TENANT_MEMORI_ONLY_IE_PURPOSE</code>: the configuration is applied to all the Tenant's Memori objects, for Import/Export purpose only.</li> <li><code>ALL_TENANT_MEMORI_ONLY_DT_PURPOSE</code>: the configuration is applied to all the Tenant's Memori objects, for Deep Thought purpose only.</li> <li><code>ALL_TENANT_MEMORI_ALL_ENABLED_PURPOSES</code>: the configuration is applied to all the Tenant's Memori objects, for all enabled purposes.</li> </ul>","nullable":true}},"additionalProperties":false,"description":"Specifications of a Completion Config object."},"AddCompletionConfigResponse":{"type":"object","properties":{"completionConfigChangeResults":{"type":"array","items":{"$ref":"#/components/schemas/CompletionConfigChangeResult"},"nullable":true},"config":{"$ref":"#/components/schemas/CompletionConfigSpecs"},"requestID":{"type":"integer","description":"Progressive number of the request (since the Server started).\r\nUse this number, together with the RequestDateTime property,\r\nto report an anomalous reponse.","format":"int64"},"requestDateTime":{"type":"string","description":"Timestamp of the request.\r\nUse this timestamp, together with the RequestID property,\r\nto report an anomalous reponse.","format":"date-time"},"resultCode":{"type":"integer","description":"Result code. A code of ```0``` means no errors.\r\nWhen the request fails, its value is indicative of the actual\r\nerror.","format":"int32"},"resultMessage":{"type":"string","description":"Result message. A message of ```Ok``` means no errors.","nullable":true}},"additionalProperties":false},"CompletionConfigChangeResult":{"type":"object","properties":{"memoriId":{"type":"string","nullable":true},"memoriName":{"type":"string","nullable":true},"applied":{"type":"boolean"},"errorMessage":{"type":"string","nullable":true}},"additionalProperties":false}}}}
````


---

# 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://docs.aisuru.com/api-en/backend/completionconfig.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.
