{"components":{"responses":{},"schemas":{"PreviewTemplateResponse":{"description":"A response to a template preview request.","example":{"content_type":"email","result":"success","template":{"html_body":"<p>Welcome to Acme!</p>","subject":"Hello John","text_body":"Welcome to Acme!"}},"properties":{"content_type":{"description":"The content type of the preview.","enum":["email","in_app_feed","push","chat","sms"],"type":"string"},"errors":{"description":"A list of errors encountered during rendering. Present when result is \"error\".","items":{"description":"A rendering error with optional location information.","example":{"field":"html_content","line":1,"message":"Reason: expected end of string, line: 1"},"properties":{"field":{"description":"The template field that caused the error, if available.","nullable":true,"type":"string"},"line":{"description":"The line number where the error occurred, if available.","nullable":true,"type":"integer"},"message":{"description":"A human-readable description of the error.","type":"string"}},"required":["message"],"type":"object"},"nullable":true,"type":"array"},"result":{"description":"The result of the preview.","enum":["success","error"],"type":"string"},"template":{"anyOf":[{"$ref":"#/components/schemas/EmailTemplate"},{"$ref":"#/components/schemas/InAppFeedTemplate"},{"$ref":"#/components/schemas/PushTemplate"},{"$ref":"#/components/schemas/ChatTemplate"},{"$ref":"#/components/schemas/SmsTemplate"}],"description":"The rendered template, ready to be previewed.","type":"object"}},"required":["result","content_type"],"title":"PreviewTemplateResponse","type":"object"},"RequestTemplateQueryParamsArray":{"description":"A list of key-value pairs for the request query params. Each object should contain key and value fields with string values.","example":[{"key":"key","value":"value"}],"items":{"properties":{"key":{"description":"The key of the query param.","example":"key","type":"string"},"value":{"description":"The value of the query param.","example":"value","type":"string"}},"required":["key","value"],"type":"object"},"title":"RequestTemplateQueryParamsArray","type":"array"},"SmsChannelSettings":{"description":"SMS channel settings. Only used as configuration as part of a workflow channel step.","example":{"link_tracking":true},"properties":{"link_tracking":{"description":"Whether to track link clicks on SMS notifications.","example":true,"type":"boolean"}},"title":"SmsChannelSettings","type":"object"},"WrappedEmailLayoutRequestRequest":{"description":"Wraps the EmailLayoutRequest request under the email_layout key.","example":{"email_layout":{"branding_overrides":{"dark_logo_url":"https://cdn.example.com/logo-dark.png","dark_primary_color":"#1A1A2E","dark_primary_color_contrast":"#FFFFFF","primary_color":"#4F46E5","primary_color_contrast":"#FFFFFF"},"footer_links":[{"text":"Example","url":"http://example.com"}],"html_layout":"<html><body>Hello, world!</body></html>","name":"Transactional","text_layout":"Hello, world!"}},"properties":{"email_layout":{"$ref":"#/components/schemas/EmailLayoutRequest"}},"required":["email_layout"],"title":"WrappedEmailLayoutRequestRequest","type":"object"},"WorkflowStep":{"anyOf":[{"$ref":"#/components/schemas/WorkflowWebhookStep"},{"$ref":"#/components/schemas/WorkflowInAppFeedStep"},{"$ref":"#/components/schemas/WorkflowChatStep"},{"$ref":"#/components/schemas/WorkflowSmsStep"},{"$ref":"#/components/schemas/WorkflowPushStep"},{"$ref":"#/components/schemas/WorkflowEmailStep"},{"$ref":"#/components/schemas/WorkflowAIAgentStep"},{"$ref":"#/components/schemas/WorkflowDelayStep"},{"$ref":"#/components/schemas/WorkflowBatchStep"},{"$ref":"#/components/schemas/WorkflowFetchStep"},{"$ref":"#/components/schemas/WorkflowUpdateDataStep"},{"$ref":"#/components/schemas/WorkflowUpdateObjectStep"},{"$ref":"#/components/schemas/WorkflowUpdateTenantStep"},{"$ref":"#/components/schemas/WorkflowUpdateUserStep"},{"$ref":"#/components/schemas/WorkflowThrottleStep"},{"$ref":"#/components/schemas/WorkflowBranchStep"},{"$ref":"#/components/schemas/WorkflowRandomCohortStep"},{"$ref":"#/components/schemas/WorkflowTriggerWorkflowStep"}],"description":"A step within a workflow. Each workflow step, regardless of its type, share a common set of core attributes (`type`, `ref`, `name`, `description`, `conditions`).","example":{"channel_group_key":null,"channel_key":"postmark","channel_overrides":null,"channel_type":"email","conditions":null,"description":"This is a description of the channel step","name":"Email channel step","ref":"channel_step","send_windows":null,"template":{"html_body":"<p>Hello, {{ recipient.name }}! Welcome to {{ vars.app_name }} <a href='{{ data.sign_in_url }}'>Get started here</a>.</p>","settings":{"layout_key":"default"},"subject":"Welcome to {{ vars.app_name }}","text_body":"Hello, {{ recipient.name }}! Welcome to {{ vars.app_name }} Get started here: {{ data.sign_in_url }}."},"type":"channel"},"title":"WorkflowStep","type":"object"},"RequestTemplateQueryParamsString":{"description":"A template string that should resolve to a JSON object representing the query params.","example":"{{ data.request_query_params }}","title":"RequestTemplateQueryParamsString","type":"string"},"EmailImageBlock":{"description":"An image block in an email template.","example":{"alt":"Example image","layout_attrs":{"horizontal_align":"center","padding_bottom":4,"padding_left":0,"padding_right":0,"padding_top":4},"style_attrs":{"width":"25%"},"type":"image","url":"https://example.com/image.jpg"},"properties":{"action":{"description":"Optional action URL for the image.","nullable":true,"type":"string"},"alt":{"description":"Alt text for the image.","nullable":true,"type":"string"},"id":{"description":"The ID of the block.","example":"123e4567-e89b-12d3-a456-426614174000","format":"uuid","type":"string"},"layout_attrs":{"description":"The layout attributes of the block.","properties":{"horizontal_align":{"description":"The horizontal alignment of the block.","enum":["left","center","right"],"type":"string"},"padding_bottom":{"description":"The padding_bottom layout attribute of the block.","type":"integer"},"padding_left":{"description":"The padding_left layout attribute of the block.","type":"integer"},"padding_right":{"description":"The padding_right layout attribute of the block.","type":"integer"},"padding_top":{"description":"The padding_top layout attribute of the block.","type":"integer"}},"required":["padding_top","padding_right","padding_bottom","padding_left","horizontal_align"],"type":"object"},"style_attrs":{"description":"The style attributes of the image.","properties":{"width":{"description":"The width of the image.","example":"100%","type":"string"}},"type":"object"},"type":{"description":"The type of the block.","enum":["image"],"example":"image","type":"string"},"url":{"description":"The URL of the image to display.","format":"uri","type":"string"},"version":{"description":"The version of the block schema. This is automatically managed by Knock and should not be set manually. Currently all blocks are at version 1.","example":1,"type":"integer"}},"required":["type","url"],"title":"EmailImageBlock","type":"object"},"PaginatedVariableResponse":{"description":"A paginated list of Variable. Contains a list of entries and page information.","example":{"entries":[{"description":"This is a description of my variable.","environment_values":{"development":"dev_value","production":"prod_value"},"inserted_at":"2021-01-01T00:00:00Z","key":"my_variable","type":"public","updated_at":"2021-01-01T00:00:00Z","value":"my_value"}],"page_info":{"after":null,"before":null,"page_size":25}},"properties":{"entries":{"description":"A list of entries.","items":{"$ref":"#/components/schemas/Variable"},"nullable":false,"type":"array"},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["entries","page_info"],"title":"PaginatedVariableResponse","type":"object"},"ChannelGroupRuleRequest":{"description":"A rule that determines if a channel should be executed as part of a channel group.","example":{"channel_key":"email-channel","index":0,"rule_type":"always"},"properties":{"argument":{"description":"For conditional rules, the value to compare against.","nullable":true,"type":"string"},"channel_key":{"description":"The key of the channel this rule applies to.","type":"string"},"index":{"description":"The order index of this rule within the channel group.","type":"integer"},"operator":{"description":"For conditional rules, the operator to apply.","enum":["equal_to","not_equal_to","greater_than","less_than","greater_than_or_equal_to","less_than_or_equal_to","contains","not_contains","contains_all","not_contains_all","is_timestamp_before","is_timestamp_on_or_after","is_timestamp_between","is_between","empty","not_empty","exists","not_exists","is_timestamp","is_audience_member","is_not_audience_member"],"example":"equal_to","nullable":true,"type":"string"},"rule_type":{"description":"The type of rule (if = conditional, unless = negative conditional, always = always apply).","enum":["if","unless","always"],"type":"string"},"variable":{"description":"For conditional rules, the variable to evaluate.","nullable":true,"type":"string"}},"required":["channel_key","rule_type"],"title":"ChannelGroupRuleRequest","type":"object"},"PreviewWorkflowTemplateResponse":{"description":"A response to a preview workflow template request.","example":{"content_type":"email","result":"success","template":{"html_body":"<p>Hello, {{ recipient.name }}! Welcome to {{ vars.app_name }} <a href='{{ data.sign_in_url }}'>Get started here</a>.</p>","settings":{"layout_key":"default"},"subject":"Welcome to {{ vars.app_name }}","text_body":"Hello, {{ recipient.name }}! Welcome to {{ vars.app_name }} Get started here: {{ data.sign_in_url }}."}},"properties":{"content_type":{"description":"The content type of the preview.","enum":["email","in_app_feed","push","chat","sms","http"],"type":"string"},"result":{"description":"The result of the preview.","enum":["success","error"],"type":"string"},"template":{"anyOf":[{"$ref":"#/components/schemas/EmailTemplate"},{"$ref":"#/components/schemas/InAppFeedTemplate"},{"$ref":"#/components/schemas/PushTemplate"},{"$ref":"#/components/schemas/ChatTemplate"},{"$ref":"#/components/schemas/SmsTemplate"},{"$ref":"#/components/schemas/RequestTemplate"}],"description":"The rendered template, ready to be previewed.","type":"object"}},"required":["result","content_type","template"],"title":"PreviewWorkflowTemplateResponse","type":"object"},"RequestTemplateHeadersString":{"description":"A template string that should resolve to a JSON object representing the headers.","example":"{{ data.request_headers }}","title":"RequestTemplateHeadersString","type":"string"},"WorkflowUpdateTenantStep":{"description":"An update tenant step. Updates properties of a specific tenant referenced in the workflow.","example":{"description":"Update tenant step description.","name":"Update tenant","ref":"update_tenant_1","settings":{"recipient_gid":"gid://Object/$tenants/tenant-123","recipient_mode":"reference","update_properties":"{\"name\": \"Updated Tenant\"}"},"type":"update_tenant"},"properties":{"conditions":{"anyOf":[{"$ref":"#/components/schemas/ConditionGroup"},{"nullable":true}],"description":"A conditions object that describes one or more conditions to be met in order for the step to be executed.","type":"object"},"description":{"description":"An arbitrary string attached to a workflow step. Useful for adding notes about the workflow for internal purposes.","example":"Update tenant step description.","nullable":true,"type":"string"},"name":{"description":"A name for the workflow step.","example":"Update tenant","nullable":true,"type":"string"},"ref":{"description":"The reference key of the workflow step. Must be unique per workflow.","example":"update_tenant_1","type":"string"},"settings":{"description":"The settings for the update tenant step.","properties":{"recipient_gid":{"description":"The global identifier (GID) of the tenant to update. Required when recipient_mode is 'reference'. Format: gid://Object/$tenants/{id}","example":"gid://Object/$tenants/tenant-123","nullable":true,"type":"string"},"recipient_mode":{"description":"The recipient mode determining how the tenant is selected. 'current' uses the workflow's current tenant. 'reference' uses a specific tenant ID.","enum":["current","reference"],"example":"reference","type":"string"},"update_properties":{"description":"A JSON string or Liquid template that evaluates to the properties to update on the tenant.","example":"{\"name\": \"Updated Tenant\", \"status\": \"active\"}","type":"string"}},"required":["recipient_mode","update_properties"],"type":"object"},"type":{"description":"The type of the workflow step.","enum":["update_tenant"],"example":"update_tenant","type":"string"}},"required":["type","ref","settings"],"title":"WorkflowUpdateTenantStep","type":"object"},"WorkflowDelayStep":{"description":"A delay function step. Read more in the [docs](https://docs.knock.app/designing-workflows/delay-function).","example":{"conditions":{},"description":"Delay for 10 seconds","name":"Delay","ref":"delay_step","settings":{"delay_for":{"unit":"seconds","value":10}},"type":"delay"},"properties":{"conditions":{"anyOf":[{"$ref":"#/components/schemas/ConditionGroup"},{"nullable":true}],"description":"A set of conditions to be evaluated for this delay step.","type":"object"},"description":{"description":"An arbitrary string attached to a workflow step. Useful for adding notes about the workflow for internal purposes.","example":"Delay for 10 seconds","nullable":true,"type":"string"},"name":{"description":"A name for the workflow step.","example":"Delay","nullable":true,"type":"string"},"ref":{"description":"The reference key of the workflow step. Must be unique per workflow.","example":"delay_step","type":"string"},"settings":{"description":"The settings for the delay step. Both fields can be set to compute a delay where `delay_for` is an offset from the `delay_until_field_path`.","properties":{"delay_for":{"anyOf":[{"$ref":"#/components/schemas/Duration"},{"nullable":true}],"description":"A duration object that describes how long to wait before proceeding to the next step.","type":"object"},"delay_until_field_path":{"description":"When set will use the path to resolve the delay into a timestamp from the property referenced","example":"recipient.delay_until","type":"string"}},"type":"object"},"type":{"description":"The type of the workflow step.","enum":["delay"],"example":"delay","type":"string"}},"required":["type","ref","settings"],"title":"WorkflowDelayStep","type":"object"},"RequestTemplate":{"description":"A request template for a fetch function step.","example":{"body":null,"headers":[{"key":"X-API-Key","value":"1234567890"}],"method":"get","query_params":[{"key":"key","value":"value"}],"url":"https://example.com"},"properties":{"body":{"description":"The body of the request. Only used for POST or PUT requests.","example":"{\"key\": \"value\"}","nullable":true,"type":"string"},"headers":{"description":"The headers of the request. Can be a template string or a list of key-value pairs.","example":[{"key":"X-API-Key","value":"1234567890"}],"oneOf":[{"description":"A template string that should resolve to a JSON object representing the headers.","example":"{{ data.request_headers }}","title":"RequestTemplateHeadersString","type":"string"},{"description":"A list of key-value pairs for the request headers. Each object should contain key and value fields with string values.","example":[{"key":"X-API-Key","value":"1234567890"}],"items":{"properties":{"key":{"description":"The key of the header.","example":"X-API-Key","type":"string"},"value":{"description":"The value of the header.","example":"1234567890","type":"string"}},"required":["key","value"],"type":"object"},"title":"RequestTemplateHeadersArray","type":"array"}],"title":"RequestTemplateHeaders","type":"object"},"method":{"description":"The HTTP method of the request.","enum":["get","post","put","delete","patch"],"example":"post","type":"string"},"query_params":{"description":"The query params of the request. Can be a template string or a list of key-value pairs.","example":[{"key":"key","value":"value"}],"oneOf":[{"description":"A template string that should resolve to a JSON object representing the query params.","example":"{{ data.request_query_params }}","title":"RequestTemplateQueryParamsString","type":"string"},{"description":"A list of key-value pairs for the request query params. Each object should contain key and value fields with string values.","example":[{"key":"key","value":"value"}],"items":{"properties":{"key":{"description":"The key of the query param.","example":"key","type":"string"},"value":{"description":"The value of the query param.","example":"value","type":"string"}},"required":["key","value"],"type":"object"},"title":"RequestTemplateQueryParamsArray","type":"array"}],"title":"RequestTemplateQueryParams","type":"object"},"url":{"description":"The URL of the request.","example":"https://example.com","type":"string"}},"required":["url","method"],"title":"RequestTemplate","type":"object"},"WorkflowBranchStepBranch":{"description":"A branch in a branch step.","example":{"conditions":{"all":[{"argument":"pro","operator":"equal_to","variable":"recipient.plan_type"}]},"name":"Pro plan","steps":[],"terminates":false},"properties":{"conditions":{"anyOf":[{"$ref":"#/components/schemas/ConditionGroup"},{"nullable":true}],"description":"A set of conditions to be evaluated for this branch.","type":"object"},"name":{"description":"The name of the branch.","example":"The name of the branch.","type":"string"},"steps":{"description":"A list of steps that will be executed if the branch is chosen.","items":{"$ref":"#/components/schemas/WorkflowStep"},"type":"array"},"terminates":{"description":"If the workflow should halt at the end of the branch. Defaults to false if not provided.","example":true,"type":"boolean"}},"title":"WorkflowBranchStepBranch","type":"object"},"PaginatedBranchResponse":{"description":"A paginated list of Branch. Contains a list of entries and page information.","example":{"entries":[{"created_at":"2022-10-31T19:59:03Z","deleted_at":null,"last_commit_at":"2022-10-31T19:59:03Z","slug":"feature-branch","updated_at":"2022-10-31T19:59:03Z"}],"page_info":{"after":null,"before":null,"page_size":25}},"properties":{"entries":{"description":"A list of entries.","items":{"$ref":"#/components/schemas/Branch"},"nullable":false,"type":"array"},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["entries","page_info"],"title":"PaginatedBranchResponse","type":"object"},"GuideScheduledActivationParams":{"description":"A request to schedule the activation of a guide. At least one of from or until must be provided.","example":{"from":"2024-03-20T10:00:00Z","until":"2024-03-21T10:00:00Z"},"properties":{"from":{"description":"When to activate the guide. If provided, the guide will be scheduled to activate at this time. Must be in ISO 8601 UTC format.","example":"2024-03-20T10:00:00Z","format":"date-time","type":"string"},"until":{"description":"When to deactivate the guide. If provided, the guide will be scheduled to deactivate at this time. Must be in ISO 8601 UTC format.","example":"2024-03-21T10:00:00Z","format":"date-time","type":"string"}},"title":"GuideScheduledActivationParams","type":"object"},"WrappedPartialResponse":{"description":"Wraps the Partial response under the `partial` key.","example":{"partial":{"content":"<p>Hello, world!</p>","description":"This is a test partial","environment":"development","icon_name":"icon-name","input_schema":[{"key":"text_field","label":"My text field","settings":{"description":"A description of the text field","max_length":100,"min_length":10,"required":true},"type":"text"}],"inserted_at":"2021-01-01T00:00:00Z","key":"my-partial","name":"My Partial","type":"html","updated_at":"2021-01-01T00:00:00Z","valid":true,"visual_block_enabled":true}},"properties":{"partial":{"$ref":"#/components/schemas/Partial"}},"required":["partial"],"title":"WrappedPartialResponse","type":"object"},"WorkflowPushStep":{"description":"A push step within a workflow. Read more in the [docs](https://docs.knock.app/designing-workflows/channel-step).","example":{"channel_group_key":null,"channel_key":"apns","channel_overrides":null,"channel_type":"push","conditions":null,"description":"This is a description of the channel step","name":"Push channel step","ref":"channel_step","send_windows":null,"template":{"settings":{"delivery_type":"content","payload_overrides":"{\"name\": \"John\"}"},"text_body":"Hello, world!","title":"Hello, world!"},"type":"channel"},"properties":{"channel_group_key":{"description":"The key of the channel group to which the channel step will be sending a notification. Either `channel_key` or `channel_group_key` must be provided, but not both.","example":"email","nullable":true,"type":"string"},"channel_key":{"description":"The key of a specific configured channel instance (e.g., 'knock-email', 'postmark', 'sendgrid-marketing') to send the notification through. Either `channel_key` or `channel_group_key` must be provided, but not both.","example":"postmark","nullable":true,"type":"string"},"channel_overrides":{"anyOf":[{"$ref":"#/components/schemas/PushChannelSettings"},{"nullable":true}],"description":"A map of channel overrides for the channel step.","type":"object"},"channel_type":{"description":"The type of the channel step. Always `push` for push steps.","enum":["push"],"example":"push","type":"string"},"conditions":{"anyOf":[{"$ref":"#/components/schemas/ConditionGroup"},{"nullable":true}],"description":"A set of conditions to be evaluated for this channel step.","type":"object"},"description":{"description":"An arbitrary string attached to a workflow step. Useful for adding notes about the workflow for internal purposes.","example":"Send a message to the channel","nullable":true,"type":"string"},"name":{"description":"A name for the workflow step.","example":"Channel","nullable":true,"type":"string"},"ref":{"description":"The reference key of the workflow step. Must be unique per workflow.","example":"channel_step","type":"string"},"send_windows":{"description":"A list of send window objects. Must include one send window object per day of the week.","items":{"$ref":"#/components/schemas/SendWindow"},"nullable":true,"type":"array"},"template":{"$ref":"#/components/schemas/PushTemplate"},"type":{"description":"The type of the workflow step.","enum":["channel"],"example":"channel","type":"string"}},"required":["type","ref","template"],"title":"WorkflowPushStep","type":"object"},"BroadcastSendRequest":{"description":"A request to send or schedule a broadcast.","example":{"send_at":"2024-03-20T10:00:00Z"},"properties":{"send_at":{"description":"When to send the broadcast. If provided, the broadcast will be scheduled to send at this time. Must be in ISO 8601 UTC format. If not provided, the broadcast will be sent immediately.","example":"2024-03-20T10:00:00Z","format":"date-time","type":"string"}},"title":"BroadcastSendRequest","type":"object"},"WrappedPartialRequestRequest":{"description":"Wraps the PartialRequest request under the partial key.","example":{"partial":{"content":"<p>Hello, world!</p>","description":"This is a test partial","input_schema":[{"key":"text_field","label":"My text field","settings":{"description":"A description of the text field","max_length":100,"min_length":10,"required":true},"type":"text"}],"name":"My Partial","type":"html","visual_block_enabled":true}},"properties":{"partial":{"$ref":"#/components/schemas/PartialRequest"}},"required":["partial"],"title":"WrappedPartialRequestRequest","type":"object"},"PaginatedBroadcastResponse":{"description":"A paginated list of Broadcast. Contains a list of entries and page information.","example":{"entries":[{"categories":["marketing","promotions"],"created_at":"2022-12-16T19:07:50.027113Z","description":"Holiday promotion broadcast for December","environment":"development","key":"december-promotion","name":"December Promotion","scheduled_at":null,"sent_at":null,"settings":{"is_commercial":true,"override_preferences":false},"sha":"f7e9d3b2a1c8e6m4k5j7h9g0i2l3n4p6q8r0t1u3v5w7x9y","status":"draft","steps":[{"channel_key":"in-app-feed","description":"Main in-app feed","name":"In-app step","ref":"in_app_feed_1","template":{"action_url":"{{ vars.app_url }}","markdown_body":"Hello **{{ recipient.name }}**"},"type":"channel"}],"target_audience_key":"premium-users","updated_at":"2023-02-08T22:15:19.846681Z","valid":true}],"page_info":{"after":null,"before":null,"page_size":25}},"properties":{"entries":{"description":"A list of entries.","items":{"$ref":"#/components/schemas/Broadcast"},"nullable":false,"type":"array"},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["entries","page_info"],"title":"PaginatedBroadcastResponse","type":"object"},"MessageTypeMultiSelectField":{"description":"A multi-select field used in a message type.","example":{"key":"multi_select_field","label":"Multi-Select Field","settings":{"default":["option1","option3"],"description":"A description of the multi-select field","options":[{"label":"Option 1","value":"option1"},{"label":"Option 2","value":"option2"},{"label":"Option 3","value":"option3"}],"required":true},"type":"multi_select"},"properties":{"key":{"description":"The unique key of the field.","example":"key","type":"string"},"label":{"description":"The label of the field.","example":"Label","nullable":true,"type":"string"},"settings":{"description":"Settings for the multi_select field.","properties":{"default":{"description":"The default values for the multi-select field.","example":["option1","option3"],"items":{"type":"string"},"nullable":true,"type":"array"},"description":{"example":"A description of the field, used in the UI as a hint text.","nullable":true,"type":"string"},"options":{"description":"The available options for the multi-select field.","items":{"properties":{"label":{"description":"The display label for the option.","example":"Option 1","type":"string"},"value":{"description":"The value for the option.","example":"option1","type":"string"}},"required":["value"],"type":"object"},"type":"array"},"placeholder":{"example":"A placeholder for the field.","nullable":true,"type":"string"},"required":{"description":"Whether the field is required.","example":true,"type":"boolean"}},"type":"object"},"type":{"description":"The type of the field.","enum":["multi_select"],"example":"multi_select","type":"string"}},"required":["type","key","label","settings"],"title":"MessageTypeMultiSelectField","type":"object"},"MessageTypeBooleanField":{"description":"A boolean field used in a message type.","example":{"key":"boolean_field","label":"Boolean Field","settings":{"default":false,"description":"A description of the boolean field","required":true},"type":"boolean"},"properties":{"key":{"description":"The unique key of the field.","example":"key","type":"string"},"label":{"description":"The label of the field.","example":"Label","nullable":true,"type":"string"},"settings":{"description":"Settings for the boolean field.","properties":{"default":{"description":"The default value of the boolean field.","example":true,"type":"boolean"},"description":{"example":"A description of the field, used in the UI as a hint text.","nullable":true,"type":"string"},"placeholder":{"example":"A placeholder for the field.","nullable":true,"type":"string"},"required":{"description":"Whether the field is required.","example":true,"type":"boolean"}},"type":"object"},"type":{"description":"The type of the field.","enum":["boolean"],"example":"boolean","type":"string"}},"required":["type","key","label"],"title":"MessageTypeBooleanField","type":"object"},"Translation":{"description":"A translation object.","example":{"content":"{\"hello\":\"Hello, world!\"}","format":"json","inserted_at":"2021-01-01T00:00:00Z","locale_code":"en","namespace":"my_app","updated_at":"2021-01-01T00:00:00Z"},"properties":{"content":{"description":"A JSON encoded string containing the key-value pairs of translation references and translation strings.","type":"string"},"format":{"description":"Indicates whether content is a JSON encoded object string or a string in the PO format.","enum":["json","po"],"type":"string"},"inserted_at":{"description":"The timestamp of when the translation was created.","format":"date-time","type":"string"},"locale_code":{"description":"The locale code for the translation object.","type":"string"},"namespace":{"description":"An optional namespace for the translation to help categorize your translations.","type":"string"},"tenant":{"description":"An optional tenant identifier to scope the translation to a specific tenant.","type":"string"},"updated_at":{"description":"The timestamp of when the translation was last updated.","format":"date-time","type":"string"}},"required":["locale_code","namespace","content","format","inserted_at","updated_at"],"title":"Translation","type":"object"},"Commit":{"description":"A commit is a change to a resource within an environment, made by an author.","example":{"author":{"email":"john.doe@example.com","name":"John Doe"},"commit_message":"This is a commit message","created_at":"2021-01-01T00:00:00Z","environment":"development","id":"123e4567-e89b-12d3-a456-426614174000","resource":{"identifier":"my-email-layout","type":"email_layout"}},"properties":{"author":{"description":"The author of the commit.","example":{"email":"john.doe@example.com","name":"John Doe"},"properties":{"email":{"description":"The email address of the commit author.","type":"string"},"name":{"description":"The name of the commit author.","nullable":true,"type":"string"}},"required":["email"],"title":"CommitAuthor","type":"object"},"commit_message":{"description":"The optional message about the commit.","type":"string"},"created_at":{"description":"The timestamp of when the commit was created.","format":"date-time","type":"string"},"environment":{"description":"The environment of the commit.","example":"development","type":"string"},"id":{"description":"The unique identifier for the commit.","format":"uuid","type":"string"},"resource":{"description":"The resource object associated with the commit.","example":{"identifier":"my-email-layout","type":"email_layout"},"properties":{"identifier":{"description":"The unique identifier for the resource.","type":"string"},"type":{"description":"The type of the resource object.","enum":["audience","email_layout","guide","message_type","partial","translation","workflow"],"example":"workflow","type":"string"}},"required":["identifier","type"],"title":"CommitResource","type":"object"}},"required":["id","resource","author","environment","created_at"],"title":"Commit","type":"object"},"MessageTypeRequest":{"description":"A request to create a message type.","example":{"description":"This is a message type","name":"My Message Type","preview":"<div>Hello, world!</div>","variants":[{"fields":[{"key":"text_field","label":"My text field","settings":{"description":"A description of the text field","max_length":100,"min_length":10,"required":true},"type":"text"}],"key":"default","name":"Default"}]},"properties":{"description":{"description":"An arbitrary string attached to a message type object. Useful for adding notes about the message type for internal purposes. Maximum of 280 characters allowed.","nullable":true,"type":"string"},"icon_name":{"description":"The icon name of the message type.","type":"string"},"name":{"description":"A name for the message type. Must be at maximum 255 characters in length.","type":"string"},"preview":{"description":"An HTML/liquid template for the message type preview.","type":"string"},"semver":{"description":"The semantic version of the message type.","example":"1.0.0","type":"string"},"variants":{"description":"The variants of the message type.","items":{"$ref":"#/components/schemas/MessageTypeVariant"},"type":"array"}},"required":["name","description","preview"],"title":"MessageTypeRequest","type":"object"},"MessageTypeButtonField":{"description":"A button field used in a message type.","example":{"action":{"key":"action","label":"Button Action","settings":{"description":"A description of the text field in the button action","required":true},"type":"text"},"key":"button_field","label":"Button Field","settings":{"description":"A description of the button field","required":true},"text":{"key":"text","label":"Button Text","settings":{"description":"A description of the text field in the button","required":true},"type":"text"},"type":"button"},"properties":{"action":{"$ref":"#/components/schemas/MessageTypeTextField"},"key":{"description":"The unique key of the field.","example":"key","type":"string"},"label":{"description":"The label of the field.","example":"Label","nullable":true,"type":"string"},"settings":{"description":"Settings for the button field.","properties":{"description":{"example":"A description of the field, used in the UI as a hint text.","nullable":true,"type":"string"},"placeholder":{"example":"A placeholder for the field.","nullable":true,"type":"string"},"required":{"description":"Whether the field is required.","example":true,"type":"boolean"}},"type":"object"},"text":{"$ref":"#/components/schemas/MessageTypeTextField"},"type":{"description":"The type of the field.","enum":["button"],"example":"button","type":"string"}},"required":["type","key","label","text","action"],"title":"MessageTypeButtonField","type":"object"},"WorkflowChatStep":{"description":"A chat step within a workflow. Read more in the [docs](https://docs.knock.app/designing-workflows/channel-step).","example":{"channel_group_key":null,"channel_key":"slack","channel_overrides":null,"channel_type":"chat","conditions":null,"description":"This is a description of the channel step","name":"Chat channel step","ref":"channel_step","send_windows":null,"template":{"json_body":null,"markdown_body":"**Hello**, world!","summary":"Hello, world!"},"type":"channel"},"properties":{"channel_group_key":{"description":"The key of the channel group to which the channel step will be sending a notification. Either `channel_key` or `channel_group_key` must be provided, but not both.","example":"email","nullable":true,"type":"string"},"channel_key":{"description":"The key of a specific configured channel instance (e.g., 'knock-email', 'postmark', 'sendgrid-marketing') to send the notification through. Either `channel_key` or `channel_group_key` must be provided, but not both.","example":"postmark","nullable":true,"type":"string"},"channel_overrides":{"anyOf":[{"$ref":"#/components/schemas/ChatChannelSettings"},{"nullable":true}],"description":"A map of channel overrides for the channel step.","type":"object"},"channel_type":{"description":"The type of the channel step. Always `chat` for chat steps.","enum":["chat"],"example":"chat","type":"string"},"conditions":{"anyOf":[{"$ref":"#/components/schemas/ConditionGroup"},{"nullable":true}],"description":"A set of conditions to be evaluated for this channel step.","type":"object"},"description":{"description":"An arbitrary string attached to a workflow step. Useful for adding notes about the workflow for internal purposes.","example":"Send a message to the channel","nullable":true,"type":"string"},"name":{"description":"A name for the workflow step.","example":"Channel","nullable":true,"type":"string"},"ref":{"description":"The reference key of the workflow step. Must be unique per workflow.","example":"channel_step","type":"string"},"send_windows":{"description":"A list of send window objects. Must include one send window object per day of the week.","items":{"$ref":"#/components/schemas/SendWindow"},"nullable":true,"type":"array"},"template":{"$ref":"#/components/schemas/ChatTemplate"},"type":{"description":"The type of the workflow step.","enum":["channel"],"example":"channel","type":"string"}},"required":["type","ref","template"],"title":"WorkflowChatStep","type":"object"},"EmailButtonSetBlock":{"description":"A button set block in an email template.","example":{"buttons":[{"action":"https://example.com/button-action","label":"Click me","size_attrs":{"is_fullwidth":false,"size":"sm"},"style_attrs":{"background_color":"#000000","border_color":"#000000","border_radius":6,"border_width":1,"text_color":"#FFFFFF"},"variant":"solid"}],"layout_attrs":{"column_gap":8,"horizontal_align":"left","padding_bottom":8,"padding_left":4,"padding_right":4,"padding_top":8},"type":"button_set"},"properties":{"buttons":{"description":"A list of buttons in the button set.","items":{"$ref":"#/components/schemas/EmailButtonSetBlockButton"},"type":"array"},"id":{"description":"The ID of the block.","example":"123e4567-e89b-12d3-a456-426614174000","format":"uuid","type":"string"},"layout_attrs":{"description":"The layout attributes of the block.","properties":{"column_gap":{"description":"The column_gap layout attribute of the block.","type":"integer"},"horizontal_align":{"description":"The horizontal alignment of the block.","enum":["left","center","right"],"type":"string"},"padding_bottom":{"description":"The padding_bottom layout attribute of the block.","type":"integer"},"padding_left":{"description":"The padding_left layout attribute of the block.","type":"integer"},"padding_right":{"description":"The padding_right layout attribute of the block.","type":"integer"},"padding_top":{"description":"The padding_top layout attribute of the block.","type":"integer"}},"required":["padding_top","padding_right","padding_bottom","padding_left","horizontal_align","column_gap"],"type":"object"},"type":{"description":"The type of the block.","enum":["button_set"],"example":"button_set","type":"string"},"version":{"description":"The version of the block schema. This is automatically managed by Knock and should not be set manually. Currently all blocks are at version 1.","example":1,"type":"integer"}},"required":["type","buttons"],"title":"EmailButtonSetBlock","type":"object"},"InAppFeedTemplate":{"description":"An in-app feed template.","example":{"action_buttons":[{"action":"https://example.com","label":"Button 1"}],"action_url":"https://example.com","markdown_body":"Hello, world!"},"properties":{"action_buttons":{"description":"The action buttons of the in-app feed message.","items":{"description":"A single-action button to be rendered in an in-app feed cell.","properties":{"action":{"description":"The URI for this action.","example":"https://example.com","type":"string"},"label":{"description":"The label of the action button.","example":"Button 1","type":"string"}},"required":["label","action"],"type":"object"},"type":"array"},"action_url":{"description":"The URL to navigate to when the in-app feed is tapped. Can be omitted for multi-action templates, where the action buttons will be used instead.","example":"https://example.com","nullable":true,"type":"string"},"markdown_body":{"description":"The markdown body of the in-app feed.","example":"Hello, world!","type":"string"}},"required":["markdown_body"],"title":"InAppFeedTemplate","type":"object"},"MessageTypeImageField":{"description":"An image field used in a message type.","example":{"action":{"key":"action","label":"Image Action","settings":{"description":"A link to open when the paywall image is clicked","placeholder":"A placeholder for the image action","required":true},"type":"text"},"alt":{"key":"alt","label":"Alt Text","settings":{"description":"A description of the paywall image","placeholder":"A placeholder for the alt text","required":true},"type":"text"},"key":"image_field","label":"Paywall Image","settings":{"description":"An image to display in the paywall","required":true},"type":"image","url":{"key":"url","label":"Image URL","settings":{"description":"The URL of the paywall image","placeholder":"A placeholder for the image URL","required":true},"type":"url"}},"properties":{"action":{"$ref":"#/components/schemas/MessageTypeTextField"},"alt":{"$ref":"#/components/schemas/MessageTypeTextField"},"key":{"description":"The unique key of the field.","example":"key","type":"string"},"label":{"description":"The label of the field.","example":"Label","nullable":true,"type":"string"},"settings":{"description":"Settings for the image field.","properties":{"description":{"example":"A description of the field, used in the UI as a hint text.","nullable":true,"type":"string"},"placeholder":{"example":"A placeholder for the field.","nullable":true,"type":"string"},"required":{"description":"Whether the field is required.","example":true,"type":"boolean"}},"type":"object"},"type":{"description":"The type of the field.","enum":["image"],"example":"image","type":"string"},"url":{"$ref":"#/components/schemas/MessageTypeUrlField"}},"required":["type","key","label","url","action","alt"],"title":"MessageTypeImageField","type":"object"},"MessageTypeVariant":{"description":"A variant of a message type.","example":{"fields":[{"key":"text_field","label":"My text field","settings":{"description":"A description of the text field","max_length":100,"min_length":10,"required":true},"type":"text"}],"key":"default","name":"Default"},"properties":{"fields":{"description":"The field types available for the variant.","items":{"anyOf":[{"$ref":"#/components/schemas/MessageTypeBooleanField"},{"$ref":"#/components/schemas/MessageTypeButtonField"},{"$ref":"#/components/schemas/MessageTypeImageField"},{"$ref":"#/components/schemas/MessageTypeJsonField"},{"$ref":"#/components/schemas/MessageTypeMarkdownField"},{"$ref":"#/components/schemas/MessageTypeMultiSelectField"},{"$ref":"#/components/schemas/MessageTypeSelectField"},{"$ref":"#/components/schemas/MessageTypeTextField"},{"$ref":"#/components/schemas/MessageTypeTextareaField"},{"$ref":"#/components/schemas/MessageTypeUrlField"}],"type":"object"},"type":"array"},"key":{"description":"The unique key string for the variant. Must be at minimum 3 characters and at maximum 255 characters in length. Must be in the format of ^[a-z0-9_-]+$.","type":"string"},"name":{"description":"A name for the variant. Must be at maximum 255 characters in length.","type":"string"}},"required":["key","name","fields"],"title":"MessageTypeVariant","type":"object"},"EmailLayoutRequest":{"description":"A request to update or create an email layout.","example":{"branding_overrides":{"dark_logo_url":"https://cdn.example.com/logo-dark.png","dark_primary_color":"#1A1A2E","dark_primary_color_contrast":"#FFFFFF","primary_color":"#4F46E5","primary_color_contrast":"#FFFFFF"},"footer_links":[{"text":"Example","url":"http://example.com"}],"html_layout":"<html><body>Hello, world!</body></html>","name":"Transactional","text_layout":"Hello, world!"},"properties":{"branding_overrides":{"$ref":"#/components/schemas/BrandingOverrides"},"footer_links":{"description":"A list of one or more items to show in the footer of the email layout.","items":{"properties":{"text":{"description":"The text to display as the link.","nullable":false,"type":"string"},"url":{"description":"The URL to link to.","nullable":false,"type":"string"}},"required":["text","url"],"type":"object"},"type":"array"},"html_layout":{"description":"The complete HTML or MJML content of the email layout.","nullable":false,"type":"string"},"is_mjml":{"description":"Whether this layout uses MJML format. When true, html_layout must contain <mjml> tags.","nullable":true,"type":"boolean"},"name":{"description":"The friendly name of this email layout.","nullable":false,"type":"string"},"text_layout":{"description":"The complete plain text content of the email layout.","nullable":false,"type":"string"}},"required":["name","html_layout","text_layout"],"title":"EmailLayoutRequest","type":"object"},"WrappedChannelGroupResponse":{"description":"Wraps the ChannelGroup response under the `channel_group` key.","example":{"channel_group":{"channel_rules":[{"channel":{"archived_at":null,"created_at":"2021-01-01T00:00:00Z","custom_icon_url":null,"id":"01234567-89ab-cdef-0123-456789abcdef","key":"my-sendgrid-channel","name":"My Sendgrid Channel","provider":"sendgrid","type":"email","updated_at":"2021-01-01T00:00:00Z"},"created_at":"2021-01-01T00:00:00Z","index":0,"rule_type":"always","updated_at":"2021-01-01T00:00:00Z"}],"channel_type":"push","created_at":"2021-01-01T00:00:00Z","key":"push-group","name":"Push Notification Group","operator":"any","source":"user","updated_at":"2021-01-01T00:00:00Z"}},"properties":{"channel_group":{"$ref":"#/components/schemas/ChannelGroup"}},"required":["channel_group"],"title":"WrappedChannelGroupResponse","type":"object"},"PartialRequest":{"description":"A partial object with attributes to update or create a partial.","example":{"content":"<p>Hello, world!</p>","description":"This is a test partial","input_schema":[{"key":"text_field","label":"My text field","settings":{"description":"A description of the text field","max_length":100,"min_length":10,"required":true},"type":"text"}],"name":"My Partial","type":"html","visual_block_enabled":true},"properties":{"content":{"description":"The partial content.","type":"string"},"description":{"description":"An arbitrary string attached to a partial object. Useful for adding notes about the partial for internal purposes. Maximum of 280 characters allowed.","type":"string"},"icon_name":{"description":"The name of the icon to be used in the visual editor.","type":"string"},"input_schema":{"description":"The field types available for the partial.","items":{"anyOf":[{"$ref":"#/components/schemas/MessageTypeBooleanField"},{"$ref":"#/components/schemas/MessageTypeButtonField"},{"$ref":"#/components/schemas/MessageTypeImageField"},{"$ref":"#/components/schemas/MessageTypeJsonField"},{"$ref":"#/components/schemas/MessageTypeMarkdownField"},{"$ref":"#/components/schemas/MessageTypeMultiSelectField"},{"$ref":"#/components/schemas/MessageTypeSelectField"},{"$ref":"#/components/schemas/MessageTypeTextField"},{"$ref":"#/components/schemas/MessageTypeTextareaField"},{"$ref":"#/components/schemas/MessageTypeUrlField"}],"type":"object"},"type":"array"},"name":{"description":"A name for the partial. Must be at maximum 255 characters in length.","type":"string"},"type":{"description":"The partial type. One of 'html', 'json', 'markdown', 'text'.","enum":["html","text","json","markdown"],"type":"string"},"visual_block_enabled":{"description":"Indicates whether the partial can be used in the visual editor. Only applies to HTML partials.","type":"boolean"}},"required":["type","name","content"],"title":"PartialRequest","type":"object"},"ConditionGroup":{"anyOf":[{"$ref":"#/components/schemas/ConditionGroupAllMatch"},{"$ref":"#/components/schemas/ConditionGroupAnyMatch"}],"description":"A group of conditions to be evaluated.","example":{"all":[{"argument":"some_property","operator":"equal_to","variable":"recipient.property"}]},"title":"ConditionGroup","type":"object"},"MessageTypeJsonField":{"description":"A JSON field used in a message type.","example":{"key":"json_field","label":"JSON Field","settings":{"default":{"key":"value"},"description":"A description of the JSON field","placeholder":"A placeholder for the JSON field","required":true,"schema":{"properties":{"key":{"type":"string"}},"required":["key"]}},"type":"json"},"properties":{"key":{"description":"The unique key of the field.","example":"key","type":"string"},"label":{"description":"The label of the field.","example":"Label","nullable":true,"type":"string"},"settings":{"description":"Settings for the json field.","properties":{"default":{"description":"The default value of the JSON field.","example":{"key":"value"},"nullable":true,"type":"object"},"description":{"example":"A description of the field, used in the UI as a hint text.","nullable":true,"type":"string"},"placeholder":{"example":"A placeholder for the field.","nullable":true,"type":"string"},"required":{"description":"Whether the field is required.","example":true,"type":"boolean"},"schema":{"description":"A JSON schema used to validate the structure of the JSON provided. Must be a valid JSON schema.","example":{"properties":{"key":{"type":"string"}}},"nullable":true,"type":"object"}},"type":"object"},"type":{"description":"The type of the field.","enum":["json"],"example":"json","type":"string"}},"required":["type","key","label"],"title":"MessageTypeJsonField","type":"object"},"BroadcastRequest":{"description":"A broadcast request for upserting a broadcast.","example":{"categories":["announcement"],"description":"A broadcast to all users","name":"My Broadcast","settings":{"is_commercial":true,"override_preferences":false},"steps":[{"channel_key":"in-app-feed","name":"Channel 1","ref":"channel_1","template":{"action_url":"{{ vars.app_url }}","markdown_body":"Hello **{{ recipient.name }}**"},"type":"channel"}],"target_audience_key":"all-users"},"properties":{"categories":{"description":"A list of categories that the broadcast belongs to.","items":{"type":"string"},"type":"array"},"description":{"description":"An arbitrary string attached to a broadcast object. Useful for adding notes about the broadcast for internal purposes. Maximum of 280 characters allowed.","type":"string"},"name":{"description":"A name for the broadcast. Must be at maximum 255 characters in length.","type":"string"},"scheduled_at":{"description":"The timestamp of when the broadcast is scheduled to be sent.","format":"date-time","nullable":true,"type":"string"},"settings":{"description":"A map of broadcast settings.","properties":{"is_commercial":{"description":"Whether the broadcast is commercial. Defaults to true.","example":true,"type":"boolean"},"override_preferences":{"description":"Whether to ignore recipient preferences for a given type of notification. If true, will send for every channel in the workflow even if the recipient has opted out of a certain kind. Defaults to false.","example":false,"type":"boolean"}},"type":"object"},"steps":{"description":"A list of broadcast step objects in the broadcast. Broadcasts only support channel, branch, and delay steps.","items":{"anyOf":[{"$ref":"#/components/schemas/WorkflowWebhookStep"},{"$ref":"#/components/schemas/WorkflowInAppFeedStep"},{"$ref":"#/components/schemas/WorkflowChatStep"},{"$ref":"#/components/schemas/WorkflowSmsStep"},{"$ref":"#/components/schemas/WorkflowPushStep"},{"$ref":"#/components/schemas/WorkflowEmailStep"},{"$ref":"#/components/schemas/WorkflowBranchStep"},{"$ref":"#/components/schemas/WorkflowDelayStep"},{"$ref":"#/components/schemas/WorkflowRandomCohortStep"}],"description":"A step within a broadcast. Each step, regardless of its type, share a common set of core attributes (`type`, `ref`, `name`, `description`, `conditions`).","type":"object"},"type":"array"},"target_audience_key":{"description":"The key of the audience to target for this broadcast.","type":"string"}},"required":["name","steps"],"title":"BroadcastRequest","type":"object"},"WrappedBroadcastResponse":{"description":"Wraps the Broadcast response under the `broadcast` key.","example":{"broadcast":{"categories":["marketing","promotions"],"created_at":"2022-12-16T19:07:50.027113Z","description":"Holiday promotion broadcast for December","environment":"development","key":"december-promotion","name":"December Promotion","scheduled_at":null,"sent_at":null,"settings":{"is_commercial":true,"override_preferences":false},"sha":"f7e9d3b2a1c8e6m4k5j7h9g0i2l3n4p6q8r0t1u3v5w7x9y","status":"draft","steps":[{"channel_key":"in-app-feed","description":"Main in-app feed","name":"In-app step","ref":"in_app_feed_1","template":{"action_url":"{{ vars.app_url }}","markdown_body":"Hello **{{ recipient.name }}**"},"type":"channel"}],"target_audience_key":"premium-users","updated_at":"2023-02-08T22:15:19.846681Z","valid":true}},"properties":{"broadcast":{"$ref":"#/components/schemas/Broadcast"}},"required":["broadcast"],"title":"WrappedBroadcastResponse","type":"object"},"StaticAudienceRequest":{"description":"Request body for creating/updating a static audience.","example":{"description":"Manually managed list of beta testers","name":"Beta users","type":"static"},"properties":{"description":{"description":"A description of the audience.","nullable":true,"type":"string"},"name":{"description":"The name of the audience.","type":"string"},"type":{"description":"The type of audience. Set to `static` for static audiences.","enum":["static"],"type":"string"}},"required":["type","name"],"title":"StaticAudienceRequest","type":"object"},"WrappedAudienceResponse":{"description":"Wraps the Audience response under the `audience` key.","example":{"audience":{"created_at":"2024-01-15T10:30:00Z","description":"Customers who signed up in the last 30 days.","environment":"development","key":"new-customers","name":"New customers","segments":[{"conditions":[{"argument":"30_days_ago","operator":"greater_than","property":"recipient.created_at"}]}],"sha":"a1b2c3d4e5f6","type":"dynamic","updated_at":"2024-06-20T14:45:00Z"}},"properties":{"audience":{"$ref":"#/components/schemas/Audience"}},"required":["audience"],"title":"WrappedAudienceResponse","type":"object"},"ArchiveGuideResponse":{"description":"The response from archiving a guide.","example":{"result":"success"},"properties":{"result":{"description":"The result of the promote operation.","example":"success","type":"string"}},"required":["result"],"title":"ArchiveGuideResponse","type":"object"},"WorkflowInAppFeedStep":{"description":"An in-app feed step within a workflow. Read more in the [docs](https://docs.knock.app/designing-workflows/channel-step).","example":{"channel_group_key":null,"channel_key":"knock-in-app","channel_overrides":null,"channel_type":"in_app_feed","conditions":null,"description":"This is a description of the channel step","name":"In-app feed channel step","ref":"channel_step","send_windows":null,"template":{"action_buttons":[{"action":"https://example.com","label":"Button 1"}],"action_url":"https://example.com","markdown_body":"Hello, world!"},"type":"channel"},"properties":{"channel_group_key":{"description":"The key of the channel group to which the channel step will be sending a notification. Either `channel_key` or `channel_group_key` must be provided, but not both.","example":"email","nullable":true,"type":"string"},"channel_key":{"description":"The key of a specific configured channel instance (e.g., 'knock-email', 'postmark', 'sendgrid-marketing') to send the notification through. Either `channel_key` or `channel_group_key` must be provided, but not both.","example":"postmark","nullable":true,"type":"string"},"channel_overrides":{"anyOf":[{"$ref":"#/components/schemas/InAppFeedChannelSettings"},{"nullable":true}],"description":"A map of channel overrides for the channel step.","type":"object"},"channel_type":{"description":"The type of the channel step. Always `in_app_feed` for in-app feed steps.","enum":["in_app_feed"],"example":"in_app_feed","type":"string"},"conditions":{"anyOf":[{"$ref":"#/components/schemas/ConditionGroup"},{"nullable":true}],"description":"A set of conditions to be evaluated for this channel step.","type":"object"},"description":{"description":"An arbitrary string attached to a workflow step. Useful for adding notes about the workflow for internal purposes.","example":"Send a message to the channel","nullable":true,"type":"string"},"name":{"description":"A name for the workflow step.","example":"Channel","nullable":true,"type":"string"},"ref":{"description":"The reference key of the workflow step. Must be unique per workflow.","example":"channel_step","type":"string"},"send_windows":{"description":"A list of send window objects. Must include one send window object per day of the week.","items":{"$ref":"#/components/schemas/SendWindow"},"nullable":true,"type":"array"},"template":{"$ref":"#/components/schemas/InAppFeedTemplate"},"type":{"description":"The type of the workflow step.","enum":["channel"],"example":"channel","type":"string"}},"required":["type","ref","template"],"title":"WorkflowInAppFeedStep","type":"object"},"WorkflowRequest":{"description":"A workflow request for upserting a workflow.","example":{"name":"My Workflow","steps":[{"channel_key":"in-app-feed","name":"Channel 1","ref":"channel_1","template":{"action_url":"{{ vars.app_url }}","markdown_body":"Hello **{{ recipient.name }}**"},"type":"channel"}]},"properties":{"categories":{"description":"A list of [categories](https://docs.knock.app/concepts/workflows#workflow-categories) that the workflow belongs to.","items":{"type":"string"},"type":"array"},"conditions":{"anyOf":[{"$ref":"#/components/schemas/ConditionGroup"},{"nullable":true}],"description":"A conditions object that describes one or more conditions to be met for the workflow to be executed. (optional).","type":"object"},"description":{"description":"An arbitrary string attached to a workflow object. Useful for adding notes about the workflow for internal purposes. Maximum of 280 characters allowed.","type":"string"},"name":{"description":"A name for the workflow. Must be at maximum 255 characters in length.","type":"string"},"settings":{"description":"A map of workflow settings.","properties":{"is_commercial":{"description":"Whether the workflow is commercial. Defaults to false.","example":false,"type":"boolean"},"override_preferences":{"description":"Whether to ignore recipient preferences for a given type of notification. If true, will send for every channel in the workflow even if the recipient has opted out of a certain kind. Defaults to false.","example":false,"type":"boolean"}},"type":"object"},"steps":{"description":"A list of workflow step objects in the workflow.","items":{"$ref":"#/components/schemas/WorkflowStep"},"type":"array"},"trigger_data_json_schema":{"additionalProperties":true,"description":"A JSON schema for the expected structure of the workflow trigger's `data` payload (available in templates as `{{ data.field_name }}`). Used to validate trigger requests. Read more in the [docs](https://docs.knock.app/developer-tools/validating-trigger-data).","type":"object"},"trigger_frequency":{"description":"The frequency at which the workflow should be triggered. One of: `once_per_recipient`, `once_per_recipient_per_tenant`, `every_trigger`. Defaults to `every_trigger`. Read more in [docs](https://docs.knock.app/send-notifications/triggering-workflows/overview#controlling-workflow-trigger-frequency).","enum":["every_trigger","once_per_recipient","once_per_recipient_per_tenant"],"example":"every_trigger","type":"string"}},"required":["name","steps"],"title":"WorkflowRequest","type":"object"},"EmailPartialBlock":{"description":"A partial block in an email template, used to render a reusable partial component.","example":{"attrs":{"foo":"bar"},"key":"my_partial","layout_attrs":{"padding_bottom":8,"padding_left":4,"padding_right":4,"padding_top":8},"name":"my_partial","type":"partial"},"properties":{"attrs":{"additionalProperties":true,"description":"The attributes to pass to the partial block.","type":"object"},"id":{"description":"The ID of the block.","example":"123e4567-e89b-12d3-a456-426614174000","format":"uuid","type":"string"},"key":{"description":"The key of the partial block to invoke.","type":"string"},"layout_attrs":{"description":"The layout attributes of the block.","properties":{"padding_bottom":{"description":"The padding_bottom layout attribute of the block.","type":"integer"},"padding_left":{"description":"The padding_left layout attribute of the block.","type":"integer"},"padding_right":{"description":"The padding_right layout attribute of the block.","type":"integer"},"padding_top":{"description":"The padding_top layout attribute of the block.","type":"integer"}},"required":["padding_top","padding_right","padding_bottom","padding_left"],"type":"object"},"name":{"description":"The name of the partial block.","type":"string"},"type":{"description":"The type of the block.","enum":["partial"],"example":"partial","type":"string"},"version":{"description":"The version of the block schema. This is automatically managed by Knock and should not be set manually. Currently all blocks are at version 1.","example":1,"type":"integer"}},"required":["type","name","key","attrs"],"title":"EmailPartialBlock","type":"object"},"WrappedBroadcastRequestRequest":{"description":"Wraps the BroadcastRequest request under the broadcast key.","example":{"broadcast":{"categories":["announcement"],"description":"A broadcast to all users","name":"My Broadcast","settings":{"is_commercial":true,"override_preferences":false},"steps":[{"channel_key":"in-app-feed","name":"Channel 1","ref":"channel_1","template":{"action_url":"{{ vars.app_url }}","markdown_body":"Hello **{{ recipient.name }}**"},"type":"channel"}],"target_audience_key":"all-users"}},"properties":{"broadcast":{"$ref":"#/components/schemas/BroadcastRequest"}},"required":["broadcast"],"title":"WrappedBroadcastRequestRequest","type":"object"},"RecipientReference":{"description":"A recipient reference, used when referencing a recipient by either their ID (for a user), or by a reference for an object.","example":{"collection":"projects","id":"project_1"},"oneOf":[{"description":"A user ID.","example":"user_1","nullable":false,"title":"UserRecipientReference","type":"string"},{"description":"An object reference.","example":{"collection":"projects","id":"project_1"},"properties":{"collection":{"description":"The collection of the object.","type":"string"},"id":{"description":"The ID of the object.","type":"string"}},"required":["id","collection"],"title":"ObjectRecipientReference","type":"object"}],"title":"RecipientReference","type":"object"},"WrappedGuideResponse":{"description":"Wraps the Guide response under the `guide` key.","example":{"guide":{"activation_url_patterns":[{"directive":"allow","pathname":"/dashboard/*"}],"active":true,"archived_at":null,"channel_key":"in-app-guide","created_at":"2024-01-01T00:00:00Z","description":"A guide to help users get started with the application","environment":"development","key":"getting-started","name":"Getting Started Guide","semver":"0.0.1","sha":"1234567890","steps":[{"name":"Welcome to the App","ref":"welcome-step","schema_key":"tooltip","schema_semver":"1.0.0","schema_variant_key":"default","values":{"text_field":"value"}}],"target_audience_id":null,"target_property_conditions":{"all":[{"argument":"some_property","operator":"equal_to","variable":"recipient.property"}]},"type":"banner","updated_at":"2024-01-01T00:00:00Z","valid":true}},"properties":{"guide":{"$ref":"#/components/schemas/Guide"}},"required":["guide"],"title":"WrappedGuideResponse","type":"object"},"WorkflowEmailStep":{"description":"An email step within a workflow. Read more in the [docs](https://docs.knock.app/designing-workflows/channel-step).","example":{"channel_group_key":null,"channel_key":"postmark","channel_overrides":null,"channel_type":"email","conditions":null,"description":"This is a description of the channel step","name":"Email channel step","ref":"channel_step","send_windows":null,"template":{"html_body":"<p>Hello, {{ recipient.name }}! Welcome to {{ vars.app_name }} <a href='{{ data.sign_in_url }}'>Get started here</a>.</p>","settings":{"layout_key":"default"},"subject":"Welcome to {{ vars.app_name }}","text_body":"Hello, {{ recipient.name }}! Welcome to {{ vars.app_name }} Get started here: {{ data.sign_in_url }}."},"type":"channel"},"properties":{"channel_group_key":{"description":"The key of the channel group to which the channel step will be sending a notification. Either `channel_key` or `channel_group_key` must be provided, but not both.","example":"email","nullable":true,"type":"string"},"channel_key":{"description":"The key of a specific configured channel instance (e.g., 'knock-email', 'postmark', 'sendgrid-marketing') to send the notification through. Either `channel_key` or `channel_group_key` must be provided, but not both.","example":"postmark","nullable":true,"type":"string"},"channel_overrides":{"anyOf":[{"$ref":"#/components/schemas/EmailChannelSettings"},{"nullable":true}],"description":"A map of channel overrides for the channel step.","type":"object"},"channel_type":{"description":"The category of channel for this step. Always `email` for email steps. This identifies the type of notification (email, sms, push, etc.) while `channel_key` specifies which configured provider instance to use.","enum":["email"],"example":"email","type":"string"},"conditions":{"anyOf":[{"$ref":"#/components/schemas/ConditionGroup"},{"nullable":true}],"description":"A set of conditions to be evaluated for this channel step.","type":"object"},"description":{"description":"An arbitrary string attached to a workflow step. Useful for adding notes about the workflow for internal purposes.","example":"Send a message to the channel","nullable":true,"type":"string"},"name":{"description":"A name for the workflow step.","example":"Channel","nullable":true,"type":"string"},"ref":{"description":"The reference key of the workflow step. Must be unique per workflow.","example":"channel_step","type":"string"},"send_windows":{"description":"A list of send window objects. Must include one send window object per day of the week.","items":{"$ref":"#/components/schemas/SendWindow"},"nullable":true,"type":"array"},"template":{"$ref":"#/components/schemas/EmailTemplate"},"type":{"description":"The type of the workflow step.","enum":["channel"],"example":"channel","type":"string"}},"required":["type","ref","template"],"title":"WorkflowEmailStep","type":"object"},"EmailVisualBlocks":{"description":"The visual blocks that make up the email template.","example":[{"content":"# Hello, {{ recipient.name }}!\n\nWelcome to **{{ vars.app_name }}**. [Get started here]({{ data.sign_in_url }}).","type":"markdown"},{"content":"<p>Hello, {{ recipient.name }}!</p><p>Welcome to <strong>{{ vars.app_name }}</strong>. <a href='{{ data.sign_in_url }}'>Get started here</a>.</p>","type":"html"},{"type":"divider"},{"attrs":{"foo":"bar"},"key":"my-partial","name":"My partial","type":"partial"},{"type":"image","url":"https://example.com/image.png"},{"buttons":[{"action":"https://example.com/button-action","label":"Click me","type":"button","variant":"solid"}],"type":"button_set"}],"items":{"anyOf":[{"$ref":"#/components/schemas/EmailButtonSetBlock"},{"$ref":"#/components/schemas/EmailDividerBlock"},{"$ref":"#/components/schemas/EmailHtmlBlock"},{"$ref":"#/components/schemas/EmailImageBlock"},{"$ref":"#/components/schemas/EmailMarkdownBlock"},{"$ref":"#/components/schemas/EmailPartialBlock"}],"type":"object"},"title":"EmailVisualBlocks","type":"array"},"ConditionGroupAnyMatch":{"description":"A group of conditions that any must be met. Can contain nested alls.","example":{"any":[{"all":[{"argument":"some_property","operator":"equal_to","variable":"recipient.property"}]}]},"properties":{"any":{"description":"An array of conditions or nested condition groups to evaluate.","items":{"anyOf":[{"$ref":"#/components/schemas/Condition"},{"$ref":"#/components/schemas/ConditionGroupAllMatch"}],"type":"object"},"type":"array"}},"title":"ConditionGroupAnyMatch","type":"object"},"MessageTypeTextField":{"description":"A text field used in a message type.","example":{"key":"text_field","label":"Text Field","settings":{"description":"A description of the text field","max_length":100,"min_length":10,"placeholder":"A placeholder for the text field","required":true},"type":"text"},"properties":{"key":{"description":"The unique key of the field.","example":"key","type":"string"},"label":{"description":"The label of the field.","example":"Label","nullable":true,"type":"string"},"settings":{"description":"Settings for the text field.","properties":{"default":{"description":"The default value of the text field.","example":"A placeholder","nullable":true,"type":"string"},"description":{"example":"A description of the field, used in the UI as a hint text.","nullable":true,"type":"string"},"max_length":{"example":100,"type":"integer"},"min_length":{"example":10,"type":"integer"},"placeholder":{"example":"A placeholder for the field.","nullable":true,"type":"string"},"required":{"description":"Whether the field is required.","example":true,"type":"boolean"}},"type":"object"},"type":{"description":"The type of the field.","enum":["text"],"example":"text","type":"string"}},"required":["type","key","label"],"title":"MessageTypeTextField","type":"object"},"GuideBooleanActivationParams":{"description":"A request to activate or deactivate a guide.","example":{"status":true},"properties":{"status":{"description":"Whether to activate or deactivate the guide.","example":true,"type":"boolean"}},"required":["status"],"title":"GuideBooleanActivationParams","type":"object"},"EmailTemplate":{"description":"An email message template.","example":{"html_body":"<p>Hello, {{ recipient.name }}! Welcome to {{ vars.app_name }} <a href='{{ data.sign_in_url }}'>Get started here</a>.</p>","settings":{"layout_key":"default"},"subject":"Welcome to {{ vars.app_name }}","text_body":"Hello, {{ recipient.name }}! Welcome to {{ vars.app_name }} Get started here: {{ data.sign_in_url }}."},"properties":{"html_body":{"description":"An HTML or MJML template for the email body. **Required** if `visual_blocks` is not provided. Only one of `html_body` or `visual_blocks` should be set. When `is_mjml` is true, this must contain MJML components. Supports Liquid templating with variables like `{{ recipient.name }}`, `{{ actor.name }}`, `{{ vars.app_name }}`, `{{ data.custom_field }}`, and `{{ tenant.name }}`. See the [template variables reference](https://docs.knock.app/designing-workflows/template-editor/variables) for available variables.","example":"<p>Hello, world!</p>","nullable":true,"type":"string"},"is_mjml":{"description":"Whether this template uses MJML format. When true, the template content will be compiled from MJML to HTML. Only valid when the selected layout is also MJML or when no layout is selected.","nullable":true,"type":"boolean"},"settings":{"description":"The [settings](https://docs.knock.app/integrations/email/settings) for the email template. Must be supplied with at least `layout_key`.","example":{"layout_key":"default"},"properties":{"attachment_key":{"description":"The object path in the workflow trigger's `data` payload to resolve attachments.Defaults to `attachments`.","example":"attachments","nullable":true,"type":"string"},"layout_key":{"description":"The `key` of the [email layout](https://docs.knock.app/integrations/email/layouts) that wraps the email template. When omitted, the email template will need to define the `<html>` structure.","example":"default","nullable":true,"type":"string"},"pre_content":{"description":"A liquid template that will be injected into the email layout above the message template content. Useful for setting variables that should be available to the email layout.","nullable":true,"type":"string"}},"title":"EmailTemplateSettings","type":"object"},"subject":{"description":"The subject of the email. Supports Liquid templating with variables like `{{ recipient.name }}`, `{{ actor.name }}`, `{{ vars.app_name }}`, `{{ data.custom_field }}`, and `{{ tenant.name }}`. See the [template variables reference](https://docs.knock.app/designing-workflows/template-editor/variables) for available variables.","example":"Hello, world!","type":"string"},"text_body":{"description":"A text template for the email body. When omitted, the email template will be autogenerated from the `html_body` or `visual_blocks`.","example":"Hello, world!","nullable":true,"type":"string"},"visual_blocks":{"anyOf":[{"$ref":"#/components/schemas/EmailVisualBlocks"},{"nullable":true}],"description":"The visual blocks that make up the email template. **Required** if `html_body` is not provided. Only one of `html_body` or `visual_blocks` should be set.","type":"object"}},"required":["subject","settings"],"title":"EmailTemplate","type":"object"},"WrappedMessageTypeResponse":{"description":"Wraps the MessageType response under the `message_type` key.","example":{"message_type":{"archived_at":null,"created_at":"2021-01-01T00:00:00Z","deleted_at":null,"description":"Email message type","environment":"development","icon_name":"email","key":"email","name":"Email","owner":"user","preview":"<div>Hello, world!</div>","semver":"1.0.0","sha":"1234567890","updated_at":"2021-01-01T00:00:00Z","valid":true,"variants":[{"fields":[{"key":"text_field","label":"My text field","settings":{"description":"A description of the text field","max_length":100,"min_length":10,"required":true},"type":"text"}],"key":"default","name":"Default"}]}},"properties":{"message_type":{"$ref":"#/components/schemas/MessageType"}},"required":["message_type"],"title":"WrappedMessageTypeResponse","type":"object"},"EmailDividerBlock":{"description":"A divider block in an email template.","example":{"layout_attrs":{"padding_bottom":8,"padding_left":4,"padding_right":4,"padding_top":8},"type":"divider"},"properties":{"id":{"description":"The ID of the block.","example":"123e4567-e89b-12d3-a456-426614174000","format":"uuid","type":"string"},"layout_attrs":{"description":"The layout attributes of the block.","properties":{"padding_bottom":{"description":"The padding_bottom layout attribute of the block.","type":"integer"},"padding_left":{"description":"The padding_left layout attribute of the block.","type":"integer"},"padding_right":{"description":"The padding_right layout attribute of the block.","type":"integer"},"padding_top":{"description":"The padding_top layout attribute of the block.","type":"integer"}},"required":["padding_top","padding_right","padding_bottom","padding_left"],"type":"object"},"type":{"description":"The type of the block.","enum":["divider"],"example":"divider","type":"string"},"version":{"description":"The version of the block schema. This is automatically managed by Knock and should not be set manually. Currently all blocks are at version 1.","example":1,"type":"integer"}},"required":["type"],"title":"EmailDividerBlock","type":"object"},"PaginatedWorkflowResponse":{"description":"A paginated list of Workflow. Contains a list of entries and page information.","example":{"entries":[{"active":false,"categories":["marketing","black-friday"],"conditions":{"all":[{"argument":"admin","operator":"equal_to","variable":"recipient.role"}]},"created_at":"2022-12-16T19:07:50.027113Z","description":"This is a dummy workflow for demo purposes.","environment":"development","key":"december-16-demo","name":"december-16-demo","settings":{"override_preferences":true},"sha":"f7e9d3b2a1c8e6m4k5j7h9g0i2l3n4p6q8r0t1u3v5w7x9y","steps":[{"channel_key":"in-app-feed","channel_type":"in_app_feed","description":"Main in-app feed","name":"In-app step","ref":"in_app_feed_1","template":{"action_url":"{{ data.onboarding_url }}","markdown_body":"Hello **{{ recipient.name }}**. Click here to get started."},"type":"channel"},{"ref":"delay_1","settings":{"delay_for":{"unit":"hours","value":1}},"type":"delay"},{"channel_key":"postmark","channel_type":"email","ref":"email_1","template":{"html_body":"<p>Hello, {{ recipient.name }}! Welcome to {{ vars.app_name }} <a href='{{ data.onboarding_url }}'>Get started here</a>.</p>","settings":{"layout_key":"default"},"subject":"Welcome to {{ vars.app_name }}!"},"type":"channel"}],"trigger_data_json_schema":{"properties":{"onboarding_url":{"type":"string"}},"required":["onboarding_url"],"type":"object"},"trigger_frequency":"every_trigger","updated_at":"2023-02-08T22:15:19.846681Z","valid":true}],"page_info":{"after":null,"before":null,"page_size":25}},"properties":{"entries":{"description":"A list of entries.","items":{"$ref":"#/components/schemas/Workflow"},"nullable":false,"type":"array"},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["entries","page_info"],"title":"PaginatedWorkflowResponse","type":"object"},"AudienceCondition":{"description":"A condition to evaluate for audience membership.","example":{"argument":"premium","operator":"equal_to","property":"recipient.plan"},"properties":{"argument":{"description":"The argument to compare against. Can be a static value (string, number, boolean) or a dynamic path expression.","example":"premium","nullable":true,"type":"string"},"operator":{"description":"The operator to use when evaluating the condition.","enum":["equal_to","not_equal_to","greater_than","less_than","greater_than_or_equal_to","less_than_or_equal_to","contains","not_contains","contains_all","not_contains_all","is_timestamp_before","is_timestamp_on_or_after","is_timestamp_between","is_between","empty","not_empty","exists","not_exists","is_timestamp","is_audience_member","is_not_audience_member"],"example":"equal_to","type":"string"},"property":{"description":"The property to be evaluated. Properties are dynamic values using path expressions like `recipient.plan` or `recipient.created_at`.","example":"recipient.plan","type":"string"}},"required":["property","operator"],"title":"AudienceCondition","type":"object"},"WorkflowRandomCohortStep":{"description":"An experiment step. Deterministically assigns recipients to percentage-based cohorts for A/B testing and experimentation.","example":{"cohort_branches":[{"name":"Control","percentage":"50","steps":[],"terminates":false},{"name":"Variant","percentage":"50","steps":[],"terminates":false}],"description":"Experiment step description.","name":"Experiment","ref":"experiment_1","type":"random_cohort"},"properties":{"cohort_branches":{"description":"A list of cohort branches. Must have between 2 and 10 branches, and percentages must sum to 100.","items":{"$ref":"#/components/schemas/WorkflowRandomCohortStepBranch"},"type":"array"},"cohort_key":{"description":"The key used to deterministically assign recipients to cohorts. Defaults to the recipient ID if not provided.","example":"tenant.id","nullable":true,"type":"string"},"description":{"description":"An arbitrary string attached to a workflow step. Useful for adding notes about the workflow for internal purposes.","example":"Experiment step description.","nullable":true,"type":"string"},"name":{"description":"A name for the workflow step.","example":"Experiment","nullable":true,"type":"string"},"ref":{"description":"The reference key of the workflow step. Must be unique per workflow.","example":"experiment_1","type":"string"},"type":{"description":"The type of step.","enum":["random_cohort"],"example":"random_cohort","type":"string"}},"required":["type","ref","cohort_branches"],"title":"WorkflowRandomCohortStep","type":"object"},"WorkflowThrottleStep":{"description":"A throttle function step. Read more in the [docs](https://docs.knock.app/designing-workflows/throttle-function).","example":{"name":"Throttle step","ref":"throttle_step","settings":{"throttle_key":"data.project_id","throttle_limit":1,"throttle_window":{"unit":"minutes","value":10}},"type":"throttle"},"properties":{"conditions":{"anyOf":[{"$ref":"#/components/schemas/ConditionGroup"},{"nullable":true}],"description":"A conditions object that describes one or more conditions to be met in order for the step to be executed.","type":"object"},"description":{"description":"An arbitrary string attached to a workflow step. Useful for adding notes about the workflow for internal purposes.","example":"Throttle step description","nullable":true,"type":"string"},"name":{"description":"A name for the workflow step.","example":"Throttle step","nullable":true,"type":"string"},"ref":{"description":"The reference key of the workflow step. Must be unique per workflow.","example":"throttle_step","type":"string"},"settings":{"description":"The settings for the throttle step.","properties":{"throttle_key":{"description":"The data property to use to throttle notifications per recipient.","example":"data.project_id","nullable":true,"type":"string"},"throttle_limit":{"description":"The maximum number of workflows to allow within the duration window. Defaults to 1.","example":1,"nullable":true,"type":"integer"},"throttle_window":{"anyOf":[{"$ref":"#/components/schemas/Duration"},{"nullable":true}],"description":"The duration of the throttle window.","nullable":true,"type":"object"},"throttle_window_field_path":{"description":"The data path to resolve a dynamic throttle window. The resolved value must be an ISO-8601 timestamp. See more in the [docs](https://docs.knock.app/designing-workflows/throttle-function#set-a-dynamic-throttle-window).","example":"recipient.throttle_window","nullable":true,"type":"string"}},"type":"object"},"type":{"description":"The type of the workflow step.","enum":["throttle"],"example":"throttle","type":"string"}},"required":["type","ref","settings"],"title":"WorkflowThrottleStep","type":"object"},"WorkflowBatchStep":{"description":"A batch function step. Read more in the [docs](https://docs.knock.app/designing-workflows/batch-function).","example":{"description":"Batch step description","name":"Batch step","ref":"batch_step","settings":{"batch_key":"data.project_id","batch_window":{"unit":"minutes","value":10}},"type":"batch"},"properties":{"description":{"description":"An arbitrary string attached to a workflow step. Useful for adding notes about the workflow for internal purposes.","example":"Batch step description","nullable":true,"type":"string"},"name":{"description":"A name for the workflow step.","example":"Batch step","nullable":true,"type":"string"},"ref":{"description":"The reference key of the workflow step. Must be unique per workflow.","example":"batch_step","type":"string"},"settings":{"description":"The settings for the batch step.","properties":{"batch_execution_mode":{"description":"The execution mode of the batch step. One of: `accumulate` or `flush_leading`. When set to `flush_leading`, the first item in the batch will be executed immediately, and the rest will be batched. See [these docs](https://docs.knock.app/designing-workflows/batch-function#immediately-flushing-the-first-item-in-a-batch) for more information.","enum":["accumulate","flush_leading"],"example":"accumulate","nullable":true,"type":"string"},"batch_items_max_limit":{"description":"The maximum number of batch items allowed in a batch. Between: 2 and 1000.","example":1000,"nullable":true,"type":"integer"},"batch_items_render_limit":{"description":"The maximum number of batch items allowed to be rendered into a template. Between: 1 and 100. Defaults to 10.","example":10,"nullable":true,"type":"integer"},"batch_key":{"description":"The data property to use to batch notifications per recipient.","example":"data.project_id","nullable":true,"type":"string"},"batch_order":{"description":"The order describing whether to return the first or last ten batch items in the activities variable. One of: `asc` or `desc`.","enum":["asc","desc"],"example":"asc","nullable":true,"type":"string"},"batch_until_field_path":{"description":"The data path to resolve the batch window. The resolved value must be an ISO-8601 timestamp.","example":"recipient.batch_until","nullable":true,"type":"string"},"batch_window":{"anyOf":[{"$ref":"#/components/schemas/Duration"},{"nullable":true}],"description":"The window of time to collect events in the batch.","type":"object"},"batch_window_extension_limit":{"anyOf":[{"$ref":"#/components/schemas/Duration"},{"nullable":true}],"description":"A duration object that describes the maximum duration a batch window can be extended to from opening when using a [sliding batch window](https://docs.knock.app/designing-workflows/batch-function#using-a-sliding-batch-window).","type":"object"},"batch_window_type":{"description":"The type of the batch window used. One of: `fixed` or `sliding`.","enum":["fixed","sliding"],"example":"fixed","nullable":true,"type":"string"}},"type":"object"},"type":{"description":"The type of the workflow step.","enum":["batch"],"example":"batch","type":"string"}},"required":["type","ref","settings"],"title":"WorkflowBatchStep","type":"object"},"Environment":{"description":"An environment object.","example":{"created_at":"2022-10-31T19:59:03Z","deleted_at":null,"hide_pii_data":false,"label_color":"#000000","last_commit_at":"2022-10-31T19:59:03Z","name":"Development","order":0,"owner":"system","slug":"development","updated_at":"2022-10-31T19:59:03Z"},"properties":{"created_at":{"description":"The timestamp of when the environment was created.","format":"date-time","type":"string"},"deleted_at":{"description":"The timestamp of when the environment was deleted.","format":"date-time","nullable":true,"type":"string"},"hide_pii_data":{"default":false,"description":"Whether PII data is hidden from the environment. Read more in the [data obfuscation docs](https://docs.knock.app/manage-your-account/data-obfuscation).","type":"boolean"},"label_color":{"description":"The color of the environment label to display in the dashboard.","nullable":true,"type":"string"},"last_commit_at":{"description":"The timestamp of the most-recent commit in the environment.","format":"date-time","nullable":true,"type":"string"},"name":{"description":"A human-readable name for the environment. Cannot exceed 255 characters.","type":"string"},"order":{"description":"The order of the environment. The lowest number is the first environment, the highest number is the last environment. The order will not always be sequential.","type":"integer"},"owner":{"description":"The owner of the environment.","enum":["system","user"],"example":"user","type":"string"},"slug":{"description":"A unique slug for the environment. Cannot exceed 255 characters.","type":"string"},"updated_at":{"description":"The timestamp of when the environment was last updated.","format":"date-time","type":"string"}},"required":["name","slug","order","created_at","updated_at","owner"],"title":"Environment","type":"object"},"WhoamiResponse":{"description":"Information about the current calling scope.","example":{"account_features":{"batch_items_render_limit_allowed":false,"custom_branding_allowed":false,"data_retention_days":30,"data_warehouse_extension_allowed":false,"datadog_extension_allowed":true,"dsync_allowed":false,"guides_monthly_notified_recipients_limit":500,"guides_per_tenant_scope_allowed":false,"heap_extension_allowed":false,"knock_branding_required":true,"litmus_email_preview_allowed":false,"message_sent_limit":10000,"new_relic_extension_allowed":false,"segment_extension_allowed":false,"self_serve_allowed":true,"sso_allowed":false,"tenant_preferences_allowed":false,"translations_allowed":false},"account_name":"Acme, Inc.","account_slug":"acme","service_token_name":"My Service Token","type":"service_token","user_id":null},"properties":{"account_features":{"description":"Account plan features and limits.","properties":{"batch_items_render_limit_allowed":{"description":"Whether batch rendering limits can be configured.","type":"boolean"},"custom_branding_allowed":{"description":"Whether custom branding can be applied to notifications.","type":"boolean"},"data_retention_days":{"description":"Number of days data is retained, null for unlimited retention.","nullable":true,"type":"integer"},"data_warehouse_extension_allowed":{"description":"Whether data warehouse integration extensions are available.","type":"boolean"},"datadog_extension_allowed":{"description":"Whether Datadog integration extension is available.","type":"boolean"},"dsync_allowed":{"description":"Whether directory sync functionality is available.","type":"boolean"},"guides_monthly_notified_recipients_limit":{"description":"Monthly limit for guide notification recipients, null for unlimited.","nullable":true,"type":"integer"},"guides_per_tenant_scope_allowed":{"description":"Whether per-tenant scope for guide messages is allowed.","type":"boolean"},"heap_extension_allowed":{"description":"Whether Heap integration extension is available.","type":"boolean"},"knock_branding_required":{"description":"Whether Knock branding is required to be displayed.","type":"boolean"},"litmus_email_preview_allowed":{"description":"Whether Litmus email preview integration is available.","type":"boolean"},"message_sent_limit":{"description":"Monthly limit for messages sent, null for unlimited.","nullable":true,"type":"integer"},"new_relic_extension_allowed":{"description":"Whether New Relic integration extension is available.","type":"boolean"},"segment_extension_allowed":{"description":"Whether Segment integration extension is available.","type":"boolean"},"self_serve_allowed":{"description":"Whether self-service account management features are available.","type":"boolean"},"sso_allowed":{"description":"Whether single sign-on (SSO) is enabled for the account.","type":"boolean"},"tenant_preferences_allowed":{"description":"Whether tenant-level preferences are supported.","type":"boolean"},"translations_allowed":{"description":"Whether multi-language translations are supported.","type":"boolean"}},"type":"object"},"account_name":{"description":"The display name of the account.","type":"string"},"account_slug":{"description":"The unique slug identifier for the account.","type":"string"},"service_token_name":{"description":"The name of the service token if authenticated via service token, null for OAuth contexts.","nullable":true,"type":"string"},"type":{"description":"The type of authentication context - either a service token or OAuth user context.","enum":["service_token","oauth_context"],"type":"string"},"user_id":{"description":"The ID of the authenticated user if in OAuth context, null for service token contexts.","nullable":true,"type":"string"}},"required":["account_name","account_slug","type","account_features"],"title":"WhoamiResponse","type":"object"},"ChannelGroupRequest":{"description":"A request to create or update a channel group.","example":{"channel_rules":[{"channel_key":"push-fcm","index":0,"rule_type":"always"}],"channel_type":"push","name":"Push Notification Group","operator":"any"},"properties":{"channel_rules":{"description":"Rules for determining which channels should be used.","items":{"$ref":"#/components/schemas/ChannelGroupRuleRequest"},"type":"array"},"channel_type":{"description":"The type of channels contained in this group.","enum":["email","in_app","in_app_feed","in_app_guide","sms","push","chat","http"],"type":"string"},"name":{"description":"The human-readable name of the channel group.","type":"string"},"operator":{"description":"Determines how the channel rules are applied ('any' means any rule can match, 'all' means all rules must match).","enum":["any","all"],"type":"string"}},"required":["name","channel_type"],"title":"ChannelGroupRequest","type":"object"},"MessageTypeUrlField":{"description":"A URL field used in a message type.","example":{"key":"url_field","label":"URL Field","settings":{"description":"A description of the URL field","placeholder":"A placeholder for the URL field","required":true},"type":"url"},"properties":{"key":{"description":"The unique key of the field.","example":"key","type":"string"},"label":{"description":"The label of the field.","example":"Label","nullable":true,"type":"string"},"settings":{"description":"Settings for the url field.","properties":{"default":{"description":"The default value of the URL field.","example":"https://example.com","nullable":true,"type":"string"},"description":{"example":"A description of the field, used in the UI as a hint text.","nullable":true,"type":"string"},"placeholder":{"example":"A placeholder for the field.","nullable":true,"type":"string"},"required":{"description":"Whether the field is required.","example":true,"type":"boolean"}},"type":"object"},"type":{"description":"The type of the field.","enum":["url"],"example":"url","type":"string"}},"required":["type","key","label"],"title":"MessageTypeUrlField","type":"object"},"PushChannelSettings":{"description":"Push channel settings. Only used as configuration as part of a workflow channel step.","example":{"token_deregistration":true},"properties":{"token_deregistration":{"description":"Whether to deregister a push-token when a push send hard bounces. This is to prevent the same token from being used for future pushes.","example":true,"type":"boolean"}},"title":"PushChannelSettings","type":"object"},"WrappedAudienceRequestRequest":{"description":"Wraps the AudienceRequest request under the audience key.","example":{"audience":{"description":"Users on the premium plan","name":"Premium users","segments":[{"conditions":[{"argument":"premium","operator":"equal_to","property":"recipient.plan"}]}],"type":"dynamic"}},"properties":{"audience":{"$ref":"#/components/schemas/AudienceRequest"}},"required":["audience"],"title":"WrappedAudienceRequestRequest","type":"object"},"WrappedCommitResponse":{"description":"Wraps the Commit response under the `commit` key.","example":{"commit":{"author":{"email":"john.doe@example.com","name":"John Doe"},"commit_message":"This is a commit message","created_at":"2021-01-01T00:00:00Z","environment":"development","id":"123e4567-e89b-12d3-a456-426614174000","resource":{"identifier":"my-email-layout","type":"email_layout"}}},"properties":{"commit":{"$ref":"#/components/schemas/Commit"}},"required":["commit"],"title":"WrappedCommitResponse","type":"object"},"WrappedEmailLayoutResponse":{"description":"Wraps the EmailLayout response under the `email_layout` key.","example":{"email_layout":{"branding_overrides":{"dark_logo_url":"https://cdn.example.com/logo-dark.png","dark_primary_color":"#1A1A2E","dark_primary_color_contrast":"#FFFFFF","primary_color":"#4F46E5","primary_color_contrast":"#FFFFFF"},"created_at":"2021-01-01T00:00:00Z","environment":"development","footer_links":[{"text":"Example","url":"http://example.com"}],"html_layout":"<html><body>Hello, world!</body></html>","key":"transactional","name":"Transactional","sha":"1234567890","text_layout":"Hello, world!","updated_at":"2021-01-01T00:00:00Z"}},"properties":{"email_layout":{"$ref":"#/components/schemas/EmailLayout"}},"required":["email_layout"],"title":"WrappedEmailLayoutResponse","type":"object"},"RequestTemplateHeadersArray":{"description":"A list of key-value pairs for the request headers. Each object should contain key and value fields with string values.","example":[{"key":"X-API-Key","value":"1234567890"}],"items":{"properties":{"key":{"description":"The key of the header.","example":"X-API-Key","type":"string"},"value":{"description":"The value of the header.","example":"1234567890","type":"string"}},"required":["key","value"],"type":"object"},"title":"RequestTemplateHeadersArray","type":"array"},"GuideActivationUrlPattern":{"description":"A rule that controls when a guide should be shown based on the user's location in the application. At least one of `pathname` or `search` must be provided.","example":{"directive":"allow","pathname":"/dashboard/*","search":"tab=settings"},"properties":{"directive":{"default":"allow","description":"Whether to allow or block the guide at the specified location.","enum":["allow","block"],"type":"string"},"pathname":{"description":"The URL pathname pattern to match against. Must be a valid URI path.","example":"/dashboard/*","type":"string"},"search":{"description":"The URL query string pattern to match against (without the leading '?'). Supports URLPattern API syntax.","example":"tab=settings&*","type":"string"}},"required":["directive"],"title":"GuideActivationUrlPattern","type":"object"},"WrappedTranslationRequestRequest":{"description":"Wraps the TranslationRequest request under the translation key.","example":{"translation":{"content":"{\"hello\":\"Hello, world!\"}","format":"json"}},"properties":{"translation":{"$ref":"#/components/schemas/TranslationRequest"}},"required":["translation"],"title":"WrappedTranslationRequestRequest","type":"object"},"InAppFeedChannelSettings":{"description":"In-app feed channel settings. Only used as configuration as part of a workflow channel step.","example":{"link_tracking":true},"properties":{"link_tracking":{"description":"Whether to track link clicks on in-app feed notifications.","example":true,"type":"boolean"}},"title":"InAppFeedChannelSettings","type":"object"},"Duration":{"description":"A duration of time, represented as a unit and a value.","example":{"unit":"minutes","value":10},"properties":{"unit":{"description":"The unit of time.","enum":["minutes","hours","days","weeks","months"],"example":"minutes","type":"string"},"value":{"description":"The value of the duration.","example":10,"type":"integer"}},"required":["unit","value"],"title":"Duration","type":"object"},"Channel":{"description":"A configured channel, which is a way to route messages to a provider.","example":{"archived_at":null,"created_at":"2021-01-01T00:00:00Z","custom_icon_url":null,"id":"01234567-89ab-cdef-0123-456789abcdef","key":"my-sendgrid-channel","name":"My Sendgrid Channel","provider":"sendgrid","type":"email","updated_at":"2021-01-01T00:00:00Z"},"properties":{"archived_at":{"description":"The timestamp of when the channel was deleted.","format":"date-time","nullable":true,"type":"string"},"created_at":{"description":"The timestamp of when the channel was created.","format":"date-time","type":"string"},"custom_icon_url":{"description":"Optional URL to a custom icon for the channel. Only used for display purposes in the dashboard.","nullable":true,"type":"string"},"description":{"description":"Optional description of the channel's purpose or usage.","nullable":true,"type":"string"},"environment_settings":{"additionalProperties":{"$ref":"#/components/schemas/ChannelEnvironmentSettings"},"description":"Per-environment settings for this channel, keyed by environment slug (e.g., 'development', 'production'). Only included when requested via the `include` parameter or when retrieving a single channel.","nullable":true,"type":"object"},"id":{"description":"The unique identifier for the channel.","type":"string"},"key":{"description":"Unique identifier for the channel within a project (immutable once created).","type":"string"},"name":{"description":"The human-readable name of the channel.","type":"string"},"provider":{"description":"The ID of the provider that this channel uses to deliver messages. Learn more about the providers available [in our documentation](https://docs.knock.app/integrations/overview).","type":"string"},"type":{"description":"The type of channel, determining what kind of messages it can send.","enum":["email","in_app","in_app_feed","in_app_guide","sms","push","chat","http"],"type":"string"},"updated_at":{"description":"The timestamp of when the channel was last updated.","format":"date-time","type":"string"}},"required":["id","name","key","type","provider","created_at","updated_at"],"title":"Channel","type":"object"},"RunWorkflowRequest":{"description":"A request to run (test) a workflow.","example":{"data":{"park_id":1},"recipients":["dnedry"]},"properties":{"actor":{"anyOf":[{"$ref":"#/components/schemas/RecipientReference"},{"nullable":true}],"description":"The actor to reference in the the workflow run.","type":"object"},"cancellation_key":{"description":"A key to cancel the workflow run.","nullable":true,"type":"string"},"data":{"additionalProperties":true,"description":"A map of data to be used in the workflow run. The structure should conform to the workflow's `trigger_data_json_schema` if one is defined. Available in templates as `{{ data.field_name }}`. See [trigger data validation docs](https://docs.knock.app/developer-tools/validating-trigger-data).","type":"object"},"recipients":{"description":"A list of recipients to run the workflow for.","items":{"$ref":"#/components/schemas/RecipientReference"},"type":"array"},"tenant":{"description":"The tenant to associate the workflow run with. Must not contain whitespace.","type":"string"}},"required":["recipients"],"title":"RunWorkflowRequest","type":"object"},"PaginatedChannelGroupResponse":{"description":"A paginated list of ChannelGroup. Contains a list of entries and page information.","example":{"entries":[{"channel_rules":[{"channel":{"archived_at":null,"created_at":"2021-01-01T00:00:00Z","custom_icon_url":null,"id":"01234567-89ab-cdef-0123-456789abcdef","key":"my-sendgrid-channel","name":"My Sendgrid Channel","provider":"sendgrid","type":"email","updated_at":"2021-01-01T00:00:00Z"},"created_at":"2021-01-01T00:00:00Z","index":0,"rule_type":"always","updated_at":"2021-01-01T00:00:00Z"}],"channel_type":"push","created_at":"2021-01-01T00:00:00Z","key":"push-group","name":"Push Notification Group","operator":"any","source":"user","updated_at":"2021-01-01T00:00:00Z"}],"page_info":{"after":null,"before":null,"page_size":25}},"properties":{"entries":{"description":"A list of entries.","items":{"$ref":"#/components/schemas/ChannelGroup"},"nullable":false,"type":"array"},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["entries","page_info"],"title":"PaginatedChannelGroupResponse","type":"object"},"Member":{"description":"A member of the account.","example":{"created_at":"2024-01-15T10:30:00Z","id":"d4b8e8e0-1234-5678-9abc-def012345678","role":"admin","updated_at":"2024-06-20T14:45:00Z","user":{"avatar_url":"https://www.gravatar.com/avatar/abc123","created_at":"2024-01-10T08:00:00Z","email":"jane@example.com","id":"a1b2c3d4-5678-9abc-def0-123456789abc","name":"Jane Doe","updated_at":"2024-06-18T12:00:00Z"}},"properties":{"created_at":{"description":"The timestamp of when the member joined the account.","format":"date-time","type":"string"},"id":{"description":"The unique identifier of the member.","format":"uuid","type":"string"},"role":{"description":"The member's role in the account.","enum":["owner","admin","member","production_only_member","billing","support"],"type":"string"},"updated_at":{"description":"The timestamp of when the member was last updated.","format":"date-time","type":"string"},"user":{"$ref":"#/components/schemas/MemberUser"}},"required":["id","role","user","created_at","updated_at"],"title":"Member","type":"object"},"ObjectRecipientReference":{"description":"An object reference.","example":{"collection":"projects","id":"project_1"},"properties":{"collection":{"description":"The collection of the object.","type":"string"},"id":{"description":"The ID of the object.","type":"string"}},"required":["id","collection"],"title":"ObjectRecipientReference","type":"object"},"StaticAudience":{"description":"A static audience where members are explicitly added or removed via the API.","example":{"created_at":"2024-01-15T10:30:00Z","description":"Users participating in the beta program.","environment":"development","key":"beta-testers","name":"Beta testers","sha":"a1b2c3d4e5f6","type":"static","updated_at":"2024-06-20T14:45:00Z"},"properties":{"created_at":{"description":"The timestamp of when the audience was created.","format":"date-time","type":"string"},"description":{"description":"A description of the audience.","nullable":true,"type":"string"},"environment":{"description":"The slug of the environment in which the audience exists.","type":"string"},"key":{"description":"The unique key of the audience.","type":"string"},"name":{"description":"The name of the audience.","type":"string"},"sha":{"description":"The SHA hash of the audience data.","nullable":true,"type":"string"},"type":{"description":"The type of audience. Always `static` for static audiences.","enum":["static"],"type":"string"},"updated_at":{"description":"The timestamp of when the audience was last updated.","format":"date-time","type":"string"}},"required":["key","type","name","environment","created_at","updated_at"],"title":"StaticAudience","type":"object"},"PromoteAllResponse":{"description":"The response from promoting all changes.","example":{"result":"success"},"properties":{"result":{"description":"The result of the promote operation.","example":"success","type":"string"}},"required":["result"],"title":"PromoteAllResponse","type":"object"},"PaginatedMemberResponse":{"description":"A paginated list of Member. Contains a list of entries and page information.","example":{"entries":[{"created_at":"2024-01-15T10:30:00Z","id":"d4b8e8e0-1234-5678-9abc-def012345678","role":"admin","updated_at":"2024-06-20T14:45:00Z","user":{"avatar_url":"https://www.gravatar.com/avatar/abc123","created_at":"2024-01-10T08:00:00Z","email":"jane@example.com","id":"a1b2c3d4-5678-9abc-def0-123456789abc","name":"Jane Doe","updated_at":"2024-06-18T12:00:00Z"}}],"page_info":{"after":null,"before":null,"page_size":25}},"properties":{"entries":{"description":"A list of entries.","items":{"$ref":"#/components/schemas/Member"},"nullable":false,"type":"array"},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["entries","page_info"],"title":"PaginatedMemberResponse","type":"object"},"PageInfo":{"description":"The information about a paginated result.","example":{"after":null,"before":null,"page_size":25},"properties":{"after":{"description":"The cursor to fetch entries after. Will only be present if there are more entries to fetch.","nullable":true,"type":"string"},"before":{"description":"The cursor to fetch entries before. Will only be present if there are more entries to fetch before the current page.","nullable":true,"type":"string"},"page_size":{"description":"The number of entries to fetch per-page.","type":"integer"}},"required":["page_size"],"title":"PageInfo","type":"object"},"CommitAllResponse":{"description":"The response from committing all changes.","example":{"result":"success"},"properties":{"result":{"description":"The result of the commit operation.","example":"success","type":"string"}},"required":["result"],"title":"CommitAllResponse","type":"object"},"Variable":{"description":"An environment variable object.","example":{"description":"This is a description of my variable.","environment_values":{"development":"dev_value","production":"prod_value"},"inserted_at":"2021-01-01T00:00:00Z","key":"my_variable","type":"public","updated_at":"2021-01-01T00:00:00Z","value":"my_value"},"properties":{"description":{"description":"The description of the variable.","nullable":true,"type":"string"},"environment_values":{"additionalProperties":{"nullable":true,"type":"string"},"description":"A map of environment slugs to their override values. Only present for project-scoped responses.","type":"object"},"inserted_at":{"description":"The timestamp of when the variable was created.","format":"date-time","type":"string"},"key":{"description":"The key of the variable.","type":"string"},"type":{"default":"public","description":"The type of the variable.","enum":["public","secret"],"type":"string"},"updated_at":{"description":"The timestamp of when the variable was last updated.","format":"date-time","type":"string"},"value":{"description":"The default value of the variable. For secret variables, this is obfuscated.","nullable":true,"type":"string"}},"required":["key","type","inserted_at","updated_at"],"title":"Variable","type":"object"},"WorkflowUpdateUserStep":{"description":"An update user step. Updates properties of a specific user referenced in the workflow.","example":{"description":"Update user step description.","name":"Update user","ref":"update_user_1","settings":{"recipient_gid":"gid://Object/$users/user-123","recipient_mode":"reference","update_properties":"{\"name\": \"Updated User\"}"},"type":"update_user"},"properties":{"conditions":{"anyOf":[{"$ref":"#/components/schemas/ConditionGroup"},{"nullable":true}],"description":"A conditions object that describes one or more conditions to be met in order for the step to be executed.","type":"object"},"description":{"description":"An arbitrary string attached to a workflow step. Useful for adding notes about the workflow for internal purposes.","example":"Update user step description.","nullable":true,"type":"string"},"name":{"description":"A name for the workflow step.","example":"Update user","nullable":true,"type":"string"},"ref":{"description":"The reference key of the workflow step. Must be unique per workflow.","example":"update_user_1","type":"string"},"settings":{"description":"The settings for the update user step.","properties":{"recipient_gid":{"description":"The global identifier (GID) of the user to update. Required when recipient_mode is 'reference'. Format: gid://Object/$users/{id}","example":"gid://Object/$users/user-123","nullable":true,"type":"string"},"recipient_mode":{"description":"The recipient mode determining how the user is selected. 'current' uses the workflow's current user. 'reference' uses a specific user ID.","enum":["current","reference"],"example":"reference","type":"string"},"update_properties":{"description":"A JSON string or Liquid template that evaluates to the properties to update on the user.","example":"{\"name\": \"Updated User\", \"email\": \"user@example.com\"}","type":"string"}},"required":["recipient_mode","update_properties"],"type":"object"},"type":{"description":"The type of the workflow step.","enum":["update_user"],"example":"update_user","type":"string"}},"required":["type","ref","settings"],"title":"WorkflowUpdateUserStep","type":"object"},"PaginatedTranslationResponse":{"description":"A paginated list of Translation. Contains a list of entries and page information.","example":{"entries":[{"content":"{\"hello\":\"Hello, world!\"}","format":"json","inserted_at":"2021-01-01T00:00:00Z","locale_code":"en","namespace":"my_app","updated_at":"2021-01-01T00:00:00Z"}],"page_info":{"after":null,"before":null,"page_size":25}},"properties":{"entries":{"description":"A list of entries.","items":{"$ref":"#/components/schemas/Translation"},"nullable":false,"type":"array"},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["entries","page_info"],"title":"PaginatedTranslationResponse","type":"object"},"PaginatedCommitResponse":{"description":"A paginated list of Commit. Contains a list of entries and page information.","example":{"entries":[{"author":{"email":"john.doe@example.com","name":"John Doe"},"commit_message":"This is a commit message","created_at":"2021-01-01T00:00:00Z","environment":"development","id":"123e4567-e89b-12d3-a456-426614174000","resource":{"identifier":"my-email-layout","type":"email_layout"}}],"page_info":{"after":null,"before":null,"page_size":25}},"properties":{"entries":{"description":"A list of entries.","items":{"$ref":"#/components/schemas/Commit"},"nullable":false,"type":"array"},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["entries","page_info"],"title":"PaginatedCommitResponse","type":"object"},"Workflow":{"description":"A workflow object. Read more in the [docs](https://docs.knock.app/concepts/workflows).","example":{"active":false,"categories":["marketing","black-friday"],"conditions":{"all":[{"argument":"admin","operator":"equal_to","variable":"recipient.role"}]},"created_at":"2022-12-16T19:07:50.027113Z","description":"This is a dummy workflow for demo purposes.","environment":"development","key":"december-16-demo","name":"december-16-demo","settings":{"override_preferences":true},"sha":"f7e9d3b2a1c8e6m4k5j7h9g0i2l3n4p6q8r0t1u3v5w7x9y","steps":[{"channel_key":"in-app-feed","channel_type":"in_app_feed","description":"Main in-app feed","name":"In-app step","ref":"in_app_feed_1","template":{"action_url":"{{ data.onboarding_url }}","markdown_body":"Hello **{{ recipient.name }}**. Click here to get started."},"type":"channel"},{"ref":"delay_1","settings":{"delay_for":{"unit":"hours","value":1}},"type":"delay"},{"channel_key":"postmark","channel_type":"email","ref":"email_1","template":{"html_body":"<p>Hello, {{ recipient.name }}! Welcome to {{ vars.app_name }} <a href='{{ data.onboarding_url }}'>Get started here</a>.</p>","settings":{"layout_key":"default"},"subject":"Welcome to {{ vars.app_name }}!"},"type":"channel"}],"trigger_data_json_schema":{"properties":{"onboarding_url":{"type":"string"}},"required":["onboarding_url"],"type":"object"},"trigger_frequency":"every_trigger","updated_at":"2023-02-08T22:15:19.846681Z","valid":true},"properties":{"active":{"description":"Whether the workflow is [active](https://docs.knock.app/concepts/workflows#workflow-status) in the current environment. (read-only).","type":"boolean"},"categories":{"description":"A list of [categories](https://docs.knock.app/concepts/workflows#workflow-categories) that the workflow belongs to.","items":{"type":"string"},"type":"array"},"conditions":{"anyOf":[{"$ref":"#/components/schemas/ConditionGroup"},{"nullable":true}],"description":"A conditions object that describes one or more conditions to be met for the workflow to be executed. (optional).","type":"object"},"created_at":{"description":"The timestamp of when the workflow was created. (read-only).","format":"date-time","type":"string"},"deleted_at":{"description":"The timestamp of when the workflow was deleted. (read-only).","format":"date-time","type":"string"},"description":{"description":"An arbitrary string attached to a workflow object. Useful for adding notes about the workflow for internal purposes. Maximum of 280 characters allowed.","type":"string"},"environment":{"description":"The slug of the environment in which the workflow exists. (read-only).","type":"string"},"key":{"description":"The unique key string for the workflow object. Must be at minimum 3 characters and at maximum 255 characters in length. Must be in the format of ^[a-z0-9_-]+$.","type":"string"},"name":{"description":"A name for the workflow. Must be at maximum 255 characters in length.","type":"string"},"settings":{"description":"A map of workflow settings.","properties":{"is_commercial":{"description":"Whether the workflow is commercial. Defaults to false.","example":false,"type":"boolean"},"override_preferences":{"description":"Whether to ignore recipient preferences for a given type of notification. If true, will send for every channel in the workflow even if the recipient has opted out of a certain kind. Defaults to false.","example":false,"type":"boolean"}},"type":"object"},"sha":{"description":"The SHA hash of the workflow data. (read-only).","type":"string"},"steps":{"description":"A list of workflow step objects in the workflow.","items":{"$ref":"#/components/schemas/WorkflowStep"},"type":"array"},"trigger_data_json_schema":{"additionalProperties":true,"description":"A JSON schema for the expected structure of the workflow trigger's `data` payload (available in templates as `{{ data.field_name }}`). Used to validate trigger requests. Read more in the [docs](https://docs.knock.app/developer-tools/validating-trigger-data).","type":"object"},"trigger_frequency":{"description":"The frequency at which the workflow should be triggered. One of: `once_per_recipient`, `once_per_recipient_per_tenant`, `every_trigger`. Defaults to `every_trigger`. Read more in [docs](https://docs.knock.app/send-notifications/triggering-workflows/overview#controlling-workflow-trigger-frequency).","enum":["every_trigger","once_per_recipient","once_per_recipient_per_tenant"],"example":"every_trigger","type":"string"},"updated_at":{"description":"The timestamp of when the workflow was last updated. (read-only).","format":"date-time","type":"string"},"valid":{"description":"Whether the workflow and its steps are in a valid state. (read-only).","type":"boolean"}},"required":["key","name","steps","active","valid","environment","created_at","updated_at","sha"],"title":"Workflow","type":"object"},"ChannelGroup":{"description":"A group of channels with rules for when they are applicable.","example":{"channel_rules":[{"channel":{"archived_at":null,"created_at":"2021-01-01T00:00:00Z","custom_icon_url":null,"id":"01234567-89ab-cdef-0123-456789abcdef","key":"my-sendgrid-channel","name":"My Sendgrid Channel","provider":"sendgrid","type":"email","updated_at":"2021-01-01T00:00:00Z"},"created_at":"2021-01-01T00:00:00Z","index":0,"rule_type":"always","updated_at":"2021-01-01T00:00:00Z"}],"channel_type":"push","created_at":"2021-01-01T00:00:00Z","key":"push-group","name":"Push Notification Group","operator":"any","source":"user","updated_at":"2021-01-01T00:00:00Z"},"properties":{"archived_at":{"description":"The timestamp of when the channel group was archived (soft deleted).","format":"date-time","nullable":true,"type":"string"},"channel_rules":{"description":"Rules for determining which channels should be used.","items":{"$ref":"#/components/schemas/ChannelGroupRule"},"type":"array"},"channel_type":{"description":"The type of channels contained in this group.","enum":["email","in_app","in_app_feed","in_app_guide","sms","push","chat","http"],"type":"string"},"created_at":{"description":"The timestamp of when the channel group was created.","format":"date-time","type":"string"},"key":{"description":"Unique identifier for the channel group within a project.","type":"string"},"name":{"description":"The human-readable name of the channel group.","type":"string"},"operator":{"description":"Determines how the channel rules are applied ('any' means any rule can match, 'all' means all rules must match).","enum":["any","all"],"type":"string"},"source":{"description":"Whether this channel group was created by the system or a user. Only user created channel groups can be modified.","enum":["system","user"],"type":"string"},"updated_at":{"description":"The timestamp of when the channel group was last updated.","format":"date-time","type":"string"}},"required":["name","key","channel_type","operator","source","channel_rules","created_at","updated_at"],"title":"ChannelGroup","type":"object"},"ChannelGroupRule":{"description":"A rule that determines if a channel should be executed as part of a channel group.","example":{"channel":{"archived_at":null,"created_at":"2021-01-01T00:00:00Z","custom_icon_url":null,"id":"01234567-89ab-cdef-0123-456789abcdef","key":"my-sendgrid-channel","name":"My Sendgrid Channel","provider":"sendgrid","type":"email","updated_at":"2021-01-01T00:00:00Z"},"created_at":"2021-01-01T00:00:00Z","index":0,"rule_type":"always","updated_at":"2021-01-01T00:00:00Z"},"properties":{"argument":{"description":"For conditional rules, the value to compare against.","nullable":true,"type":"string"},"channel":{"$ref":"#/components/schemas/Channel"},"created_at":{"description":"The timestamp of when the rule was created.","format":"date-time","type":"string"},"index":{"description":"The order index of this rule within the channel group.","type":"integer"},"operator":{"description":"For conditional rules, the operator to apply.","enum":["equal_to","not_equal_to","greater_than","less_than","greater_than_or_equal_to","less_than_or_equal_to","contains","not_contains","contains_all","not_contains_all","is_timestamp_before","is_timestamp_on_or_after","is_timestamp_between","is_between","empty","not_empty","exists","not_exists","is_timestamp","is_audience_member","is_not_audience_member"],"example":"equal_to","nullable":true,"type":"string"},"rule_type":{"description":"The type of rule (if = conditional, unless = negative conditional, always = always apply).","enum":["if","unless","always"],"type":"string"},"updated_at":{"description":"The timestamp of when the rule was last updated.","format":"date-time","type":"string"},"variable":{"description":"For conditional rules, the variable to evaluate.","nullable":true,"type":"string"}},"required":["index","rule_type","channel","created_at","updated_at"],"title":"ChannelGroupRule","type":"object"},"Broadcast":{"description":"A broadcast object.","example":{"categories":["marketing","promotions"],"created_at":"2022-12-16T19:07:50.027113Z","description":"Holiday promotion broadcast for December","environment":"development","key":"december-promotion","name":"December Promotion","scheduled_at":null,"sent_at":null,"settings":{"is_commercial":true,"override_preferences":false},"sha":"f7e9d3b2a1c8e6m4k5j7h9g0i2l3n4p6q8r0t1u3v5w7x9y","status":"draft","steps":[{"channel_key":"in-app-feed","description":"Main in-app feed","name":"In-app step","ref":"in_app_feed_1","template":{"action_url":"{{ vars.app_url }}","markdown_body":"Hello **{{ recipient.name }}**"},"type":"channel"}],"target_audience_key":"premium-users","updated_at":"2023-02-08T22:15:19.846681Z","valid":true},"properties":{"archived_at":{"description":"The timestamp of when the broadcast was archived.","format":"date-time","nullable":true,"type":"string"},"categories":{"description":"A list of categories that the broadcast belongs to.","items":{"type":"string"},"type":"array"},"created_at":{"description":"The timestamp of when the broadcast was created. (read-only).","format":"date-time","type":"string"},"description":{"description":"An arbitrary string attached to a broadcast object. Useful for adding notes about the broadcast for internal purposes. Maximum of 280 characters allowed.","type":"string"},"environment":{"description":"The slug of the environment in which the broadcast exists. (read-only).","type":"string"},"key":{"description":"The unique key string for the broadcast object. Must be at minimum 3 characters and at maximum 255 characters in length. Must be in the format of ^[a-z0-9_-]+$.","type":"string"},"name":{"description":"A name for the broadcast. Must be at maximum 255 characters in length.","type":"string"},"scheduled_at":{"description":"The timestamp of when the broadcast is scheduled to be sent.","format":"date-time","nullable":true,"type":"string"},"sent_at":{"description":"The timestamp of when the broadcast was sent. (read-only).","format":"date-time","nullable":true,"type":"string"},"settings":{"description":"A map of broadcast settings.","properties":{"is_commercial":{"description":"Whether the broadcast is commercial. Defaults to true.","example":true,"type":"boolean"},"override_preferences":{"description":"Whether to ignore recipient preferences for a given type of notification. If true, will send for every channel in the workflow even if the recipient has opted out of a certain kind. Defaults to false.","example":false,"type":"boolean"}},"type":"object"},"sha":{"description":"The SHA hash of the workflow data. (read-only).","type":"string"},"status":{"description":"The current status of the broadcast. One of: `draft`, `scheduled`, `sent`.","enum":["draft","scheduled","sent"],"type":"string"},"steps":{"description":"A list of broadcast step objects in the broadcast. Broadcasts only support channel, branch, and delay steps.","items":{"anyOf":[{"$ref":"#/components/schemas/WorkflowWebhookStep"},{"$ref":"#/components/schemas/WorkflowInAppFeedStep"},{"$ref":"#/components/schemas/WorkflowChatStep"},{"$ref":"#/components/schemas/WorkflowSmsStep"},{"$ref":"#/components/schemas/WorkflowPushStep"},{"$ref":"#/components/schemas/WorkflowEmailStep"},{"$ref":"#/components/schemas/WorkflowBranchStep"},{"$ref":"#/components/schemas/WorkflowDelayStep"},{"$ref":"#/components/schemas/WorkflowRandomCohortStep"}],"description":"A step within a broadcast. Each step, regardless of its type, share a common set of core attributes (`type`, `ref`, `name`, `description`, `conditions`).","type":"object"},"type":"array"},"target_audience_key":{"description":"The key of the audience to target for this broadcast.","type":"string"},"updated_at":{"description":"The timestamp of when the broadcast was last updated. (read-only).","format":"date-time","type":"string"},"valid":{"description":"Whether the broadcast and its steps are in a valid state. (read-only).","type":"boolean"}},"required":["key","name","status","steps","valid","environment","created_at","updated_at","sha"],"title":"Broadcast","type":"object"},"WorkflowWebhookStep":{"description":"A webhook step within a workflow to send an HTTP request to a generic channel. Read more in the [docs](https://docs.knock.app/designing-workflows/channel-step).","example":{"channel_group_key":null,"channel_key":"pagerduty","channel_type":"http","conditions":null,"description":"This is a description of the channel step","name":"Webhook channel step","ref":"channel_step","send_windows":null,"template":{"body":null,"headers":[{"key":"X-API-Key","value":"1234567890"}],"method":"get","query_params":[{"key":"key","value":"value"}],"url":"https://example.com"},"type":"channel"},"properties":{"channel_group_key":{"description":"The key of the channel group to which the channel step will be sending a notification. Either `channel_key` or `channel_group_key` must be provided, but not both.","example":"email","nullable":true,"type":"string"},"channel_key":{"description":"The key of a specific configured channel instance (e.g., 'knock-email', 'postmark', 'sendgrid-marketing') to send the notification through. Either `channel_key` or `channel_group_key` must be provided, but not both.","example":"postmark","nullable":true,"type":"string"},"channel_type":{"description":"The type of the channel step. Always `http` for webhook steps.","enum":["http"],"example":"http","type":"string"},"conditions":{"anyOf":[{"$ref":"#/components/schemas/ConditionGroup"},{"nullable":true}],"description":"A set of conditions to be evaluated for this channel step.","type":"object"},"description":{"description":"An arbitrary string attached to a workflow step. Useful for adding notes about the workflow for internal purposes.","example":"Send a message to the channel","nullable":true,"type":"string"},"name":{"description":"A name for the workflow step.","example":"Channel","nullable":true,"type":"string"},"ref":{"description":"The reference key of the workflow step. Must be unique per workflow.","example":"channel_step","type":"string"},"send_windows":{"description":"A list of send window objects. Must include one send window object per day of the week.","items":{"$ref":"#/components/schemas/SendWindow"},"nullable":true,"type":"array"},"template":{"$ref":"#/components/schemas/WebhookTemplate"},"type":{"description":"The type of the workflow step.","enum":["channel"],"example":"channel","type":"string"}},"required":["type","ref","template"],"title":"WorkflowWebhookStep","type":"object"},"WorkflowUpdateDataStep":{"description":"An update data function step. Merges data into the workflow's `data` scope for use in subsequent steps.","example":{"description":"Update data step description.","name":"Update data","ref":"update_data_1","settings":{"data":"{\"key\": \"value\"}"},"type":"update_data"},"properties":{"conditions":{"anyOf":[{"$ref":"#/components/schemas/ConditionGroup"},{"nullable":true}],"description":"A conditions object that describes one or more conditions to be met in order for the step to be executed.","type":"object"},"description":{"description":"An arbitrary string attached to a workflow step. Useful for adding notes about the workflow for internal purposes.","example":"Update data step description.","nullable":true,"type":"string"},"name":{"description":"A name for the workflow step.","example":"Update data","nullable":true,"type":"string"},"ref":{"description":"The reference key of the workflow step. Must be unique per workflow.","example":"update_data_1","type":"string"},"settings":{"description":"The settings for the update data step.","properties":{"data":{"description":"A JSON string or Liquid template that evaluates to the data to merge into the workflow's data scope.","example":"{\"key\": \"value\"}","type":"string"}},"required":["data"],"type":"object"},"type":{"description":"The type of the workflow step.","enum":["update_data"],"example":"update_data","type":"string"}},"required":["type","ref","settings"],"title":"WorkflowUpdateDataStep","type":"object"},"WrappedWorkflowResponse":{"description":"Wraps the Workflow response under the `workflow` key.","example":{"workflow":{"active":false,"categories":["marketing","black-friday"],"conditions":{"all":[{"argument":"admin","operator":"equal_to","variable":"recipient.role"}]},"created_at":"2022-12-16T19:07:50.027113Z","description":"This is a dummy workflow for demo purposes.","environment":"development","key":"december-16-demo","name":"december-16-demo","settings":{"override_preferences":true},"sha":"f7e9d3b2a1c8e6m4k5j7h9g0i2l3n4p6q8r0t1u3v5w7x9y","steps":[{"channel_key":"in-app-feed","channel_type":"in_app_feed","description":"Main in-app feed","name":"In-app step","ref":"in_app_feed_1","template":{"action_url":"{{ data.onboarding_url }}","markdown_body":"Hello **{{ recipient.name }}**. Click here to get started."},"type":"channel"},{"ref":"delay_1","settings":{"delay_for":{"unit":"hours","value":1}},"type":"delay"},{"channel_key":"postmark","channel_type":"email","ref":"email_1","template":{"html_body":"<p>Hello, {{ recipient.name }}! Welcome to {{ vars.app_name }} <a href='{{ data.onboarding_url }}'>Get started here</a>.</p>","settings":{"layout_key":"default"},"subject":"Welcome to {{ vars.app_name }}!"},"type":"channel"}],"trigger_data_json_schema":{"properties":{"onboarding_url":{"type":"string"}},"required":["onboarding_url"],"type":"object"},"trigger_frequency":"every_trigger","updated_at":"2023-02-08T22:15:19.846681Z","valid":true}},"properties":{"workflow":{"$ref":"#/components/schemas/Workflow"}},"required":["workflow"],"title":"WrappedWorkflowResponse","type":"object"},"WrappedWorkflowRequestRequest":{"description":"Wraps the WorkflowRequest request under the workflow key.","example":{"workflow":{"name":"My Workflow","steps":[{"channel_key":"in-app-feed","name":"Channel 1","ref":"channel_1","template":{"action_url":"{{ vars.app_url }}","markdown_body":"Hello **{{ recipient.name }}**"},"type":"channel"}]}},"properties":{"workflow":{"$ref":"#/components/schemas/WorkflowRequest"}},"required":["workflow"],"title":"WrappedWorkflowRequestRequest","type":"object"},"EmailLayout":{"description":"A versioned email layout used within an environment.","example":{"branding_overrides":{"dark_logo_url":"https://cdn.example.com/logo-dark.png","dark_primary_color":"#1A1A2E","dark_primary_color_contrast":"#FFFFFF","primary_color":"#4F46E5","primary_color_contrast":"#FFFFFF"},"created_at":"2021-01-01T00:00:00Z","environment":"development","footer_links":[{"text":"Example","url":"http://example.com"}],"html_layout":"<html><body>Hello, world!</body></html>","key":"transactional","name":"Transactional","sha":"1234567890","text_layout":"Hello, world!","updated_at":"2021-01-01T00:00:00Z"},"properties":{"branding_overrides":{"$ref":"#/components/schemas/BrandingOverrides"},"created_at":{"description":"The timestamp of when the email layout was created.","format":"date-time","type":"string"},"environment":{"description":"The environment of the email layout.","type":"string"},"footer_links":{"description":"A list of one or more items to show in the footer of the email layout.","items":{"properties":{"text":{"description":"The text to display as the link.","type":"string"},"url":{"description":"The URL to link to.","type":"string"}},"required":["text","url"],"type":"object"},"type":"array"},"html_layout":{"description":"The complete HTML or MJML content of the email layout.","type":"string"},"is_mjml":{"description":"Whether this layout uses MJML format. When true, html_layout must contain <mjml> tags.","type":"boolean"},"key":{"description":"The unique key for this email layout.","type":"string"},"name":{"description":"The human-readable name of this email layout.","type":"string"},"sha":{"description":"The SHA of the email layout.","type":"string"},"text_layout":{"description":"The complete plaintext content of the email layout.","type":"string"},"updated_at":{"description":"The timestamp of when the email layout was last updated.","format":"date-time","type":"string"}},"required":["key","name","html_layout","text_layout","sha","created_at"],"title":"EmailLayout","type":"object"},"ChatChannelSettings":{"description":"Chat channel settings. Only used as configuration as part of a workflow channel step.","example":{"email_based_user_id_resolution":true,"link_tracking":true},"properties":{"email_based_user_id_resolution":{"description":"Whether to resolve chat provider user IDs using a Knock user's email address. Only relevant for Slack channels for the time being.","example":true,"type":"boolean"},"link_tracking":{"description":"Whether to track link clicks on chat notifications.","example":true,"type":"boolean"}},"title":"ChatChannelSettings","type":"object"},"EmailButtonSetBlockButton":{"description":"A button in a button set block.","example":{"action":"https://example.com/button-action","label":"Click me","size_attrs":{"is_fullwidth":false,"size":"sm"},"style_attrs":{"background_color":"#000000","border_color":"#000000","border_radius":6,"border_width":1,"text_color":"#FFFFFF"},"variant":"solid"},"properties":{"action":{"description":"The action of the button.","type":"string"},"label":{"description":"The label of the button.","type":"string"},"size_attrs":{"description":"The size attributes of the button.","properties":{"is_fullwidth":{"description":"Whether the button is full width.","type":"boolean"},"size":{"description":"The size of the button.","enum":["sm","md","lg"],"type":"string"}},"type":"object"},"style_attrs":{"description":"The style attributes of the button.","properties":{"background_color":{"description":"The background color of the button.","type":"string"},"border_color":{"description":"The border color of the button.","type":"string"},"border_radius":{"description":"The border radius of the button.","type":"integer"},"border_width":{"description":"The border width of the button.","type":"integer"},"text_color":{"description":"The text color of the button.","type":"string"}},"type":"object"},"variant":{"description":"The variant of the button.","enum":["solid","outline"],"example":"solid","type":"string"}},"required":["label","action","variant"],"title":"EmailButtonSetBlockButton","type":"object"},"ChatTemplate":{"description":"A chat template.","example":{"json_body":null,"markdown_body":"**Hello**, world!","summary":"Hello, world!"},"properties":{"json_body":{"description":"A JSON template for the chat notification message payload. Only present if not using the markdown body.","example":"{\"type\": \"text\", \"text\": \"Hello, world!\"}","nullable":true,"type":"string"},"markdown_body":{"description":"The markdown body of the chat template.","example":"Hello, world!","type":"string"},"summary":{"description":"The summary of the chat template. Used by some chat apps in their push notifications.","example":"Hello, world!","type":"string"}},"required":["markdown_body"],"title":"ChatTemplate","type":"object"},"WrappedChannelGroupRequestRequest":{"description":"Wraps the ChannelGroupRequest request under the channel_group key.","example":{"channel_group":{"channel_rules":[{"channel_key":"push-fcm","index":0,"rule_type":"always"}],"channel_type":"push","name":"Push Notification Group","operator":"any"}},"properties":{"channel_group":{"$ref":"#/components/schemas/ChannelGroupRequest"}},"required":["channel_group"],"title":"WrappedChannelGroupRequestRequest","type":"object"},"Guide":{"description":"A guide defines an in-app guide that can be displayed to users based on priority and other conditions.","example":{"activation_url_patterns":[{"directive":"allow","pathname":"/dashboard/*"}],"active":true,"archived_at":null,"channel_key":"in-app-guide","created_at":"2024-01-01T00:00:00Z","description":"A guide to help users get started with the application","environment":"development","key":"getting-started","name":"Getting Started Guide","semver":"0.0.1","sha":"1234567890","steps":[{"name":"Welcome to the App","ref":"welcome-step","schema_key":"tooltip","schema_semver":"1.0.0","schema_variant_key":"default","values":{"text_field":"value"}}],"target_audience_id":null,"target_property_conditions":{"all":[{"argument":"some_property","operator":"equal_to","variable":"recipient.property"}]},"type":"banner","updated_at":"2024-01-01T00:00:00Z","valid":true},"properties":{"activation_url_patterns":{"description":"A list of activation url patterns that describe when the guide should be shown.","items":{"$ref":"#/components/schemas/GuideActivationUrlPattern"},"type":"array"},"active":{"default":false,"description":"Whether the guide is active.","type":"boolean"},"archived_at":{"description":"The timestamp of when the guide was archived.","format":"date-time","nullable":true,"type":"string"},"channel_key":{"description":"The key of the channel in which the guide exists.","type":"string"},"created_at":{"description":"The timestamp of when the guide was created.","format":"date-time","type":"string"},"deleted_at":{"description":"The timestamp of when the guide was deleted.","format":"date-time","nullable":true,"type":"string"},"description":{"description":"An arbitrary string attached to a guide object. Useful for adding notes about the guide for internal purposes. Maximum of 280 characters allowed.","nullable":true,"type":"string"},"environment":{"description":"The slug of the environment in which the guide exists.","type":"string"},"key":{"description":"The unique key string for the guide object. Must be at minimum 3 characters and at maximum 255 characters in length. Must be in the format of ^[a-z0-9_-]+$.","type":"string"},"name":{"description":"A name for the guide. Must be at maximum 255 characters in length.","type":"string"},"semver":{"description":"The semver of the guide.","type":"string"},"sha":{"description":"The SHA hash of the guide.","type":"string"},"steps":{"description":"A list of guide step objects in the guide.","items":{"$ref":"#/components/schemas/GuideStep"},"type":"array"},"target_audience_id":{"description":"The ID of the target audience for the guide. When not set, will default to targeting all users.","nullable":true,"type":"string"},"target_property_conditions":{"anyOf":[{"$ref":"#/components/schemas/ConditionGroup"},{"nullable":true}],"description":"A conditions object that describes one or more conditions to be met for the guide to be shown to an audience member.","type":"object"},"type":{"description":"The type of the guide. This is derived from the message type of the guide steps.","type":"string"},"updated_at":{"description":"The timestamp of when the guide was last updated.","format":"date-time","type":"string"},"valid":{"description":"Whether the guide is valid.","type":"boolean"}},"required":["key","active","name","environment","created_at","updated_at","sha"],"title":"Guide","type":"object"},"ArchiveAudienceResponse":{"description":"The response from archiving an audience.","example":{"result":"success"},"properties":{"result":{"description":"The result of the archive operation.","example":"success","type":"string"}},"required":["result"],"title":"ArchiveAudienceResponse","type":"object"},"WorkflowUpdateObjectStep":{"description":"An update object step. Updates properties of a specific object referenced in the workflow.","example":{"description":"Update object step description.","name":"Update object","ref":"update_object_1","settings":{"recipient_gid":"gid://Object/projects/123","update_properties":"{\"status\": \"active\"}"},"type":"update_object"},"properties":{"conditions":{"anyOf":[{"$ref":"#/components/schemas/ConditionGroup"},{"nullable":true}],"description":"A conditions object that describes one or more conditions to be met in order for the step to be executed.","type":"object"},"description":{"description":"An arbitrary string attached to a workflow step. Useful for adding notes about the workflow for internal purposes.","example":"Update object step description.","nullable":true,"type":"string"},"name":{"description":"A name for the workflow step.","example":"Update object","nullable":true,"type":"string"},"ref":{"description":"The reference key of the workflow step. Must be unique per workflow.","example":"update_object_1","type":"string"},"settings":{"description":"The settings for the update object step.","properties":{"recipient_gid":{"description":"The global identifier (GID) of the object to update. Format: gid://Object/{collection}/{id}","example":"gid://Object/projects/123","type":"string"},"update_properties":{"description":"A JSON string or Liquid template that evaluates to the properties to update on the object.","example":"{\"status\": \"active\", \"updated_at\": \"{{ timestamp }}\"}","type":"string"}},"required":["recipient_gid","update_properties"],"type":"object"},"type":{"description":"The type of the workflow step.","enum":["update_object"],"example":"update_object","type":"string"}},"required":["type","ref","settings"],"title":"WorkflowUpdateObjectStep","type":"object"},"WrappedMessageTypeRequestRequest":{"description":"Wraps the MessageTypeRequest request under the message_type key.","example":{"message_type":{"description":"This is a message type","name":"My Message Type","preview":"<div>Hello, world!</div>","variants":[{"fields":[{"key":"text_field","label":"My text field","settings":{"description":"A description of the text field","max_length":100,"min_length":10,"required":true},"type":"text"}],"key":"default","name":"Default"}]}},"properties":{"message_type":{"$ref":"#/components/schemas/MessageTypeRequest"}},"required":["message_type"],"title":"WrappedMessageTypeRequestRequest","type":"object"},"PaginatedAudienceResponse":{"description":"A paginated list of Audience. Contains a list of entries and page information.","example":{"entries":[{"created_at":"2024-01-15T10:30:00Z","description":"Customers who signed up in the last 30 days.","environment":"development","key":"new-customers","name":"New customers","segments":[{"conditions":[{"argument":"30_days_ago","operator":"greater_than","property":"recipient.created_at"}]}],"sha":"a1b2c3d4e5f6","type":"dynamic","updated_at":"2024-06-20T14:45:00Z"}],"page_info":{"after":null,"before":null,"page_size":25}},"properties":{"entries":{"description":"A list of entries.","items":{"$ref":"#/components/schemas/Audience"},"nullable":false,"type":"array"},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["entries","page_info"],"title":"PaginatedAudienceResponse","type":"object"},"ShowWorkflowResponse":{"description":"A workflow object.","example":{"active":false,"categories":["marketing","black-friday"],"conditions":{"all":[{"argument":"admin","operator":"equal_to","variable":"recipient.role"}]},"created_at":"2022-12-16T19:07:50.027113Z","created_by":{"email":"john@example.com","id":"user_123","name":"John Doe"},"description":"This is a dummy workflow for demo purposes.","environment":"development","key":"december-16-demo","name":"december-16-demo","settings":{"override_preferences":true},"sha":"f7e9d3b2a1c8e6m4k5j7h9g0i2l3n4p6q8r0t1u3v5w7x9y","steps":[{"channel_key":"in-app-feed","description":"Main in-app feed","name":"In-app step","ref":"in_app_feed_1","template":{"action_url":"{{ vars.app_url }}","markdown_body":"Hello **{{ recipient.name }}**"},"type":"channel"}],"trigger_data_json_schema":{"properties":{"name":{"type":"string"}},"required":["name"],"type":"object"},"trigger_frequency":"every_trigger","updated_at":"2023-02-08T22:15:19.846681Z","updated_by":{"email":"jane@example.com","id":"user_456","name":"Jane Smith"},"valid":true},"properties":{"active":{"description":"Whether the workflow is [active](https://docs.knock.app/concepts/workflows#workflow-status) in the current environment. (read-only).","type":"boolean"},"categories":{"description":"A list of [categories](https://docs.knock.app/concepts/workflows#workflow-categories) that the workflow belongs to.","items":{"type":"string"},"type":"array"},"conditions":{"anyOf":[{"$ref":"#/components/schemas/ConditionGroup"},{"nullable":true}],"description":"A conditions object that describes one or more conditions to be met for the workflow to be executed. (optional).","type":"object"},"created_at":{"description":"The timestamp of when the workflow was created. (read-only).","format":"date-time","type":"string"},"created_by":{"anyOf":[{"$ref":"#/components/schemas/MemberUser"},{"nullable":true}],"description":"Information about the user who created the workflow. Only included in detailed views. (read-only)."},"deleted_at":{"description":"The timestamp of when the workflow was deleted. (read-only).","format":"date-time","type":"string"},"description":{"description":"An arbitrary string attached to a workflow object. Useful for adding notes about the workflow for internal purposes. Maximum of 280 characters allowed.","type":"string"},"environment":{"description":"The slug of the environment in which the workflow exists. (read-only).","type":"string"},"key":{"description":"The unique key string for the workflow object. Must be at minimum 3 characters and at maximum 255 characters in length. Must be in the format of ^[a-z0-9_-]+$.","type":"string"},"name":{"description":"A name for the workflow. Must be at maximum 255 characters in length.","type":"string"},"settings":{"description":"A map of workflow settings.","properties":{"is_commercial":{"description":"Whether the workflow is commercial. Defaults to false.","example":false,"type":"boolean"},"override_preferences":{"description":"Whether to ignore recipient preferences for a given type of notification. If true, will send for every channel in the workflow even if the recipient has opted out of a certain kind. Defaults to false.","example":false,"type":"boolean"}},"type":"object"},"sha":{"description":"The SHA hash of the workflow data. (read-only).","type":"string"},"steps":{"description":"A list of workflow step objects in the workflow.","items":{"$ref":"#/components/schemas/WorkflowStep"},"type":"array"},"trigger_data_json_schema":{"additionalProperties":true,"description":"A JSON schema for the expected structure of the workflow trigger's `data` payload (available in templates as `{{ data.field_name }}`). Used to validate trigger requests. Read more in the [docs](https://docs.knock.app/developer-tools/validating-trigger-data).","type":"object"},"trigger_frequency":{"description":"The frequency at which the workflow should be triggered. One of: `once_per_recipient`, `once_per_recipient_per_tenant`, `every_trigger`. Defaults to `every_trigger`. Read more in [docs](https://docs.knock.app/send-notifications/triggering-workflows/overview#controlling-workflow-trigger-frequency).","enum":["every_trigger","once_per_recipient","once_per_recipient_per_tenant"],"example":"every_trigger","type":"string"},"updated_at":{"description":"The timestamp of when the workflow was last updated. (read-only).","format":"date-time","type":"string"},"updated_by":{"anyOf":[{"$ref":"#/components/schemas/MemberUser"},{"nullable":true}],"description":"Information about the user who last updated the workflow. Only included in detailed views. (read-only)."},"valid":{"description":"Whether the workflow and its steps are in a valid state. (read-only).","type":"boolean"}},"required":["key","name","steps","active","valid","environment","created_at","updated_at","sha"],"title":"ShowWorkflowResponse","type":"object"},"WorkflowSmsStep":{"description":"A SMS step within a workflow. Read more in the [docs](https://docs.knock.app/designing-workflows/channel-step).","example":{"channel_group_key":null,"channel_key":"twilio","channel_overrides":null,"channel_type":"sms","conditions":null,"description":"This is a description of the channel step","name":"SMS channel step","ref":"channel_step","send_windows":null,"template":{"settings":{"payload_overrides":"{\"name\": \"John\"}","to_number":"+1234567890"},"text_body":"Hello, world!"},"type":"channel"},"properties":{"channel_group_key":{"description":"The key of the channel group to which the channel step will be sending a notification. Either `channel_key` or `channel_group_key` must be provided, but not both.","example":"email","nullable":true,"type":"string"},"channel_key":{"description":"The key of a specific configured channel instance (e.g., 'knock-email', 'postmark', 'sendgrid-marketing') to send the notification through. Either `channel_key` or `channel_group_key` must be provided, but not both.","example":"postmark","nullable":true,"type":"string"},"channel_overrides":{"anyOf":[{"$ref":"#/components/schemas/SmsChannelSettings"},{"nullable":true}],"description":"A map of channel overrides for the channel step.","type":"object"},"channel_type":{"description":"The type of the channel step. Always `sms` for SMS steps.","enum":["sms"],"example":"sms","type":"string"},"conditions":{"anyOf":[{"$ref":"#/components/schemas/ConditionGroup"},{"nullable":true}],"description":"A set of conditions to be evaluated for this channel step.","type":"object"},"description":{"description":"An arbitrary string attached to a workflow step. Useful for adding notes about the workflow for internal purposes.","example":"Send a message to the channel","nullable":true,"type":"string"},"name":{"description":"A name for the workflow step.","example":"Channel","nullable":true,"type":"string"},"ref":{"description":"The reference key of the workflow step. Must be unique per workflow.","example":"channel_step","type":"string"},"send_windows":{"description":"A list of send window objects. Must include one send window object per day of the week.","items":{"$ref":"#/components/schemas/SendWindow"},"nullable":true,"type":"array"},"template":{"$ref":"#/components/schemas/SmsTemplate"},"type":{"description":"The type of the workflow step.","enum":["channel"],"example":"channel","type":"string"}},"required":["type","ref","template"],"title":"WorkflowSmsStep","type":"object"},"WorkflowBranchStep":{"description":"A branch function step. Read more in the [docs](https://docs.knock.app/designing-workflows/branch-function).","example":{"branches":[{"conditions":{"all":[{"argument":"pro","operator":"equal_to","variable":"recipient.plan_type"}]},"name":"Pro plan","steps":[],"terminates":false},{"conditions":null,"name":"Default","steps":[],"terminates":false}],"description":"Branch description","name":"Branch 1","ref":"branch_1","type":"branch"},"properties":{"branches":{"description":"A list of workflow branches to be evaluated.","items":{"description":"A branch in a branch step.","example":{"conditions":{"all":[{"argument":"pro","operator":"equal_to","variable":"recipient.plan_type"}]},"name":"Pro plan","steps":[],"terminates":false},"properties":{"conditions":{"anyOf":[{"$ref":"#/components/schemas/ConditionGroup"},{"nullable":true}],"description":"A set of conditions to be evaluated for this branch.","type":"object"},"name":{"description":"The name of the branch.","example":"The name of the branch.","type":"string"},"steps":{"description":"A list of steps that will be executed if the branch is chosen.","items":{"$ref":"#/components/schemas/WorkflowStep"},"type":"array"},"terminates":{"description":"If the workflow should halt at the end of the branch. Defaults to false if not provided.","example":true,"type":"boolean"}},"title":"WorkflowBranchStepBranch","type":"object"},"type":"array"},"description":{"description":"An arbitrary string attached to a workflow step. Useful for adding notes about the workflow for internal purposes.","example":"Branch description","type":"string"},"name":{"description":"A name for the workflow step.","example":"Branch","nullable":true,"type":"string"},"ref":{"description":"The reference key of the workflow step. Must be unique per workflow.","example":"branch_step","type":"string"},"type":{"description":"The type of step.","enum":["branch"],"example":"branch","type":"string"}},"required":["type","ref","branches"],"title":"WorkflowBranchStep","type":"object"},"DynamicAudienceRequest":{"description":"Request body for creating/updating a dynamic audience.","example":{"description":"Users on the premium plan","name":"Premium users","segments":[{"conditions":[{"argument":"premium","operator":"equal_to","property":"recipient.plan"}]}],"type":"dynamic"},"properties":{"description":{"description":"A description of the audience.","nullable":true,"type":"string"},"name":{"description":"The name of the audience.","type":"string"},"segments":{"description":"A list of segments that define the dynamic audience membership criteria. Each segment contains one or more conditions joined by AND. Multiple segments are joined by OR.","items":{"properties":{"conditions":{"description":"A list of conditions within this segment, joined by AND.","items":{"$ref":"#/components/schemas/AudienceCondition"},"type":"array"}},"required":["conditions"],"type":"object"},"type":"array"},"type":{"description":"The type of audience. Set to `dynamic` for dynamic audiences.","enum":["dynamic"],"type":"string"}},"required":["type","name"],"title":"DynamicAudienceRequest","type":"object"},"WebhookTemplate":{"description":"A webhook template. By default, a webhook step will use the request settings you configured in your webhook channel. You can override this as you see fit on a per-step basis.","example":{"body":null,"headers":[{"key":"X-API-Key","value":"1234567890"}],"method":"get","query_params":[{"key":"key","value":"value"}],"url":"https://example.com"},"properties":{"body":{"description":"The body of the request. Only used for POST or PUT requests.","example":"{\"key\": \"value\"}","nullable":true,"type":"string"},"headers":{"description":"A list of key-value pairs for the request headers. Each object should contain key and value fields with string values.","items":{"properties":{"key":{"description":"The key of the header.","example":"X-API-Key","type":"string"},"value":{"description":"The value of the header.","example":"1234567890","type":"string"}},"required":["key","value"],"type":"object"},"type":"array"},"method":{"description":"The HTTP method of the webhook.","enum":["get","post","put","delete","patch"],"example":"post","type":"string"},"query_params":{"description":"A list of key-value pairs for the request query params. Each object should contain key and value fields with string values.","items":{"properties":{"key":{"description":"The key of the query param.","example":"key","type":"string"},"value":{"description":"The value of the query param.","example":"value","type":"string"}},"required":["key","value"],"type":"object"},"type":"array"},"url":{"description":"The URL of the webhook.","example":"https://example.com","type":"string"}},"required":["url","method"],"title":"WebhookTemplate","type":"object"},"PaginatedChannelResponse":{"description":"A paginated list of Channel. Contains a list of entries and page information.","example":{"entries":[{"archived_at":null,"created_at":"2021-01-01T00:00:00Z","custom_icon_url":null,"id":"01234567-89ab-cdef-0123-456789abcdef","key":"my-sendgrid-channel","name":"My Sendgrid Channel","provider":"sendgrid","type":"email","updated_at":"2021-01-01T00:00:00Z"}],"page_info":{"after":null,"before":null,"page_size":25}},"properties":{"entries":{"description":"A list of entries.","items":{"$ref":"#/components/schemas/Channel"},"nullable":false,"type":"array"},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["entries","page_info"],"title":"PaginatedChannelResponse","type":"object"},"PaginatedGuideResponse":{"description":"A paginated list of Guide. Contains a list of entries and page information.","example":{"entries":[{"activation_url_patterns":[{"directive":"allow","pathname":"/dashboard/*"}],"active":true,"archived_at":null,"channel_key":"in-app-guide","created_at":"2024-01-01T00:00:00Z","description":"A guide to help users get started with the application","environment":"development","key":"getting-started","name":"Getting Started Guide","semver":"0.0.1","sha":"1234567890","steps":[{"name":"Welcome to the App","ref":"welcome-step","schema_key":"tooltip","schema_semver":"1.0.0","schema_variant_key":"default","values":{"text_field":"value"}}],"target_audience_id":null,"target_property_conditions":{"all":[{"argument":"some_property","operator":"equal_to","variable":"recipient.property"}]},"type":"banner","updated_at":"2024-01-01T00:00:00Z","valid":true}],"page_info":{"after":null,"before":null,"page_size":25}},"properties":{"entries":{"description":"A list of entries.","items":{"$ref":"#/components/schemas/Guide"},"nullable":false,"type":"array"},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["entries","page_info"],"title":"PaginatedGuideResponse","type":"object"},"EmailMarkdownBlock":{"description":"A markdown block in an email template.","example":{"content":"# Hello, world!","layout_attrs":{"padding_bottom":8,"padding_left":4,"padding_right":4,"padding_top":8},"type":"markdown"},"properties":{"content":{"description":"The markdown content of the block. Supports Liquid templating with variables like `{{ recipient.name }}`, `{{ actor.name }}`, `{{ vars.app_name }}`, `{{ data.custom_field }}`, and `{{ tenant.name }}`. See the [template variables reference](https://docs.knock.app/designing-workflows/template-editor/variables) for available variables.","type":"string"},"id":{"description":"The ID of the block.","example":"123e4567-e89b-12d3-a456-426614174000","format":"uuid","type":"string"},"layout_attrs":{"description":"The layout attributes of the block.","properties":{"padding_bottom":{"description":"The padding_bottom layout attribute of the block.","type":"integer"},"padding_left":{"description":"The padding_left layout attribute of the block.","type":"integer"},"padding_right":{"description":"The padding_right layout attribute of the block.","type":"integer"},"padding_top":{"description":"The padding_top layout attribute of the block.","type":"integer"}},"required":["padding_top","padding_right","padding_bottom","padding_left"],"type":"object"},"type":{"description":"The type of the block.","enum":["markdown"],"example":"markdown","type":"string"},"variant":{"description":"The flavor of markdown to use for the block.","enum":["default"],"example":"default","type":"string"},"version":{"description":"The version of the block schema. This is automatically managed by Knock and should not be set manually. Currently all blocks are at version 1.","example":1,"type":"integer"}},"required":["type","content"],"title":"EmailMarkdownBlock","type":"object"},"ConditionGroupAllMatch":{"description":"A group of conditions that must all be met.","example":{"all":[{"argument":"some_property","operator":"equal_to","variable":"recipient.property"}]},"properties":{"all":{"description":"A list of conditions.","items":{"$ref":"#/components/schemas/Condition"},"type":"array"}},"title":"ConditionGroupAllMatch","type":"object"},"ExchangeForApiKeyResponse":{"description":"Returns an API key that can be used to make requests to the public API.","example":{"api_key":"sk_1234567890"},"properties":{"api_key":{"description":"The secret API key exchanged from the service token.","type":"string"}},"required":["api_key"],"title":"ExchangeForApiKeyResponse","type":"object"},"MessageTypeMarkdownField":{"description":"A markdown field used in a message type.","example":{"key":"markdown_field","label":"Markdown Field","settings":{"default":"# Heading\n\nThis is **bold** and this is *italic*.","description":"A description of the markdown field","placeholder":"A placeholder for the markdown field","required":true},"type":"markdown"},"properties":{"key":{"description":"The unique key of the field.","example":"key","type":"string"},"label":{"description":"The label of the field.","example":"Label","nullable":true,"type":"string"},"settings":{"description":"Settings for the markdown field.","properties":{"default":{"description":"The default value of the markdown field.","example":"# Heading\n\nThis is **bold** and this is *italic*.","type":"string"},"description":{"example":"A description of the field, used in the UI as a hint text.","nullable":true,"type":"string"},"placeholder":{"example":"A placeholder for the field.","nullable":true,"type":"string"},"required":{"description":"Whether the field is required.","example":true,"type":"boolean"}},"type":"object"},"type":{"description":"The type of the field.","enum":["markdown"],"example":"markdown","type":"string"}},"required":["type","key","label"],"title":"MessageTypeMarkdownField","type":"object"},"MessageTypeTextareaField":{"description":"A textarea field used in a message type.","example":{"key":"textarea_field","label":"Textarea Field","settings":{"description":"A description of the textarea field","max_length":1000,"min_length":10,"placeholder":"A placeholder for the textarea field","required":true},"type":"textarea"},"properties":{"key":{"description":"The unique key of the field.","example":"key","type":"string"},"label":{"description":"The label of the field.","example":"Label","nullable":true,"type":"string"},"settings":{"description":"Settings for the textarea field.","properties":{"default":{"description":"The default value of the textarea field.","example":"A placeholder","nullable":true,"type":"string"},"description":{"example":"A description of the field, used in the UI as a hint text.","nullable":true,"type":"string"},"max_length":{"example":1000,"type":"integer"},"min_length":{"example":10,"type":"integer"},"placeholder":{"example":"A placeholder for the field.","nullable":true,"type":"string"},"required":{"description":"Whether the field is required.","example":true,"type":"boolean"}},"type":"object"},"type":{"description":"The type of the field.","enum":["textarea"],"example":"textarea","type":"string"}},"required":["type","key","label"],"title":"MessageTypeTextareaField","type":"object"},"BrandingOverrides":{"additionalProperties":false,"description":"Overrides to apply against account branding variables in an email layout, including dark mode-specific values.","example":{"dark_icon_url":"https://cdn.example.com/icon-dark.png","dark_logo_url":"https://cdn.example.com/logo-dark.png","dark_primary_color":"#1A1A2E","dark_primary_color_contrast":"#FFFFFF","icon_url":"https://cdn.example.com/icon-light.png","logo_url":"https://cdn.example.com/logo-light.png","primary_color":"#4F46E5","primary_color_contrast":"#FFFFFF","primary_text_color":"#111827","secondary_text_color":"#6B7280"},"nullable":true,"properties":{"dark_icon_url":{"description":"A URL for a dark mode icon override.","nullable":true,"type":"string"},"dark_logo_url":{"description":"A URL for a dark mode logo override.","nullable":true,"type":"string"},"dark_primary_color":{"description":"The dark mode primary brand color in hex format.","nullable":true,"pattern":"^#(?:[A-Fa-f0-9]{3}|[A-Fa-f0-9]{6})$","type":"string"},"dark_primary_color_contrast":{"description":"The dark mode contrast color for the primary brand color in hex format.","nullable":true,"pattern":"^#(?:[A-Fa-f0-9]{3}|[A-Fa-f0-9]{6})$","type":"string"},"icon_url":{"description":"A URL for a light mode icon override.","nullable":true,"type":"string"},"logo_url":{"description":"A URL for a light mode logo override.","nullable":true,"type":"string"},"primary_color":{"description":"The light mode primary brand color in hex format.","nullable":true,"pattern":"^#(?:[A-Fa-f0-9]{3}|[A-Fa-f0-9]{6})$","type":"string"},"primary_color_contrast":{"description":"The light mode contrast color for the primary brand color in hex format.","nullable":true,"pattern":"^#(?:[A-Fa-f0-9]{3}|[A-Fa-f0-9]{6})$","type":"string"},"primary_text_color":{"description":"The light mode primary text color in hex format.","nullable":true,"pattern":"^#(?:[A-Fa-f0-9]{3}|[A-Fa-f0-9]{6})$","type":"string"},"secondary_text_color":{"description":"The light mode secondary text color in hex format.","nullable":true,"pattern":"^#(?:[A-Fa-f0-9]{3}|[A-Fa-f0-9]{6})$","type":"string"}},"title":"BrandingOverrides","type":"object"},"DynamicAudience":{"description":"A dynamic audience where membership is determined by segment conditions evaluated at runtime.","example":{"created_at":"2024-01-15T10:30:00Z","description":"Customers who signed up in the last 30 days.","environment":"development","key":"new-customers","name":"New customers","segments":[{"conditions":[{"argument":"30_days_ago","operator":"greater_than","property":"recipient.created_at"}]}],"sha":"a1b2c3d4e5f6","type":"dynamic","updated_at":"2024-06-20T14:45:00Z"},"properties":{"created_at":{"description":"The timestamp of when the audience was created.","format":"date-time","type":"string"},"description":{"description":"A description of the audience.","nullable":true,"type":"string"},"environment":{"description":"The slug of the environment in which the audience exists.","type":"string"},"key":{"description":"The unique key of the audience.","type":"string"},"name":{"description":"The name of the audience.","type":"string"},"segments":{"description":"A list of segments that define the dynamic audience membership criteria. Each segment contains one or more conditions joined by AND. Multiple segments are joined by OR.","items":{"properties":{"conditions":{"description":"A list of conditions within this segment, joined by AND.","items":{"$ref":"#/components/schemas/AudienceCondition"},"type":"array"}},"required":["conditions"],"type":"object"},"type":"array"},"sha":{"description":"The SHA hash of the audience data.","nullable":true,"type":"string"},"type":{"description":"The type of audience. Always `dynamic` for dynamic audiences.","enum":["dynamic"],"type":"string"},"updated_at":{"description":"The timestamp of when the audience was last updated.","format":"date-time","type":"string"}},"required":["key","type","name","environment","created_at","updated_at","segments"],"title":"DynamicAudience","type":"object"},"GuideRequest":{"description":"A request to create or update a guide.","example":{"activation_url_patterns":[{"directive":"allow","pathname":"/dashboard/*"}],"channel_key":"in-app-guide","description":"A guide to help users get started with the application","name":"Getting Started Guide","steps":[{"name":"Welcome to the App","ref":"welcome-step","schema_key":"tooltip","schema_semver":"1.0.0","schema_variant_key":"default","values":{"text_field":"value"}}],"target_audience_id":null,"target_property_conditions":{"all":[{"argument":"some_property","operator":"equal_to","variable":"recipient.property"}]}},"properties":{"activation_url_patterns":{"description":"A list of activation url patterns that describe when the guide should be shown.","items":{"$ref":"#/components/schemas/GuideActivationUrlPattern"},"type":"array"},"archived_at":{"description":"The timestamp of when the guide was archived.","format":"date-time","nullable":true,"type":"string"},"channel_key":{"description":"The key of the channel in which the guide exists.","type":"string"},"deleted_at":{"description":"The timestamp of when the guide was deleted.","format":"date-time","nullable":true,"type":"string"},"description":{"description":"An arbitrary string attached to a guide object. Useful for adding notes about the guide for internal purposes. Maximum of 280 characters allowed.","nullable":true,"type":"string"},"name":{"description":"A name for the guide. Must be at maximum 255 characters in length.","type":"string"},"steps":{"description":"A list of guide step objects in the guide.","items":{"$ref":"#/components/schemas/GuideStep"},"type":"array"},"target_audience_id":{"description":"The ID of the target audience for the guide. When not set, will default to targeting all users.","nullable":true,"type":"string"},"target_property_conditions":{"anyOf":[{"$ref":"#/components/schemas/ConditionGroup"},{"nullable":true}],"description":"A conditions object that describes one or more conditions to be met for the guide to be shown to an audience member.","type":"object"}},"required":["name","channel_key","steps"],"title":"GuideRequest","type":"object"},"TranslationRequest":{"description":"A translation object with a content attribute used to update or create a translation.","example":{"content":"{\"hello\":\"Hello, world!\"}","format":"json"},"properties":{"content":{"description":"A JSON encoded string containing the key-value pairs of translation references and translation strings.","type":"string"},"format":{"description":"Indicates whether content is a JSON encoded object string or a string in the PO format.","enum":["json","po"],"example":"json","type":"string"}},"required":["content","format"],"title":"TranslationRequest","type":"object"},"GuideActivationParams":{"description":"A request to activate or schedule the activation of a guide.","example":{"active":true},"oneOf":[{"description":"A request to activate or deactivate a guide.","example":{"status":true},"properties":{"status":{"description":"Whether to activate or deactivate the guide.","example":true,"type":"boolean"}},"required":["status"],"title":"GuideBooleanActivationParams","type":"object"},{"description":"A request to schedule the activation of a guide. At least one of from or until must be provided.","example":{"from":"2024-03-20T10:00:00Z","until":"2024-03-21T10:00:00Z"},"properties":{"from":{"description":"When to activate the guide. If provided, the guide will be scheduled to activate at this time. Must be in ISO 8601 UTC format.","example":"2024-03-20T10:00:00Z","format":"date-time","type":"string"},"until":{"description":"When to deactivate the guide. If provided, the guide will be scheduled to deactivate at this time. Must be in ISO 8601 UTC format.","example":"2024-03-21T10:00:00Z","format":"date-time","type":"string"}},"title":"GuideScheduledActivationParams","type":"object"}],"title":"GuideActivationParams","type":"object"},"PaginatedMessageTypeResponse":{"description":"A paginated list of MessageType. Contains a list of entries and page information.","example":{"entries":[{"archived_at":null,"created_at":"2021-01-01T00:00:00Z","deleted_at":null,"description":"Email message type","environment":"development","icon_name":"email","key":"email","name":"Email","owner":"user","preview":"<div>Hello, world!</div>","semver":"1.0.0","sha":"1234567890","updated_at":"2021-01-01T00:00:00Z","valid":true,"variants":[{"fields":[{"key":"text_field","label":"My text field","settings":{"description":"A description of the text field","max_length":100,"min_length":10,"required":true},"type":"text"}],"key":"default","name":"Default"}]}],"page_info":{"after":null,"before":null,"page_size":25}},"properties":{"entries":{"description":"A list of entries.","items":{"$ref":"#/components/schemas/MessageType"},"nullable":false,"type":"array"},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["entries","page_info"],"title":"PaginatedMessageTypeResponse","type":"object"},"SmsTemplate":{"description":"An SMS template.","example":{"settings":{"payload_overrides":"{\"name\": \"John\"}","to_number":"+1234567890"},"text_body":"Hello, world!"},"properties":{"settings":{"anyOf":[{"description":"The [settings](https://docs.knock.app/integrations/sms/settings-and-overrides) for the SMS template.","properties":{"payload_overrides":{"description":"A JSON object that overrides the payload sent to the SMS provider.","example":"{\"name\": \"John\"}","nullable":true,"type":"string"},"to_number":{"description":"An override for the phone number to send the SMS to. When not set, defaults to `recipient.phone_number`.","example":"+1234567890","nullable":true,"type":"string"}},"type":"object"},{"nullable":true}],"description":"The settings for the SMS template. Can be omitted.","type":"object"},"text_body":{"description":"The message of the SMS.","example":"Hello, world!","type":"string"}},"required":["text_body"],"title":"SmsTemplate","type":"object"},"EmailChannelSettings":{"description":"Email channel settings. Only used as configuration as part of a workflow channel step.","example":{"bcc_address":null,"cc_address":null,"from_address":"hello@example.com","from_name":"John Doe","json_overrides":"{\"some_override\": true}","link_tracking":true,"open_tracking":true,"reply_to_address":null,"to_address":"hello@example.com"},"properties":{"bcc_address":{"description":"The BCC address on email notifications. Supports liquid.","example":"hello@example.com","nullable":true,"type":"string"},"cc_address":{"description":"The CC address on email notifications. Supports liquid.","example":"hello@example.com","nullable":true,"type":"string"},"from_address":{"description":"The email address from which this channel will send. Supports liquid.","example":"hello@example.com","nullable":true,"type":"string"},"from_name":{"description":"The name from which this channel will send. Supports liquid.","example":"John Doe","nullable":true,"type":"string"},"json_overrides":{"description":"A JSON template for any custom overrides to merge into the API payload that is sent to the email provider. Supports liquid.","example":"{\"some_override\": true}","nullable":true,"type":"string"},"link_tracking":{"description":"Whether to track link clicks on email notifications.","example":true,"type":"boolean"},"open_tracking":{"description":"Whether to track opens on email notifications.","example":true,"type":"boolean"},"reply_to_address":{"description":"The Reply-to address on email notifications. Supports liquid.","example":"hello@example.com","nullable":true,"type":"string"},"to_address":{"description":"The email address to which this channel will send. Defaults to `recipient.email`. Supports liquid.","example":"hello@example.com","type":"string"}},"title":"EmailChannelSettings","type":"object"},"PreviewTemplateRequest":{"description":"A request to preview a template, without requiring a template to be persisted within Knock.","example":{"channel_type":"email","data":{"order_id":123},"recipient":"user_123","template":{"html_body":"<p>Welcome!</p>","settings":{"layout_key":"default"},"subject":"Hello {{ recipient.name }}"}},"properties":{"actor":{"anyOf":[{"$ref":"#/components/schemas/RecipientReference"},{"nullable":true}],"description":"The actor to reference in the preview."},"channel_type":{"description":"The channel type of the template to preview.","enum":["email","sms","push","chat","in_app_feed"],"type":"string"},"data":{"additionalProperties":true,"description":"The data to pass to the template for rendering.","type":"object"},"layout":{"description":"Email layout configuration. Only applicable for email channel type. Falls back to environment default if not provided.","nullable":true,"properties":{"html_content":{"description":"Inline HTML content for the layout. Must include `{{ content }}` placeholder.","nullable":true,"type":"string"},"key":{"description":"The key of an existing email layout to use.","nullable":true,"type":"string"},"text_content":{"description":"Inline text content for the layout.","nullable":true,"type":"string"}},"type":"object"},"recipient":{"$ref":"#/components/schemas/RecipientReference"},"template":{"anyOf":[{"$ref":"#/components/schemas/EmailTemplate"},{"$ref":"#/components/schemas/SmsTemplate"},{"$ref":"#/components/schemas/PushTemplate"},{"$ref":"#/components/schemas/ChatTemplate"},{"$ref":"#/components/schemas/InAppFeedTemplate"}],"description":"The template content to preview. Structure depends on channel_type.","type":"object"},"tenant":{"description":"The tenant to associate with the preview. Must not contain whitespace.","nullable":true,"type":"string"},"workflow":{"description":"Optional workflow context for variable hydration. When provided, recipient/actor/tenant are resolved via Knock.","nullable":true,"properties":{"categories":{"description":"Workflow categories.","items":{"type":"string"},"nullable":true,"type":"array"},"key":{"description":"The workflow key.","type":"string"}},"required":["key"],"type":"object"}},"required":["channel_type","template","recipient"],"title":"PreviewTemplateRequest","type":"object"},"SendWindow":{"description":"A send window time for a notification. Describes a single day.","example":{"day":"monday","from":"09:00","type":"send","until":"17:00"},"properties":{"day":{"description":"The day of the week.","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"],"type":"string"},"from":{"description":"The start time of the send window.","example":"09:00","format":"time","nullable":true,"type":"string"},"type":{"description":"The type of send window.","enum":["send","do_not_send"],"example":"send","type":"string"},"until":{"description":"The end time of the send window.","example":"17:00","format":"time","nullable":true,"type":"string"}},"required":["day","type"],"title":"SendWindow","type":"object"},"PaginatedEnvironmentResponse":{"description":"A paginated list of Environment. Contains a list of entries and page information.","example":{"entries":[{"created_at":"2022-10-31T19:59:03Z","deleted_at":null,"hide_pii_data":false,"label_color":"#000000","last_commit_at":"2022-10-31T19:59:03Z","name":"Development","order":0,"owner":"system","slug":"development","updated_at":"2022-10-31T19:59:03Z"}],"page_info":{"after":null,"before":null,"page_size":25}},"properties":{"entries":{"description":"A list of entries.","items":{"$ref":"#/components/schemas/Environment"},"nullable":false,"type":"array"},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["entries","page_info"],"title":"PaginatedEnvironmentResponse","type":"object"},"MemberUser":{"description":"Information about a user within the Knock dashboard. Not to be confused with an external user (recipient) of a workflow.","example":{"avatar_url":"https://www.gravatar.com/avatar/abc123","created_at":"2024-01-10T08:00:00Z","email":"jane@example.com","id":"a1b2c3d4-5678-9abc-def0-123456789abc","name":"Jane Doe","updated_at":"2024-06-18T12:00:00Z"},"properties":{"avatar_url":{"description":"The URL of the user's avatar image.","nullable":true,"type":"string"},"created_at":{"description":"The timestamp of when the user was created.","format":"date-time","type":"string"},"email":{"description":"The user's email address.","format":"email","type":"string"},"id":{"description":"The user's unique identifier.","format":"uuid","type":"string"},"name":{"description":"The user's display name.","nullable":true,"type":"string"},"updated_at":{"description":"The timestamp of when the user was last updated.","format":"date-time","type":"string"}},"required":["id","email","created_at","updated_at"],"title":"MemberUser","type":"object"},"PreviewWorkflowTemplateRequest":{"description":"A request to preview a workflow template.","example":{"actor":"dnedry","data":{"park_id":1},"recipient":"dnedry","tenant":"acme-corp"},"properties":{"actor":{"anyOf":[{"$ref":"#/components/schemas/RecipientReference"},{"nullable":true}],"description":"The actor to reference in the the workflow run.","type":"object"},"data":{"additionalProperties":true,"description":"The data to pass to the workflow template for rendering.","type":"object"},"recipient":{"$ref":"#/components/schemas/RecipientReference"},"tenant":{"description":"The tenant to associate the workflow with. Must not contain whitespace.","nullable":true,"type":"string"}},"required":["recipient"],"title":"PreviewWorkflowTemplateRequest","type":"object"},"EmailTemplateSettings":{"description":"The [settings](https://docs.knock.app/integrations/email/settings) for the email template. Must be supplied with at least `layout_key`.","example":{"layout_key":"default"},"properties":{"attachment_key":{"description":"The object path in the workflow trigger's `data` payload to resolve attachments.Defaults to `attachments`.","example":"attachments","nullable":true,"type":"string"},"layout_key":{"description":"The `key` of the [email layout](https://docs.knock.app/integrations/email/layouts) that wraps the email template. When omitted, the email template will need to define the `<html>` structure.","example":"default","nullable":true,"type":"string"},"pre_content":{"description":"A liquid template that will be injected into the email layout above the message template content. Useful for setting variables that should be available to the email layout.","nullable":true,"type":"string"}},"title":"EmailTemplateSettings","type":"object"},"EmailHtmlBlock":{"description":"An HTML block in an email template.","example":{"content":"<p>Hello, world!</p>","layout_attrs":{"padding_bottom":8,"padding_left":4,"padding_right":4,"padding_top":8},"type":"html"},"properties":{"content":{"description":"The HTML content of the block. Supports Liquid templating with variables like `{{ recipient.name }}`, `{{ actor.name }}`, `{{ vars.app_name }}`, `{{ data.custom_field }}`, and `{{ tenant.name }}`. See the [template variables reference](https://docs.knock.app/designing-workflows/template-editor/variables) for available variables.","type":"string"},"id":{"description":"The ID of the block.","example":"123e4567-e89b-12d3-a456-426614174000","format":"uuid","type":"string"},"layout_attrs":{"description":"The layout attributes of the block.","properties":{"padding_bottom":{"description":"The padding_bottom layout attribute of the block.","type":"integer"},"padding_left":{"description":"The padding_left layout attribute of the block.","type":"integer"},"padding_right":{"description":"The padding_right layout attribute of the block.","type":"integer"},"padding_top":{"description":"The padding_top layout attribute of the block.","type":"integer"}},"required":["padding_top","padding_right","padding_bottom","padding_left"],"type":"object"},"type":{"description":"The type of the block.","enum":["html"],"example":"html","type":"string"},"version":{"description":"The version of the block schema. This is automatically managed by Knock and should not be set manually. Currently all blocks are at version 1.","example":1,"type":"integer"}},"required":["type","content"],"title":"EmailHtmlBlock","type":"object"},"PaginatedEmailLayoutResponse":{"description":"A paginated list of EmailLayout. Contains a list of entries and page information.","example":{"entries":[{"branding_overrides":{"dark_logo_url":"https://cdn.example.com/logo-dark.png","dark_primary_color":"#1A1A2E","dark_primary_color_contrast":"#FFFFFF","primary_color":"#4F46E5","primary_color_contrast":"#FFFFFF"},"created_at":"2021-01-01T00:00:00Z","environment":"development","footer_links":[{"text":"Example","url":"http://example.com"}],"html_layout":"<html><body>Hello, world!</body></html>","key":"transactional","name":"Transactional","sha":"1234567890","text_layout":"Hello, world!","updated_at":"2021-01-01T00:00:00Z"}],"page_info":{"after":null,"before":null,"page_size":25}},"properties":{"entries":{"description":"A list of entries.","items":{"$ref":"#/components/schemas/EmailLayout"},"nullable":false,"type":"array"},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["entries","page_info"],"title":"PaginatedEmailLayoutResponse","type":"object"},"ChannelEnvironmentSettings":{"description":"Environment-specific settings for a channel.","example":{"channel_settings":{"from_address":"hello@example.com","from_name":"Example Inc"},"id":"550e8400-e29b-41d4-a716-446655440001","is_sandbox":false,"is_valid":true,"provider_settings":{"api_key":"{{ vars.sendgrid_api_key }}","check_delivery_status":true,"link_tracking":true,"open_tracking":true}},"properties":{"channel_settings":{"additionalProperties":true,"description":"Channel-type-specific settings (e.g., from_address for email). Structure varies by channel type.","nullable":true,"type":"object"},"id":{"description":"The unique identifier for these environment settings.","format":"uuid","type":"string"},"is_sandbox":{"description":"Whether the channel is in sandbox mode for this environment. Sandbox mode may prevent actual message delivery.","type":"boolean"},"is_valid":{"description":"Whether the channel configuration is valid and ready to send messages in this environment.","type":"boolean"},"provider_settings":{"additionalProperties":true,"description":"Provider-specific settings (e.g., API keys, credentials). Structure varies by provider. Secret values are obfuscated unless they are Liquid templates.","nullable":true,"type":"object"}},"required":["id","is_valid","is_sandbox"],"title":"ChannelEnvironmentSettings","type":"object"},"WorkflowRandomCohortStepBranch":{"description":"A cohort branch in an experiment step.","example":{"name":"Control","percentage":"50","steps":[],"terminates":false},"properties":{"name":{"description":"The name of the cohort branch.","example":"Control","type":"string"},"percentage":{"description":"The percentage of recipients to assign to this cohort. Must be between 0 and 100 with at most 1 decimal place. All branch percentages must sum to 100. Sent as a number in requests; returned as a decimal string in responses (e.g. \"50\", \"33.3\").","example":"50","type":"string"},"steps":{"description":"A list of steps that will be executed for recipients assigned to this cohort.","items":{"$ref":"#/components/schemas/WorkflowStep"},"type":"array"},"terminates":{"description":"If the workflow should halt at the end of the branch. Defaults to false if not provided.","example":false,"type":"boolean"}},"required":["percentage"],"title":"WorkflowRandomCohortStepBranch","type":"object"},"RunWorkflowResponse":{"description":"A response to a run workflow request.","example":{"workflow_run_id":"123e4567-e89b-12d3-a456-426614174000"},"properties":{"workflow_run_id":{"description":"The ID of the workflow run.","format":"uuid","type":"string"}},"required":["workflow_run_id"],"title":"RunWorkflowResponse","type":"object"},"AudienceRequest":{"description":"An audience object with attributes to create or update an audience. Use `type: static` for audiences with explicitly managed members, or `type: dynamic` for audiences with segment-based membership.","discriminator":{"mapping":{"dynamic":"#/components/schemas/DynamicAudienceRequest","static":"#/components/schemas/StaticAudienceRequest"},"propertyName":"type"},"example":{"description":"Users on the premium plan","name":"Premium users","segments":[{"conditions":[{"argument":"premium","operator":"equal_to","property":"recipient.plan"}]}],"type":"dynamic"},"oneOf":[{"$ref":"#/components/schemas/StaticAudienceRequest"},{"$ref":"#/components/schemas/DynamicAudienceRequest"}],"title":"AudienceRequest","type":"object"},"RequestTemplateQueryParams":{"description":"The query params of the request. Can be a template string or a list of key-value pairs.","example":[{"key":"key","value":"value"}],"oneOf":[{"description":"A template string that should resolve to a JSON object representing the query params.","example":"{{ data.request_query_params }}","title":"RequestTemplateQueryParamsString","type":"string"},{"description":"A list of key-value pairs for the request query params. Each object should contain key and value fields with string values.","example":[{"key":"key","value":"value"}],"items":{"properties":{"key":{"description":"The key of the query param.","example":"key","type":"string"},"value":{"description":"The value of the query param.","example":"value","type":"string"}},"required":["key","value"],"type":"object"},"title":"RequestTemplateQueryParamsArray","type":"array"}],"title":"RequestTemplateQueryParams","type":"object"},"Branch":{"description":"A branch object.","example":{"created_at":"2022-10-31T19:59:03Z","deleted_at":null,"last_commit_at":"2022-10-31T19:59:03Z","slug":"feature-branch","updated_at":"2022-10-31T19:59:03Z"},"properties":{"created_at":{"description":"The timestamp of when the branch was created.","format":"date-time","type":"string"},"deleted_at":{"description":"The timestamp of when the branch was deleted.","format":"date-time","nullable":true,"type":"string"},"last_commit_at":{"description":"The timestamp of the most-recent commit in the branch.","format":"date-time","nullable":true,"type":"string"},"slug":{"description":"A unique slug for the branch. Cannot exceed 255 characters.","type":"string"},"updated_at":{"description":"The timestamp of when the branch was last updated.","format":"date-time","type":"string"}},"required":["slug","created_at","updated_at"],"title":"Branch","type":"object"},"WorkflowAIAgentStep":{"description":"An AI agent function step. Fetches data from an AI model and merges it into the workflow's `data` scope for use in later steps. Supports Liquid templating in the prompt. Read more in the [docs](https://docs.knock.app/designing-workflows/ai-agent-function).","example":{"name":"AI agent step","ref":"ai_agent_step","settings":{"model":"anthropic:claude-haiku-4-5","request_prompt":"You are a helpful assistant.","response_type":"text"},"type":"ai_agent"},"properties":{"conditions":{"anyOf":[{"$ref":"#/components/schemas/ConditionGroup"},{"nullable":true}],"description":"A conditions object that describes one or more conditions to be met in order for the step to be executed.","type":"object"},"description":{"description":"An arbitrary string attached to a workflow step. Useful for adding notes about the workflow for internal purposes.","example":"AI agent step description","nullable":true,"type":"string"},"name":{"description":"A name for the workflow step.","example":"AI agent step","nullable":true,"type":"string"},"ref":{"description":"The reference key of the workflow step. Must be unique per workflow.","example":"ai_1","type":"string"},"settings":{"description":"The settings for the AI agent step.","properties":{"halt_on_error":{"description":"Whether to halt the workflow if the AI fetch fails.","example":true,"nullable":true,"type":"boolean"},"model":{"description":"The AI model to use in `provider:model` format (e.g. `anthropic:claude-haiku-4-5`, `openai:gpt-5.2-chat-latest`). See the documentation for a list of supported models.","example":"anthropic:claude-haiku-4-5","type":"string"},"request_prompt":{"description":"The prompt template for the AI request. Supports Liquid templating.","example":"You are a helpful assistant.","type":"string"},"response_schema":{"description":"A JSON schema string for structured output. Required when `response_type` is `json`. Must not be set when `response_type` is `text`.","example":"{\"type\": \"object\", \"properties\": {\"summary\": {\"type\": \"string\"}}}","nullable":true,"type":"string"},"response_type":{"description":"The type of response to expect from the AI model.","enum":["text","json"],"example":"text","type":"string"},"web_search_enabled":{"description":"Whether to enable web search for the AI request.","example":false,"nullable":true,"type":"boolean"}},"required":["model","response_type","request_prompt"],"type":"object"},"type":{"description":"The type of the workflow step.","enum":["ai_agent"],"example":"ai_agent","type":"string"}},"required":["type","ref","settings"],"title":"WorkflowAIAgentStep","type":"object"},"RequestTemplateHeaders":{"description":"The headers of the request. Can be a template string or a list of key-value pairs.","example":[{"key":"X-API-Key","value":"1234567890"}],"oneOf":[{"description":"A template string that should resolve to a JSON object representing the headers.","example":"{{ data.request_headers }}","title":"RequestTemplateHeadersString","type":"string"},{"description":"A list of key-value pairs for the request headers. Each object should contain key and value fields with string values.","example":[{"key":"X-API-Key","value":"1234567890"}],"items":{"properties":{"key":{"description":"The key of the header.","example":"X-API-Key","type":"string"},"value":{"description":"The value of the header.","example":"1234567890","type":"string"}},"required":["key","value"],"type":"object"},"title":"RequestTemplateHeadersArray","type":"array"}],"title":"RequestTemplateHeaders","type":"object"},"Partial":{"description":"A partial is a reusable piece of content that can be used in a template.","example":{"content":"<p>Hello, world!</p>","description":"This is a test partial","environment":"development","icon_name":"icon-name","input_schema":[{"key":"text_field","label":"My text field","settings":{"description":"A description of the text field","max_length":100,"min_length":10,"required":true},"type":"text"}],"inserted_at":"2021-01-01T00:00:00Z","key":"my-partial","name":"My Partial","type":"html","updated_at":"2021-01-01T00:00:00Z","valid":true,"visual_block_enabled":true},"properties":{"content":{"description":"The partial content.","type":"string"},"description":{"description":"An arbitrary string attached to a partial object. Useful for adding notes about the partial for internal purposes. Maximum of 280 characters allowed.","type":"string"},"environment":{"description":"The slug of the environment in which the partial exists.","type":"string"},"icon_name":{"description":"The name of the icon to be used in the visual editor.","type":"string"},"input_schema":{"description":"The field types available for the partial.","items":{"anyOf":[{"$ref":"#/components/schemas/MessageTypeBooleanField"},{"$ref":"#/components/schemas/MessageTypeButtonField"},{"$ref":"#/components/schemas/MessageTypeImageField"},{"$ref":"#/components/schemas/MessageTypeJsonField"},{"$ref":"#/components/schemas/MessageTypeMarkdownField"},{"$ref":"#/components/schemas/MessageTypeMultiSelectField"},{"$ref":"#/components/schemas/MessageTypeSelectField"},{"$ref":"#/components/schemas/MessageTypeTextField"},{"$ref":"#/components/schemas/MessageTypeTextareaField"},{"$ref":"#/components/schemas/MessageTypeUrlField"}],"type":"object"},"type":"array"},"inserted_at":{"description":"The timestamp of when the partial was created.","format":"date-time","type":"string"},"key":{"description":"The unique key string for the partial object. Must be at minimum 3 characters and at maximum 255 characters in length. Must be in the format of ^[a-z0-9_-]+$.","type":"string"},"name":{"description":"A name for the partial. Must be at maximum 255 characters in length.","type":"string"},"type":{"description":"The partial type. One of 'html', 'json', 'markdown', 'text'.","enum":["html","text","json","markdown"],"type":"string"},"updated_at":{"description":"The timestamp of when the partial was last updated.","format":"date-time","type":"string"},"valid":{"description":"Whether the partial and its content are in a valid state.","type":"boolean"},"visual_block_enabled":{"description":"Indicates whether the partial can be used in the visual editor. Only applies to HTML partials.","type":"boolean"}},"required":["key","type","name","content","inserted_at","updated_at","valid"],"title":"Partial","type":"object"},"UserRecipientReference":{"description":"A user ID.","example":"user_1","nullable":false,"title":"UserRecipientReference","type":"string"},"MessageType":{"description":"A message type is a schema for a message that maps to a UI component or element within your application.","example":{"archived_at":null,"created_at":"2021-01-01T00:00:00Z","deleted_at":null,"description":"Email message type","environment":"development","icon_name":"email","key":"email","name":"Email","owner":"user","preview":"<div>Hello, world!</div>","semver":"1.0.0","sha":"1234567890","updated_at":"2021-01-01T00:00:00Z","valid":true,"variants":[{"fields":[{"key":"text_field","label":"My text field","settings":{"description":"A description of the text field","max_length":100,"min_length":10,"required":true},"type":"text"}],"key":"default","name":"Default"}]},"properties":{"archived_at":{"description":"The timestamp of when the message type was deleted.","format":"date-time","nullable":true,"type":"string"},"created_at":{"description":"The timestamp of when the message type was created.","format":"date-time","type":"string"},"deleted_at":{"description":"The timestamp of when the message type was deleted.","format":"date-time","nullable":true,"type":"string"},"description":{"description":"An arbitrary string attached to a message type object. Useful for adding notes about the message type for internal purposes. Maximum of 280 characters allowed.","nullable":true,"type":"string"},"environment":{"description":"The environment of the message type.","type":"string"},"icon_name":{"description":"The icon name of the message type.","type":"string"},"key":{"description":"The unique key string for the message type object. Must be at minimum 3 characters and at maximum 255 characters in length. Must be in the format of ^[a-z0-9_-]+$.","type":"string"},"name":{"description":"A name for the message type. Must be at maximum 255 characters in length.","type":"string"},"owner":{"description":"The owner of the message type.","enum":["system","user"],"type":"string"},"preview":{"description":"An HTML/liquid template for the message type preview.","type":"string"},"semver":{"description":"The semantic version of the message type.","example":"1.0.0","type":"string"},"sha":{"description":"The SHA hash of the message type.","type":"string"},"updated_at":{"description":"The timestamp of when the message type was last updated.","format":"date-time","type":"string"},"valid":{"description":"Whether the message type is valid.","type":"boolean"},"variants":{"description":"The variants of the message type.","items":{"$ref":"#/components/schemas/MessageTypeVariant"},"type":"array"}},"required":["key","valid","owner","environment","created_at","name","variants","preview","semver","updated_at","sha"],"title":"MessageType","type":"object"},"WorkflowFetchStep":{"description":"A fetch function step. Retrieves data from an external source and merges it into the workflow's `data` scope for use in later steps. Read more in the [docs](https://docs.knock.app/designing-workflows/fetch-function).","example":{"name":"Fetch step","ref":"fetch_1","settings":{"body":null,"headers":[{"key":"X-API-Key","value":"1234567890"}],"method":"get","query_params":[{"key":"key","value":"value"}],"url":"https://example.com"},"type":"http_fetch"},"properties":{"conditions":{"anyOf":[{"$ref":"#/components/schemas/ConditionGroup"},{"nullable":true}],"description":"A conditions object that describes one or more conditions to be met in order for the step to be executed.","type":"object"},"description":{"description":"An arbitrary string attached to a workflow step. Useful for adding notes about the workflow for internal purposes.","example":"Fetch step description","nullable":true,"type":"string"},"name":{"description":"A name for the workflow step.","example":"Fetch step","nullable":true,"type":"string"},"ref":{"description":"The reference key of the workflow step. Must be unique per workflow.","example":"fetch_step","type":"string"},"settings":{"$ref":"#/components/schemas/RequestTemplate"},"type":{"description":"The type of the workflow step.","enum":["http_fetch"],"example":"http_fetch","type":"string"}},"required":["type","ref","settings"],"title":"WorkflowFetchStep","type":"object"},"PaginatedPartialResponse":{"description":"A paginated list of Partial. Contains a list of entries and page information.","example":{"entries":[{"content":"<p>Hello, world!</p>","description":"This is a test partial","environment":"development","icon_name":"icon-name","input_schema":[{"key":"text_field","label":"My text field","settings":{"description":"A description of the text field","max_length":100,"min_length":10,"required":true},"type":"text"}],"inserted_at":"2021-01-01T00:00:00Z","key":"my-partial","name":"My Partial","type":"html","updated_at":"2021-01-01T00:00:00Z","valid":true,"visual_block_enabled":true}],"page_info":{"after":null,"before":null,"page_size":25}},"properties":{"entries":{"description":"A list of entries.","items":{"$ref":"#/components/schemas/Partial"},"nullable":false,"type":"array"},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["entries","page_info"],"title":"PaginatedPartialResponse","type":"object"},"WrappedTranslationResponse":{"description":"Wraps the Translation response under the `translation` key.","example":{"translation":{"content":"{\"hello\":\"Hello, world!\"}","format":"json","inserted_at":"2021-01-01T00:00:00Z","locale_code":"en","namespace":"my_app","updated_at":"2021-01-01T00:00:00Z"}},"properties":{"translation":{"$ref":"#/components/schemas/Translation"}},"required":["translation"],"title":"WrappedTranslationResponse","type":"object"},"WrappedGuideRequestRequest":{"description":"Wraps the GuideRequest request under the guide key.","example":{"guide":{"activation_url_patterns":[{"directive":"allow","pathname":"/dashboard/*"}],"channel_key":"in-app-guide","description":"A guide to help users get started with the application","name":"Getting Started Guide","steps":[{"name":"Welcome to the App","ref":"welcome-step","schema_key":"tooltip","schema_semver":"1.0.0","schema_variant_key":"default","values":{"text_field":"value"}}],"target_audience_id":null,"target_property_conditions":{"all":[{"argument":"some_property","operator":"equal_to","variable":"recipient.property"}]}}},"properties":{"guide":{"$ref":"#/components/schemas/GuideRequest"}},"required":["guide"],"title":"WrappedGuideRequestRequest","type":"object"},"MessageTypeSelectField":{"description":"A select field used in a message type.","example":{"key":"select_field","label":"Select Field","settings":{"default":"option1","description":"A description of the select field","options":[{"label":"Option 1","value":"option1"},{"label":"Option 2","value":"option2"},{"label":"Option 3","value":"option3"}],"required":true},"type":"select"},"properties":{"key":{"description":"The unique key of the field.","example":"key","type":"string"},"label":{"description":"The label of the field.","example":"Label","nullable":true,"type":"string"},"settings":{"description":"Settings for the select field.","properties":{"default":{"description":"The default value for the select field.","example":"option1","nullable":true,"type":"string"},"description":{"example":"A description of the field, used in the UI as a hint text.","nullable":true,"type":"string"},"options":{"description":"The available options for the select field.","items":{"properties":{"label":{"description":"The display label for the option.","example":"Option 1","type":"string"},"value":{"description":"The value for the option.","example":"option1","type":"string"}},"required":["value"],"type":"object"},"type":"array"},"placeholder":{"example":"A placeholder for the field.","nullable":true,"type":"string"},"required":{"description":"Whether the field is required.","example":true,"type":"boolean"}},"type":"object"},"type":{"description":"The type of the field.","enum":["select"],"example":"select","type":"string"}},"required":["type","key","label","settings"],"title":"MessageTypeSelectField","type":"object"},"GuideStep":{"description":"A step in a guide that corresponds to a piece of UI and its content.","example":{"name":"Welcome to the App","ref":"welcome-step","schema_key":"tooltip","schema_semver":"1.0.0","schema_variant_key":"default","values":{"text_field":"value"}},"properties":{"name":{"description":"A name for the step.","type":"string"},"ref":{"description":"The unique reference string for the step. Must be at minimum 3 characters and at maximum 255 characters in length. Must be in the format of ^[a-z0-9_-]+$.","example":"welcome-step","type":"string"},"schema_key":{"description":"The key of the template schema to use for this step.","example":"tooltip","type":"string"},"schema_semver":{"description":"The semantic version of the template schema to use.","example":"1.0.0","type":"string"},"schema_variant_key":{"description":"The key of the template schema variant to use.","example":"default","type":"string"},"values":{"additionalProperties":true,"description":"A map of values that make up the step's content. Each value must conform to its respective template schema field settings.","example":{"text_field":"value"},"type":"object"}},"required":["ref","schema_key","schema_semver","schema_variant_key"],"title":"GuideStep","type":"object"},"WorkflowTriggerWorkflowStep":{"description":"A workflow trigger function step. Read more in the [docs](https://docs.knock.app/designing-workflows/trigger-workflow-function).","example":{"name":"Trigger workflow step","ref":"trigger_workflow_step","settings":{"actor":"{{ actor.id }}","cancellation_key":"{{ workflow.cancellation_key }}","data":"{{ data | json }}","recipients":"{{ recipient.id }}","tenant":"{{ tenant.id }}","workflow_key":"dinosaurs-loose"},"type":"trigger_workflow"},"properties":{"conditions":{"anyOf":[{"$ref":"#/components/schemas/ConditionGroup"},{"nullable":true}],"description":"A set of conditions to be evaluated for this trigger workflow step.","type":"object"},"description":{"description":"A description for the workflow step.","example":"Trigger workflow step description","nullable":true,"type":"string"},"name":{"description":"A name for the workflow step.","example":"Trigger workflow step","nullable":true,"type":"string"},"ref":{"description":"The reference key of the workflow step. Must be unique per workflow.","example":"trigger_workflow_step","type":"string"},"settings":{"description":"The settings for the workflow trigger workflow step.","properties":{"actor":{"description":"The actor to trigger the workflow with. Supports liquid.","example":"{{ actor.id }}","type":"string"},"cancellation_key":{"description":"The cancellation key to trigger the workflow with. Supports liquid.","example":"{{ workflow.cancellation_key }}","type":"string"},"data":{"description":"The data to be supplied to the workflow. Supports liquid.","example":"{{ data | json }}","type":"string"},"recipients":{"description":"The recipients or recipient to trigger the workflow for. Supports liquid.","example":"{{ recipient.id }}","type":"string"},"tenant":{"description":"The tenant to trigger the workflow with. Supports liquid.","example":"{{ tenant.id }}","type":"string"},"workflow_key":{"description":"The key of the workflow to trigger. Supports liquid.","example":"dinosaurs-loose","type":"string"}},"type":"object"},"type":{"description":"The type of the workflow step.","enum":["trigger_workflow"],"example":"trigger_workflow","type":"string"}},"required":["type","ref","settings"],"title":"WorkflowTriggerWorkflowStep","type":"object"},"Audience":{"description":"An audience defines a set of users that can be targeted for notifications. Can be either a `StaticAudience` (members explicitly added/removed) or a `DynamicAudience` (members determined by segment conditions).","discriminator":{"mapping":{"dynamic":"#/components/schemas/DynamicAudience","static":"#/components/schemas/StaticAudience"},"propertyName":"type"},"example":{"created_at":"2024-01-15T10:30:00Z","description":"Customers who signed up in the last 30 days.","environment":"development","key":"new-customers","name":"New customers","segments":[{"conditions":[{"argument":"30_days_ago","operator":"greater_than","property":"recipient.created_at"}]}],"sha":"a1b2c3d4e5f6","type":"dynamic","updated_at":"2024-06-20T14:45:00Z"},"oneOf":[{"$ref":"#/components/schemas/StaticAudience"},{"$ref":"#/components/schemas/DynamicAudience"}],"title":"Audience","type":"object"},"Condition":{"description":"A condition to be evaluated.","example":{"argument":"some_property","operator":"equal_to","variable":"recipient.property"},"properties":{"argument":{"description":"The argument to be evaluated. Arguments can be either static values or dynamic properties. Static values will always be JSON decoded so will support strings, lists, objects, numbers, and booleans. Dynamic values should be path expressions.","example":"some_property","nullable":true,"type":"string"},"operator":{"description":"The operator to use in the evaluation of the condition.","enum":["equal_to","not_equal_to","greater_than","less_than","greater_than_or_equal_to","less_than_or_equal_to","contains","not_contains","contains_all","not_contains_all","is_timestamp_before","is_timestamp_on_or_after","is_timestamp_between","is_between","empty","not_empty","exists","not_exists","is_timestamp","is_audience_member","is_not_audience_member"],"example":"equal_to","type":"string"},"variable":{"description":"The variable to be evaluated. Variables can be either static values or dynamic properties. Static values will always be JSON decoded so will support strings, lists, objects, numbers, and booleans. Dynamic values should be path expressions.","example":"recipient.property","type":"string"}},"required":["variable","operator"],"title":"Condition","type":"object"},"PushTemplate":{"description":"A push notification template.","example":{"settings":{"delivery_type":"content","payload_overrides":"{\"name\": \"John\"}"},"text_body":"Hello, world!","title":"Hello, world!"},"properties":{"settings":{"description":"The [settings](https://docs.knock.app/integrations/sms/settings-and-overrides) for the push template.","properties":{"delivery_type":{"description":"The delivery type of the push notification. Set as silent to send a data-only notification. When set to `silent`, no body will be sent.","enum":["silent","content"],"example":"content","type":"string"},"payload_overrides":{"description":"A JSON object that overrides the payload sent to the push provider.","example":"{\"name\": \"John\"}","type":"string"}},"required":["delivery_type"],"type":"object"},"text_body":{"description":"The body of the push notification.","example":"Hello, world!","type":"string"},"title":{"description":"The title of the push notification.","example":"Hello, world!","type":"string"}},"required":["title","text_body","settings"],"title":"PushTemplate","type":"object"},"CommitAuthor":{"description":"The author of the commit.","example":{"email":"john.doe@example.com","name":"John Doe"},"properties":{"email":{"description":"The email address of the commit author.","type":"string"},"name":{"description":"The name of the commit author.","nullable":true,"type":"string"}},"required":["email"],"title":"CommitAuthor","type":"object"},"CommitResource":{"description":"The resource object associated with the commit.","example":{"identifier":"my-email-layout","type":"email_layout"},"properties":{"identifier":{"description":"The unique identifier for the resource.","type":"string"},"type":{"description":"The type of the resource object.","enum":["audience","email_layout","guide","message_type","partial","translation","workflow"],"example":"workflow","type":"string"}},"required":["identifier","type"],"title":"CommitResource","type":"object"}},"securitySchemes":{"BearerAuth":{"bearerFormat":"JWT","scheme":"bearer","type":"http"}}},"info":{"title":"Knock Management API (mAPI)","version":"1.0"},"openapi":"3.0.0","paths":{"/v1/environments/{environment_slug}":{"get":{"callbacks":{},"description":"Returns a single environment by the `environment_slug`.","operationId":"getEnvironment","parameters":[{"description":"The slug of the environment to retrieve.","in":"path","name":"environment_slug","required":true,"schema":{"example":"development","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Environment"}}},"description":"OK"}},"summary":"Get an environment","tags":["Environments"]}},"/v1/branches":{"get":{"callbacks":{},"description":"Returns a paginated list of branches. The branches will be returned in order of their last commit time (newest first).","operationId":"listBranches","parameters":[{"description":"The environment slug.","in":"query","name":"environment","required":true,"schema":{"example":"development","type":"string"}},{"description":"The cursor to fetch entries after.","in":"query","name":"after","required":false,"schema":{"type":"string"}},{"description":"The cursor to fetch entries before.","in":"query","name":"before","required":false,"schema":{"type":"string"}},{"description":"The number of entries to fetch per-page.","in":"query","name":"limit","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"description":"A paginated list of Branch. Contains a list of entries and page information.","example":{"entries":[{"created_at":"2022-10-31T19:59:03Z","deleted_at":null,"last_commit_at":"2022-10-31T19:59:03Z","slug":"feature-branch","updated_at":"2022-10-31T19:59:03Z"}],"page_info":{"after":null,"before":null,"page_size":25}},"properties":{"entries":{"description":"A list of entries.","items":{"$ref":"#/components/schemas/Branch"},"nullable":false,"type":"array"},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["entries","page_info"],"title":"PaginatedBranchResponse","type":"object"}}},"description":"OK"}},"summary":"List branches","tags":["Branches"]}},"/v1/workflows/{workflow_key}/validate":{"put":{"callbacks":{},"description":"Validates a workflow payload without persisting it. Some read-only fields will be empty as they are generated by the system when persisted.\n\nNote: Validating a workflow is only done in the development environment context.\n","operationId":"validateWorkflow","parameters":[{"description":"The key of the workflow.","in":"path","name":"workflow_key","required":true,"schema":{"type":"string"}},{"description":"The environment slug.","in":"query","name":"environment","required":true,"schema":{"example":"development","type":"string"}},{"description":"The slug of a branch to use. This option can only be used when `environment` is `\"development\"`.","in":"query","name":"branch","required":false,"schema":{"example":"feature-branch","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"Wraps the WorkflowRequest request under the workflow key.","example":{"workflow":{"name":"My Workflow","steps":[{"channel_key":"in-app-feed","name":"Channel 1","ref":"channel_1","template":{"action_url":"{{ vars.app_url }}","markdown_body":"Hello **{{ recipient.name }}**"},"type":"channel"}]}},"properties":{"workflow":{"$ref":"#/components/schemas/WorkflowRequest"}},"required":["workflow"],"title":"WrappedWorkflowRequestRequest","type":"object"}}},"description":"Params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"description":"Wraps the Workflow response under the `workflow` key.","example":{"workflow":{"active":false,"categories":["marketing","black-friday"],"conditions":{"all":[{"argument":"admin","operator":"equal_to","variable":"recipient.role"}]},"created_at":"2022-12-16T19:07:50.027113Z","description":"This is a dummy workflow for demo purposes.","environment":"development","key":"december-16-demo","name":"december-16-demo","settings":{"override_preferences":true},"sha":"f7e9d3b2a1c8e6m4k5j7h9g0i2l3n4p6q8r0t1u3v5w7x9y","steps":[{"channel_key":"in-app-feed","channel_type":"in_app_feed","description":"Main in-app feed","name":"In-app step","ref":"in_app_feed_1","template":{"action_url":"{{ data.onboarding_url }}","markdown_body":"Hello **{{ recipient.name }}**. Click here to get started."},"type":"channel"},{"ref":"delay_1","settings":{"delay_for":{"unit":"hours","value":1}},"type":"delay"},{"channel_key":"postmark","channel_type":"email","ref":"email_1","template":{"html_body":"<p>Hello, {{ recipient.name }}! Welcome to {{ vars.app_name }} <a href='{{ data.onboarding_url }}'>Get started here</a>.</p>","settings":{"layout_key":"default"},"subject":"Welcome to {{ vars.app_name }}!"},"type":"channel"}],"trigger_data_json_schema":{"properties":{"onboarding_url":{"type":"string"}},"required":["onboarding_url"],"type":"object"},"trigger_frequency":"every_trigger","updated_at":"2023-02-08T22:15:19.846681Z","valid":true}},"properties":{"workflow":{"$ref":"#/components/schemas/Workflow"}},"required":["workflow"],"title":"WrappedWorkflowResponse","type":"object"}}},"description":"OK"}},"summary":"Validate a workflow","tags":["Workflows"]}},"/v1/workflows/{workflow_key}/run":{"put":{"callbacks":{},"description":"Runs the latest version of a committed workflow in a given environment using the params provided.","operationId":"runWorkflow","parameters":[{"description":"The key of the workflow.","in":"path","name":"workflow_key","required":true,"schema":{"type":"string"}},{"description":"The environment slug.","in":"query","name":"environment","required":true,"schema":{"example":"development","type":"string"}},{"description":"The slug of a branch to use. This option can only be used when `environment` is `\"development\"`.","in":"query","name":"branch","required":false,"schema":{"example":"feature-branch","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunWorkflowRequest"}}},"description":"Params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunWorkflowResponse"}}},"description":"OK"}},"summary":"Run a workflow","tags":["Workflows"]}},"/v1/email_layouts":{"get":{"callbacks":{},"description":"Returns a paginated list of email layouts available in a given environment.","operationId":"listEmailLayouts","parameters":[{"description":"The environment slug.","in":"query","name":"environment","required":true,"schema":{"example":"development","type":"string"}},{"description":"The slug of a branch to use. This option can only be used when `environment` is `\"development\"`.","in":"query","name":"branch","required":false,"schema":{"example":"feature-branch","type":"string"}},{"description":"Whether to annotate the resource. Only used in the Knock CLI.","in":"query","name":"annotate","required":false,"schema":{"type":"boolean"}},{"description":"Whether to hide uncommitted changes. When true, only committed changes will be returned. When false, both committed and uncommitted changes will be returned.","in":"query","name":"hide_uncommitted_changes","required":false,"schema":{"type":"boolean"}},{"description":"The cursor to fetch entries after.","in":"query","name":"after","required":false,"schema":{"type":"string"}},{"description":"The cursor to fetch entries before.","in":"query","name":"before","required":false,"schema":{"type":"string"}},{"description":"The number of entries to fetch per-page.","in":"query","name":"limit","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"description":"A paginated list of EmailLayout. Contains a list of entries and page information.","example":{"entries":[{"branding_overrides":{"dark_logo_url":"https://cdn.example.com/logo-dark.png","dark_primary_color":"#1A1A2E","dark_primary_color_contrast":"#FFFFFF","primary_color":"#4F46E5","primary_color_contrast":"#FFFFFF"},"created_at":"2021-01-01T00:00:00Z","environment":"development","footer_links":[{"text":"Example","url":"http://example.com"}],"html_layout":"<html><body>Hello, world!</body></html>","key":"transactional","name":"Transactional","sha":"1234567890","text_layout":"Hello, world!","updated_at":"2021-01-01T00:00:00Z"}],"page_info":{"after":null,"before":null,"page_size":25}},"properties":{"entries":{"description":"A list of entries.","items":{"$ref":"#/components/schemas/EmailLayout"},"nullable":false,"type":"array"},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["entries","page_info"],"title":"PaginatedEmailLayoutResponse","type":"object"}}},"description":"OK"}},"summary":"List email layouts","tags":["Email layouts"]}},"/v1/guides/{guide_key}":{"delete":{"callbacks":{},"description":"Archives a given guide across all environments.","operationId":"archiveGuide","parameters":[{"description":"The key of the guide to archive.","in":"path","name":"guide_key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"description":"The response from archiving a guide.","example":{"result":"success"},"properties":{"result":{"description":"The result of the promote operation.","example":"success","type":"string"}},"required":["result"],"title":"ArchiveGuideResponse","type":"object"}}},"description":"OK"}},"summary":"Archive a guide","tags":["Guides"]},"get":{"callbacks":{},"description":"Get a guide by its key.","operationId":"getGuide","parameters":[{"description":"The environment slug.","in":"query","name":"environment","required":true,"schema":{"example":"development","type":"string"}},{"description":"The slug of a branch to use. This option can only be used when `environment` is `\"development\"`.","in":"query","name":"branch","required":false,"schema":{"example":"feature-branch","type":"string"}},{"description":"The key of the guide to retrieve.","in":"path","name":"guide_key","required":true,"schema":{"type":"string"}},{"description":"Whether to annotate the resource. Only used in the Knock CLI.","in":"query","name":"annotate","required":false,"schema":{"type":"boolean"}},{"description":"Whether to hide uncommitted changes. When true, only committed changes will be returned. When false, both committed and uncommitted changes will be returned.","in":"query","name":"hide_uncommitted_changes","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Guide"}}},"description":"OK"}},"summary":"Get a guide","tags":["Guides"]},"put":{"callbacks":{},"description":"Updates a guide of a given key, or creates a new one if it does not yet exist.\n\nNote: this endpoint only operates on guides in the \"development\" environment.\n","operationId":"upsertGuide","parameters":[{"description":"The environment slug.","in":"query","name":"environment","required":true,"schema":{"example":"development","type":"string"}},{"description":"The slug of a branch to use. This option can only be used when `environment` is `\"development\"`.","in":"query","name":"branch","required":false,"schema":{"example":"feature-branch","type":"string"}},{"description":"The key of the guide to upsert.","in":"path","name":"guide_key","required":true,"schema":{"type":"string"}},{"description":"Whether to annotate the resource. Only used in the Knock CLI.","in":"query","name":"annotate","required":false,"schema":{"type":"boolean"}},{"description":"When set to true, forces the upsert to override existing content regardless of environment restrictions. This bypasses the development-only environment check and origin environment checks.","in":"query","name":"force","required":false,"schema":{"type":"boolean"}},{"description":"Whether to commit the resource at the same time as modifying it.","in":"query","name":"commit","required":false,"schema":{"type":"boolean"}},{"description":"The message to commit the resource with, only used if `commit` is `true`.","in":"query","name":"commit_message","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"Wraps the GuideRequest request under the guide key.","example":{"guide":{"activation_url_patterns":[{"directive":"allow","pathname":"/dashboard/*"}],"channel_key":"in-app-guide","description":"A guide to help users get started with the application","name":"Getting Started Guide","steps":[{"name":"Welcome to the App","ref":"welcome-step","schema_key":"tooltip","schema_semver":"1.0.0","schema_variant_key":"default","values":{"text_field":"value"}}],"target_audience_id":null,"target_property_conditions":{"all":[{"argument":"some_property","operator":"equal_to","variable":"recipient.property"}]}}},"properties":{"guide":{"$ref":"#/components/schemas/GuideRequest"}},"required":["guide"],"title":"WrappedGuideRequestRequest","type":"object"}}},"description":"Params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"description":"Wraps the Guide response under the `guide` key.","example":{"guide":{"activation_url_patterns":[{"directive":"allow","pathname":"/dashboard/*"}],"active":true,"archived_at":null,"channel_key":"in-app-guide","created_at":"2024-01-01T00:00:00Z","description":"A guide to help users get started with the application","environment":"development","key":"getting-started","name":"Getting Started Guide","semver":"0.0.1","sha":"1234567890","steps":[{"name":"Welcome to the App","ref":"welcome-step","schema_key":"tooltip","schema_semver":"1.0.0","schema_variant_key":"default","values":{"text_field":"value"}}],"target_audience_id":null,"target_property_conditions":{"all":[{"argument":"some_property","operator":"equal_to","variable":"recipient.property"}]},"type":"banner","updated_at":"2024-01-01T00:00:00Z","valid":true}},"properties":{"guide":{"$ref":"#/components/schemas/Guide"}},"required":["guide"],"title":"WrappedGuideResponse","type":"object"}}},"description":"OK"}},"summary":"Upsert a guide","tags":["Guides"]}},"/v1/broadcasts/{broadcast_key}/send":{"put":{"callbacks":{},"description":"Sends a broadcast immediately or schedules it to send at a future time.\n","operationId":"sendBroadcast","parameters":[{"description":"The key of the broadcast.","in":"path","name":"broadcast_key","required":true,"schema":{"type":"string"}},{"description":"The environment slug.","in":"query","name":"environment","required":true,"schema":{"example":"development","type":"string"}},{"description":"The slug of a branch to use. This option can only be used when `environment` is `\"development\"`.","in":"query","name":"branch","required":false,"schema":{"example":"feature-branch","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BroadcastSendRequest"}}},"description":"Params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"description":"Wraps the Broadcast response under the `broadcast` key.","example":{"broadcast":{"categories":["marketing","promotions"],"created_at":"2022-12-16T19:07:50.027113Z","description":"Holiday promotion broadcast for December","environment":"development","key":"december-promotion","name":"December Promotion","scheduled_at":null,"sent_at":null,"settings":{"is_commercial":true,"override_preferences":false},"sha":"f7e9d3b2a1c8e6m4k5j7h9g0i2l3n4p6q8r0t1u3v5w7x9y","status":"draft","steps":[{"channel_key":"in-app-feed","description":"Main in-app feed","name":"In-app step","ref":"in_app_feed_1","template":{"action_url":"{{ vars.app_url }}","markdown_body":"Hello **{{ recipient.name }}**"},"type":"channel"}],"target_audience_key":"premium-users","updated_at":"2023-02-08T22:15:19.846681Z","valid":true}},"properties":{"broadcast":{"$ref":"#/components/schemas/Broadcast"}},"required":["broadcast"],"title":"WrappedBroadcastResponse","type":"object"}}},"description":"OK"}},"summary":"Send a broadcast","tags":["Broadcasts"]}},"/v1/guides":{"get":{"callbacks":{},"description":"Returns a paginated list of guides available in a given environment.","operationId":"listGuides","parameters":[{"description":"The environment slug.","in":"query","name":"environment","required":true,"schema":{"example":"development","type":"string"}},{"description":"The slug of a branch to use. This option can only be used when `environment` is `\"development\"`.","in":"query","name":"branch","required":false,"schema":{"example":"feature-branch","type":"string"}},{"description":"Whether to annotate the resource. Only used in the Knock CLI.","in":"query","name":"annotate","required":false,"schema":{"type":"boolean"}},{"description":"Whether to hide uncommitted changes. When true, only committed changes will be returned. When false, both committed and uncommitted changes will be returned.","in":"query","name":"hide_uncommitted_changes","required":false,"schema":{"type":"boolean"}},{"description":"The cursor to fetch entries after.","in":"query","name":"after","required":false,"schema":{"type":"string"}},{"description":"The cursor to fetch entries before.","in":"query","name":"before","required":false,"schema":{"type":"string"}},{"description":"The number of entries to fetch per-page.","in":"query","name":"limit","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"description":"A paginated list of Guide. Contains a list of entries and page information.","example":{"entries":[{"activation_url_patterns":[{"directive":"allow","pathname":"/dashboard/*"}],"active":true,"archived_at":null,"channel_key":"in-app-guide","created_at":"2024-01-01T00:00:00Z","description":"A guide to help users get started with the application","environment":"development","key":"getting-started","name":"Getting Started Guide","semver":"0.0.1","sha":"1234567890","steps":[{"name":"Welcome to the App","ref":"welcome-step","schema_key":"tooltip","schema_semver":"1.0.0","schema_variant_key":"default","values":{"text_field":"value"}}],"target_audience_id":null,"target_property_conditions":{"all":[{"argument":"some_property","operator":"equal_to","variable":"recipient.property"}]},"type":"banner","updated_at":"2024-01-01T00:00:00Z","valid":true}],"page_info":{"after":null,"before":null,"page_size":25}},"properties":{"entries":{"description":"A list of entries.","items":{"$ref":"#/components/schemas/Guide"},"nullable":false,"type":"array"},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["entries","page_info"],"title":"PaginatedGuideResponse","type":"object"}}},"description":"OK"}},"summary":"List guides","tags":["Guides"]}},"/v1/broadcasts/{broadcast_key}/validate":{"put":{"callbacks":{},"description":"Validates a broadcast payload without persisting it.\n","operationId":"validateBroadcast","parameters":[{"description":"The key of the broadcast.","in":"path","name":"broadcast_key","required":true,"schema":{"type":"string"}},{"description":"The environment slug.","in":"query","name":"environment","required":true,"schema":{"example":"development","type":"string"}},{"description":"The slug of a branch to use. This option can only be used when `environment` is `\"development\"`.","in":"query","name":"branch","required":false,"schema":{"example":"feature-branch","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"Wraps the BroadcastRequest request under the broadcast key.","example":{"broadcast":{"categories":["announcement"],"description":"A broadcast to all users","name":"My Broadcast","settings":{"is_commercial":true,"override_preferences":false},"steps":[{"channel_key":"in-app-feed","name":"Channel 1","ref":"channel_1","template":{"action_url":"{{ vars.app_url }}","markdown_body":"Hello **{{ recipient.name }}**"},"type":"channel"}],"target_audience_key":"all-users"}},"properties":{"broadcast":{"$ref":"#/components/schemas/BroadcastRequest"}},"required":["broadcast"],"title":"WrappedBroadcastRequestRequest","type":"object"}}},"description":"Params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"description":"Wraps the Broadcast response under the `broadcast` key.","example":{"broadcast":{"categories":["marketing","promotions"],"created_at":"2022-12-16T19:07:50.027113Z","description":"Holiday promotion broadcast for December","environment":"development","key":"december-promotion","name":"December Promotion","scheduled_at":null,"sent_at":null,"settings":{"is_commercial":true,"override_preferences":false},"sha":"f7e9d3b2a1c8e6m4k5j7h9g0i2l3n4p6q8r0t1u3v5w7x9y","status":"draft","steps":[{"channel_key":"in-app-feed","description":"Main in-app feed","name":"In-app step","ref":"in_app_feed_1","template":{"action_url":"{{ vars.app_url }}","markdown_body":"Hello **{{ recipient.name }}**"},"type":"channel"}],"target_audience_key":"premium-users","updated_at":"2023-02-08T22:15:19.846681Z","valid":true}},"properties":{"broadcast":{"$ref":"#/components/schemas/Broadcast"}},"required":["broadcast"],"title":"WrappedBroadcastResponse","type":"object"}}},"description":"OK"}},"summary":"Validate a broadcast","tags":["Broadcasts"]}},"/v1/variables/{key}":{"get":{"callbacks":{},"description":"Returns a single variable by key with per-environment value overrides.","operationId":"getVariable","parameters":[{"description":"The key of the variable to retrieve.","in":"path","name":"key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Variable"}}},"description":"OK"}},"summary":"Get a variable","tags":["Variables"]}},"/v1/translations":{"get":{"callbacks":{},"description":"Returns a paginated list of translations available in a given environment. The translations are returned in alphabetical order by locale code.\n","operationId":"listTranslations","parameters":[{"description":"A specific locale code to filter translations for.","in":"query","name":"locale_code","required":false,"schema":{"type":"string"}},{"description":"A specific namespace to filter translations for.","in":"query","name":"namespace","required":false,"schema":{"type":"string"}},{"description":"A specific tenant to filter translations for.","in":"query","name":"tenant","required":false,"schema":{"type":"string"}},{"description":"Optionally specify the returned content format. Supports 'json' and 'po'. Defaults to 'json'.","in":"query","name":"format","required":false,"schema":{"enum":["json","po"],"type":"string"}},{"description":"The environment slug.","in":"query","name":"environment","required":true,"schema":{"example":"development","type":"string"}},{"description":"The slug of a branch to use. This option can only be used when `environment` is `\"development\"`.","in":"query","name":"branch","required":false,"schema":{"example":"feature-branch","type":"string"}},{"description":"Whether to annotate the resource. Only used in the Knock CLI.","in":"query","name":"annotate","required":false,"schema":{"type":"boolean"}},{"description":"Whether to hide uncommitted changes. When true, only committed changes will be returned. When false, both committed and uncommitted changes will be returned.","in":"query","name":"hide_uncommitted_changes","required":false,"schema":{"type":"boolean"}},{"description":"The cursor to fetch entries after.","in":"query","name":"after","required":false,"schema":{"type":"string"}},{"description":"The cursor to fetch entries before.","in":"query","name":"before","required":false,"schema":{"type":"string"}},{"description":"The number of entries to fetch per-page.","in":"query","name":"limit","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"description":"A paginated list of Translation. Contains a list of entries and page information.","example":{"entries":[{"content":"{\"hello\":\"Hello, world!\"}","format":"json","inserted_at":"2021-01-01T00:00:00Z","locale_code":"en","namespace":"my_app","updated_at":"2021-01-01T00:00:00Z"}],"page_info":{"after":null,"before":null,"page_size":25}},"properties":{"entries":{"description":"A list of entries.","items":{"$ref":"#/components/schemas/Translation"},"nullable":false,"type":"array"},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["entries","page_info"],"title":"PaginatedTranslationResponse","type":"object"}}},"description":"OK"}},"summary":"List translations","tags":["Translations"]}},"/v1/workflows/{workflow_key}/steps/{step_ref}/preview_template":{"post":{"callbacks":{},"description":"Generates a rendered template for a given channel step in a workflow.","operationId":"previewWorkflowTemplate","parameters":[{"description":"The key of the workflow.","in":"path","name":"workflow_key","required":true,"schema":{"type":"string"}},{"description":"The reference key of the channel step in the workflow to preview.","in":"path","name":"step_ref","required":true,"schema":{"type":"string"}},{"description":"The environment slug.","in":"query","name":"environment","required":true,"schema":{"example":"development","type":"string"}},{"description":"The slug of a branch to use. This option can only be used when `environment` is `\"development\"`.","in":"query","name":"branch","required":false,"schema":{"example":"feature-branch","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewWorkflowTemplateRequest"}}},"description":"Params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewWorkflowTemplateResponse"}}},"description":"OK"}},"summary":"Preview a workflow template","tags":["Workflows"]}},"/v1/templates/preview":{"post":{"callbacks":{},"description":"Renders a template preview, without requiring a template to be persisted within Knock.\nThis is useful for previewing templates in isolation, without the need to use a workflow.\n\nFor email templates, you can optionally specify a layout by key or provide inline layout content.\n","operationId":"previewTemplate","parameters":[{"description":"The environment slug.","in":"query","name":"environment","required":true,"schema":{"example":"development","type":"string"}},{"description":"The slug of a branch to use. This option can only be used when `environment` is `\"development\"`.","in":"query","name":"branch","required":false,"schema":{"example":"feature-branch","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewTemplateRequest"}}},"description":"Params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewTemplateResponse"}}},"description":"OK"}},"summary":"Preview a template","tags":["Templates"]}},"/v1/guides/{guide_key}/activate":{"put":{"callbacks":{},"description":"Activates (or deactivates) a guide in a given environment. You can either set the active status immediately or schedule it.\n\nNote: This immediately enables or disables a guide in a given environment without needing to go through environment promotion.\n","operationId":"activateGuide","parameters":[{"description":"The key of the guide.","in":"path","name":"guide_key","required":true,"schema":{"type":"string"}},{"description":"The environment slug.","in":"query","name":"environment","required":true,"schema":{"example":"development","type":"string"}},{"description":"The slug of a branch to use. This option can only be used when `environment` is `\"development\"`.","in":"query","name":"branch","required":false,"schema":{"example":"feature-branch","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuideActivationParams"}}},"description":"Params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"description":"Wraps the Guide response under the `guide` key.","example":{"guide":{"activation_url_patterns":[{"directive":"allow","pathname":"/dashboard/*"}],"active":true,"archived_at":null,"channel_key":"in-app-guide","created_at":"2024-01-01T00:00:00Z","description":"A guide to help users get started with the application","environment":"development","key":"getting-started","name":"Getting Started Guide","semver":"0.0.1","sha":"1234567890","steps":[{"name":"Welcome to the App","ref":"welcome-step","schema_key":"tooltip","schema_semver":"1.0.0","schema_variant_key":"default","values":{"text_field":"value"}}],"target_audience_id":null,"target_property_conditions":{"all":[{"argument":"some_property","operator":"equal_to","variable":"recipient.property"}]},"type":"banner","updated_at":"2024-01-01T00:00:00Z","valid":true}},"properties":{"guide":{"$ref":"#/components/schemas/Guide"}},"required":["guide"],"title":"WrappedGuideResponse","type":"object"}}},"description":"OK"}},"summary":"Activate a guide","tags":["Guides"]}},"/v1/partials":{"get":{"callbacks":{},"description":"List all partials for a given environment.","operationId":"listPartials","parameters":[{"description":"The environment slug.","in":"query","name":"environment","required":true,"schema":{"example":"development","type":"string"}},{"description":"The slug of a branch to use. This option can only be used when `environment` is `\"development\"`.","in":"query","name":"branch","required":false,"schema":{"example":"feature-branch","type":"string"}},{"description":"Whether to annotate the resource. Only used in the Knock CLI.","in":"query","name":"annotate","required":false,"schema":{"type":"boolean"}},{"description":"Whether to hide uncommitted changes. When true, only committed changes will be returned. When false, both committed and uncommitted changes will be returned.","in":"query","name":"hide_uncommitted_changes","required":false,"schema":{"type":"boolean"}},{"description":"The cursor to fetch entries after.","in":"query","name":"after","required":false,"schema":{"type":"string"}},{"description":"The cursor to fetch entries before.","in":"query","name":"before","required":false,"schema":{"type":"string"}},{"description":"The number of entries to fetch per-page.","in":"query","name":"limit","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"description":"A paginated list of Partial. Contains a list of entries and page information.","example":{"entries":[{"content":"<p>Hello, world!</p>","description":"This is a test partial","environment":"development","icon_name":"icon-name","input_schema":[{"key":"text_field","label":"My text field","settings":{"description":"A description of the text field","max_length":100,"min_length":10,"required":true},"type":"text"}],"inserted_at":"2021-01-01T00:00:00Z","key":"my-partial","name":"My Partial","type":"html","updated_at":"2021-01-01T00:00:00Z","valid":true,"visual_block_enabled":true}],"page_info":{"after":null,"before":null,"page_size":25}},"properties":{"entries":{"description":"A list of entries.","items":{"$ref":"#/components/schemas/Partial"},"nullable":false,"type":"array"},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["entries","page_info"],"title":"PaginatedPartialResponse","type":"object"}}},"description":"OK"}},"summary":"List partials","tags":["Partials"]}},"/v1/partials/{partial_key}":{"get":{"callbacks":{},"description":"Get a partial by its key.","operationId":"getPartial","parameters":[{"description":"The environment slug.","in":"query","name":"environment","required":true,"schema":{"example":"development","type":"string"}},{"description":"The slug of a branch to use. This option can only be used when `environment` is `\"development\"`.","in":"query","name":"branch","required":false,"schema":{"example":"feature-branch","type":"string"}},{"description":"The key of the partial to retrieve.","in":"path","name":"partial_key","required":true,"schema":{"type":"string"}},{"description":"Whether to annotate the resource. Only used in the Knock CLI.","in":"query","name":"annotate","required":false,"schema":{"type":"boolean"}},{"description":"Whether to hide uncommitted changes. When true, only committed changes will be returned. When false, both committed and uncommitted changes will be returned.","in":"query","name":"hide_uncommitted_changes","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Partial"}}},"description":"OK"}},"summary":"Get a partial","tags":["Partials"]},"put":{"callbacks":{},"description":"Updates a partial of a given key, or creates a new one if it does not yet exist.\n\nNote: this endpoint only operates on partials in the “development” environment.\n","operationId":"upsertPartial","parameters":[{"description":"The environment slug.","in":"query","name":"environment","required":true,"schema":{"example":"development","type":"string"}},{"description":"The slug of a branch to use. This option can only be used when `environment` is `\"development\"`.","in":"query","name":"branch","required":false,"schema":{"example":"feature-branch","type":"string"}},{"description":"The key of the partial to upsert.","in":"path","name":"partial_key","required":true,"schema":{"type":"string"}},{"description":"Whether to annotate the resource. Only used in the Knock CLI.","in":"query","name":"annotate","required":false,"schema":{"type":"boolean"}},{"description":"When set to true, forces the upsert to override existing content regardless of environment restrictions. This bypasses the development-only environment check and origin environment checks.","in":"query","name":"force","required":false,"schema":{"type":"boolean"}},{"description":"Whether to commit the resource at the same time as modifying it.","in":"query","name":"commit","required":false,"schema":{"type":"boolean"}},{"description":"The message to commit the resource with, only used if `commit` is `true`.","in":"query","name":"commit_message","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"Wraps the PartialRequest request under the partial key.","example":{"partial":{"content":"<p>Hello, world!</p>","description":"This is a test partial","input_schema":[{"key":"text_field","label":"My text field","settings":{"description":"A description of the text field","max_length":100,"min_length":10,"required":true},"type":"text"}],"name":"My Partial","type":"html","visual_block_enabled":true}},"properties":{"partial":{"$ref":"#/components/schemas/PartialRequest"}},"required":["partial"],"title":"WrappedPartialRequestRequest","type":"object"}}},"description":"Params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"description":"Wraps the Partial response under the `partial` key.","example":{"partial":{"content":"<p>Hello, world!</p>","description":"This is a test partial","environment":"development","icon_name":"icon-name","input_schema":[{"key":"text_field","label":"My text field","settings":{"description":"A description of the text field","max_length":100,"min_length":10,"required":true},"type":"text"}],"inserted_at":"2021-01-01T00:00:00Z","key":"my-partial","name":"My Partial","type":"html","updated_at":"2021-01-01T00:00:00Z","valid":true,"visual_block_enabled":true}},"properties":{"partial":{"$ref":"#/components/schemas/Partial"}},"required":["partial"],"title":"WrappedPartialResponse","type":"object"}}},"description":"OK"}},"summary":"Upsert a partial","tags":["Partials"]}},"/v1/channels":{"get":{"callbacks":{},"description":"Returns a paginated list of channels. Note: the list of channels is across the entire account, not scoped to an environment.","operationId":"listChannels","parameters":[{"description":"A channel id to filter the results by.","in":"query","name":"id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"Associated resources to include in the response. Accepts `environment_settings` to include per-environment channel configuration.","in":"query","name":"include","required":false,"schema":{"items":{"enum":["environment_settings"],"type":"string"},"type":"array"}},{"description":"The cursor to fetch entries after.","in":"query","name":"after","required":false,"schema":{"type":"string"}},{"description":"The cursor to fetch entries before.","in":"query","name":"before","required":false,"schema":{"type":"string"}},{"description":"The number of entries to fetch per-page.","in":"query","name":"limit","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"description":"A paginated list of Channel. Contains a list of entries and page information.","example":{"entries":[{"archived_at":null,"created_at":"2021-01-01T00:00:00Z","custom_icon_url":null,"id":"01234567-89ab-cdef-0123-456789abcdef","key":"my-sendgrid-channel","name":"My Sendgrid Channel","provider":"sendgrid","type":"email","updated_at":"2021-01-01T00:00:00Z"}],"page_info":{"after":null,"before":null,"page_size":25}},"properties":{"entries":{"description":"A list of entries.","items":{"$ref":"#/components/schemas/Channel"},"nullable":false,"type":"array"},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["entries","page_info"],"title":"PaginatedChannelResponse","type":"object"}}},"description":"OK"}},"summary":"List channels","tags":["Channels"]}},"/v1/members/{id}":{"delete":{"callbacks":{},"description":"Removes a member from the account.","operationId":"removeMember","parameters":[{"description":"The ID of the member to remove.","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"No Content"}},"summary":"Remove a member","tags":["Members"]},"get":{"callbacks":{},"description":"Returns a single member by their ID.","operationId":"getMember","parameters":[{"description":"The ID of the member to retrieve.","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Member"}}},"description":"OK"}},"summary":"Get a member","tags":["Members"]}},"/v1/email_layouts/{email_layout_key}":{"get":{"callbacks":{},"description":"Retrieve an email layout by its key, in a given environment.","operationId":"getEmailLayout","parameters":[{"description":"The key of the email layout to show.","in":"path","name":"email_layout_key","required":true,"schema":{"type":"string"}},{"description":"The environment slug.","in":"query","name":"environment","required":true,"schema":{"example":"development","type":"string"}},{"description":"The slug of a branch to use. This option can only be used when `environment` is `\"development\"`.","in":"query","name":"branch","required":false,"schema":{"example":"feature-branch","type":"string"}},{"description":"Whether to annotate the resource. Only used in the Knock CLI.","in":"query","name":"annotate","required":false,"schema":{"type":"boolean"}},{"description":"Whether to hide uncommitted changes. When true, only committed changes will be returned. When false, both committed and uncommitted changes will be returned.","in":"query","name":"hide_uncommitted_changes","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailLayout"}}},"description":"OK"}},"summary":"Get email layout","tags":["Email layouts"]},"put":{"callbacks":{},"description":"Updates an email layout, or creates a new one if it does not yet exist.\n\nNote: this endpoint only operates in the \"development\" environment.\n","operationId":"upsertEmailLayout","parameters":[{"description":"The key of the email layout to upsert.","in":"path","name":"email_layout_key","required":true,"schema":{"type":"string"}},{"description":"The environment slug.","in":"query","name":"environment","required":true,"schema":{"example":"development","type":"string"}},{"description":"The slug of a branch to use. This option can only be used when `environment` is `\"development\"`.","in":"query","name":"branch","required":false,"schema":{"example":"feature-branch","type":"string"}},{"description":"Whether to annotate the resource. Only used in the Knock CLI.","in":"query","name":"annotate","required":false,"schema":{"type":"boolean"}},{"description":"When set to true, forces the upsert to override existing content regardless of environment restrictions. This bypasses the development-only environment check and origin environment checks.","in":"query","name":"force","required":false,"schema":{"type":"boolean"}},{"description":"Whether to commit the resource at the same time as modifying it.","in":"query","name":"commit","required":false,"schema":{"type":"boolean"}},{"description":"The message to commit the resource with, only used if `commit` is `true`.","in":"query","name":"commit_message","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"Wraps the EmailLayoutRequest request under the email_layout key.","example":{"email_layout":{"branding_overrides":{"dark_logo_url":"https://cdn.example.com/logo-dark.png","dark_primary_color":"#1A1A2E","dark_primary_color_contrast":"#FFFFFF","primary_color":"#4F46E5","primary_color_contrast":"#FFFFFF"},"footer_links":[{"text":"Example","url":"http://example.com"}],"html_layout":"<html><body>Hello, world!</body></html>","name":"Transactional","text_layout":"Hello, world!"}},"properties":{"email_layout":{"$ref":"#/components/schemas/EmailLayoutRequest"}},"required":["email_layout"],"title":"WrappedEmailLayoutRequestRequest","type":"object"}}},"description":"Email layout","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"description":"Wraps the EmailLayout response under the `email_layout` key.","example":{"email_layout":{"branding_overrides":{"dark_logo_url":"https://cdn.example.com/logo-dark.png","dark_primary_color":"#1A1A2E","dark_primary_color_contrast":"#FFFFFF","primary_color":"#4F46E5","primary_color_contrast":"#FFFFFF"},"created_at":"2021-01-01T00:00:00Z","environment":"development","footer_links":[{"text":"Example","url":"http://example.com"}],"html_layout":"<html><body>Hello, world!</body></html>","key":"transactional","name":"Transactional","sha":"1234567890","text_layout":"Hello, world!","updated_at":"2021-01-01T00:00:00Z"}},"properties":{"email_layout":{"$ref":"#/components/schemas/EmailLayout"}},"required":["email_layout"],"title":"WrappedEmailLayoutResponse","type":"object"}}},"description":"OK"}},"summary":"Upsert email layout","tags":["Email layouts"]}},"/v1/channel_groups":{"get":{"callbacks":{},"description":"Returns a paginated list of channel groups. Note: the list of channel groups is across the entire account, not scoped to an environment.","operationId":"listChannelGroups","parameters":[{"description":"The cursor to fetch entries after.","in":"query","name":"after","required":false,"schema":{"type":"string"}},{"description":"The cursor to fetch entries before.","in":"query","name":"before","required":false,"schema":{"type":"string"}},{"description":"The number of entries to fetch per-page.","in":"query","name":"limit","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"description":"A paginated list of ChannelGroup. Contains a list of entries and page information.","example":{"entries":[{"channel_rules":[{"channel":{"archived_at":null,"created_at":"2021-01-01T00:00:00Z","custom_icon_url":null,"id":"01234567-89ab-cdef-0123-456789abcdef","key":"my-sendgrid-channel","name":"My Sendgrid Channel","provider":"sendgrid","type":"email","updated_at":"2021-01-01T00:00:00Z"},"created_at":"2021-01-01T00:00:00Z","index":0,"rule_type":"always","updated_at":"2021-01-01T00:00:00Z"}],"channel_type":"push","created_at":"2021-01-01T00:00:00Z","key":"push-group","name":"Push Notification Group","operator":"any","source":"user","updated_at":"2021-01-01T00:00:00Z"}],"page_info":{"after":null,"before":null,"page_size":25}},"properties":{"entries":{"description":"A list of entries.","items":{"$ref":"#/components/schemas/ChannelGroup"},"nullable":false,"type":"array"},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["entries","page_info"],"title":"PaginatedChannelGroupResponse","type":"object"}}},"description":"OK"}},"summary":"List channel groups","tags":["Channel Groups"]}},"/v1/workflows":{"get":{"callbacks":{},"description":"Returns a paginated list of workflows available in a given environment. The workflows are returned alphabetically by `key`.","operationId":"listWorkflows","parameters":[{"description":"The environment slug.","in":"query","name":"environment","required":true,"schema":{"example":"development","type":"string"}},{"description":"The slug of a branch to use. This option can only be used when `environment` is `\"development\"`.","in":"query","name":"branch","required":false,"schema":{"example":"feature-branch","type":"string"}},{"description":"The cursor to fetch entries after.","in":"query","name":"after","required":false,"schema":{"type":"string"}},{"description":"The cursor to fetch entries before.","in":"query","name":"before","required":false,"schema":{"type":"string"}},{"description":"The number of entries to fetch per-page.","in":"query","name":"limit","required":false,"schema":{"type":"integer"}},{"description":"Whether to annotate the resource. Only used in the Knock CLI.","in":"query","name":"annotate","required":false,"schema":{"type":"boolean"}},{"description":"Whether to hide uncommitted changes. When true, only committed changes will be returned. When false, both committed and uncommitted changes will be returned.","in":"query","name":"hide_uncommitted_changes","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"description":"A paginated list of Workflow. Contains a list of entries and page information.","example":{"entries":[{"active":false,"categories":["marketing","black-friday"],"conditions":{"all":[{"argument":"admin","operator":"equal_to","variable":"recipient.role"}]},"created_at":"2022-12-16T19:07:50.027113Z","description":"This is a dummy workflow for demo purposes.","environment":"development","key":"december-16-demo","name":"december-16-demo","settings":{"override_preferences":true},"sha":"f7e9d3b2a1c8e6m4k5j7h9g0i2l3n4p6q8r0t1u3v5w7x9y","steps":[{"channel_key":"in-app-feed","channel_type":"in_app_feed","description":"Main in-app feed","name":"In-app step","ref":"in_app_feed_1","template":{"action_url":"{{ data.onboarding_url }}","markdown_body":"Hello **{{ recipient.name }}**. Click here to get started."},"type":"channel"},{"ref":"delay_1","settings":{"delay_for":{"unit":"hours","value":1}},"type":"delay"},{"channel_key":"postmark","channel_type":"email","ref":"email_1","template":{"html_body":"<p>Hello, {{ recipient.name }}! Welcome to {{ vars.app_name }} <a href='{{ data.onboarding_url }}'>Get started here</a>.</p>","settings":{"layout_key":"default"},"subject":"Welcome to {{ vars.app_name }}!"},"type":"channel"}],"trigger_data_json_schema":{"properties":{"onboarding_url":{"type":"string"}},"required":["onboarding_url"],"type":"object"},"trigger_frequency":"every_trigger","updated_at":"2023-02-08T22:15:19.846681Z","valid":true}],"page_info":{"after":null,"before":null,"page_size":25}},"properties":{"entries":{"description":"A list of entries.","items":{"$ref":"#/components/schemas/Workflow"},"nullable":false,"type":"array"},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["entries","page_info"],"title":"PaginatedWorkflowResponse","type":"object"}}},"description":"OK"}},"summary":"List workflows","tags":["Workflows"]}},"/v1/broadcasts":{"get":{"callbacks":{},"description":"Returns a paginated list of broadcasts available in a given environment. The broadcasts are returned ordered by creation time (newest first).","operationId":"listBroadcasts","parameters":[{"description":"The environment slug.","in":"query","name":"environment","required":true,"schema":{"example":"development","type":"string"}},{"description":"The slug of a branch to use. This option can only be used when `environment` is `\"development\"`.","in":"query","name":"branch","required":false,"schema":{"example":"feature-branch","type":"string"}},{"description":"The cursor to fetch entries after.","in":"query","name":"after","required":false,"schema":{"type":"string"}},{"description":"The cursor to fetch entries before.","in":"query","name":"before","required":false,"schema":{"type":"string"}},{"description":"The number of entries to fetch per-page.","in":"query","name":"limit","required":false,"schema":{"type":"integer"}},{"description":"Whether to annotate the resource. Only used in the Knock CLI.","in":"query","name":"annotate","required":false,"schema":{"type":"boolean"}},{"description":"Whether to hide uncommitted changes. When true, only committed changes will be returned. When false, both committed and uncommitted changes will be returned.","in":"query","name":"hide_uncommitted_changes","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"description":"A paginated list of Broadcast. Contains a list of entries and page information.","example":{"entries":[{"categories":["marketing","promotions"],"created_at":"2022-12-16T19:07:50.027113Z","description":"Holiday promotion broadcast for December","environment":"development","key":"december-promotion","name":"December Promotion","scheduled_at":null,"sent_at":null,"settings":{"is_commercial":true,"override_preferences":false},"sha":"f7e9d3b2a1c8e6m4k5j7h9g0i2l3n4p6q8r0t1u3v5w7x9y","status":"draft","steps":[{"channel_key":"in-app-feed","description":"Main in-app feed","name":"In-app step","ref":"in_app_feed_1","template":{"action_url":"{{ vars.app_url }}","markdown_body":"Hello **{{ recipient.name }}**"},"type":"channel"}],"target_audience_key":"premium-users","updated_at":"2023-02-08T22:15:19.846681Z","valid":true}],"page_info":{"after":null,"before":null,"page_size":25}},"properties":{"entries":{"description":"A list of entries.","items":{"$ref":"#/components/schemas/Broadcast"},"nullable":false,"type":"array"},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["entries","page_info"],"title":"PaginatedBroadcastResponse","type":"object"}}},"description":"OK"}},"summary":"List broadcasts","tags":["Broadcasts"]}},"/v1/translations/{locale_code}/validate":{"put":{"callbacks":{},"description":"Validates a translation payload without persisting it.\n\nNote: this endpoint only operates on translations in the \"development\" environment.\n","operationId":"validateTranslation","parameters":[{"description":"The translation's locale code.","in":"path","name":"locale_code","required":true,"schema":{"type":"string"}},{"description":"The environment slug.","in":"query","name":"environment","required":true,"schema":{"example":"development","type":"string"}},{"description":"The slug of a branch to use. This option can only be used when `environment` is `\"development\"`.","in":"query","name":"branch","required":false,"schema":{"example":"feature-branch","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"Wraps the TranslationRequest request under the translation key.","example":{"translation":{"content":"{\"hello\":\"Hello, world!\"}","format":"json"}},"properties":{"translation":{"$ref":"#/components/schemas/TranslationRequest"}},"required":["translation"],"title":"WrappedTranslationRequestRequest","type":"object"}}},"description":"Params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"description":"Wraps the Translation response under the `translation` key.","example":{"translation":{"content":"{\"hello\":\"Hello, world!\"}","format":"json","inserted_at":"2021-01-01T00:00:00Z","locale_code":"en","namespace":"my_app","updated_at":"2021-01-01T00:00:00Z"}},"properties":{"translation":{"$ref":"#/components/schemas/Translation"}},"required":["translation"],"title":"WrappedTranslationResponse","type":"object"}}},"description":"OK"}},"summary":"Validate translation","tags":["Translations"]}},"/v1/whoami":{"get":{"callbacks":{},"description":"Return information about the current calling scope. Will either be a service token or from an OAuth context.","operationId":"getWhoami","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhoamiResponse"}}},"description":"OK"}},"summary":"Verify scope","tags":["Accounts"]}},"/v1/audiences/{audience_key}":{"delete":{"callbacks":{},"description":"Archives a given audience across all environments.","operationId":"archiveAudience","parameters":[{"description":"The key of the audience to archive.","in":"path","name":"audience_key","required":true,"schema":{"type":"string"}},{"description":"The environment slug.","in":"query","name":"environment","required":true,"schema":{"example":"development","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"description":"The response from archiving an audience.","example":{"result":"success"},"properties":{"result":{"description":"The result of the archive operation.","example":"success","type":"string"}},"required":["result"],"title":"ArchiveAudienceResponse","type":"object"}}},"description":"OK"}},"summary":"Archive an audience","tags":["Audiences"]},"get":{"callbacks":{},"description":"Retrieve an audience by its key in a given environment.","operationId":"getAudience","parameters":[{"description":"The key of the audience to retrieve.","in":"path","name":"audience_key","required":true,"schema":{"type":"string"}},{"description":"The environment slug.","in":"query","name":"environment","required":true,"schema":{"example":"development","type":"string"}},{"description":"The slug of a branch to use. This option can only be used when `environment` is `\"development\"`.","in":"query","name":"branch","required":false,"schema":{"example":"feature-branch","type":"string"}},{"description":"Whether to annotate the resource. Only used in the Knock CLI.","in":"query","name":"annotate","required":false,"schema":{"type":"boolean"}},{"description":"Whether to hide uncommitted changes. When true, only committed changes will be returned. When false, both committed and uncommitted changes will be returned.","in":"query","name":"hide_uncommitted_changes","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Audience"}}},"description":"OK"}},"summary":"Get an audience","tags":["Audiences"]},"put":{"callbacks":{},"description":"Updates an audience of a given key, or creates a new one if it does not yet exist.","operationId":"upsertAudience","parameters":[{"description":"The environment slug.","in":"query","name":"environment","required":true,"schema":{"example":"development","type":"string"}},{"description":"The slug of a branch to use. This option can only be used when `environment` is `\"development\"`.","in":"query","name":"branch","required":false,"schema":{"example":"feature-branch","type":"string"}},{"description":"The key of the audience to upsert.","in":"path","name":"audience_key","required":true,"schema":{"type":"string"}},{"description":"Whether to annotate the resource. Only used in the Knock CLI.","in":"query","name":"annotate","required":false,"schema":{"type":"boolean"}},{"description":"When set to true, forces the upsert to override existing content regardless of environment restrictions. This bypasses the development-only environment check and origin environment checks.","in":"query","name":"force","required":false,"schema":{"type":"boolean"}},{"description":"Whether to commit the resource at the same time as modifying it.","in":"query","name":"commit","required":false,"schema":{"type":"boolean"}},{"description":"The message to commit the resource with, only used if `commit` is `true`.","in":"query","name":"commit_message","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"Wraps the AudienceRequest request under the audience key.","example":{"audience":{"description":"Users on the premium plan","name":"Premium users","segments":[{"conditions":[{"argument":"premium","operator":"equal_to","property":"recipient.plan"}]}],"type":"dynamic"}},"properties":{"audience":{"$ref":"#/components/schemas/AudienceRequest"}},"required":["audience"],"title":"WrappedAudienceRequestRequest","type":"object"}}},"description":"Params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"description":"Wraps the Audience response under the `audience` key.","example":{"audience":{"created_at":"2024-01-15T10:30:00Z","description":"Customers who signed up in the last 30 days.","environment":"development","key":"new-customers","name":"New customers","segments":[{"conditions":[{"argument":"30_days_ago","operator":"greater_than","property":"recipient.created_at"}]}],"sha":"a1b2c3d4e5f6","type":"dynamic","updated_at":"2024-06-20T14:45:00Z"}},"properties":{"audience":{"$ref":"#/components/schemas/Audience"}},"required":["audience"],"title":"WrappedAudienceResponse","type":"object"}}},"description":"OK"}},"summary":"Upsert an audience","tags":["Audiences"]}},"/v1/commits/{id}":{"get":{"callbacks":{},"description":"Retrieve a single commit by its ID.","operationId":"getCommit","parameters":[{"description":"The id of the commit to retrieve.","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Commit"}}},"description":"OK"}},"summary":"Get a commit","tags":["Commits"]}},"/v1/audiences/{audience_key}/validate":{"put":{"callbacks":{},"description":"Validates an audience payload without persisting it.","operationId":"validateAudience","parameters":[{"description":"The environment slug.","in":"query","name":"environment","required":true,"schema":{"example":"development","type":"string"}},{"description":"The slug of a branch to use. This option can only be used when `environment` is `\"development\"`.","in":"query","name":"branch","required":false,"schema":{"example":"feature-branch","type":"string"}},{"description":"The key of the audience to validate.","in":"path","name":"audience_key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"Wraps the AudienceRequest request under the audience key.","example":{"audience":{"description":"Users on the premium plan","name":"Premium users","segments":[{"conditions":[{"argument":"premium","operator":"equal_to","property":"recipient.plan"}]}],"type":"dynamic"}},"properties":{"audience":{"$ref":"#/components/schemas/AudienceRequest"}},"required":["audience"],"title":"WrappedAudienceRequestRequest","type":"object"}}},"description":"Params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"description":"Wraps the Audience response under the `audience` key.","example":{"audience":{"created_at":"2024-01-15T10:30:00Z","description":"Customers who signed up in the last 30 days.","environment":"development","key":"new-customers","name":"New customers","segments":[{"conditions":[{"argument":"30_days_ago","operator":"greater_than","property":"recipient.created_at"}]}],"sha":"a1b2c3d4e5f6","type":"dynamic","updated_at":"2024-06-20T14:45:00Z"}},"properties":{"audience":{"$ref":"#/components/schemas/Audience"}},"required":["audience"],"title":"WrappedAudienceResponse","type":"object"}}},"description":"OK"}},"summary":"Validate an audience","tags":["Audiences"]}},"/v1/variables":{"get":{"callbacks":{},"description":"Returns a list of variables. When an environment is specified, returns per-environment variables. Otherwise, returns project-scoped variables with per-environment overrides.","operationId":"listVariables","parameters":[{"description":"The environment slug.","in":"query","name":"environment","required":true,"schema":{"example":"development","type":"string"}},{"description":"The slug of a branch to use. This option can only be used when `environment` is `\"development\"`.","in":"query","name":"branch","required":false,"schema":{"example":"feature-branch","type":"string"}},{"description":"Filter variables by type. Supports 'public' or 'secret'.","in":"query","name":"type","required":false,"schema":{"enum":["public","secret"],"type":"string"}},{"description":"The cursor to fetch entries after.","in":"query","name":"after","required":false,"schema":{"type":"string"}},{"description":"The cursor to fetch entries before.","in":"query","name":"before","required":false,"schema":{"type":"string"}},{"description":"The number of entries to fetch per-page.","in":"query","name":"limit","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"description":"A paginated list of Variable. Contains a list of entries and page information.","example":{"entries":[{"description":"This is a description of my variable.","environment_values":{"development":"dev_value","production":"prod_value"},"inserted_at":"2021-01-01T00:00:00Z","key":"my_variable","type":"public","updated_at":"2021-01-01T00:00:00Z","value":"my_value"}],"page_info":{"after":null,"before":null,"page_size":25}},"properties":{"entries":{"description":"A list of entries.","items":{"$ref":"#/components/schemas/Variable"},"nullable":false,"type":"array"},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["entries","page_info"],"title":"PaginatedVariableResponse","type":"object"}}},"description":"OK"}},"summary":"List variables","tags":["Variables"]}},"/v1/workflows/{workflow_key}/activate":{"put":{"callbacks":{},"description":"Activates (or deactivates) a workflow in a given environment. Read more in the [docs](https://docs.knock.app/concepts/workflows#workflow-status).\n\nNote: This immediately enables or disables a workflow in a given environment without needing to go through environment promotion.\n","operationId":"activateWorkflow","parameters":[{"description":"The key of the workflow.","in":"path","name":"workflow_key","required":true,"schema":{"type":"string"}},{"description":"The environment slug.","in":"query","name":"environment","required":true,"schema":{"example":"development","type":"string"}},{"description":"The slug of a branch to use. This option can only be used when `environment` is `\"development\"`.","in":"query","name":"branch","required":false,"schema":{"example":"feature-branch","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"example":{"status":true},"properties":{"status":{"description":"Whether to activate or deactivate the workflow. Set to `true` by default, which will activate the workflow.","example":true,"type":"boolean"}},"required":["status"],"type":"object"}}},"description":"Params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"description":"Wraps the Workflow response under the `workflow` key.","example":{"workflow":{"active":false,"categories":["marketing","black-friday"],"conditions":{"all":[{"argument":"admin","operator":"equal_to","variable":"recipient.role"}]},"created_at":"2022-12-16T19:07:50.027113Z","description":"This is a dummy workflow for demo purposes.","environment":"development","key":"december-16-demo","name":"december-16-demo","settings":{"override_preferences":true},"sha":"f7e9d3b2a1c8e6m4k5j7h9g0i2l3n4p6q8r0t1u3v5w7x9y","steps":[{"channel_key":"in-app-feed","channel_type":"in_app_feed","description":"Main in-app feed","name":"In-app step","ref":"in_app_feed_1","template":{"action_url":"{{ data.onboarding_url }}","markdown_body":"Hello **{{ recipient.name }}**. Click here to get started."},"type":"channel"},{"ref":"delay_1","settings":{"delay_for":{"unit":"hours","value":1}},"type":"delay"},{"channel_key":"postmark","channel_type":"email","ref":"email_1","template":{"html_body":"<p>Hello, {{ recipient.name }}! Welcome to {{ vars.app_name }} <a href='{{ data.onboarding_url }}'>Get started here</a>.</p>","settings":{"layout_key":"default"},"subject":"Welcome to {{ vars.app_name }}!"},"type":"channel"}],"trigger_data_json_schema":{"properties":{"onboarding_url":{"type":"string"}},"required":["onboarding_url"],"type":"object"},"trigger_frequency":"every_trigger","updated_at":"2023-02-08T22:15:19.846681Z","valid":true}},"properties":{"workflow":{"$ref":"#/components/schemas/Workflow"}},"required":["workflow"],"title":"WrappedWorkflowResponse","type":"object"}}},"description":"OK"}},"summary":"Activate a workflow","tags":["Workflows"]}},"/v1/partials/{partial_key}/validate":{"put":{"callbacks":{},"description":"Validates a partial payload without persisting it.\n\nNote: this endpoint only operates on partials in the “development” environment.\n","operationId":"validatePartial","parameters":[{"description":"The environment slug.","in":"query","name":"environment","required":true,"schema":{"example":"development","type":"string"}},{"description":"The slug of a branch to use. This option can only be used when `environment` is `\"development\"`.","in":"query","name":"branch","required":false,"schema":{"example":"feature-branch","type":"string"}},{"description":"The key of the partial to validate.","in":"path","name":"partial_key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"Wraps the PartialRequest request under the partial key.","example":{"partial":{"content":"<p>Hello, world!</p>","description":"This is a test partial","input_schema":[{"key":"text_field","label":"My text field","settings":{"description":"A description of the text field","max_length":100,"min_length":10,"required":true},"type":"text"}],"name":"My Partial","type":"html","visual_block_enabled":true}},"properties":{"partial":{"$ref":"#/components/schemas/PartialRequest"}},"required":["partial"],"title":"WrappedPartialRequestRequest","type":"object"}}},"description":"Params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"description":"Wraps the Partial response under the `partial` key.","example":{"partial":{"content":"<p>Hello, world!</p>","description":"This is a test partial","environment":"development","icon_name":"icon-name","input_schema":[{"key":"text_field","label":"My text field","settings":{"description":"A description of the text field","max_length":100,"min_length":10,"required":true},"type":"text"}],"inserted_at":"2021-01-01T00:00:00Z","key":"my-partial","name":"My Partial","type":"html","updated_at":"2021-01-01T00:00:00Z","valid":true,"visual_block_enabled":true}},"properties":{"partial":{"$ref":"#/components/schemas/Partial"}},"required":["partial"],"title":"WrappedPartialResponse","type":"object"}}},"description":"OK"}},"summary":"Validate a partial","tags":["Partials"]}},"/v1/message_types/{message_type_key}/validate":{"put":{"callbacks":{},"description":"Validates a message type payload without persisting it.\n\nNote: this endpoint only operates on message types in the `development` environment.\n","operationId":"validateMessageType","parameters":[{"description":"The key of the message type to validate.","in":"path","name":"message_type_key","required":true,"schema":{"example":"email","type":"string"}},{"description":"The environment slug.","in":"query","name":"environment","required":true,"schema":{"example":"development","type":"string"}},{"description":"The slug of a branch to use. This option can only be used when `environment` is `\"development\"`.","in":"query","name":"branch","required":false,"schema":{"example":"feature-branch","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"Wraps the MessageTypeRequest request under the message_type key.","example":{"message_type":{"description":"This is a message type","name":"My Message Type","preview":"<div>Hello, world!</div>","variants":[{"fields":[{"key":"text_field","label":"My text field","settings":{"description":"A description of the text field","max_length":100,"min_length":10,"required":true},"type":"text"}],"key":"default","name":"Default"}]}},"properties":{"message_type":{"$ref":"#/components/schemas/MessageTypeRequest"}},"required":["message_type"],"title":"WrappedMessageTypeRequestRequest","type":"object"}}},"description":"Params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"description":"Wraps the MessageType response under the `message_type` key.","example":{"message_type":{"archived_at":null,"created_at":"2021-01-01T00:00:00Z","deleted_at":null,"description":"Email message type","environment":"development","icon_name":"email","key":"email","name":"Email","owner":"user","preview":"<div>Hello, world!</div>","semver":"1.0.0","sha":"1234567890","updated_at":"2021-01-01T00:00:00Z","valid":true,"variants":[{"fields":[{"key":"text_field","label":"My text field","settings":{"description":"A description of the text field","max_length":100,"min_length":10,"required":true},"type":"text"}],"key":"default","name":"Default"}]}},"properties":{"message_type":{"$ref":"#/components/schemas/MessageType"}},"required":["message_type"],"title":"WrappedMessageTypeResponse","type":"object"}}},"description":"OK"}},"summary":"Validate message type","tags":["Message types"]}},"/v1/translations/{locale_code}":{"get":{"callbacks":{},"description":"Retrieve a translation by its locale and namespace, in a given environment.","operationId":"getTranslation","parameters":[{"description":"A specific locale code to filter translations for.","in":"path","name":"locale_code","required":true,"schema":{"type":"string"}},{"description":"The environment slug.","in":"query","name":"environment","required":true,"schema":{"example":"development","type":"string"}},{"description":"The slug of a branch to use. This option can only be used when `environment` is `\"development\"`.","in":"query","name":"branch","required":false,"schema":{"example":"feature-branch","type":"string"}},{"description":"Optionally specify the returned content format. Supports 'json' and 'po'. Defaults to 'json'.","in":"query","name":"format","required":false,"schema":{"enum":["json","po"],"type":"string"}},{"description":"A specific namespace to filter translations for.","in":"query","name":"namespace","required":false,"schema":{"type":"string"}},{"description":"A specific tenant to scope the translation to.","in":"query","name":"tenant","required":false,"schema":{"type":"string"}},{"description":"Whether to annotate the resource. Only used in the Knock CLI.","in":"query","name":"annotate","required":false,"schema":{"type":"boolean"}},{"description":"Whether to hide uncommitted changes. When true, only committed changes will be returned. When false, both committed and uncommitted changes will be returned.","in":"query","name":"hide_uncommitted_changes","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"description":"Wraps the Translation response under the `translation` key.","example":{"translation":{"content":"{\"hello\":\"Hello, world!\"}","format":"json","inserted_at":"2021-01-01T00:00:00Z","locale_code":"en","namespace":"my_app","updated_at":"2021-01-01T00:00:00Z"}},"properties":{"translation":{"$ref":"#/components/schemas/Translation"}},"required":["translation"],"title":"WrappedTranslationResponse","type":"object"}}},"description":"OK"}},"summary":"Get translation","tags":["Translations"]},"put":{"callbacks":{},"description":"Updates a translation of a given locale code + namespace, or creates a new one if it does not yet exist.\n\nNote: this endpoint only operates on translations in the \"development\" environment.\n","operationId":"upsertTranslation","parameters":[{"description":"A locale code of the translation.","in":"path","name":"locale_code","required":true,"schema":{"type":"string"}},{"description":"The environment slug.","in":"query","name":"environment","required":true,"schema":{"example":"development","type":"string"}},{"description":"The slug of a branch to use. This option can only be used when `environment` is `\"development\"`.","in":"query","name":"branch","required":false,"schema":{"example":"feature-branch","type":"string"}},{"description":"An optional namespace that identifies the translation.","in":"query","name":"namespace","required":true,"schema":{"type":"string"}},{"description":"An optional tenant to scope the translation to.","in":"query","name":"tenant","required":false,"schema":{"type":"string"}},{"description":"Optionally specify the returned content format. Supports 'json' and 'po'. Defaults to 'json'.","in":"query","name":"format","required":false,"schema":{"enum":["json","po"],"type":"string"}},{"description":"Whether to annotate the resource. Only used in the Knock CLI.","in":"query","name":"annotate","required":false,"schema":{"type":"boolean"}},{"description":"When set to true, forces the upsert to override existing content regardless of environment restrictions. This bypasses the development-only environment check and origin environment checks.","in":"query","name":"force","required":false,"schema":{"type":"boolean"}},{"description":"Whether to commit the resource at the same time as modifying it.","in":"query","name":"commit","required":false,"schema":{"type":"boolean"}},{"description":"The message to commit the resource with, only used if `commit` is `true`.","in":"query","name":"commit_message","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"Wraps the TranslationRequest request under the translation key.","example":{"translation":{"content":"{\"hello\":\"Hello, world!\"}","format":"json"}},"properties":{"translation":{"$ref":"#/components/schemas/TranslationRequest"}},"required":["translation"],"title":"WrappedTranslationRequestRequest","type":"object"}}},"description":"Params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"description":"Wraps the Translation response under the `translation` key.","example":{"translation":{"content":"{\"hello\":\"Hello, world!\"}","format":"json","inserted_at":"2021-01-01T00:00:00Z","locale_code":"en","namespace":"my_app","updated_at":"2021-01-01T00:00:00Z"}},"properties":{"translation":{"$ref":"#/components/schemas/Translation"}},"required":["translation"],"title":"WrappedTranslationResponse","type":"object"}}},"description":"OK"}},"summary":"Upsert translation","tags":["Translations"]}},"/v1/environments":{"get":{"callbacks":{},"description":"Returns a paginated list of environments. The environments will be returned in order of their index, with the `development` environment first.","operationId":"listEnvironments","parameters":[{"description":"The cursor to fetch entries after.","in":"query","name":"after","required":false,"schema":{"type":"string"}},{"description":"The cursor to fetch entries before.","in":"query","name":"before","required":false,"schema":{"type":"string"}},{"description":"The number of entries to fetch per-page.","in":"query","name":"limit","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"description":"A paginated list of Environment. Contains a list of entries and page information.","example":{"entries":[{"created_at":"2022-10-31T19:59:03Z","deleted_at":null,"hide_pii_data":false,"label_color":"#000000","last_commit_at":"2022-10-31T19:59:03Z","name":"Development","order":0,"owner":"system","slug":"development","updated_at":"2022-10-31T19:59:03Z"}],"page_info":{"after":null,"before":null,"page_size":25}},"properties":{"entries":{"description":"A list of entries.","items":{"$ref":"#/components/schemas/Environment"},"nullable":false,"type":"array"},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["entries","page_info"],"title":"PaginatedEnvironmentResponse","type":"object"}}},"description":"OK"}},"summary":"List environments","tags":["Environments"]}},"/v1/email_layouts/{email_layout_key}/validate":{"put":{"callbacks":{},"description":"Validates an email layout payload without persisting it.\n\nNote: this endpoint only operates in the \"development\" environment.\n","operationId":"validateEmailLayout","parameters":[{"description":"The key of the email layout to validate.","in":"path","name":"email_layout_key","required":true,"schema":{"type":"string"}},{"description":"The environment slug.","in":"query","name":"environment","required":true,"schema":{"example":"development","type":"string"}},{"description":"The slug of a branch to use. This option can only be used when `environment` is `\"development\"`.","in":"query","name":"branch","required":false,"schema":{"example":"feature-branch","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"Wraps the EmailLayoutRequest request under the email_layout key.","example":{"email_layout":{"branding_overrides":{"dark_logo_url":"https://cdn.example.com/logo-dark.png","dark_primary_color":"#1A1A2E","dark_primary_color_contrast":"#FFFFFF","primary_color":"#4F46E5","primary_color_contrast":"#FFFFFF"},"footer_links":[{"text":"Example","url":"http://example.com"}],"html_layout":"<html><body>Hello, world!</body></html>","name":"Transactional","text_layout":"Hello, world!"}},"properties":{"email_layout":{"$ref":"#/components/schemas/EmailLayoutRequest"}},"required":["email_layout"],"title":"WrappedEmailLayoutRequestRequest","type":"object"}}},"description":"Email layout","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"description":"Wraps the EmailLayout response under the `email_layout` key.","example":{"email_layout":{"branding_overrides":{"dark_logo_url":"https://cdn.example.com/logo-dark.png","dark_primary_color":"#1A1A2E","dark_primary_color_contrast":"#FFFFFF","primary_color":"#4F46E5","primary_color_contrast":"#FFFFFF"},"created_at":"2021-01-01T00:00:00Z","environment":"development","footer_links":[{"text":"Example","url":"http://example.com"}],"html_layout":"<html><body>Hello, world!</body></html>","key":"transactional","name":"Transactional","sha":"1234567890","text_layout":"Hello, world!","updated_at":"2021-01-01T00:00:00Z"}},"properties":{"email_layout":{"$ref":"#/components/schemas/EmailLayout"}},"required":["email_layout"],"title":"WrappedEmailLayoutResponse","type":"object"}}},"description":"OK"}},"summary":"Validate email layout","tags":["Email layouts"]}},"/v1/commits/{id}/promote":{"put":{"callbacks":{},"description":"Promotes one change to the subsequent environment.","operationId":"promoteOneCommit","parameters":[{"description":"The target commit ID to promote to the subsequent environment.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"description":"Wraps the Commit response under the `commit` key.","example":{"commit":{"author":{"email":"john.doe@example.com","name":"John Doe"},"commit_message":"This is a commit message","created_at":"2021-01-01T00:00:00Z","environment":"development","id":"123e4567-e89b-12d3-a456-426614174000","resource":{"identifier":"my-email-layout","type":"email_layout"}}},"properties":{"commit":{"$ref":"#/components/schemas/Commit"}},"required":["commit"],"title":"WrappedCommitResponse","type":"object"}}},"description":"OK"}},"summary":"Promote one commit","tags":["Commits"]}},"/v1/guides/{guide_key}/validate":{"put":{"callbacks":{},"description":"Validates a guide payload without persisting it.\n\nNote: Validating a guide is only done in the development environment context.\n","operationId":"validateGuide","parameters":[{"description":"The key of the guide.","in":"path","name":"guide_key","required":true,"schema":{"type":"string"}},{"description":"The environment slug.","in":"query","name":"environment","required":true,"schema":{"example":"development","type":"string"}},{"description":"The slug of a branch to use. This option can only be used when `environment` is `\"development\"`.","in":"query","name":"branch","required":false,"schema":{"example":"feature-branch","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"Wraps the GuideRequest request under the guide key.","example":{"guide":{"activation_url_patterns":[{"directive":"allow","pathname":"/dashboard/*"}],"channel_key":"in-app-guide","description":"A guide to help users get started with the application","name":"Getting Started Guide","steps":[{"name":"Welcome to the App","ref":"welcome-step","schema_key":"tooltip","schema_semver":"1.0.0","schema_variant_key":"default","values":{"text_field":"value"}}],"target_audience_id":null,"target_property_conditions":{"all":[{"argument":"some_property","operator":"equal_to","variable":"recipient.property"}]}}},"properties":{"guide":{"$ref":"#/components/schemas/GuideRequest"}},"required":["guide"],"title":"WrappedGuideRequestRequest","type":"object"}}},"description":"Params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"description":"Wraps the Guide response under the `guide` key.","example":{"guide":{"activation_url_patterns":[{"directive":"allow","pathname":"/dashboard/*"}],"active":true,"archived_at":null,"channel_key":"in-app-guide","created_at":"2024-01-01T00:00:00Z","description":"A guide to help users get started with the application","environment":"development","key":"getting-started","name":"Getting Started Guide","semver":"0.0.1","sha":"1234567890","steps":[{"name":"Welcome to the App","ref":"welcome-step","schema_key":"tooltip","schema_semver":"1.0.0","schema_variant_key":"default","values":{"text_field":"value"}}],"target_audience_id":null,"target_property_conditions":{"all":[{"argument":"some_property","operator":"equal_to","variable":"recipient.property"}]},"type":"banner","updated_at":"2024-01-01T00:00:00Z","valid":true}},"properties":{"guide":{"$ref":"#/components/schemas/Guide"}},"required":["guide"],"title":"WrappedGuideResponse","type":"object"}}},"description":"OK"}},"summary":"Validate a guide","tags":["Guides"]}},"/v1/channel_groups/{channel_group_key}":{"delete":{"callbacks":{},"description":"Archives (soft deletes) a channel group by key.","operationId":"deleteChannelGroup","parameters":[{"description":"The key of the channel group to delete.","in":"path","name":"channel_group_key","required":true,"schema":{"type":"string"}}],"responses":{"204":{"content":{"application/json":{}},"description":"No Content"}},"summary":"Delete a channel group","tags":["Channel Groups"]},"get":{"callbacks":{},"description":"Get a channel group by its key.","operationId":"getChannelGroup","parameters":[{"description":"The key of the channel group to retrieve.","in":"path","name":"channel_group_key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelGroup"}}},"description":"OK"}},"summary":"Get a channel group","tags":["Channel Groups"]},"put":{"callbacks":{},"description":"Creates or updates a channel group by key.","operationId":"upsertChannelGroup","parameters":[{"description":"The key of the channel group to upsert.","in":"path","name":"channel_group_key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"Wraps the ChannelGroupRequest request under the channel_group key.","example":{"channel_group":{"channel_rules":[{"channel_key":"push-fcm","index":0,"rule_type":"always"}],"channel_type":"push","name":"Push Notification Group","operator":"any"}},"properties":{"channel_group":{"$ref":"#/components/schemas/ChannelGroupRequest"}},"required":["channel_group"],"title":"WrappedChannelGroupRequestRequest","type":"object"}}},"description":"Params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"description":"Wraps the ChannelGroup response under the `channel_group` key.","example":{"channel_group":{"channel_rules":[{"channel":{"archived_at":null,"created_at":"2021-01-01T00:00:00Z","custom_icon_url":null,"id":"01234567-89ab-cdef-0123-456789abcdef","key":"my-sendgrid-channel","name":"My Sendgrid Channel","provider":"sendgrid","type":"email","updated_at":"2021-01-01T00:00:00Z"},"created_at":"2021-01-01T00:00:00Z","index":0,"rule_type":"always","updated_at":"2021-01-01T00:00:00Z"}],"channel_type":"push","created_at":"2021-01-01T00:00:00Z","key":"push-group","name":"Push Notification Group","operator":"any","source":"user","updated_at":"2021-01-01T00:00:00Z"}},"properties":{"channel_group":{"$ref":"#/components/schemas/ChannelGroup"}},"required":["channel_group"],"title":"WrappedChannelGroupResponse","type":"object"}}},"description":"OK"}},"summary":"Upsert a channel group","tags":["Channel Groups"]}},"/v1/message_types/{message_type_key}":{"get":{"callbacks":{},"description":"Retrieve a message type by its key, in a given environment.","operationId":"getMessageType","parameters":[{"description":"The key of the message type to retrieve.","in":"path","name":"message_type_key","required":true,"schema":{"example":"email","type":"string"}},{"description":"The environment slug.","in":"query","name":"environment","required":true,"schema":{"example":"development","type":"string"}},{"description":"The slug of a branch to use. This option can only be used when `environment` is `\"development\"`.","in":"query","name":"branch","required":false,"schema":{"example":"feature-branch","type":"string"}},{"description":"Whether to annotate the resource. Only used in the Knock CLI.","in":"query","name":"annotate","required":false,"schema":{"type":"boolean"}},{"description":"Whether to hide uncommitted changes. When true, only committed changes will be returned. When false, both committed and uncommitted changes will be returned.","in":"query","name":"hide_uncommitted_changes","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageType"}}},"description":"OK"}},"summary":"Get message type","tags":["Message types"]},"put":{"callbacks":{},"description":"Updates a message type, or creates a new one if it does not yet exist.\n\nNote: this endpoint only operates in the `development` environment.\n","operationId":"upsertMessageType","parameters":[{"description":"The key of the message type to upsert.","in":"path","name":"message_type_key","required":true,"schema":{"example":"email","type":"string"}},{"description":"The environment slug.","in":"query","name":"environment","required":true,"schema":{"example":"development","type":"string"}},{"description":"The slug of a branch to use. This option can only be used when `environment` is `\"development\"`.","in":"query","name":"branch","required":false,"schema":{"example":"feature-branch","type":"string"}},{"description":"Whether to annotate the resource. Only used in the Knock CLI.","in":"query","name":"annotate","required":false,"schema":{"type":"boolean"}},{"description":"When set to true, forces the upsert to override existing content regardless of environment restrictions. This bypasses the development-only environment check and origin environment checks.","in":"query","name":"force","required":false,"schema":{"type":"boolean"}},{"description":"Whether to commit the resource at the same time as modifying it.","in":"query","name":"commit","required":false,"schema":{"type":"boolean"}},{"description":"The message to commit the resource with, only used if `commit` is `true`.","in":"query","name":"commit_message","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"Wraps the MessageTypeRequest request under the message_type key.","example":{"message_type":{"description":"This is a message type","name":"My Message Type","preview":"<div>Hello, world!</div>","variants":[{"fields":[{"key":"text_field","label":"My text field","settings":{"description":"A description of the text field","max_length":100,"min_length":10,"required":true},"type":"text"}],"key":"default","name":"Default"}]}},"properties":{"message_type":{"$ref":"#/components/schemas/MessageTypeRequest"}},"required":["message_type"],"title":"WrappedMessageTypeRequestRequest","type":"object"}}},"description":"Params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"description":"Wraps the MessageType response under the `message_type` key.","example":{"message_type":{"archived_at":null,"created_at":"2021-01-01T00:00:00Z","deleted_at":null,"description":"Email message type","environment":"development","icon_name":"email","key":"email","name":"Email","owner":"user","preview":"<div>Hello, world!</div>","semver":"1.0.0","sha":"1234567890","updated_at":"2021-01-01T00:00:00Z","valid":true,"variants":[{"fields":[{"key":"text_field","label":"My text field","settings":{"description":"A description of the text field","max_length":100,"min_length":10,"required":true},"type":"text"}],"key":"default","name":"Default"}]}},"properties":{"message_type":{"$ref":"#/components/schemas/MessageType"}},"required":["message_type"],"title":"WrappedMessageTypeResponse","type":"object"}}},"description":"OK"}},"summary":"Upsert message type","tags":["Message types"]}},"/v1/workflows/{workflow_key}":{"get":{"callbacks":{},"description":"Retrieve a workflow by its key in a given environment.","operationId":"getWorkflow","parameters":[{"description":"The key of the workflow to retrieve.","in":"path","name":"workflow_key","required":true,"schema":{"type":"string"}},{"description":"The environment slug.","in":"query","name":"environment","required":true,"schema":{"example":"development","type":"string"}},{"description":"The slug of a branch to use. This option can only be used when `environment` is `\"development\"`.","in":"query","name":"branch","required":false,"schema":{"example":"feature-branch","type":"string"}},{"description":"Whether to annotate the resource. Only used in the Knock CLI.","in":"query","name":"annotate","required":false,"schema":{"type":"boolean"}},{"description":"Whether to hide uncommitted changes. When true, only committed changes will be returned. When false, both committed and uncommitted changes will be returned.","in":"query","name":"hide_uncommitted_changes","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShowWorkflowResponse"}}},"description":"OK"}},"summary":"Get a workflow","tags":["Workflows"]},"put":{"callbacks":{},"description":"Updates a workflow of a given key, or creates a new one if it does not yet exist.\n\nNote: this endpoint only operates on workflows in the `development` environment.\n","operationId":"upsertWorkflow","parameters":[{"description":"The key of the workflow.","in":"path","name":"workflow_key","required":true,"schema":{"type":"string"}},{"description":"The environment slug.","in":"query","name":"environment","required":true,"schema":{"example":"development","type":"string"}},{"description":"The slug of a branch to use. This option can only be used when `environment` is `\"development\"`.","in":"query","name":"branch","required":false,"schema":{"example":"feature-branch","type":"string"}},{"description":"Whether to annotate the resource. Only used in the Knock CLI.","in":"query","name":"annotate","required":false,"schema":{"type":"boolean"}},{"description":"When set to true, forces the upsert to override existing content regardless of environment restrictions. This bypasses the development-only environment check and origin environment checks.","in":"query","name":"force","required":false,"schema":{"type":"boolean"}},{"description":"Whether to commit the resource at the same time as modifying it.","in":"query","name":"commit","required":false,"schema":{"type":"boolean"}},{"description":"The message to commit the resource with, only used if `commit` is `true`.","in":"query","name":"commit_message","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"Wraps the WorkflowRequest request under the workflow key.","example":{"workflow":{"name":"My Workflow","steps":[{"channel_key":"in-app-feed","name":"Channel 1","ref":"channel_1","template":{"action_url":"{{ vars.app_url }}","markdown_body":"Hello **{{ recipient.name }}**"},"type":"channel"}]}},"properties":{"workflow":{"$ref":"#/components/schemas/WorkflowRequest"}},"required":["workflow"],"title":"WrappedWorkflowRequestRequest","type":"object"}}},"description":"Params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"description":"Wraps the Workflow response under the `workflow` key.","example":{"workflow":{"active":false,"categories":["marketing","black-friday"],"conditions":{"all":[{"argument":"admin","operator":"equal_to","variable":"recipient.role"}]},"created_at":"2022-12-16T19:07:50.027113Z","description":"This is a dummy workflow for demo purposes.","environment":"development","key":"december-16-demo","name":"december-16-demo","settings":{"override_preferences":true},"sha":"f7e9d3b2a1c8e6m4k5j7h9g0i2l3n4p6q8r0t1u3v5w7x9y","steps":[{"channel_key":"in-app-feed","channel_type":"in_app_feed","description":"Main in-app feed","name":"In-app step","ref":"in_app_feed_1","template":{"action_url":"{{ data.onboarding_url }}","markdown_body":"Hello **{{ recipient.name }}**. Click here to get started."},"type":"channel"},{"ref":"delay_1","settings":{"delay_for":{"unit":"hours","value":1}},"type":"delay"},{"channel_key":"postmark","channel_type":"email","ref":"email_1","template":{"html_body":"<p>Hello, {{ recipient.name }}! Welcome to {{ vars.app_name }} <a href='{{ data.onboarding_url }}'>Get started here</a>.</p>","settings":{"layout_key":"default"},"subject":"Welcome to {{ vars.app_name }}!"},"type":"channel"}],"trigger_data_json_schema":{"properties":{"onboarding_url":{"type":"string"}},"required":["onboarding_url"],"type":"object"},"trigger_frequency":"every_trigger","updated_at":"2023-02-08T22:15:19.846681Z","valid":true}},"properties":{"workflow":{"$ref":"#/components/schemas/Workflow"}},"required":["workflow"],"title":"WrappedWorkflowResponse","type":"object"}}},"description":"OK"}},"summary":"Upsert a workflow","tags":["Workflows"]}},"/v1/branches/{branch_slug}":{"delete":{"callbacks":{},"description":"Deletes a branch by the `branch_slug`.","operationId":"deleteBranch","parameters":[{"description":"The environment slug.","in":"query","name":"environment","required":true,"schema":{"example":"development","type":"string"}},{"description":"The slug of the branch to delete.","in":"path","name":"branch_slug","required":true,"schema":{"example":"feature-branch","type":"string"}}],"responses":{"204":{"description":"No Content"}},"summary":"Delete a branch","tags":["Branches"]},"get":{"callbacks":{},"description":"Returns a single branch by the `branch_slug`.","operationId":"getBranch","parameters":[{"description":"The environment slug.","in":"query","name":"environment","required":true,"schema":{"example":"development","type":"string"}},{"description":"The slug of the branch to retrieve.","in":"path","name":"branch_slug","required":true,"schema":{"example":"feature-branch","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Branch"}}},"description":"OK"}},"summary":"Get a branch","tags":["Branches"]},"post":{"callbacks":{},"description":"Creates a new branch off of the development environment with the given slug.","operationId":"createBranch","parameters":[{"description":"The environment slug.","in":"query","name":"environment","required":true,"schema":{"example":"development","type":"string"}},{"description":"The slug for the new branch to create.","in":"path","name":"branch_slug","required":true,"schema":{"example":"feature-branch","type":"string"}}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Branch"}}},"description":"Created"}},"summary":"Create a branch","tags":["Branches"]}},"/v1/commits/promote":{"put":{"callbacks":{},"description":"Promote all changes across all resources to the target environment from its preceding environment.","operationId":"promoteAllCommits","parameters":[{"description":"A slug of the target environment to which you want to promote all changes from its directly preceding environment.\n\nFor example, if you have three environments “development”, “staging”, and “production” (in that order), setting this param to “production” will promote all commits not currently in production from staging.\n\nWhen this param is set to `\"development\"`, the `\"branch\"` param must be provided.\n","in":"query","name":"to_environment","required":true,"schema":{"type":"string"}},{"description":"The slug of the branch to promote all changes from.","in":"query","name":"branch","required":false,"schema":{"type":"string"}},{"description":"Filter commits to promote by resource type(s). Accepts a single type or array of types. Can be combined with resource_id to filter for specific resources.","in":"query","name":"resource_type","required":false,"schema":{"oneOf":[{"enum":["audience","email_layout","guide","message_type","partial","translation","workflow"],"type":"string"},{"items":{"enum":["audience","email_layout","guide","message_type","partial","translation","workflow"],"type":"string"},"type":"array"}]}},{"description":"Filter commits to promote by resource identifier. Must be used together with resource_type.","in":"query","name":"resource_id","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"description":"The response from promoting all changes.","example":{"result":"success"},"properties":{"result":{"description":"The result of the promote operation.","example":"success","type":"string"}},"required":["result"],"title":"PromoteAllResponse","type":"object"}}},"description":"OK"}},"summary":"Promote all changes","tags":["Commits"]}},"/v1/commits":{"get":{"callbacks":{},"description":"Returns a paginated list of commits in a given environment. The commits are ordered from most recent first.","operationId":"listCommits","parameters":[{"description":"The environment slug.","in":"query","name":"environment","required":true,"schema":{"example":"development","type":"string"}},{"description":"The slug of a branch to use. This option can only be used when `environment` is `\"development\"`.","in":"query","name":"branch","required":false,"schema":{"example":"feature-branch","type":"string"}},{"description":"Whether to show commits in the given environment that have not been promoted to the subsequent environment (false) or commits which have been promoted (true).","in":"query","name":"promoted","required":false,"schema":{"type":"boolean"}},{"description":"Filter commits by resource type(s). Accepts a single type or array of types. Can be combined with resource_id to filter for specific resources.","in":"query","name":"resource_type","required":false,"schema":{"oneOf":[{"enum":["audience","email_layout","guide","message_type","partial","translation","workflow"],"type":"string"},{"items":{"enum":["audience","email_layout","guide","message_type","partial","translation","workflow"],"type":"string"},"type":"array"}]}},{"description":"Filter commits by resource identifier. Must be used together with resource_type. For most resources, this will be the resource key. In the case of translations, this will be the locale code and namespace, separated by a `/`. For example, `en/courses` or `en`.","in":"query","name":"resource_id","required":false,"schema":{"type":"string"}},{"description":"The cursor to fetch entries after.","in":"query","name":"after","required":false,"schema":{"type":"string"}},{"description":"The cursor to fetch entries before.","in":"query","name":"before","required":false,"schema":{"type":"string"}},{"description":"The number of entries to fetch per-page.","in":"query","name":"limit","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"description":"A paginated list of Commit. Contains a list of entries and page information.","example":{"entries":[{"author":{"email":"john.doe@example.com","name":"John Doe"},"commit_message":"This is a commit message","created_at":"2021-01-01T00:00:00Z","environment":"development","id":"123e4567-e89b-12d3-a456-426614174000","resource":{"identifier":"my-email-layout","type":"email_layout"}}],"page_info":{"after":null,"before":null,"page_size":25}},"properties":{"entries":{"description":"A list of entries.","items":{"$ref":"#/components/schemas/Commit"},"nullable":false,"type":"array"},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["entries","page_info"],"title":"PaginatedCommitResponse","type":"object"}}},"description":"OK"}},"summary":"List commits","tags":["Commits"]},"put":{"callbacks":{},"description":"Commit all changes across all resources in the development environment.","operationId":"commitAllChanges","parameters":[{"description":"The environment slug.","in":"query","name":"environment","required":true,"schema":{"example":"development","type":"string"}},{"description":"The slug of a branch to use. This option can only be used when `environment` is `\"development\"`.","in":"query","name":"branch","required":false,"schema":{"example":"feature-branch","type":"string"}},{"description":"An optional message to include in a commit.","in":"query","name":"commit_message","required":false,"schema":{"type":"string"}},{"description":"Filter changes to commit by resource type(s). Accepts a single type or array of types. Can be combined with resource_id to filter for specific resources.","in":"query","name":"resource_type","required":false,"schema":{"oneOf":[{"enum":["audience","email_layout","guide","message_type","partial","translation","workflow"],"type":"string"},{"items":{"enum":["audience","email_layout","guide","message_type","partial","translation","workflow"],"type":"string"},"type":"array"}]}},{"description":"Filter changes to commit by resource identifier. Must be used together with resource_type.","in":"query","name":"resource_id","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"description":"The response from committing all changes.","example":{"result":"success"},"properties":{"result":{"description":"The result of the commit operation.","example":"success","type":"string"}},"required":["result"],"title":"CommitAllResponse","type":"object"}}},"description":"OK"}},"summary":"Commit all changes","tags":["Commits"]}},"/v1/audiences":{"get":{"callbacks":{},"description":"Returns a paginated list of audiences for the given environment.","operationId":"listAudiences","parameters":[{"description":"The environment slug.","in":"query","name":"environment","required":true,"schema":{"example":"development","type":"string"}},{"description":"The slug of a branch to use. This option can only be used when `environment` is `\"development\"`.","in":"query","name":"branch","required":false,"schema":{"example":"feature-branch","type":"string"}},{"description":"The cursor to fetch entries after.","in":"query","name":"after","required":false,"schema":{"type":"string"}},{"description":"The cursor to fetch entries before.","in":"query","name":"before","required":false,"schema":{"type":"string"}},{"description":"The number of entries to fetch per-page.","in":"query","name":"limit","required":false,"schema":{"type":"integer"}},{"description":"Whether to annotate the resource. Only used in the Knock CLI.","in":"query","name":"annotate","required":false,"schema":{"type":"boolean"}},{"description":"Whether to hide uncommitted changes. When true, only committed changes will be returned. When false, both committed and uncommitted changes will be returned.","in":"query","name":"hide_uncommitted_changes","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"description":"A paginated list of Audience. Contains a list of entries and page information.","example":{"entries":[{"created_at":"2024-01-15T10:30:00Z","description":"Customers who signed up in the last 30 days.","environment":"development","key":"new-customers","name":"New customers","segments":[{"conditions":[{"argument":"30_days_ago","operator":"greater_than","property":"recipient.created_at"}]}],"sha":"a1b2c3d4e5f6","type":"dynamic","updated_at":"2024-06-20T14:45:00Z"}],"page_info":{"after":null,"before":null,"page_size":25}},"properties":{"entries":{"description":"A list of entries.","items":{"$ref":"#/components/schemas/Audience"},"nullable":false,"type":"array"},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["entries","page_info"],"title":"PaginatedAudienceResponse","type":"object"}}},"description":"OK"}},"summary":"List audiences","tags":["Audiences"]}},"/v1/members":{"get":{"callbacks":{},"description":"Returns a paginated list of members for the current account. Optionally filter by role.","operationId":"listMembers","parameters":[{"description":"Filter members by role. One of: owner, admin, member, production_only_member, billing, support.","in":"query","name":"role","required":false,"schema":{"type":"string"}},{"description":"Filter members by email address (exact match).","in":"query","name":"email","required":false,"schema":{"type":"string"}},{"description":"The cursor to fetch entries after.","in":"query","name":"after","required":false,"schema":{"type":"string"}},{"description":"The cursor to fetch entries before.","in":"query","name":"before","required":false,"schema":{"type":"string"}},{"description":"The number of entries to fetch per-page.","in":"query","name":"limit","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"description":"A paginated list of Member. Contains a list of entries and page information.","example":{"entries":[{"created_at":"2024-01-15T10:30:00Z","id":"d4b8e8e0-1234-5678-9abc-def012345678","role":"admin","updated_at":"2024-06-20T14:45:00Z","user":{"avatar_url":"https://www.gravatar.com/avatar/abc123","created_at":"2024-01-10T08:00:00Z","email":"jane@example.com","id":"a1b2c3d4-5678-9abc-def0-123456789abc","name":"Jane Doe","updated_at":"2024-06-18T12:00:00Z"}}],"page_info":{"after":null,"before":null,"page_size":25}},"properties":{"entries":{"description":"A list of entries.","items":{"$ref":"#/components/schemas/Member"},"nullable":false,"type":"array"},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["entries","page_info"],"title":"PaginatedMemberResponse","type":"object"}}},"description":"OK"}},"summary":"List members","tags":["Members"]}},"/v1/api_keys/exchange":{"post":{"callbacks":{},"description":"Given an authenticated service token and an environment, will exchange the service token for a secret API key that can be used to make requests to the public API.","operationId":"exchangeForApiKey","parameters":[{"description":"The environment slug.","in":"query","name":"environment","required":true,"schema":{"example":"development","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"description":"Returns an API key that can be used to make requests to the public API.","example":{"api_key":"sk_1234567890"},"properties":{"api_key":{"description":"The secret API key exchanged from the service token.","type":"string"}},"required":["api_key"],"title":"ExchangeForApiKeyResponse","type":"object"}}},"description":"OK"}},"summary":"Exchange for API key","tags":["API keys"]}},"/v1/broadcasts/{broadcast_key}":{"get":{"callbacks":{},"description":"Get a broadcast by its key in a given environment.","operationId":"getBroadcast","parameters":[{"description":"The key of the broadcast to retrieve.","in":"path","name":"broadcast_key","required":true,"schema":{"type":"string"}},{"description":"The environment slug.","in":"query","name":"environment","required":true,"schema":{"example":"development","type":"string"}},{"description":"The slug of a branch to use. This option can only be used when `environment` is `\"development\"`.","in":"query","name":"branch","required":false,"schema":{"example":"feature-branch","type":"string"}},{"description":"Whether to annotate the resource. Only used in the Knock CLI.","in":"query","name":"annotate","required":false,"schema":{"type":"boolean"}},{"description":"Whether to hide uncommitted changes. When true, only committed changes will be returned. When false, both committed and uncommitted changes will be returned.","in":"query","name":"hide_uncommitted_changes","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Broadcast"}}},"description":"OK"}},"summary":"Get a broadcast","tags":["Broadcasts"]},"put":{"callbacks":{},"description":"Updates a broadcast of a given key, or creates a new one if it does not yet exist.\n","operationId":"upsertBroadcast","parameters":[{"description":"The key of the broadcast.","in":"path","name":"broadcast_key","required":true,"schema":{"type":"string"}},{"description":"The environment slug.","in":"query","name":"environment","required":true,"schema":{"example":"development","type":"string"}},{"description":"The slug of a branch to use. This option can only be used when `environment` is `\"development\"`.","in":"query","name":"branch","required":false,"schema":{"example":"feature-branch","type":"string"}},{"description":"Whether to annotate the resource. Only used in the Knock CLI.","in":"query","name":"annotate","required":false,"schema":{"type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"Wraps the BroadcastRequest request under the broadcast key.","example":{"broadcast":{"categories":["announcement"],"description":"A broadcast to all users","name":"My Broadcast","settings":{"is_commercial":true,"override_preferences":false},"steps":[{"channel_key":"in-app-feed","name":"Channel 1","ref":"channel_1","template":{"action_url":"{{ vars.app_url }}","markdown_body":"Hello **{{ recipient.name }}**"},"type":"channel"}],"target_audience_key":"all-users"}},"properties":{"broadcast":{"$ref":"#/components/schemas/BroadcastRequest"}},"required":["broadcast"],"title":"WrappedBroadcastRequestRequest","type":"object"}}},"description":"Params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"description":"Wraps the Broadcast response under the `broadcast` key.","example":{"broadcast":{"categories":["marketing","promotions"],"created_at":"2022-12-16T19:07:50.027113Z","description":"Holiday promotion broadcast for December","environment":"development","key":"december-promotion","name":"December Promotion","scheduled_at":null,"sent_at":null,"settings":{"is_commercial":true,"override_preferences":false},"sha":"f7e9d3b2a1c8e6m4k5j7h9g0i2l3n4p6q8r0t1u3v5w7x9y","status":"draft","steps":[{"channel_key":"in-app-feed","description":"Main in-app feed","name":"In-app step","ref":"in_app_feed_1","template":{"action_url":"{{ vars.app_url }}","markdown_body":"Hello **{{ recipient.name }}**"},"type":"channel"}],"target_audience_key":"premium-users","updated_at":"2023-02-08T22:15:19.846681Z","valid":true}},"properties":{"broadcast":{"$ref":"#/components/schemas/Broadcast"}},"required":["broadcast"],"title":"WrappedBroadcastResponse","type":"object"}}},"description":"OK"}},"summary":"Upsert a broadcast","tags":["Broadcasts"]}},"/v1/message_types":{"get":{"callbacks":{},"description":"Returns a paginated list of message types available in a given environment.","operationId":"listMessageTypes","parameters":[{"description":"The environment slug.","in":"query","name":"environment","required":true,"schema":{"example":"development","type":"string"}},{"description":"The slug of a branch to use. This option can only be used when `environment` is `\"development\"`.","in":"query","name":"branch","required":false,"schema":{"example":"feature-branch","type":"string"}},{"description":"Whether to annotate the resource. Only used in the Knock CLI.","in":"query","name":"annotate","required":false,"schema":{"type":"boolean"}},{"description":"Whether to hide uncommitted changes. When true, only committed changes will be returned. When false, both committed and uncommitted changes will be returned.","in":"query","name":"hide_uncommitted_changes","required":false,"schema":{"type":"boolean"}},{"description":"The cursor to fetch entries after.","in":"query","name":"after","required":false,"schema":{"type":"string"}},{"description":"The cursor to fetch entries before.","in":"query","name":"before","required":false,"schema":{"type":"string"}},{"description":"The number of entries to fetch per-page.","in":"query","name":"limit","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"description":"A paginated list of MessageType. Contains a list of entries and page information.","example":{"entries":[{"archived_at":null,"created_at":"2021-01-01T00:00:00Z","deleted_at":null,"description":"Email message type","environment":"development","icon_name":"email","key":"email","name":"Email","owner":"user","preview":"<div>Hello, world!</div>","semver":"1.0.0","sha":"1234567890","updated_at":"2021-01-01T00:00:00Z","valid":true,"variants":[{"fields":[{"key":"text_field","label":"My text field","settings":{"description":"A description of the text field","max_length":100,"min_length":10,"required":true},"type":"text"}],"key":"default","name":"Default"}]}],"page_info":{"after":null,"before":null,"page_size":25}},"properties":{"entries":{"description":"A list of entries.","items":{"$ref":"#/components/schemas/MessageType"},"nullable":false,"type":"array"},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["entries","page_info"],"title":"PaginatedMessageTypeResponse","type":"object"}}},"description":"OK"}},"summary":"List message types","tags":["Message types"]}},"/v1/channels/{channel_key}":{"get":{"callbacks":{},"description":"Returns a channel with all environment-specific settings. Secret values in provider settings are obfuscated unless they are Liquid templates (e.g., `{{ vars.api_key }}`).","operationId":"getChannel","parameters":[{"description":"The key of the channel to retrieve.","in":"path","name":"channel_key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Channel"}}},"description":"OK"}},"summary":"Get a channel","tags":["Channels"]}},"/v1/broadcasts/{broadcast_key}/cancel":{"put":{"callbacks":{},"description":"Cancels sending a scheduled broadcast. The broadcast will return to draft status.\n","operationId":"cancelBroadcast","parameters":[{"description":"The key of the broadcast.","in":"path","name":"broadcast_key","required":true,"schema":{"type":"string"}},{"description":"The environment slug.","in":"query","name":"environment","required":true,"schema":{"example":"development","type":"string"}},{"description":"The slug of a branch to use. This option can only be used when `environment` is `\"development\"`.","in":"query","name":"branch","required":false,"schema":{"example":"feature-branch","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"description":"Wraps the Broadcast response under the `broadcast` key.","example":{"broadcast":{"categories":["marketing","promotions"],"created_at":"2022-12-16T19:07:50.027113Z","description":"Holiday promotion broadcast for December","environment":"development","key":"december-promotion","name":"December Promotion","scheduled_at":null,"sent_at":null,"settings":{"is_commercial":true,"override_preferences":false},"sha":"f7e9d3b2a1c8e6m4k5j7h9g0i2l3n4p6q8r0t1u3v5w7x9y","status":"draft","steps":[{"channel_key":"in-app-feed","description":"Main in-app feed","name":"In-app step","ref":"in_app_feed_1","template":{"action_url":"{{ vars.app_url }}","markdown_body":"Hello **{{ recipient.name }}**"},"type":"channel"}],"target_audience_key":"premium-users","updated_at":"2023-02-08T22:15:19.846681Z","valid":true}},"properties":{"broadcast":{"$ref":"#/components/schemas/Broadcast"}},"required":["broadcast"],"title":"WrappedBroadcastResponse","type":"object"}}},"description":"OK"}},"summary":"Cancel a scheduled broadcast","tags":["Broadcasts"]}}},"security":[{"BearerAuth":[]}],"servers":[{"url":"https://control.knock.app","variables":{}}],"tags":[{"description":"Resources for managing your Knock account.","name":"Accounts"},{"description":"Workflows let you express your cross-channel notification logic.","name":"Workflows"},{"description":"Partials allow you to reuse content across templates.","name":"Partials"},{"description":"Commits are versioned changes to resources.","name":"Commits"},{"description":"Environments are isolated instances of your account that map to your infrastructure.","name":"Environments"},{"description":"Branches in Knock are a way to isolate changes to your Knock resources.","name":"Branches"},{"description":"Translations are per-locale string files that can be used in your templates.","name":"Translations"},{"description":"Email layouts wrap your email templates and provide a consistent look and feel.","name":"Email layouts"},{"description":"A message type allows you to specify an in-app schema that defines the fields available for your in-app notifications.","name":"Message types"},{"description":"Guides let you define in-app guides that can be displayed to users based on priority and other conditions.","name":"Guides"},{"description":"Audiences define sets of users that can be targeted for notifications.","name":"Audiences"}]}