Skip to main content
PATCH
/
v2.0
/
flows
/
{flowId}
/
slotfillers
/
{slotFillerId}
Update a Slot Filler
curl --request PATCH \
  --url https://api-trial.cognigy.ai/new/v2.0/flows/{flowId}/slotfillers/{slotFillerId} \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "name": "<string>",
  "type": "age",
  "usePositiveOnly": true,
  "storeResultInContext": true,
  "contextKey": "<string>",
  "storeInContactProfile": true,
  "profileKey": "<string>",
  "storeDetailedResults": true,
  "skipIfResultInContext": true,
  "additionalValidation": "<string>",
  "resultLocation": "<string>",
  "regex": "<string>",
  "slot": "<string>"
}
'
{
  "type": "Bad Request",
  "title": "Bad Request Error",
  "status": 400,
  "detail": "Validation failed. Missing payload.",
  "instance": "/v2.0/flows/5ce7c2d833ea1e04d7e6c432",
  "code": 1000,
  "traceId": "api--f84324f4-98eb-4f02-abdd-375a2e6c3c1f",
  "details": {}
}

Authorizations

X-API-Key
string
header
required

Supply the API Key in the HTTP-Header

Headers

Accept
enum<string>

The Accept header specifies the media type that the client expects in the response. Available options: application/json, application/hal+json, application/xml, text/xml, text/csv. The default value is application/json.

Available options:
application/json,
application/hal+json,
application/xml,
text/xml,
text/csv

Path Parameters

flowId
string
required

The unique identifier for the Flow.

Required string length: 24
Pattern: ^[a-z0-9]{24}$
slotFillerId
string
required

The unique identifier for the Slot Filler.

Required string length: 24
Pattern: ^[a-z0-9]{24}$

Body

application/json

The payload for creating or updating a Slot Filler.

name
string

The display name of the Slot Filler.

type
enum<string>

The type of the Slot Filler.

Available options:
age,
date,
duration,
email,
intent,
slot,
money,
number,
percentage,
regex,
temperature
Example:

"age"

usePositiveOnly
boolean

If set to true, extracts only Slots from predefined Keyphrases.

storeResultInContext
boolean

If set to true, stores the result in the Context object.

contextKey
string

The key used to store the result in the Context object.

storeInContactProfile
boolean

If set to true, the result is stored in the Contact Profile.

profileKey
string

The key used to store the result in the Contact Profile.

storeDetailedResults
boolean

If set to true, stores metadata about the extracted Slot.

skipIfResultInContext
boolean

If set to true, the user input isn't checked for the Slot that is already in the Context object.

additionalValidation
string

The additional validation expression or script.

resultLocation
string

Determines where to extract the Slot value from. By default, the Slot value is extracted from the user input. You can set a CognigyScript expression in this parameter to override the detected Slot value with a value from the Input, Context, or Profile objects. This parameter works only if the user input is recognized and the CognigyScript expression doesn't resolve to a falsy value.

regex
string

The regex pattern to extract specific data from the user input. Used only when the Slot Filler type is regex.

slot
string

Specifies which Slot this Filler is associated with, for example, date or airport_code. Used only when the Slot Filler type is slot.

Response

Successfully updated SlotFiller