diff --git a/data/specs/api/openapi.yml b/data/specs/api/openapi.yml index a2351759..fb5293e1 100644 --- a/data/specs/api/openapi.yml +++ b/data/specs/api/openapi.yml @@ -10,7 +10,7 @@ components: email: ian.malcolm@chaos.theory id: user_id name: Dr. Ian Malcolm - updated_at: "2024-05-22T12:00:00Z" + updated_at: '2024-05-22T12:00:00Z' page_info: __typename: PageInfo after: null @@ -129,7 +129,7 @@ components: description: A subscription object. example: __typename: Subscription - inserted_at: "2021-01-01T00:00:00Z" + inserted_at: '2021-01-01T00:00:00Z' object: __typename: Object collection: assets @@ -142,7 +142,7 @@ components: foo: bar name: Velociraptor status: contained - updated_at: "2024-05-22T12:00:00Z" + updated_at: '2024-05-22T12:00:00Z' recipient: __typename: User avatar: null @@ -152,8 +152,8 @@ components: name: Jane Doe phone_number: null timezone: null - updated_at: "2024-05-22T12:00:00Z" - updated_at: "2021-01-01T00:00:00Z" + updated_at: '2024-05-22T12:00:00Z' + updated_at: '2021-01-01T00:00:00Z' properties: __typename: description: The typename of the schema. @@ -163,7 +163,7 @@ components: x-validate: null inserted_at: description: Timestamp when the resource was created. - example: "2021-01-01T00:00:00Z" + example: '2021-01-01T00:00:00Z' format: date-time type: string x-struct: null @@ -181,7 +181,7 @@ components: $ref: '#/components/schemas/Recipient' updated_at: description: The timestamp when the resource was last updated. - example: "2021-01-01T00:00:00Z" + example: '2021-01-01T00:00:00Z' format: date-time type: string x-struct: null @@ -233,7 +233,9 @@ components: - nullable: true x-struct: null x-validate: null - description: An object where the key is the channel type and the values are the preference settings for that channel type. + description: >- + An object where the key is the channel type and the values are the preference settings for that + channel type. x-struct: null x-validate: null conditions: @@ -315,24 +317,36 @@ components: - nullable: true x-struct: null x-validate: null - description: A map of properties describing a user or an object to identify in Knock and mark as who or what performed the action. + description: >- + A map of properties describing a user or an object to identify in Knock and mark as who or what + performed the action. x-struct: null x-validate: null cancellation_key: - description: An optional key that is used to reference a specific workflow trigger request when issuing a [workflow cancellation](/send-notifications/canceling-workflows) request. Must be provided while triggering a workflow in order to enable subsequent cancellation. Should be unique across trigger requests to avoid unintentional cancellations. + description: >- + An optional key that is used to reference a specific workflow trigger request when issuing a + [workflow cancellation](/send-notifications/canceling-workflows) request. Must be provided while + triggering a workflow in order to enable subsequent cancellation. Should be unique across trigger + requests to avoid unintentional cancellations. nullable: true type: string x-struct: null x-validate: null data: additionalProperties: true - description: An optional map of data to pass into the workflow execution. There is a 1024 byte limit on the size of any single string value (with the exception of [email attachments](/integrations/email/attachments)), and a 10MB limit on the size of the full `data` payload. + description: >- + An optional map of data to pass into the workflow execution. There is a 1024 byte limit on the + size of any single string value (with the exception of [email + attachments](/integrations/email/attachments)), and a 10MB limit on the size of the full `data` + payload. nullable: true type: object x-struct: null x-validate: null recipients: - description: The recipients to trigger the workflow for. Can inline identify users, objects, or use a list of user IDs. Limited to 1,000 recipients. + description: >- + The recipients to trigger the workflow for. Can inline identify users, objects, or use a list of + user IDs. Limited to 1,000 recipients. items: $ref: '#/components/schemas/RecipientRequest' type: array @@ -344,7 +358,10 @@ components: - nullable: true x-struct: null x-validate: null - description: The tenant to trigger the workflow for. Triggering with a tenant will use any tenant-level overrides associated with the tenant object, and all messages produced from workflow runs will be tagged with the tenant. + description: >- + The tenant to trigger the workflow for. Triggering with a tenant will use any tenant-level + overrides associated with the tenant object, and all messages produced from workflow runs will be + tagged with the tenant. x-struct: null x-validate: null required: @@ -378,7 +395,9 @@ components: InlinePreferenceSetRequest: additionalProperties: $ref: '#/components/schemas/PreferenceSetRequest' - description: Inline set preferences for a recipient, where the key is the preference set id. Preferences that are set inline will be merged into any existing preferences rather than replacing them. + description: >- + Inline set preferences for a recipient, where the key is the preference set id. Preferences that are + set inline will be merged into any existing preferences rather than replacing them. example: default: categories: @@ -397,9 +416,11 @@ components: __typename: MessageContent data: __typename: MessageSmsContent - body: 'URGENT: Power failure detected in perimeter fencing. Backup generators failed to engage. Technical team dispatched. Maintain lockdown protocols.' - to: "+15553982647" - inserted_at: "1993-06-11T20:30:00Z" + body: >- + URGENT: Power failure detected in perimeter fencing. Backup generators failed to engage. Technical + team dispatched. Maintain lockdown protocols. + to: '+15553982647' + inserted_at: '1993-06-11T20:30:00Z' message_id: 2w3YUpTTOxuDvZFji8OMsKrG176 properties: __typename: @@ -423,7 +444,7 @@ components: x-validate: null inserted_at: description: Timestamp when the message content was created. - example: "2021-01-01T00:00:00Z" + example: '2021-01-01T00:00:00Z' format: date-time nullable: false type: string @@ -450,7 +471,7 @@ components: example: entries: - __typename: AudienceMember - added_at: "1993-06-10T14:30:00Z" + added_at: '1993-06-10T14:30:00Z' tenant: ingen_isla_nublar user: __typename: User @@ -458,7 +479,7 @@ components: email: alan.grant@dig.site.mt id: dr_grant name: Dr. Alan Grant - updated_at: "1993-06-09T08:15:00Z" + updated_at: '1993-06-09T08:15:00Z' user_id: dr_grant page_info: __typename: PageInfo @@ -510,18 +531,27 @@ components: bcc: security@ingen.net cc: operations@isla-nublar.com from: welcome@isla-nublar.com - html_body:

Welcome to Isla Nublar

Dear visitor,

We're excited to confirm your upcoming tour of our biological preserve. Your safety is our primary concern.

Please review the safety protocols before arrival.

Remember: All specimens are accounted for and contained.

+ html_body: >- +

Welcome to Isla Nublar

Dear visitor,

We're excited to confirm your upcoming tour of + our biological preserve. Your safety is our primary concern.

Please review the safety protocols before + arrival.

Remember: All specimens are accounted for and contained.

reply_to: visitor.center@isla-nublar.com subject_line: 'Tour Confirmation: Isla Nublar Biological Preserve' - text_body: |- + text_body: >- Welcome to Isla Nublar + Dear visitor, - We're excited to confirm your upcoming tour of our biological preserve. Your safety is our primary concern. + + We're excited to confirm your upcoming tour of our biological preserve. Your safety is our primary + concern. + Please review the safety protocols before arrival: https://example.com/safety + Remember: All specimens are accounted for and contained. to: dr.grant@dig.site.mt properties: @@ -690,12 +720,14 @@ components: x-struct: Elixir.SwitchboardWeb.V1.Specs.PreferenceSetChannelTypes x-validate: null MessageEvent: - description: A message event. Occurs when a message [delivery or engagement status](/send-notifications/message-statuses) changes. + description: >- + A message event. Occurs when a message [delivery or engagement + status](/send-notifications/message-statuses) changes. example: __typename: MessageEvent data: null id: 2FVHPWxRqNuXQ9krvNP5A6Z4qXe - inserted_at: "2021-01-01T00:00:00Z" + inserted_at: '2021-01-01T00:00:00Z' recipient: user_123 type: message.sent properties: @@ -720,7 +752,7 @@ components: x-validate: null inserted_at: description: Timestamp when the event was created. - example: "2021-01-01T00:00:00Z" + example: '2021-01-01T00:00:00Z' format: date-time type: string x-struct: null @@ -782,7 +814,7 @@ components: body: Limited spots available for today's behind-the-scenes DNA extraction demonstration. title: DNA Lab Tour Available data: - next_time: 14:30 + next_time: '14:30' spots_left: 8 tour_id: dna_lab_tour guide_id: 7e9dc78c-b3b1-4127-a54e-71f1899b831a @@ -876,7 +908,9 @@ components: x-struct: null x-validate: null recipients: - description: The recipients of the subscription. You can subscribe up to 100 recipients to an object at a time. + description: >- + The recipients of the subscription. You can subscribe up to 100 recipients to an object at a + time. items: $ref: '#/components/schemas/RecipientRequest' type: array @@ -904,7 +938,7 @@ components: actor: null data: null id: 123e4567-e89b-12d3-a456-426614174000 - inserted_at: "2021-01-01T00:00:00Z" + inserted_at: '2021-01-01T00:00:00Z' last_occurrence_at: null next_occurrence_at: null recipient: @@ -916,7 +950,7 @@ components: name: Jane Doe phone_number: null timezone: null - updated_at: "2024-05-22T12:00:00Z" + updated_at: '2024-05-22T12:00:00Z' repeats: - __typename: ScheduleRepeat day_of_month: null @@ -933,7 +967,7 @@ components: interval: 1 minutes: null tenant: null - updated_at: "2021-01-01T00:00:00Z" + updated_at: '2021-01-01T00:00:00Z' workflow: workflow_123 page_info: __typename: PageInfo @@ -1089,9 +1123,11 @@ components: - __typename: MessageContent data: __typename: MessageSmsContent - body: 'URGENT: Power failure detected in perimeter fencing. Backup generators failed to engage. Technical team dispatched. Maintain lockdown protocols.' - to: "+15553982647" - inserted_at: "1993-06-11T20:30:00Z" + body: >- + URGENT: Power failure detected in perimeter fencing. Backup generators failed to engage. + Technical team dispatched. Maintain lockdown protocols. + to: '+15553982647' + inserted_at: '1993-06-11T20:30:00Z' message_id: 2w3YUpTTOxuDvZFji8OMsKrG176 items: $ref: '#/components/schemas/MessageContents' @@ -1103,7 +1139,7 @@ components: description: Discord channel data. example: connections: - - channel_id: "123456789012345678" + - channel_id: '123456789012345678' properties: connections: description: List of Discord channel connections. @@ -1153,7 +1189,7 @@ components: example: entries: - __typename: Subscription - inserted_at: "2021-01-01T00:00:00Z" + inserted_at: '2021-01-01T00:00:00Z' object: __typename: Object collection: assets @@ -1166,7 +1202,7 @@ components: foo: bar name: Velociraptor status: contained - updated_at: "2024-05-22T12:00:00Z" + updated_at: '2024-05-22T12:00:00Z' recipient: __typename: User avatar: null @@ -1176,8 +1212,8 @@ components: name: Jane Doe phone_number: null timezone: null - updated_at: "2024-05-22T12:00:00Z" - updated_at: "2021-01-01T00:00:00Z" + updated_at: '2024-05-22T12:00:00Z' + updated_at: '2021-01-01T00:00:00Z' page_info: __typename: PageInfo after: null @@ -1374,7 +1410,7 @@ components: preferences: $ref: '#/components/schemas/InlinePreferenceSetRequest' timezone: - description: The timezone of the object. Must be a valid [tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). Used for [recurring schedules](/concepts/schedules#scheduling-workflows-with-recurring-schedules-for-recipients). + description: "The timezone of the object. Must be a valid\_[tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). Used for\_[recurring schedules](/concepts/schedules#scheduling-workflows-with-recurring-schedules-for-recipients)." nullable: true type: string x-struct: null @@ -1605,7 +1641,9 @@ components: name: My project properties: channel_data: - description: An optional set of [channel data](/managing-recipients/setting-channel-data) for the object. This is a list of `ChannelData` objects. + description: >- + An optional set of [channel data](/managing-recipients/setting-channel-data) for the object. This + is a list of `ChannelData` objects. oneOf: - $ref: '#/components/schemas/InlineChannelDataRequest' - nullable: true @@ -1812,7 +1850,9 @@ components: x-struct: Elixir.SwitchboardWeb.V1.Specs.MessagePushContent x-validate: null PreferenceSet: - description: A preference set represents a specific set of notification preferences for a recipient. A recipient can have multiple preference sets. + description: >- + A preference set represents a specific set of notification preferences for a recipient. A recipient + can have multiple preference sets. example: categories: marketing: false @@ -1834,7 +1874,9 @@ components: anyOf: - additionalProperties: $ref: '#/components/schemas/PreferenceSetWorkflowCategorySetting' - description: An object where the key is the category and the values are the preference settings for that category. + description: >- + An object where the key is the category and the values are the preference settings for that + category. example: marketing: channel_types: @@ -1846,7 +1888,9 @@ components: - nullable: true x-struct: null x-validate: null - description: An object where the key is the category and the values are the preference settings for that category. + description: >- + An object where the key is the category and the values are the preference settings for that + category. x-struct: null x-validate: null channel_types: @@ -1855,7 +1899,9 @@ components: - nullable: true x-struct: null x-validate: null - description: An object where the key is the channel type and the values are the preference settings for that channel type. + description: >- + An object where the key is the channel type and the values are the preference settings for that + channel type. x-struct: null x-validate: null id: @@ -1868,7 +1914,9 @@ components: anyOf: - additionalProperties: $ref: '#/components/schemas/PreferenceSetWorkflowCategorySetting' - description: An object where the key is the workflow key and the values are the preference settings for that workflow. + description: >- + An object where the key is the workflow key and the values are the preference settings for + that workflow. example: dinosaurs-loose: channel_types: @@ -1880,7 +1928,9 @@ components: - nullable: true x-struct: null x-validate: null - description: An object where the key is the workflow key and the values are the preference settings for that workflow. + description: >- + An object where the key is the workflow key and the values are the preference settings for that + workflow. x-struct: null x-validate: null required: @@ -2011,7 +2061,9 @@ components: workflow: comment-created properties: actor: - description: A map of properties describing a user or an object to identify in Knock and mark as who or what performed the action. + description: >- + A map of properties describing a user or an object to identify in Knock and mark as who or what + performed the action. oneOf: - $ref: '#/components/schemas/RecipientRequest' - nullable: true @@ -2022,7 +2074,11 @@ components: x-validate: null data: additionalProperties: true - description: An optional map of data to pass into the workflow execution. There is a 1024 byte limit on the size of any single string value (with the exception of [email attachments](/integrations/email/attachments)), and a 10MB limit on the size of the full `data` payload. + description: >- + An optional map of data to pass into the workflow execution. There is a 1024 byte limit on the + size of any single string value (with the exception of [email + attachments](/integrations/email/attachments)), and a 10MB limit on the size of the full `data` + payload. nullable: true type: object x-struct: null @@ -2061,7 +2117,10 @@ components: - nullable: true x-struct: null x-validate: null - description: The tenant to trigger the workflow for. Triggering with a tenant will use any tenant-level overrides associated with the tenant object, and all messages produced from workflow runs will be tagged with the tenant. + description: >- + The tenant to trigger the workflow for. Triggering with a tenant will use any tenant-level + overrides associated with the tenant object, and all messages produced from workflow runs will be + tagged with the tenant. x-struct: null x-validate: null workflow: @@ -2078,12 +2137,14 @@ components: x-struct: Elixir.SwitchboardWeb.V1.Specs.CreateSchedulesRequest x-validate: null MessageDeliveryLog: - description: A message delivery log contains a `request` from Knock to a downstream provider and the `response` that was returned. + description: >- + A message delivery log contains a `request` from Knock to a downstream provider and the `response` + that was returned. example: __typename: MessageDeliveryLog environment_id: 123e4567-e89b-12d3-a456-426614174000 id: 2FVHPWxRqNuXQ9krvNP5A6Z4qXe - inserted_at: "2021-01-01T00:00:00Z" + inserted_at: '2021-01-01T00:00:00Z' request: body: html_content: @@ -2092,7 +2153,7 @@ components: host: localhost method: GET path: / - query: ?foo=bar + query: '?foo=bar' response: body: success: true @@ -2125,7 +2186,7 @@ components: x-validate: null inserted_at: description: Timestamp when the message delivery log was created. - example: "2021-01-01T00:00:00Z" + example: '2021-01-01T00:00:00Z' nullable: false type: string x-struct: null @@ -2168,7 +2229,7 @@ components: foo: bar name: Velociraptor status: contained - updated_at: "2024-05-22T12:00:00Z" + updated_at: '2024-05-22T12:00:00Z' page_info: __typename: PageInfo after: null @@ -2218,7 +2279,9 @@ components: PreferenceSetRequestWorkflows: additionalProperties: $ref: '#/components/schemas/PreferenceSetWorkflowCategorySetting' - description: An object where the key is the workflow key and the values are the preference settings for that workflow. + description: >- + An object where the key is the workflow key and the values are the preference settings for that + workflow. example: dinosaurs-loose: channel_types: @@ -2251,7 +2314,9 @@ components: - nullable: true x-struct: null x-validate: null - description: An object where the key is the channel type and the values are the preference settings for that channel type. + description: >- + An object where the key is the channel type and the values are the preference settings for + that channel type. x-struct: null x-validate: null conditions: @@ -2280,7 +2345,7 @@ components: data: foo: bar id: 2FVHPWxRqNuXQ9krvNP5A6Z4qXe - inserted_at: "2024-01-01T00:00:00Z" + inserted_at: '2024-01-01T00:00:00Z' recipient: __typename: User avatar: null @@ -2290,8 +2355,8 @@ components: name: Jane Doe phone_number: null timezone: null - updated_at: "2024-05-22T12:00:00Z" - updated_at: "2024-01-01T00:00:00Z" + updated_at: '2024-05-22T12:00:00Z' + updated_at: '2024-01-01T00:00:00Z' actors: - __typename: User avatar: null @@ -2301,7 +2366,7 @@ components: name: Jane Doe phone_number: null timezone: null - updated_at: "2024-05-22T12:00:00Z" + updated_at: '2024-05-22T12:00:00Z' blocks: - content: This is a message in an app feed name: body @@ -2310,7 +2375,7 @@ components: data: foo: bar id: 2FVHPWxRqNuXQ9krvNP5A6Z4qXe - inserted_at: "2021-01-01T00:00:00Z" + inserted_at: '2021-01-01T00:00:00Z' source: __typename: Workflow categories: @@ -2320,7 +2385,7 @@ components: tenant: acme_corp total_activities: 10 total_actors: 5 - updated_at: "2021-01-01T00:00:00Z" + updated_at: '2021-01-01T00:00:00Z' properties: __typename: description: The typename of the schema. @@ -2550,14 +2615,22 @@ components: actor: $ref: '#/components/schemas/RecipientReference' cancellation_key: - description: An optional key that is used to reference a specific workflow trigger request when issuing a [workflow cancellation](/send-notifications/canceling-workflows) request. Must be provided while triggering a workflow in order to enable subsequent cancellation. Should be unique across trigger requests to avoid unintentional cancellations. + description: >- + An optional key that is used to reference a specific workflow trigger request when issuing a + [workflow cancellation](/send-notifications/canceling-workflows) request. Must be provided while + triggering a workflow in order to enable subsequent cancellation. Should be unique across trigger + requests to avoid unintentional cancellations. nullable: true type: string x-struct: null x-validate: null data: additionalProperties: true - description: An optional map of data to pass into the workflow execution. There is a 1024 byte limit on the size of any single string value (with the exception of [email attachments](/integrations/email/attachments)), and a 10MB limit on the size of the full `data` payload. + description: >- + An optional map of data to pass into the workflow execution. There is a 1024 byte limit on the + size of any single string value (with the exception of [email + attachments](/integrations/email/attachments)), and a 10MB limit on the size of the full `data` + payload. nullable: true type: object x-struct: null @@ -2589,7 +2662,7 @@ components: - __typename: MessageDeliveryLog environment_id: 123e4567-e89b-12d3-a456-426614174000 id: 2FVHPWxRqNuXQ9krvNP5A6Z4qXe - inserted_at: "2021-01-01T00:00:00Z" + inserted_at: '2021-01-01T00:00:00Z' request: body: html_content: @@ -2598,7 +2671,7 @@ components: host: localhost method: GET path: / - query: ?foo=bar + query: '?foo=bar' response: body: success: true @@ -2613,7 +2686,9 @@ components: page_size: 25 properties: items: - description: Returns a paginated list of delivery logs from the downstream provider for the specified message. For Knock in-app channels, the delivery logs will always be an empty list. + description: >- + Returns a paginated list of delivery logs from the downstream provider for the specified message. + For Knock in-app channels, the delivery logs will always be an empty list. items: $ref: '#/components/schemas/MessageDeliveryLog' type: array @@ -2687,7 +2762,10 @@ components: x-struct: Elixir.SwitchboardWeb.V1.Specs.ListTenantsResponse x-validate: null ListActivitiesResponse: - description: Returns a paginated list of `activities` associated with a given message. For messages produced after a [batch step](/designing-workflows/batch-function), this will contain one or more activities. Non-batched messages will always return a single activity. + description: >- + Returns a paginated list of `activities` associated with a given message. For messages produced after + a [batch step](/designing-workflows/batch-function), this will contain one or more activities. + Non-batched messages will always return a single activity. example: items: - __typename: Activity @@ -2695,7 +2773,7 @@ components: data: foo: bar id: 2FVHPWxRqNuXQ9krvNP5A6Z4qXe - inserted_at: "2024-01-01T00:00:00Z" + inserted_at: '2024-01-01T00:00:00Z' recipient: __typename: User avatar: null @@ -2705,8 +2783,8 @@ components: name: Jane Doe phone_number: null timezone: null - updated_at: "2024-05-22T12:00:00Z" - updated_at: "2024-01-01T00:00:00Z" + updated_at: '2024-05-22T12:00:00Z' + updated_at: '2024-01-01T00:00:00Z' page_info: __typename: PageInfo after: null @@ -2760,7 +2838,7 @@ components: name: Jane Doe phone_number: null timezone: null - updated_at: "2024-05-22T12:00:00Z" + updated_at: '2024-05-22T12:00:00Z' oneOf: - $ref: '#/components/schemas/User' - $ref: '#/components/schemas/Object' @@ -2904,7 +2982,7 @@ components: data: foo: bar id: 2FVHPWxRqNuXQ9krvNP5A6Z4qXe - inserted_at: "2024-01-01T00:00:00Z" + inserted_at: '2024-01-01T00:00:00Z' recipient: __typename: User avatar: null @@ -2914,8 +2992,8 @@ components: name: Jane Doe phone_number: null timezone: null - updated_at: "2024-05-22T12:00:00Z" - updated_at: "2024-01-01T00:00:00Z" + updated_at: '2024-05-22T12:00:00Z' + updated_at: '2024-01-01T00:00:00Z' actors: - __typename: User avatar: null @@ -2925,7 +3003,7 @@ components: name: Jane Doe phone_number: null timezone: null - updated_at: "2024-05-22T12:00:00Z" + updated_at: '2024-05-22T12:00:00Z' blocks: - content: This is a message in an app feed name: body @@ -2934,7 +3012,7 @@ components: data: foo: bar id: 2FVHPWxRqNuXQ9krvNP5A6Z4qXe - inserted_at: "2021-01-01T00:00:00Z" + inserted_at: '2021-01-01T00:00:00Z' source: __typename: Workflow categories: @@ -2944,7 +3022,7 @@ components: tenant: acme_corp total_activities: 10 total_actors: 5 - updated_at: "2021-01-01T00:00:00Z" + updated_at: '2021-01-01T00:00:00Z' meta: __typename: FeedMetadata total_count: 100 @@ -3024,7 +3102,10 @@ components: x-struct: Elixir.SwitchboardWeb.V1.Specs.UserInAppFeedResponse x-validate: null RecipientRequest: - description: Specifies a recipient in a request. This can either be a user identifier (string), an inline user request (object), or an inline object request, which is determined by the presence of a `collection` property. + description: >- + Specifies a recipient in a request. This can either be a user identifier (string), an inline user + request (object), or an inline object request, which is determined by the presence of a `collection` + property. example: id: user_1 nullable: false @@ -3074,7 +3155,9 @@ components: x-validate: null IdentifyUserRequest: additionalProperties: true - description: A set of parameters to identify a user with. Does not include the user ID, as that's specified elsewhere in the request. You can supply any additional properties you'd like to upsert for the user. + description: >- + A set of parameters to identify a user with. Does not include the user ID, as that's specified + elsewhere in the request. You can supply any additional properties you'd like to upsert for the user. example: channel_data: 97c5837d-c65c-4d54-aa39-080eeb81c69d: @@ -3131,7 +3214,7 @@ components: x-struct: null x-validate: null phone_number: - description: The [E.164](https://www.twilio.com/docs/glossary/what-e164) phone number of the user (required for SMS channels). + description: "The\_[E.164](https://www.twilio.com/docs/glossary/what-e164)\_phone number of the user (required for SMS channels)." nullable: true type: string x-struct: null @@ -3144,7 +3227,7 @@ components: x-struct: null x-validate: null timezone: - description: The timezone of the user. Must be a valid [tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). Used for [recurring schedules](/concepts/schedules#scheduling-workflows-with-recurring-schedules-for-recipients). + description: "The timezone of the user. Must be a valid\_[tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). Used for\_[recurring schedules](/concepts/schedules#scheduling-workflows-with-recurring-schedules-for-recipients)." nullable: true type: string x-struct: null @@ -3271,7 +3354,7 @@ components: foo: bar name: Velociraptor status: contained - updated_at: "2024-05-22T12:00:00Z" + updated_at: '2024-05-22T12:00:00Z' properties: __typename: description: The typename of the schema. @@ -3365,7 +3448,7 @@ components: recipient: description: The recipient of the guide. oneOf: - - type: "null" + - type: 'null' x-struct: null x-validate: null - description: The recipient of the guide. @@ -3454,17 +3537,17 @@ components: - read - seen id: 2w3YUpTTOxuDvZFji8OMsKrG176 - inserted_at: "1993-06-11T21:15:00Z" + inserted_at: '1993-06-11T21:15:00Z' interacted_at: null link_clicked_at: null metadata: incident_id: shutdown-june-1993 initiated_by: ray_arnold priority: critical - read_at: "1993-06-11T21:30:00Z" + read_at: '1993-06-11T21:30:00Z' recipients: dr_grant scheduled_at: null - seen_at: "1993-06-11T21:29:45Z" + seen_at: '1993-06-11T21:29:45Z' source: __typename: Workflow categories: @@ -3474,7 +3557,7 @@ components: version_id: 123e4567-e89b-12d3-a456-426614174000 status: sent tenant: ingen_isla_nublar - updated_at: "1993-06-11T21:30:05Z" + updated_at: '1993-06-11T21:30:05Z' workflow: security-breach-alert page_info: __typename: PageInfo @@ -3542,14 +3625,17 @@ components: x-validate: null User: additionalProperties: true - description: A [User](/concepts/users) represents an individual in your system who can receive notifications through Knock. Users are the most common recipients of notifications and are always referenced by your internal identifier. + description: >- + A [User](/concepts/users) represents an individual in your system who can receive notifications + through Knock. Users are the most common recipients of notifications and are always referenced by your + internal identifier. example: __typename: User created_at: null email: ian.malcolm@chaos.theory id: user_id name: Dr. Ian Malcolm - updated_at: "2024-05-22T12:00:00Z" + updated_at: '2024-05-22T12:00:00Z' properties: __typename: description: The typename of the schema. @@ -3588,13 +3674,13 @@ components: x-struct: null x-validate: null phone_number: - description: The [E.164](https://www.twilio.com/docs/glossary/what-e164) phone number of the user (required for SMS channels). + description: "The\_[E.164](https://www.twilio.com/docs/glossary/what-e164)\_phone number of the user (required for SMS channels)." nullable: true type: string x-struct: null x-validate: null timezone: - description: The timezone of the user. Must be a valid [tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). Used for [recurring schedules](/concepts/schedules#scheduling-workflows-with-recurring-schedules-for-recipients). + description: "The timezone of the user. Must be a valid\_[tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). Used for\_[recurring schedules](/concepts/schedules#scheduling-workflows-with-recurring-schedules-for-recipients)." nullable: true type: string x-struct: null @@ -3621,7 +3707,9 @@ components: name: My project properties: channel_data: - description: An optional set of [channel data](/managing-recipients/setting-channel-data) for the object. This is a list of `ChannelData` objects. + description: >- + An optional set of [channel data](/managing-recipients/setting-channel-data) for the object. This + is a list of `ChannelData` objects. oneOf: - $ref: '#/components/schemas/InlineChannelDataRequest' - nullable: true @@ -3685,7 +3773,9 @@ components: tenant: acme_corp properties: actor: - description: A map of properties describing a user or an object to identify in Knock and mark as who or what performed the action. + description: >- + A map of properties describing a user or an object to identify in Knock and mark as who or what + performed the action. oneOf: - $ref: '#/components/schemas/RecipientReference' - nullable: true @@ -3695,7 +3785,11 @@ components: x-validate: null data: additionalProperties: true - description: An optional map of data to pass into the workflow execution. There is a 1024 byte limit on the size of any single string value (with the exception of [email attachments](/integrations/email/attachments)), and a 10MB limit on the size of the full `data` payload. + description: >- + An optional map of data to pass into the workflow execution. There is a 1024 byte limit on the + size of any single string value (with the exception of [email + attachments](/integrations/email/attachments)), and a 10MB limit on the size of the full `data` + payload. nullable: true type: object x-struct: null @@ -3738,7 +3832,10 @@ components: - nullable: true x-struct: null x-validate: null - description: The tenant to trigger the workflow for. Triggering with a tenant will use any tenant-level overrides associated with the tenant object, and all messages produced from workflow runs will be tagged with the tenant. + description: >- + The tenant to trigger the workflow for. Triggering with a tenant will use any tenant-level + overrides associated with the tenant object, and all messages produced from workflow runs will be + tagged with the tenant. x-struct: null x-validate: null required: @@ -3751,7 +3848,7 @@ components: description: An audience member. example: __typename: AudienceMember - added_at: "1993-06-10T14:30:00Z" + added_at: '1993-06-10T14:30:00Z' tenant: ingen_isla_nublar user: __typename: User @@ -3759,7 +3856,7 @@ components: email: alan.grant@dig.site.mt id: dr_grant name: Dr. Alan Grant - updated_at: "1993-06-09T08:15:00Z" + updated_at: '1993-06-09T08:15:00Z' user_id: dr_grant properties: __typename: @@ -3770,7 +3867,7 @@ components: x-validate: null added_at: description: Timestamp when the resource was created. - example: "2025-01-01T00:00:00Z" + example: '2025-01-01T00:00:00Z' format: date-time type: string x-struct: null @@ -3803,8 +3900,10 @@ components: description: The content of an SMS message. example: __typename: MessageSmsContent - body: 'ALERT: Security systems offline in Sector B. Evacuate immediately. Proceed to emergency bunker. DO NOT attempt to approach the paddocks. Response team dispatched.' - to: "+15553982647" + body: >- + ALERT: Security systems offline in Sector B. Evacuate immediately. Proceed to emergency bunker. DO + NOT attempt to approach the paddocks. Response team dispatched. + to: '+15553982647' properties: __typename: description: The typename of the schema. @@ -3848,7 +3947,9 @@ components: PreferenceSetWorkflows: additionalProperties: $ref: '#/components/schemas/PreferenceSetWorkflowCategorySetting' - description: An object where the key is the workflow key and the values are the preference settings for that workflow. + description: >- + An object where the key is the workflow key and the values are the preference settings for that + workflow. example: dinosaurs-loose: channel_types: @@ -3908,14 +4009,19 @@ components: x-struct: Elixir.SwitchboardWeb.V1.Specs.SlackChannelData x-validate: null BulkUpdateMessagesForChannelRequest: - description: Updates message statuses in a specified channel. Use the `channel_id` parameter to target the channel and the `status` parameter to define what the status should be changed to (e.g. `archive`, `unarchive`). Apply to all messages or use filters to target a subset. For in-app channels, messages can be updated indefinitely via this operation. For all other channel types, messages outside the account's retention window will not be updated as part of this operation. + description: >- + Updates message statuses in a specified channel. Use the `channel_id` parameter to target the channel + and the `status` parameter to define what the status should be changed to (e.g. `archive`, + `unarchive`). Apply to all messages or use filters to target a subset. For in-app channels, messages + can be updated indefinitely via this operation. For all other channel types, messages outside the + account's retention window will not be updated as part of this operation. example: archived: include delivery_status: delivered engagement_status: seen has_tenant: true - newer_than: "2024-01-01T00:00:00Z" - older_than: "2024-01-01T00:00:00Z" + newer_than: '2024-01-01T00:00:00Z' + older_than: '2024-01-01T00:00:00Z' recipient_ids: - recipient1 - recipient2 @@ -3999,7 +4105,9 @@ components: x-struct: null x-validate: null trigger_data: - description: Limits the results to only messages that were generated with the given data. See [trigger data filtering](/api-reference/overview/trigger-data-filtering) for more information. + description: >- + Limits the results to only messages that were generated with the given data. See [trigger data + filtering](/api-reference/overview/trigger-data-filtering) for more information. type: string x-struct: null x-validate: null @@ -4018,7 +4126,7 @@ components: x-validate: null EmptyContentResponse: description: A `204 No Content` response. - example: "" + example: '' title: EmptyContentResponse type: string x-struct: Elixir.SwitchboardWeb.V1.Specs.EmptyContentResponse @@ -4036,7 +4144,7 @@ components: engagement_statuses: - seen id: 1jNaXzB2RZX3LY8wVQnfCKyPnv7 - inserted_at: "2021-01-01T00:00:00Z" + inserted_at: '2021-01-01T00:00:00Z' interacted_at: null link_clicked_at: null metadata: @@ -4044,7 +4152,7 @@ components: read_at: null recipient: user_123 scheduled_at: null - seen_at: "2025-01-01T00:01:00Z" + seen_at: '2025-01-01T00:01:00Z' source: __typename: NotificationSource categories: @@ -4053,7 +4161,7 @@ components: version_id: 123e4567-e89b-12d3-a456-426614174000 status: sent tenant: tenant_123 - updated_at: "2021-01-01T00:00:00Z" + updated_at: '2021-01-01T00:00:00Z' workflow: comment-created items: allOf: @@ -4069,7 +4177,7 @@ components: engagement_statuses: - seen id: 1jNaXzB2RZX3LY8wVQnfCKyPnv7 - inserted_at: "2021-01-01T00:00:00Z" + inserted_at: '2021-01-01T00:00:00Z' interacted_at: null link_clicked_at: null metadata: @@ -4077,7 +4185,7 @@ components: read_at: null recipient: user_123 scheduled_at: null - seen_at: "2025-01-01T00:01:00Z" + seen_at: '2025-01-01T00:01:00Z' source: __typename: NotificationSource categories: @@ -4086,7 +4194,7 @@ components: version_id: 123e4567-e89b-12d3-a456-426614174000 status: sent tenant: tenant_123 - updated_at: "2021-01-01T00:00:00Z" + updated_at: '2021-01-01T00:00:00Z' workflow: comment-created x-struct: null x-validate: null @@ -4095,14 +4203,17 @@ components: x-struct: null x-validate: null Activity: - description: An activity associated with a workflow trigger request. Messages produced after a [batch step](/designing-workflows/batch-function) can be associated with one or more activities. Non-batched messages will always be associated with a single activity. + description: >- + An activity associated with a workflow trigger request. Messages produced after a [batch + step](/designing-workflows/batch-function) can be associated with one or more activities. Non-batched + messages will always be associated with a single activity. example: __typename: Activity actor: null data: foo: bar id: 2FVHPWxRqNuXQ9krvNP5A6Z4qXe - inserted_at: "2024-01-01T00:00:00Z" + inserted_at: '2024-01-01T00:00:00Z' recipient: __typename: User avatar: null @@ -4112,8 +4223,8 @@ components: name: Jane Doe phone_number: null timezone: null - updated_at: "2024-05-22T12:00:00Z" - updated_at: "2024-01-01T00:00:00Z" + updated_at: '2024-05-22T12:00:00Z' + updated_at: '2024-01-01T00:00:00Z' properties: __typename: description: The typename of the schema. @@ -4164,7 +4275,10 @@ components: x-validate: null InlineIdentifyUserRequest: additionalProperties: true - description: A set of parameters to inline-identify a user with. Inline identifying the user will ensure that the user is available before the request is executed in Knock. It will perform an upsert for the user you're supplying, replacing any properties specified. + description: >- + A set of parameters to inline-identify a user with. Inline identifying the user will ensure that the + user is available before the request is executed in Knock. It will perform an upsert for the user + you're supplying, replacing any properties specified. example: channel_data: 97c5837d-c65c-4d54-aa39-080eeb81c69d: @@ -4228,7 +4342,7 @@ components: x-struct: null x-validate: null phone_number: - description: The [E.164](https://www.twilio.com/docs/glossary/what-e164) phone number of the user (required for SMS channels). + description: "The\_[E.164](https://www.twilio.com/docs/glossary/what-e164)\_phone number of the user (required for SMS channels)." nullable: true type: string x-struct: null @@ -4241,7 +4355,7 @@ components: x-struct: null x-validate: null timezone: - description: The timezone of the user. Must be a valid [tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). Used for [recurring schedules](/concepts/schedules#scheduling-workflows-with-recurring-schedules-for-recipients). + description: "The timezone of the user. Must be a valid\_[tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). Used for\_[recurring schedules](/concepts/schedules#scheduling-workflows-with-recurring-schedules-for-recipients)." nullable: true type: string x-struct: null @@ -4425,7 +4539,10 @@ components: x-struct: Elixir.SwitchboardWeb.V1.Specs.MessageChatContent.Block x-validate: null Cancel Request: - description: When invoked using a specific workflow key and cancellation key, will cancel any queued workflow runs associated with that key/cancellation key pair. Can optionally provide one or more recipients to scope the request to. + description: >- + When invoked using a specific workflow key and cancellation key, will cancel any queued workflow runs + associated with that key/cancellation key pair. Can optionally provide one or more recipients to scope + the request to. example: cancellation_key: comment_123 name: new-comment @@ -4433,7 +4550,11 @@ components: - user_456 properties: cancellation_key: - description: An optional key that is used to reference a specific workflow trigger request when issuing a [workflow cancellation](/send-notifications/canceling-workflows) request. Must be provided while triggering a workflow in order to enable subsequent cancellation. Should be unique across trigger requests to avoid unintentional cancellations. + description: >- + An optional key that is used to reference a specific workflow trigger request when issuing a + [workflow cancellation](/send-notifications/canceling-workflows) request. Must be provided while + triggering a workflow in order to enable subsequent cancellation. Should be unique across trigger + requests to avoid unintentional cancellations. type: string x-struct: null x-validate: null @@ -4443,7 +4564,9 @@ components: x-struct: null x-validate: null recipients: - description: A list of recipients to cancel the notification for. If omitted, cancels for all recipients associated with the cancellation key. + description: >- + A list of recipients to cancel the notification for. If omitted, cancels for all recipients + associated with the cancellation key. items: $ref: '#/components/schemas/RecipientReference' type: array @@ -4466,14 +4589,14 @@ components: estimated_total_rows: 1000 failed_at: null id: 123e4567-e89b-12d3-a456-426614174000 - inserted_at: "2024-05-22T12:00:00Z" + inserted_at: '2024-05-22T12:00:00Z' name: Bulk operation name processed_rows: 0 progress_path: https://api.switchboard.com/v1/bulk_operations/123e4567-e89b-12d3-a456-426614174000 started_at: null status: processing success_count: 0 - updated_at: "2024-05-22T12:00:00Z" + updated_at: '2024-05-22T12:00:00Z' properties: __typename: description: The typename of the schema. @@ -4654,17 +4777,17 @@ components: - read - seen id: 2w3YUpTTOxuDvZFji8OMsKrG176 - inserted_at: "1993-06-11T21:15:00Z" + inserted_at: '1993-06-11T21:15:00Z' interacted_at: null link_clicked_at: null metadata: incident_id: shutdown-june-1993 initiated_by: ray_arnold priority: critical - read_at: "1993-06-11T21:30:00Z" + read_at: '1993-06-11T21:30:00Z' recipients: dr_grant scheduled_at: null - seen_at: "1993-06-11T21:29:45Z" + seen_at: '1993-06-11T21:29:45Z' source: __typename: Workflow categories: @@ -4674,7 +4797,7 @@ components: version_id: 123e4567-e89b-12d3-a456-426614174000 status: sent tenant: ingen_isla_nublar - updated_at: "1993-06-11T21:30:05Z" + updated_at: '1993-06-11T21:30:05Z' workflow: security-breach-alert properties: __typename: @@ -4684,7 +4807,9 @@ components: x-struct: null x-validate: null actors: - description: 'One or more actors that are associated with this message. Note: this is a list that can contain up to 10 actors if the message is produced from a [batch](/designing-workflows/batch-function).' + description: >- + One or more actors that are associated with this message. Note: this is a list that can contain up + to 10 actors if the message is produced from a [batch](/designing-workflows/batch-function). items: $ref: '#/components/schemas/RecipientReference' type: array @@ -4712,7 +4837,12 @@ components: x-validate: null data: additionalProperties: true - description: Data associated with the message’s workflow run. Includes the workflow trigger request’s `data` payload merged with any additional data returned by a [fetch function](/designing-workflows/fetch-function). For messages produced after a [batch step](/designing-workflows/batch-function), includes the payload `data` from the most-recent trigger request (the final `activity` in the batch). + description: >- + Data associated with the message’s workflow run. Includes the workflow trigger request’s `data` + payload merged with any additional data returned by a [fetch + function](/designing-workflows/fetch-function). For messages produced after a [batch + step](/designing-workflows/batch-function), includes the payload `data` from the most-recent + trigger request (the final `activity` in the batch). nullable: true type: object x-struct: null @@ -4723,7 +4853,9 @@ components: - read - seen items: - description: 'An engagement status for a message. Can be one of: read, seen, interacted, link_clicked, archived.' + description: >- + An engagement status for a message. Can be one of: read, seen, interacted, link_clicked, + archived. enum: - seen - read @@ -4850,7 +4982,9 @@ components: x-struct: null x-validate: null tenant: - description: The ID of the `tenant` associated with the message. Only present when a `tenant` is provided on a workflow trigger request. + description: >- + The ID of the `tenant` associated with the message. Only present when a `tenant` is provided on a + workflow trigger request. nullable: true type: string x-struct: null @@ -4876,7 +5010,7 @@ components: description: The response from setting a tenant. example: __typename: Tenant - created_at: "1993-05-24T08:30:00Z" + created_at: '1993-05-24T08:30:00Z' id: ingen_isla_nublar name: Jurassic Park settings: @@ -4885,7 +5019,7 @@ components: logo_url: https://example.com/amber_fossil_logo.png primary_color: '#DF1A22' primary_color_contrast: '#FFDE00' - updated_at: "1993-06-11T15:45:00Z" + updated_at: '1993-06-11T15:45:00Z' oneOf: - $ref: '#/components/schemas/Tenant' title: SetTenantResponse @@ -5051,7 +5185,10 @@ components: * Do not feed or provoke the animals * Follow all staff instructions name: body - rendered:

Your tour will begin shortly. During your visit, please:

+ rendered: >- +

Your tour will begin shortly. During your visit, please:

type: markdown - buttons: - action: https://example.com/park-map @@ -5096,11 +5233,11 @@ components: DiscordChannelConnection: description: Discord channel connection. example: - channel_id: "123456789012345678" + channel_id: '123456789012345678' properties: channel_id: description: Discord channel ID. - example: "123456789012345678" + example: '123456789012345678' type: string x-struct: null x-validate: null @@ -5177,7 +5314,7 @@ components: actor: null data: null id: 123e4567-e89b-12d3-a456-426614174000 - inserted_at: "2021-01-01T00:00:00Z" + inserted_at: '2021-01-01T00:00:00Z' last_occurrence_at: null next_occurrence_at: null recipient: @@ -5189,7 +5326,7 @@ components: name: Jane Doe phone_number: null timezone: null - updated_at: "2024-05-22T12:00:00Z" + updated_at: '2024-05-22T12:00:00Z' repeats: - __typename: ScheduleRepeat day_of_month: null @@ -5206,7 +5343,7 @@ components: interval: 1 minutes: null tenant: null - updated_at: "2021-01-01T00:00:00Z" + updated_at: '2021-01-01T00:00:00Z' workflow: workflow_123 properties: __typename: @@ -5216,7 +5353,9 @@ components: x-struct: null x-validate: null actor: - description: A map of properties describing a user or an object to identify in Knock and mark as who or what performed the action. + description: >- + A map of properties describing a user or an object to identify in Knock and mark as who or what + performed the action. oneOf: - $ref: '#/components/schemas/Recipient' - nullable: true @@ -5226,7 +5365,11 @@ components: x-validate: null data: additionalProperties: true - description: An optional map of data to pass into the workflow execution. There is a 1024 byte limit on the size of any single string value (with the exception of [email attachments](/integrations/email/attachments)), and a 10MB limit on the size of the full `data` payload. + description: >- + An optional map of data to pass into the workflow execution. There is a 1024 byte limit on the + size of any single string value (with the exception of [email + attachments](/integrations/email/attachments)), and a 10MB limit on the size of the full `data` + payload. nullable: true type: object x-struct: null @@ -5267,7 +5410,10 @@ components: x-struct: null x-validate: null tenant: - description: The tenant to trigger the workflow for. Triggering with a tenant will use any tenant-level overrides associated with the tenant object, and all messages produced from workflow runs will be tagged with the tenant. + description: >- + The tenant to trigger the workflow for. Triggering with a tenant will use any tenant-level + overrides associated with the tenant object, and all messages produced from workflow runs will be + tagged with the tenant. nullable: true type: string x-struct: null @@ -5301,7 +5447,7 @@ components: actor: null data: null id: 123e4567-e89b-12d3-a456-426614174000 - inserted_at: "2021-01-01T00:00:00Z" + inserted_at: '2021-01-01T00:00:00Z' last_occurrence_at: null next_occurrence_at: null recipient: @@ -5313,7 +5459,7 @@ components: name: Jane Doe phone_number: null timezone: null - updated_at: "2024-05-22T12:00:00Z" + updated_at: '2024-05-22T12:00:00Z' repeats: - __typename: ScheduleRepeat day_of_month: null @@ -5330,7 +5476,7 @@ components: interval: 1 minutes: null tenant: null - updated_at: "2021-01-01T00:00:00Z" + updated_at: '2021-01-01T00:00:00Z' workflow: workflow_123 items: $ref: '#/components/schemas/Schedule' @@ -5357,7 +5503,9 @@ components: anyOf: - additionalProperties: $ref: '#/components/schemas/PreferenceSetWorkflowCategorySetting' - description: An object where the key is the category and the values are the preference settings for that category. + description: >- + An object where the key is the category and the values are the preference settings for that + category. example: marketing: channel_types: @@ -5370,7 +5518,9 @@ components: - nullable: true x-struct: null x-validate: null - description: An object where the key is the category and the values are the preference settings for that category. + description: >- + An object where the key is the category and the values are the preference settings for that + category. x-struct: null x-validate: null channel_types: @@ -5379,14 +5529,18 @@ components: - nullable: true x-struct: null x-validate: null - description: An object where the key is the channel type and the values are the preference settings for that channel type. + description: >- + An object where the key is the channel type and the values are the preference settings for that + channel type. x-struct: null x-validate: null workflows: anyOf: - additionalProperties: $ref: '#/components/schemas/PreferenceSetWorkflowCategorySetting' - description: An object where the key is the workflow key and the values are the preference settings for that workflow. + description: >- + An object where the key is the workflow key and the values are the preference settings for + that workflow. example: dinosaurs-loose: channel_types: @@ -5400,7 +5554,9 @@ components: - nullable: true x-struct: null x-validate: null - description: An object where the key is the workflow key and the values are the preference settings for that workflow. + description: >- + An object where the key is the workflow key and the values are the preference settings for that + workflow. x-struct: null x-validate: null title: PreferenceSetRequest @@ -5470,7 +5626,9 @@ components: x-struct: null x-validate: null skip_token: - description: '[OData param](https://learn.microsoft.com/en-us/graph/query-parameters) passed to the Microsoft Graph API to retrieve the next page of results.' + description: >- + [OData param](https://learn.microsoft.com/en-us/graph/query-parameters) passed to the Microsoft + Graph API to retrieve the next page of results. nullable: true type: string x-struct: null @@ -5483,7 +5641,9 @@ components: x-struct: Elixir.SwitchboardWeb.V1.Specs.TeamsForMsTeamsProviderResponse x-validate: null BulkCreateSchedulesRequest: - description: A request to bulk create schedules. Accepts a list of schedules to create. Each schedule must have a single recipient. The recipients do not have to be unique. + description: >- + A request to bulk create schedules. Accepts a list of schedules to create. Each schedule must have a + single recipient. The recipients do not have to be unique. example: schedules: - data: @@ -5537,7 +5697,9 @@ components: description: A schedule represents a recurring workflow execution. properties: actor: - description: A map of properties describing a user or an object to identify in Knock and mark as who or what performed the action. + description: >- + A map of properties describing a user or an object to identify in Knock and mark as who or + what performed the action. oneOf: - $ref: '#/components/schemas/RecipientRequest' - nullable: true @@ -5548,7 +5710,11 @@ components: x-validate: null data: additionalProperties: true - description: An optional map of data to pass into the workflow execution. There is a 1024 byte limit on the size of any single string value (with the exception of [email attachments](/integrations/email/attachments)), and a 10MB limit on the size of the full `data` payload. + description: >- + An optional map of data to pass into the workflow execution. There is a 1024 byte limit on + the size of any single string value (with the exception of [email + attachments](/integrations/email/attachments)), and a 10MB limit on the size of the full + `data` payload. nullable: true type: object x-struct: null @@ -5582,7 +5748,10 @@ components: - nullable: true x-struct: null x-validate: null - description: The tenant to trigger the workflow for. Triggering with a tenant will use any tenant-level overrides associated with the tenant object, and all messages produced from workflow runs will be tagged with the tenant. + description: >- + The tenant to trigger the workflow for. Triggering with a tenant will use any tenant-level + overrides associated with the tenant object, and all messages produced from workflow runs + will be tagged with the tenant. x-struct: null x-validate: null workflow: @@ -5606,13 +5775,15 @@ components: x-struct: Elixir.SwitchboardWeb.V1.Specs.BulkCreateSchedulesRequest x-validate: null ListMessageEventsResponse: - description: Returns a paginated list of [delivery and engagement](/send-notifications/message-statuses) events for the specified message. + description: >- + Returns a paginated list of [delivery and engagement](/send-notifications/message-statuses) events for + the specified message. example: items: - __typename: MessageEvent data: null id: 2FVHPWxRqNuXQ9krvNP5A6Z4qXe - inserted_at: "2021-01-01T00:00:00Z" + inserted_at: '2021-01-01T00:00:00Z' recipient: user_123 type: message.sent page_info: @@ -5641,7 +5812,7 @@ components: description: A response containing a list of subscriptions. example: - __typename: Subscription - inserted_at: "2021-01-01T00:00:00Z" + inserted_at: '2021-01-01T00:00:00Z' object: __typename: Object collection: assets @@ -5654,7 +5825,7 @@ components: foo: bar name: Velociraptor status: contained - updated_at: "2024-05-22T12:00:00Z" + updated_at: '2024-05-22T12:00:00Z' recipient: __typename: User avatar: null @@ -5664,8 +5835,8 @@ components: name: Jane Doe phone_number: null timezone: null - updated_at: "2024-05-22T12:00:00Z" - updated_at: "2021-01-01T00:00:00Z" + updated_at: '2024-05-22T12:00:00Z' + updated_at: '2021-01-01T00:00:00Z' items: $ref: '#/components/schemas/Subscription' title: SubscriptionsResponse @@ -5684,7 +5855,10 @@ components: name: general properties: next_cursor: - description: Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first "page" of the collection. + description: >- + Paginate through collections of data by setting the cursor parameter to a next_cursor attribute + returned by a previous request's response_metadata. Default value fetches the first "page" of the + collection. nullable: true type: string x-struct: null @@ -5797,19 +5971,28 @@ components: x-struct: Elixir.SwitchboardWeb.V1.Specs.Condition x-validate: null CancelWorkflowRequest: - description: When invoked using a specific workflow key and cancellation key, will cancel any queued workflow runs associated with that key/cancellation key pair. Can optionally provide one or more recipients to scope the request to. + description: >- + When invoked using a specific workflow key and cancellation key, will cancel any queued workflow runs + associated with that key/cancellation key pair. Can optionally provide one or more recipients to scope + the request to. example: cancellation_key: cancel-workflow-123 recipients: - jhammond properties: cancellation_key: - description: An optional key that is used to reference a specific workflow trigger request when issuing a [workflow cancellation](/send-notifications/canceling-workflows) request. Must be provided while triggering a workflow in order to enable subsequent cancellation. Should be unique across trigger requests to avoid unintentional cancellations. + description: >- + An optional key that is used to reference a specific workflow trigger request when issuing a + [workflow cancellation](/send-notifications/canceling-workflows) request. Must be provided while + triggering a workflow in order to enable subsequent cancellation. Should be unique across trigger + requests to avoid unintentional cancellations. type: string x-struct: null x-validate: null recipients: - description: A list of recipients to cancel the notification for. If omitted, cancels for all recipients associated with the cancellation key. + description: >- + A list of recipients to cancel the notification for. If omitted, cancels for all recipients + associated with the cancellation key. items: $ref: '#/components/schemas/RecipientReference' nullable: true @@ -5857,7 +6040,7 @@ components: host: localhost method: GET path: / - query: ?foo=bar + query: '?foo=bar' properties: body: description: The body content that was sent with the request. @@ -5908,7 +6091,7 @@ components: x-validate: null query: description: The query string of the URL that was requested. - example: ?foo=bar + example: '?foo=bar' nullable: true type: string x-struct: null @@ -5924,7 +6107,7 @@ components: type: http info: title: Knock API - version: "1.0" + version: '1.0' openapi: 3.0.0 paths: /v1/objects/{collection}/{object_id}/preferences/{id}/workflows: @@ -5935,7 +6118,7 @@ paths: operationId: updateObjectPreferenceWorkflows parameters: [] responses: - "200": + '200': content: application/json: schema: @@ -5961,7 +6144,7 @@ paths: x-struct: null x-validate: null responses: - "204": + '204': content: application/json: schema: @@ -6055,7 +6238,7 @@ paths: x-struct: null x-validate: null responses: - "200": + '200': content: application/json: schema: @@ -6138,7 +6321,9 @@ paths: puts(tenant) put: callbacks: {} - description: Sets a tenant within an environment, performing an upsert operation. Any existing properties will be merged with the incoming properties. + description: >- + Sets a tenant within an environment, performing an upsert operation. Any existing properties will be + merged with the incoming properties. operationId: setTenant parameters: - description: The unique identifier for the tenant. @@ -6165,7 +6350,7 @@ paths: description: Tenant required: true responses: - "200": + '200': content: application/json: schema: @@ -6279,14 +6464,23 @@ paths: /v1/users/{user_id}/feeds/{id}: get: callbacks: {} - description: | - Returns a paginated list of feed items for a user in reverse chronological order, including metadata about the feed. If the user has not yet been identified within Knock, an empty feed will be returned. + description: > + Returns a paginated list of feed items for a user in reverse chronological order, including metadata + about the feed. If the user has not yet been identified within Knock, an empty feed will be returned. + + + You can customize the response using [response + filters](/integrations/in-app/knock#customizing-api-response-content) to exclude or only include + specific properties on your resources. - You can customize the response using [response filters](/integrations/in-app/knock#customizing-api-response-content) to exclude or only include specific properties on your resources. **Notes:** - * When making this call from a client-side environment, use your publishable key along with a user token. - * This endpoint’s rate limit is always scoped per-user and per-environment. This is true even for requests made without a signed user token. + + * When making this call from a client-side environment, use your publishable key along with a user + token. + + * This endpoint’s rate limit is always scoped per-user and per-environment. This is true even for + requests made without a signed user token. operationId: listUserInAppFeedItems parameters: - description: The unique identifier of the user. @@ -6409,7 +6603,7 @@ paths: x-struct: null x-validate: null responses: - "200": + '200': content: application/json: schema: @@ -6530,7 +6724,7 @@ paths: x-struct: null x-validate: null responses: - "200": + '200': content: application/json: schema: @@ -6542,14 +6736,18 @@ paths: - Users x-ratelimit-tier: 4 x-stainless-snippets: - typescript: |- + typescript: >- import Knock from '@knocklabs/node'; + const client = new Knock({ apiKey: process.env['KNOCK_API_KEY'], // This is the default and can be omitted }); - const response = await client.users.feeds.getSettings('user_id', '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'); + + const response = await client.users.feeds.getSettings('user_id', + '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'); + console.log(response.features); python: |- @@ -6627,7 +6825,7 @@ paths: operationId: updateObjectPreferenceChannelType parameters: [] responses: - "200": + '200': content: application/json: schema: @@ -6680,7 +6878,7 @@ paths: description: Params required: true responses: - "200": + '200': content: application/json: schema: @@ -6780,14 +6978,18 @@ paths: CensusCustomDestinationResponse response = client.integrations().census().customDestination(params); } } - ruby: |- + ruby: >- require "knockapi" + knock = Knockapi::Client.new( api_key: ENV["KNOCK_API_KEY"] # This is the default and can be omitted ) - response = knock.integrations.census.custom_destination(id: "id", jsonrpc: "jsonrpc", method_: "method") + + response = knock.integrations.census.custom_destination(id: "id", jsonrpc: "jsonrpc", method_: + "method") + puts(response) /v1/bulk_operations/{id}: @@ -6806,7 +7008,7 @@ paths: x-struct: null x-validate: null responses: - "200": + '200': content: application/json: schema: @@ -6950,7 +7152,7 @@ paths: x-struct: null x-validate: null responses: - "200": + '200': content: application/json: schema: @@ -7055,7 +7257,7 @@ paths: x-struct: null x-validate: null responses: - "204": + '204': content: application/json: schema: @@ -7149,7 +7351,7 @@ paths: x-struct: null x-validate: null responses: - "200": + '200': content: application/json: schema: @@ -7232,7 +7434,10 @@ paths: puts(user) put: callbacks: {} - description: Create or update a user with the provided identification data. When you identify an existing user, the system merges the properties you specific with what is currently set on the user, updating only the fields included in your requests. + description: >- + Create or update a user with the provided identification data. When you identify an existing user, the + system merges the properties you specific with what is currently set on the user, updating only the + fields included in your requests. operationId: identifyUser parameters: - description: The unique identifier of the user. @@ -7267,7 +7472,7 @@ paths: description: Params required: true responses: - "200": + '200': content: application/json: schema: @@ -7433,7 +7638,7 @@ paths: x-struct: null x-validate: null responses: - "200": + '200': content: application/json: schema: @@ -7616,7 +7821,9 @@ paths: type: array x-struct: null x-validate: null - - description: 'Limits the results to only the message IDs given (max 50). Note: when using this option, the results will be subject to any other filters applied to the query.' + - description: >- + Limits the results to only the message IDs given (max 50). Note: when using this option, the + results will be subject to any other filters applied to the query. example: - 1jNaXzB2RZX3LY8wVQnfCKyPnv7 in: query @@ -7653,7 +7860,9 @@ paths: type: string x-struct: null x-validate: null - - description: Limits the results to messages associated with the top-level workflow run ID returned by the workflow trigger request. + - description: >- + Limits the results to messages associated with the top-level workflow run ID returned by the + workflow trigger request. example: 123e4567-e89b-12d3-a456-426614174000 in: query name: workflow_run_id @@ -7673,7 +7882,9 @@ paths: type: string x-struct: null x-validate: null - - description: Limits the results to only messages that were generated with the given data. See [trigger data filtering](/api-reference/overview/trigger-data-filtering) for more information. + - description: >- + Limits the results to only messages that were generated with the given data. See [trigger data + filtering](/api-reference/overview/trigger-data-filtering) for more information. example: '{"comment_id": "123"}' in: query name: trigger_data @@ -7683,7 +7894,7 @@ paths: x-struct: null x-validate: null - description: Limits the results to messages inserted after or on the given date. - example: "2025-01-01T00:00:00Z" + example: '2025-01-01T00:00:00Z' in: query name: inserted_at.gte required: false @@ -7692,7 +7903,7 @@ paths: x-struct: null x-validate: null - description: Limits the results to messages inserted before or on the given date. - example: "2025-01-01T00:00:00Z" + example: '2025-01-01T00:00:00Z' in: query name: inserted_at.lte required: false @@ -7701,7 +7912,7 @@ paths: x-struct: null x-validate: null - description: Limits the results to messages inserted after the given date. - example: "2025-01-01T00:00:00Z" + example: '2025-01-01T00:00:00Z' in: query name: inserted_at.gt required: false @@ -7710,7 +7921,7 @@ paths: x-struct: null x-validate: null - description: Limits the results to messages inserted before the given date. - example: "2025-01-01T00:00:00Z" + example: '2025-01-01T00:00:00Z' in: query name: inserted_at.lt required: false @@ -7719,7 +7930,7 @@ paths: x-struct: null x-validate: null responses: - "200": + '200': content: application/json: schema: @@ -7806,7 +8017,9 @@ paths: /v1/messages/{message_id}/unseen: delete: callbacks: {} - description: Marks a message as `unseen`. This reverses the `seen` state. Read more about message engagement statuses [here](/send-notifications/message-statuses#engagement-status). + description: >- + Marks a message as `unseen`. This reverses the `seen` state. Read more about message engagement + statuses [here](/send-notifications/message-statuses#engagement-status). operationId: markMessageUnseen (2) parameters: - description: The unique identifier for the message. @@ -7819,7 +8032,7 @@ paths: x-struct: null x-validate: null responses: - "200": + '200': content: application/json: schema: @@ -7835,7 +8048,7 @@ paths: foo: bar engagement_statuses: [] id: 1jNaXzB2RZX3LY8wVQnfCKyPnv7 - inserted_at: "2021-01-01T00:00:00Z" + inserted_at: '2021-01-01T00:00:00Z' interacted_at: null link_clicked_at: null metadata: @@ -7852,7 +8065,7 @@ paths: version_id: 123e4567-e89b-12d3-a456-426614174000 status: sent tenant: tenant_123 - updated_at: "2021-01-01T00:00:00Z" + updated_at: '2021-01-01T00:00:00Z' workflow: comment-created x-struct: null x-validate: null @@ -7869,7 +8082,7 @@ paths: operationId: updateUserPreferenceCategory parameters: [] responses: - "200": + '200': content: application/json: schema: @@ -7911,7 +8124,7 @@ paths: body: Limited spots available for today's behind-the-scenes DNA extraction demonstration. title: DNA Lab Tour Available data: - next_time: 14:30 + next_time: '14:30' spots_left: 8 tour_id: dna_lab_tour guide_id: 7e9dc78c-b3b1-4127-a54e-71f1899b831a @@ -7928,7 +8141,7 @@ paths: description: Params required: true responses: - "200": + '200': content: application/json: schema: @@ -8110,7 +8323,7 @@ paths: description: Params required: true responses: - "200": + '200': content: application/json: schema: @@ -8200,14 +8413,18 @@ paths: BulkOperation bulkOperation = client.objects().bulk().delete(params); } } - ruby: |- + ruby: >- require "knockapi" + knock = Knockapi::Client.new( api_key: ENV["KNOCK_API_KEY"] # This is the default and can be omitted ) - bulk_operation = knock.objects.bulk.delete("collection", object_ids: ["obj_123", "obj_456", "obj_789"]) + + bulk_operation = knock.objects.bulk.delete("collection", object_ids: ["obj_123", "obj_456", + "obj_789"]) + puts(bulk_operation) /v1/providers/slack/{channel_id}/channels: @@ -8233,7 +8450,10 @@ paths: type: string x-struct: null x-validate: null - - description: Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first "page" of the collection. + - description: >- + Paginate through collections of data by setting the cursor parameter to a next_cursor attribute + returned by a previous request's response_metadata. Default value fetches the first "page" of the + collection. in: query name: query_options.cursor required: false @@ -8249,7 +8469,9 @@ paths: type: integer x-struct: null x-validate: null - - description: Set to true to exclude archived channels from the list. Defaults to `true` when not explicitly provided. + - description: >- + Set to true to exclude archived channels from the list. Defaults to `true` when not explicitly + provided. in: query name: query_options.exclude_archived required: false @@ -8257,7 +8479,9 @@ paths: type: boolean x-struct: null x-validate: null - - description: Mix and match channel types by providing a comma-separated list of any combination of public_channel, private_channel, mpim, im. Defaults to `"public_channel,private_channel"`. + - description: >- + Mix and match channel types by providing a comma-separated list of any combination of + public_channel, private_channel, mpim, im. Defaults to `"public_channel,private_channel"`. in: query name: query_options.types required: false @@ -8274,7 +8498,7 @@ paths: x-struct: null x-validate: null responses: - "200": + '200': content: application/json: schema: @@ -8434,7 +8658,7 @@ paths: x-struct: null x-validate: null responses: - "200": + '200': content: application/json: schema: @@ -8531,7 +8755,12 @@ paths: /v1/workflows/{key}/trigger: post: callbacks: {} - description: Trigger a workflow (specified by the key) to run for the given recipients, using the parameters provided. Returns an identifier for the workflow run request. All workflow runs are executed asynchronously. This endpoint also handles [inline identifications](/managing-recipients/identifying-recipients#inline-identifying-recipients) for the `actor`, `recipient`, and `tenant` fields. + description: >- + Trigger a workflow (specified by the key) to run for the given recipients, using the parameters + provided. Returns an identifier for the workflow run request. All workflow runs are executed + asynchronously. This endpoint also handles [inline + identifications](/managing-recipients/identifying-recipients#inline-identifying-recipients) for the + `actor`, `recipient`, and `tenant` fields. operationId: triggerWorkflow (2) parameters: - description: Key of the workflow to trigger. @@ -8568,7 +8797,7 @@ paths: description: Params required: true responses: - "200": + '200': content: application/json: schema: @@ -8710,7 +8939,9 @@ paths: /v1/messages/batch/unarchived: post: callbacks: {} - description: Marks the given messages as unarchived. This reverses the `archived` state. Archived messages are hidden from the default message list in the feed but can still be accessed and unarchived later. + description: >- + Marks the given messages as unarchived. This reverses the `archived` state. Archived messages are + hidden from the default message list in the feed but can still be accessed and unarchived later. operationId: batchMarkMessagesAsUnarchived parameters: [] requestBody: @@ -8725,7 +8956,7 @@ paths: description: Params required: true responses: - "200": + '200': content: application/json: schema: @@ -8741,7 +8972,7 @@ paths: engagement_statuses: - seen id: 1jNaXzB2RZX3LY8wVQnfCKyPnv7 - inserted_at: "2021-01-01T00:00:00Z" + inserted_at: '2021-01-01T00:00:00Z' interacted_at: null link_clicked_at: null metadata: @@ -8749,7 +8980,7 @@ paths: read_at: null recipient: user_123 scheduled_at: null - seen_at: "2025-01-01T00:01:00Z" + seen_at: '2025-01-01T00:01:00Z' source: __typename: NotificationSource categories: @@ -8758,7 +8989,7 @@ paths: version_id: 123e4567-e89b-12d3-a456-426614174000 status: sent tenant: tenant_123 - updated_at: "2021-01-01T00:00:00Z" + updated_at: '2021-01-01T00:00:00Z' workflow: comment-created items: allOf: @@ -8774,7 +9005,7 @@ paths: engagement_statuses: - seen id: 1jNaXzB2RZX3LY8wVQnfCKyPnv7 - inserted_at: "2021-01-01T00:00:00Z" + inserted_at: '2021-01-01T00:00:00Z' interacted_at: null link_clicked_at: null metadata: @@ -8782,7 +9013,7 @@ paths: read_at: null recipient: user_123 scheduled_at: null - seen_at: "2025-01-01T00:01:00Z" + seen_at: '2025-01-01T00:01:00Z' source: __typename: NotificationSource categories: @@ -8791,7 +9022,7 @@ paths: version_id: 123e4567-e89b-12d3-a456-426614174000 status: sent tenant: tenant_123 - updated_at: "2021-01-01T00:00:00Z" + updated_at: '2021-01-01T00:00:00Z' workflow: comment-created x-struct: null x-validate: null @@ -8888,7 +9119,9 @@ paths: /v1/messages/{message_id}/unread: delete: callbacks: {} - description: Marks a message as `unread`. This reverses the `read` state. Read more about message engagement statuses [here](/send-notifications/message-statuses#engagement-status). + description: >- + Marks a message as `unread`. This reverses the `read` state. Read more about message engagement + statuses [here](/send-notifications/message-statuses#engagement-status). operationId: markMessageUnread (2) parameters: - description: The unique identifier for the message. @@ -8901,7 +9134,7 @@ paths: x-struct: null x-validate: null responses: - "200": + '200': content: application/json: schema: @@ -8918,7 +9151,7 @@ paths: engagement_statuses: - seen id: 1jNaXzB2RZX3LY8wVQnfCKyPnv7 - inserted_at: "2021-01-01T00:00:00Z" + inserted_at: '2021-01-01T00:00:00Z' interacted_at: null link_clicked_at: null metadata: @@ -8926,7 +9159,7 @@ paths: read_at: null recipient: user_123 scheduled_at: null - seen_at: "2025-01-01T00:01:00Z" + seen_at: '2025-01-01T00:01:00Z' source: __typename: NotificationSource categories: @@ -8935,7 +9168,7 @@ paths: version_id: 123e4567-e89b-12d3-a456-426614174000 status: sent tenant: tenant_123 - updated_at: "2021-01-01T00:00:00Z" + updated_at: '2021-01-01T00:00:00Z' workflow: comment-created x-struct: null x-validate: null @@ -8947,7 +9180,9 @@ paths: /v1/providers/ms-teams/{channel_id}/auth_check: get: callbacks: {} - description: Check if a connection to Microsoft Teams has been authorized for a given Microsoft Teams tenant object. + description: >- + Check if a connection to Microsoft Teams has been authorized for a given Microsoft Teams tenant + object. operationId: msTeamsProviderAuthCheck parameters: - description: The ID of the Knock Microsoft Teams channel to check. @@ -8968,7 +9203,7 @@ paths: x-struct: null x-validate: null responses: - "200": + '200': content: application/json: schema: @@ -9053,20 +9288,26 @@ paths: MsTeamCheckAuthResponse response = client.providers().msTeams().checkAuth(params); } } - ruby: |- + ruby: >- require "knockapi" + knock = Knockapi::Client.new( api_key: ENV["KNOCK_API_KEY"] # This is the default and can be omitted ) - response = knock.providers.ms_teams.check_auth("channel_id", ms_teams_tenant_object: "ms_teams_tenant_object") + + response = knock.providers.ms_teams.check_auth("channel_id", ms_teams_tenant_object: + "ms_teams_tenant_object") + puts(response) /v1/messages/{message_id}/seen: delete: callbacks: {} - description: Marks a message as `unseen`. This reverses the `seen` state. Read more about message engagement statuses [here](/send-notifications/message-statuses#engagement-status). + description: >- + Marks a message as `unseen`. This reverses the `seen` state. Read more about message engagement + statuses [here](/send-notifications/message-statuses#engagement-status). operationId: markMessageUnseen parameters: - description: The unique identifier for the message. @@ -9079,7 +9320,7 @@ paths: x-struct: null x-validate: null responses: - "200": + '200': content: application/json: schema: @@ -9095,7 +9336,7 @@ paths: foo: bar engagement_statuses: [] id: 1jNaXzB2RZX3LY8wVQnfCKyPnv7 - inserted_at: "2021-01-01T00:00:00Z" + inserted_at: '2021-01-01T00:00:00Z' interacted_at: null link_clicked_at: null metadata: @@ -9112,7 +9353,7 @@ paths: version_id: 123e4567-e89b-12d3-a456-426614174000 status: sent tenant: tenant_123 - updated_at: "2021-01-01T00:00:00Z" + updated_at: '2021-01-01T00:00:00Z' workflow: comment-created x-struct: null x-validate: null @@ -9194,7 +9435,10 @@ paths: puts(message) put: callbacks: {} - description: Marks a message as `seen`. This indicates that the user has viewed the message in their feed or inbox. Read more about message engagement statuses [here](/send-notifications/message-statuses#engagement-status). + description: >- + Marks a message as `seen`. This indicates that the user has viewed the message in their feed or inbox. + Read more about message engagement statuses + [here](/send-notifications/message-statuses#engagement-status). operationId: markMessageSeen parameters: - description: The unique identifier for the message. @@ -9207,7 +9451,7 @@ paths: x-struct: null x-validate: null responses: - "200": + '200': content: application/json: schema: @@ -9224,7 +9468,7 @@ paths: engagement_statuses: - seen id: 1jNaXzB2RZX3LY8wVQnfCKyPnv7 - inserted_at: "2021-01-01T00:00:00Z" + inserted_at: '2021-01-01T00:00:00Z' interacted_at: null link_clicked_at: null metadata: @@ -9232,7 +9476,7 @@ paths: read_at: null recipient: user_123 scheduled_at: null - seen_at: "2025-01-01T00:01:00Z" + seen_at: '2025-01-01T00:01:00Z' source: __typename: NotificationSource categories: @@ -9241,7 +9485,7 @@ paths: version_id: 123e4567-e89b-12d3-a456-426614174000 status: sent tenant: tenant_123 - updated_at: "2021-01-01T00:00:00Z" + updated_at: '2021-01-01T00:00:00Z' workflow: comment-created x-struct: null x-validate: null @@ -9345,7 +9589,7 @@ paths: x-struct: null x-validate: null responses: - "204": + '204': content: application/json: schema: @@ -9357,14 +9601,18 @@ paths: - Users x-ratelimit-tier: 3 x-stainless-snippets: - typescript: |- + typescript: >- import Knock from '@knocklabs/node'; + const client = new Knock({ apiKey: process.env['KNOCK_API_KEY'], // This is the default and can be omitted }); - const response = await client.users.unsetChannelData('user_id', '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'); + + const response = await client.users.unsetChannelData('user_id', + '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'); + console.log(response); python: |- @@ -9456,7 +9704,7 @@ paths: x-struct: null x-validate: null responses: - "200": + '200': content: application/json: schema: @@ -9468,14 +9716,18 @@ paths: - Users x-ratelimit-tier: 4 x-stainless-snippets: - typescript: |- + typescript: >- import Knock from '@knocklabs/node'; + const client = new Knock({ apiKey: process.env['KNOCK_API_KEY'], // This is the default and can be omitted }); - const channelData = await client.users.getChannelData('user_id', '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'); + + const channelData = await client.users.getChannelData('user_id', + '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'); + console.log(channelData.channel_id); python: |- @@ -9547,7 +9799,9 @@ paths: puts(channel_data) put: callbacks: {} - description: Updates or creates channel data for a specific user and channel ID. If no user exists in the current environment for the given `user_id`, Knock will create the user entry as part of this request. + description: >- + Updates or creates channel data for a specific user and channel ID. If no user exists in the current + environment for the given `user_id`, Knock will create the user entry as part of this request. operationId: setUserChannelData parameters: - description: The unique identifier of the user. @@ -9579,7 +9833,7 @@ paths: description: Params required: true responses: - "200": + '200': content: application/json: schema: @@ -9591,17 +9845,21 @@ paths: - Users x-ratelimit-tier: 3 x-stainless-snippets: - typescript: |- + typescript: >- import Knock from '@knocklabs/node'; + const client = new Knock({ apiKey: process.env['KNOCK_API_KEY'], // This is the default and can be omitted }); - const channelData = await client.users.setChannelData('user_id', '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { + + const channelData = await client.users.setChannelData('user_id', + '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { data: { tokens: ['push_token_1'] }, }); + console.log(channelData.channel_id); python: |- import os @@ -9732,7 +9990,7 @@ paths: x-struct: null x-validate: null responses: - "200": + '200': content: application/json: schema: @@ -9846,7 +10104,7 @@ paths: x-struct: null x-validate: null responses: - "200": + '200': content: application/json: schema: @@ -9931,14 +10189,18 @@ paths: SlackCheckAuthResponse response = client.providers().slack().checkAuth(params); } } - ruby: |- + ruby: >- require "knockapi" + knock = Knockapi::Client.new( api_key: ENV["KNOCK_API_KEY"] # This is the default and can be omitted ) - response = knock.providers.slack.check_auth("channel_id", access_token_object: "access_token_object") + + response = knock.providers.slack.check_auth("channel_id", access_token_object: + "access_token_object") + puts(response) /v1/tenants: @@ -9988,7 +10250,7 @@ paths: x-struct: null x-validate: null responses: - "200": + '200': content: application/json: schema: @@ -10074,7 +10336,10 @@ paths: /v1/messages/batch/seen: post: callbacks: {} - description: Marks the given messages as `seen`. This indicates that the user has viewed the message in their feed or inbox. Read more about message engagement statuses [here](/send-notifications/message-statuses#engagement-status). + description: >- + Marks the given messages as `seen`. This indicates that the user has viewed the message in their feed + or inbox. Read more about message engagement statuses + [here](/send-notifications/message-statuses#engagement-status). operationId: batchMarkMessagesAsSeen parameters: [] requestBody: @@ -10089,7 +10354,7 @@ paths: description: Params required: true responses: - "200": + '200': content: application/json: schema: @@ -10105,7 +10370,7 @@ paths: engagement_statuses: - seen id: 1jNaXzB2RZX3LY8wVQnfCKyPnv7 - inserted_at: "2021-01-01T00:00:00Z" + inserted_at: '2021-01-01T00:00:00Z' interacted_at: null link_clicked_at: null metadata: @@ -10113,7 +10378,7 @@ paths: read_at: null recipient: user_123 scheduled_at: null - seen_at: "2025-01-01T00:01:00Z" + seen_at: '2025-01-01T00:01:00Z' source: __typename: NotificationSource categories: @@ -10122,7 +10387,7 @@ paths: version_id: 123e4567-e89b-12d3-a456-426614174000 status: sent tenant: tenant_123 - updated_at: "2021-01-01T00:00:00Z" + updated_at: '2021-01-01T00:00:00Z' workflow: comment-created items: allOf: @@ -10138,7 +10403,7 @@ paths: engagement_statuses: - seen id: 1jNaXzB2RZX3LY8wVQnfCKyPnv7 - inserted_at: "2021-01-01T00:00:00Z" + inserted_at: '2021-01-01T00:00:00Z' interacted_at: null link_clicked_at: null metadata: @@ -10146,7 +10411,7 @@ paths: read_at: null recipient: user_123 scheduled_at: null - seen_at: "2025-01-01T00:01:00Z" + seen_at: '2025-01-01T00:01:00Z' source: __typename: NotificationSource categories: @@ -10155,7 +10420,7 @@ paths: version_id: 123e4567-e89b-12d3-a456-426614174000 status: sent tenant: tenant_123 - updated_at: "2021-01-01T00:00:00Z" + updated_at: '2021-01-01T00:00:00Z' workflow: comment-created x-struct: null x-validate: null @@ -10252,7 +10517,9 @@ paths: /v1/messages/batch/unseen: post: callbacks: {} - description: Marks the given messages as `unseen`. This reverses the `seen` state. Read more about message engagement statuses [here](/send-notifications/message-statuses#engagement-status). + description: >- + Marks the given messages as `unseen`. This reverses the `seen` state. Read more about message + engagement statuses [here](/send-notifications/message-statuses#engagement-status). operationId: batchMarkMessagesAsUnseen parameters: [] requestBody: @@ -10263,7 +10530,7 @@ paths: description: Params required: true responses: - "200": + '200': content: application/json: schema: @@ -10278,7 +10545,7 @@ paths: foo: bar engagement_statuses: [] id: 1jNaXzB2RZX3LY8wVQnfCKyPnv7 - inserted_at: "2021-01-01T00:00:00Z" + inserted_at: '2021-01-01T00:00:00Z' interacted_at: null link_clicked_at: null metadata: @@ -10295,7 +10562,7 @@ paths: version_id: 123e4567-e89b-12d3-a456-426614174000 status: sent tenant: tenant_123 - updated_at: "2021-01-01T00:00:00Z" + updated_at: '2021-01-01T00:00:00Z' workflow: comment-created items: allOf: @@ -10310,7 +10577,7 @@ paths: foo: bar engagement_statuses: [] id: 1jNaXzB2RZX3LY8wVQnfCKyPnv7 - inserted_at: "2021-01-01T00:00:00Z" + inserted_at: '2021-01-01T00:00:00Z' interacted_at: null link_clicked_at: null metadata: @@ -10327,7 +10594,7 @@ paths: version_id: 123e4567-e89b-12d3-a456-426614174000 status: sent tenant: tenant_123 - updated_at: "2021-01-01T00:00:00Z" + updated_at: '2021-01-01T00:00:00Z' workflow: comment-created x-struct: null x-validate: null @@ -10424,7 +10691,9 @@ paths: /v1/users/{user_id}/merge: post: callbacks: {} - description: Merge two users together, where the user specified with the `from_user_id` param will be merged into the user specified by `user_id`. + description: >- + Merge two users together, where the user specified with the `from_user_id` param will be merged into + the user specified by `user_id`. operationId: mergeUser parameters: - description: The id of the user to merge into. @@ -10445,7 +10714,7 @@ paths: description: Params required: true responses: - "200": + '200': content: application/json: schema: @@ -10540,7 +10809,9 @@ paths: /v1/objects/{collection}/{id}/messages: get: callbacks: {} - description: Returns a paginated list of messages for a specific object in the given collection. Allows filtering by message status and provides various sorting options. + description: >- + Returns a paginated list of messages for a specific object in the given collection. Allows filtering + by message status and provides various sorting options. operationId: listMessagesForObject parameters: - description: The cursor to fetch entries after. @@ -10630,7 +10901,9 @@ paths: type: array x-struct: null x-validate: null - - description: 'Limits the results to only the message IDs given (max 50). Note: when using this option, the results will be subject to any other filters applied to the query.' + - description: >- + Limits the results to only the message IDs given (max 50). Note: when using this option, the + results will be subject to any other filters applied to the query. example: - 1jNaXzB2RZX3LY8wVQnfCKyPnv7 in: query @@ -10667,7 +10940,9 @@ paths: type: string x-struct: null x-validate: null - - description: Limits the results to messages associated with the top-level workflow run ID returned by the workflow trigger request. + - description: >- + Limits the results to messages associated with the top-level workflow run ID returned by the + workflow trigger request. example: 123e4567-e89b-12d3-a456-426614174000 in: query name: workflow_run_id @@ -10687,7 +10962,9 @@ paths: type: string x-struct: null x-validate: null - - description: Limits the results to only messages that were generated with the given data. See [trigger data filtering](/api-reference/overview/trigger-data-filtering) for more information. + - description: >- + Limits the results to only messages that were generated with the given data. See [trigger data + filtering](/api-reference/overview/trigger-data-filtering) for more information. example: '{"comment_id": "123"}' in: query name: trigger_data @@ -10697,7 +10974,7 @@ paths: x-struct: null x-validate: null - description: Limits the results to messages inserted after or on the given date. - example: "2025-01-01T00:00:00Z" + example: '2025-01-01T00:00:00Z' in: query name: inserted_at.gte required: false @@ -10706,7 +10983,7 @@ paths: x-struct: null x-validate: null - description: Limits the results to messages inserted before or on the given date. - example: "2025-01-01T00:00:00Z" + example: '2025-01-01T00:00:00Z' in: query name: inserted_at.lte required: false @@ -10715,7 +10992,7 @@ paths: x-struct: null x-validate: null - description: Limits the results to messages inserted after the given date. - example: "2025-01-01T00:00:00Z" + example: '2025-01-01T00:00:00Z' in: query name: inserted_at.gt required: false @@ -10724,7 +11001,7 @@ paths: x-struct: null x-validate: null - description: Limits the results to messages inserted before the given date. - example: "2025-01-01T00:00:00Z" + example: '2025-01-01T00:00:00Z' in: query name: inserted_at.lt required: false @@ -10751,7 +11028,7 @@ paths: x-struct: null x-validate: null responses: - "200": + '200': content: application/json: schema: @@ -10854,7 +11131,7 @@ paths: operationId: updateObjectPreferenceCategory parameters: [] responses: - "200": + '200': content: application/json: schema: @@ -10888,7 +11165,7 @@ paths: x-struct: null x-validate: null responses: - "200": + '200': content: application/json: schema: @@ -11002,7 +11279,9 @@ paths: /v1/messages/{message_id}/read: delete: callbacks: {} - description: Marks a message as `unread`. This reverses the `read` state. Read more about message engagement statuses [here](/send-notifications/message-statuses#engagement-status). + description: >- + Marks a message as `unread`. This reverses the `read` state. Read more about message engagement + statuses [here](/send-notifications/message-statuses#engagement-status). operationId: markMessageUnread parameters: - description: The unique identifier for the message. @@ -11015,7 +11294,7 @@ paths: x-struct: null x-validate: null responses: - "200": + '200': content: application/json: schema: @@ -11032,7 +11311,7 @@ paths: engagement_statuses: - seen id: 1jNaXzB2RZX3LY8wVQnfCKyPnv7 - inserted_at: "2021-01-01T00:00:00Z" + inserted_at: '2021-01-01T00:00:00Z' interacted_at: null link_clicked_at: null metadata: @@ -11040,7 +11319,7 @@ paths: read_at: null recipient: user_123 scheduled_at: null - seen_at: "2025-01-01T00:01:00Z" + seen_at: '2025-01-01T00:01:00Z' source: __typename: NotificationSource categories: @@ -11049,7 +11328,7 @@ paths: version_id: 123e4567-e89b-12d3-a456-426614174000 status: sent tenant: tenant_123 - updated_at: "2021-01-01T00:00:00Z" + updated_at: '2021-01-01T00:00:00Z' workflow: comment-created x-struct: null x-validate: null @@ -11131,7 +11410,9 @@ paths: puts(message) put: callbacks: {} - description: Marks a message as `read`. This indicates that the user has read the message content. Read more about message engagement statuses [here](/send-notifications/message-statuses#engagement-status). + description: >- + Marks a message as `read`. This indicates that the user has read the message content. Read more about + message engagement statuses [here](/send-notifications/message-statuses#engagement-status). operationId: markMessageRead parameters: - description: The unique identifier for the message. @@ -11144,7 +11425,7 @@ paths: x-struct: null x-validate: null responses: - "200": + '200': content: application/json: schema: @@ -11162,15 +11443,15 @@ paths: - seen - read id: 1jNaXzB2RZX3LY8wVQnfCKyPnv7 - inserted_at: "2021-01-01T00:00:00Z" + inserted_at: '2021-01-01T00:00:00Z' interacted_at: null link_clicked_at: null metadata: external_id: 123e4567-e89b-12d3-a456-426614174000 - read_at: "2025-01-01T00:02:00Z" + read_at: '2025-01-01T00:02:00Z' recipient: user_123 scheduled_at: null - seen_at: "2025-01-01T00:01:00Z" + seen_at: '2025-01-01T00:01:00Z' source: __typename: NotificationSource categories: @@ -11179,7 +11460,7 @@ paths: version_id: 123e4567-e89b-12d3-a456-426614174000 status: sent tenant: tenant_123 - updated_at: "2021-01-01T00:00:00Z" + updated_at: '2021-01-01T00:00:00Z' workflow: comment-created x-struct: null x-validate: null @@ -11262,7 +11543,7 @@ paths: /v1/users/bulk/preferences: post: callbacks: {} - description: Bulk sets the preferences for up to 1,000 users at a time. The preference set `:id` can be either `default` or a `tenant.id`. Learn more about [per-tenant preferences](/preferences/tenant-preferences). Note that this is a destructive operation and will replace any existing users' preferences with the preferences sent. + description: "Bulk sets the preferences for up to 1,000 users at a time. The preference set\_`:id`\_can be either\_`default`\_or a\_`tenant.id`. Learn more about\_[per-tenant preferences](/preferences/tenant-preferences). Note that this is a destructive operation and will replace any existing users' preferences with the preferences sent." operationId: bulkSetUserPreferences parameters: [] requestBody: @@ -11289,7 +11570,7 @@ paths: description: Params required: true responses: - "200": + '200': content: application/json: schema: @@ -11435,7 +11716,7 @@ paths: operationId: updateObjectPreferenceWorkflow parameters: [] responses: - "200": + '200': content: application/json: schema: @@ -11494,7 +11775,7 @@ paths: x-struct: null x-validate: null responses: - "200": + '200': content: application/json: schema: @@ -11506,14 +11787,18 @@ paths: - Users x-ratelimit-tier: 2 x-stainless-snippets: - typescript: |- + typescript: >- import Knock from '@knocklabs/node'; + const client = new Knock({ apiKey: process.env['KNOCK_API_KEY'], // This is the default and can be omitted }); - const response = await client.users.guides.getChannel('user_id', '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'); + + const response = await client.users.guides.getChannel('user_id', + '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'); + console.log(response.guides); python: |- @@ -11589,7 +11874,9 @@ paths: /v1/schedules: delete: callbacks: {} - description: Permanently deletes one or more schedules identified by the provided schedule IDs. This operation cannot be undone. + description: >- + Permanently deletes one or more schedules identified by the provided schedule IDs. This operation + cannot be undone. operationId: deleteSchedules parameters: [] requestBody: @@ -11600,7 +11887,7 @@ paths: description: Params required: true responses: - "200": + '200': content: application/json: schema: @@ -11611,14 +11898,18 @@ paths: - Schedules x-ratelimit-tier: 3 x-stainless-snippets: - typescript: |- + typescript: >- import Knock from '@knocklabs/node'; + const client = new Knock({ apiKey: process.env['KNOCK_API_KEY'], // This is the default and can be omitted }); - const schedules = await client.schedules.delete({ schedule_ids: ['123e4567-e89b-12d3-a456-426614174000'] }); + + const schedules = await client.schedules.delete({ schedule_ids: + ['123e4567-e89b-12d3-a456-426614174000'] }); + console.log(schedules); python: |- @@ -11688,7 +11979,9 @@ paths: puts(schedules) get: callbacks: {} - description: Returns a paginated list of schedules for the current environment, filtered by workflow and optionally by recipients and tenant. + description: >- + Returns a paginated list of schedules for the current environment, filtered by workflow and optionally + by recipients and tenant. operationId: listSchedules parameters: - description: Filter by workflow key. @@ -11743,7 +12036,7 @@ paths: x-struct: null x-validate: null responses: - "200": + '200': content: application/json: schema: @@ -11833,7 +12126,11 @@ paths: puts(page) post: callbacks: {} - description: Creates one or more schedules for a workflow with the specified recipients, timing, and data. Schedules can be one-time or recurring. This endpoint also handles [inline identifications](/managing-recipients/identifying-recipients#inline-identifying-recipients) for the `actor`, `recipient`, and `tenant` fields. + description: >- + Creates one or more schedules for a workflow with the specified recipients, timing, and data. + Schedules can be one-time or recurring. This endpoint also handles [inline + identifications](/managing-recipients/identifying-recipients#inline-identifying-recipients) for the + `actor`, `recipient`, and `tenant` fields. operationId: createSchedules parameters: [] requestBody: @@ -11868,7 +12165,7 @@ paths: description: Params required: true responses: - "200": + '200': content: application/json: schema: @@ -12002,7 +12299,11 @@ paths: puts(schedules) put: callbacks: {} - description: Updates one or more existing schedules with new timing, data, or other properties. All specified schedule IDs will be updated with the same values. This endpoint also handles [inline identifications](/managing-recipients/identifying-recipients#inline-identifying-recipients) for the `actor`, `recipient`, and `tenant` fields. + description: >- + Updates one or more existing schedules with new timing, data, or other properties. All specified + schedule IDs will be updated with the same values. This endpoint also handles [inline + identifications](/managing-recipients/identifying-recipients#inline-identifying-recipients) for the + `actor`, `recipient`, and `tenant` fields. operationId: updateSchedules parameters: [] requestBody: @@ -12037,7 +12338,7 @@ paths: description: Params required: true responses: - "200": + '200': content: application/json: schema: @@ -12168,7 +12469,11 @@ paths: /v1/objects/{collection}/bulk/subscriptions/add: post: callbacks: {} - description: Add subscriptions for all objects in a single collection. If a subscription for an object in the collection already exists, it will be updated. This endpoint also handles [inline identifications](/managing-recipients/identifying-recipients#inline-identifying-recipients) for the `recipient` field. + description: >- + Add subscriptions for all objects in a single collection. If a subscription for an object in the + collection already exists, it will be updated. This endpoint also handles [inline + identifications](/managing-recipients/identifying-recipients#inline-identifying-recipients) for the + `recipient` field. operationId: bulkAddSubscriptions parameters: - description: The collection this object belongs to. @@ -12194,7 +12499,7 @@ paths: description: Params required: true responses: - "200": + '200': content: application/json: schema: @@ -12296,14 +12601,18 @@ paths: BulkOperation bulkOperation = client.objects().bulk().addSubscriptions(params); } } - ruby: |- + ruby: >- require "knockapi" + knock = Knockapi::Client.new( api_key: ENV["KNOCK_API_KEY"] # This is the default and can be omitted ) - bulk_operation = knock.objects.bulk.add_subscriptions("collection", subscriptions: [{recipients: [{id: "user_1"}]}]) + + bulk_operation = knock.objects.bulk.add_subscriptions("collection", subscriptions: [{recipients: + [{id: "user_1"}]}]) + puts(bulk_operation) /v1/messages/batch/content: @@ -12325,7 +12634,7 @@ paths: x-struct: null x-validate: null responses: - "200": + '200': content: application/json: schema: @@ -12334,9 +12643,11 @@ paths: - __typename: MessageContent data: __typename: MessageSmsContent - body: 'URGENT: Power failure detected in perimeter fencing. Backup generators failed to engage. Technical team dispatched. Maintain lockdown protocols.' - to: "+15553982647" - inserted_at: "1993-06-11T20:30:00Z" + body: >- + URGENT: Power failure detected in perimeter fencing. Backup generators failed to + engage. Technical team dispatched. Maintain lockdown protocols. + to: '+15553982647' + inserted_at: '1993-06-11T20:30:00Z' message_id: 2w3YUpTTOxuDvZFji8OMsKrG176 items: $ref: '#/components/schemas/MessageContents' @@ -12429,7 +12740,9 @@ paths: /v1/users/bulk/identify: post: callbacks: {} - description: Identifies multiple users in a single operation. Allows creating or updating up to 1,000 users in a single batch with various properties, preferences, and channel data. + description: >- + Identifies multiple users in a single operation. Allows creating or updating up to 1,000 users in a + single batch with various properties, preferences, and channel data. operationId: bulkIdentifyUsers parameters: [] requestBody: @@ -12446,7 +12759,7 @@ paths: description: Params required: true responses: - "200": + '200': content: application/json: schema: @@ -12551,7 +12864,9 @@ paths: /v1/messages/{message_id}/content: get: callbacks: {} - description: Returns the fully rendered contents of a message, where the response depends on which channel the message was sent through. + description: >- + Returns the fully rendered contents of a message, where the response depends on which channel the + message was sent through. operationId: getMessageContents parameters: - description: The ID of the message to fetch contents of. @@ -12563,7 +12878,7 @@ paths: x-struct: null x-validate: null responses: - "200": + '200': content: application/json: schema: @@ -12653,7 +12968,7 @@ paths: operationId: updateUserPreferenceWorkflows parameters: [] responses: - "200": + '200': content: application/json: schema: @@ -12672,7 +12987,7 @@ paths: operationId: updateObjectPreferenceCategories parameters: [] responses: - "200": + '200': content: application/json: schema: @@ -12697,7 +13012,7 @@ paths: description: Cancel Payload required: true responses: - "204": + '204': content: application/json: {} description: No Content @@ -12728,7 +13043,7 @@ paths: x-struct: null x-validate: null responses: - "204": + '204': content: application/json: schema: @@ -12817,7 +13132,9 @@ paths: puts(object) get: callbacks: {} - description: Retrieves a specific object by its ID from the specified collection. Returns the object with all its properties. + description: >- + Retrieves a specific object by its ID from the specified collection. Returns the object with all its + properties. operationId: getObject parameters: - description: The collection this object belongs to. @@ -12837,7 +13154,7 @@ paths: x-struct: null x-validate: null responses: - "200": + '200': content: application/json: schema: @@ -12927,7 +13244,9 @@ paths: puts(object) put: callbacks: {} - description: Creates a new object or updates an existing one in the specified collection. This operation is used to identify objects with their properties, as well as optional preferences and channel data. + description: >- + Creates a new object or updates an existing one in the specified collection. This operation is used to + identify objects with their properties, as well as optional preferences and channel data. operationId: setObject parameters: - description: The collection this object belongs to. @@ -12972,7 +13291,7 @@ paths: description: Params required: true responses: - "200": + '200': content: application/json: schema: @@ -13134,7 +13453,7 @@ paths: x-struct: null x-validate: null responses: - "200": + '200': content: application/json: schema: @@ -13268,7 +13587,7 @@ paths: x-struct: null x-validate: null responses: - "200": + '200': content: application/json: schema: @@ -13361,7 +13680,10 @@ paths: /v1/channels/{channel_id}/messages/bulk/{action}: post: callbacks: {} - description: Bulk update the status of messages for a specific channel. The channel is specified by the `channel_id` parameter. The action to perform is specified by the `action` parameter, where the action is a status change action (e.g. `archive`, `unarchive`). + description: >- + Bulk update the status of messages for a specific channel. The channel is specified by the + `channel_id` parameter. The action to perform is specified by the `action` parameter, where the action + is a status change action (e.g. `archive`, `unarchive`). operationId: bulkUpdateMessagesForChannel parameters: - description: The ID of the channel to update messages for. @@ -13400,8 +13722,8 @@ paths: delivery_status: delivered engagement_status: seen has_tenant: true - newer_than: "2024-01-01T00:00:00Z" - older_than: "2024-01-01T00:00:00Z" + newer_than: '2024-01-01T00:00:00Z' + older_than: '2024-01-01T00:00:00Z' recipient_ids: - recipient1 - recipient2 @@ -13417,7 +13739,7 @@ paths: description: Params required: true responses: - "200": + '200': content: application/json: schema: @@ -13536,14 +13858,18 @@ paths: ); } } - ruby: |- + ruby: >- require "knockapi" + knock = Knockapi::Client.new( api_key: ENV["KNOCK_API_KEY"] # This is the default and can be omitted ) - bulk_operation = knock.channels.bulk.update_message_status("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", :seen) + + bulk_operation = knock.channels.bulk.update_message_status("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + :seen) + puts(bulk_operation) /v1/users/{user_id}/preferences/{id}/categories: @@ -13554,7 +13880,7 @@ paths: operationId: updateUserPreferenceCategories parameters: [] responses: - "200": + '200': content: application/json: schema: @@ -13595,7 +13921,7 @@ paths: description: Params required: true responses: - "200": + '200': content: application/json: schema: @@ -13744,7 +14070,7 @@ paths: x-struct: null x-validate: null responses: - "204": + '204': content: application/json: schema: @@ -13830,14 +14156,18 @@ paths: ); } } - ruby: |- + ruby: >- require "knockapi" + knock = Knockapi::Client.new( api_key: ENV["KNOCK_API_KEY"] # This is the default and can be omitted ) - response = knock.objects.unset_channel_data("collection", "object_id", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + + response = knock.objects.unset_channel_data("collection", "object_id", + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + puts(response) get: @@ -13871,7 +14201,7 @@ paths: x-struct: null x-validate: null responses: - "200": + '200': content: application/json: schema: @@ -13958,19 +14288,26 @@ paths: ); } } - ruby: |- + ruby: >- require "knockapi" + knock = Knockapi::Client.new( api_key: ENV["KNOCK_API_KEY"] # This is the default and can be omitted ) - channel_data = knock.objects.get_channel_data("collection", "object_id", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + + channel_data = knock.objects.get_channel_data("collection", "object_id", + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + puts(channel_data) put: callbacks: {} - description: Sets the channel data for the specified object and channel. If no object exists in the current environment for the given `collection` and `object_id`, Knock will create the object as part of this request. + description: >- + Sets the channel data for the specified object and channel. If no object exists in the current + environment for the given `collection` and `object_id`, Knock will create the object as part of this + request. operationId: setObjectChannelData parameters: - description: Unique identifier for the object. @@ -14010,7 +14347,7 @@ paths: description: Params required: true responses: - "200": + '200': content: application/json: schema: @@ -14153,7 +14490,7 @@ paths: description: Params required: true responses: - "204": + '204': content: application/json: schema: @@ -14266,7 +14603,7 @@ paths: x-struct: null x-validate: null responses: - "200": + '200': content: application/json: schema: @@ -14373,7 +14710,7 @@ paths: description: Params required: true responses: - "204": + '204': content: application/json: schema: @@ -14481,7 +14818,9 @@ paths: /v1/providers/ms-teams/{channel_id}/channels: get: callbacks: {} - description: List the Microsoft Teams channels within a team. By default, archived and private channels are excluded from the results. + description: >- + List the Microsoft Teams channels within a team. By default, archived and private channels are + excluded from the results. operationId: listChannelsForMsTeamsProvider parameters: - description: The ID of the Knock Microsoft Teams channel to get channels for. @@ -14509,7 +14848,9 @@ paths: type: string x-struct: null x-validate: null - - description: '[OData param](https://learn.microsoft.com/en-us/graph/query-parameters) passed to the Microsoft Graph API to filter channels.' + - description: >- + [OData param](https://learn.microsoft.com/en-us/graph/query-parameters) passed to the Microsoft + Graph API to filter channels. example: displayName eq 'General' in: query name: query_options.$filter @@ -14518,7 +14859,9 @@ paths: type: string x-struct: null x-validate: null - - description: '[OData param](https://learn.microsoft.com/en-us/graph/query-parameters) passed to the Microsoft Graph API to select specific properties.' + - description: >- + [OData param](https://learn.microsoft.com/en-us/graph/query-parameters) passed to the Microsoft + Graph API to select specific properties. example: id,displayName,description in: query name: query_options.$select @@ -14528,7 +14871,7 @@ paths: x-struct: null x-validate: null responses: - "200": + '200': content: application/json: schema: @@ -14645,7 +14988,7 @@ paths: description: Params required: true responses: - "200": + '200': content: application/json: schema: @@ -14757,7 +15100,7 @@ paths: x-struct: null x-validate: null responses: - "200": + '200': content: application/json: schema: @@ -14776,7 +15119,7 @@ paths: x-struct: null x-validate: null description: OK - "403": + '403': content: application/json: schema: @@ -14900,20 +15243,26 @@ paths: SlackRevokeAccessResponse response = client.providers().slack().revokeAccess(params); } } - ruby: |- + ruby: >- require "knockapi" + knock = Knockapi::Client.new( api_key: ENV["KNOCK_API_KEY"] # This is the default and can be omitted ) - response = knock.providers.slack.revoke_access("channel_id", access_token_object: "access_token_object") + + response = knock.providers.slack.revoke_access("channel_id", access_token_object: + "access_token_object") + puts(response) /v1/messages/batch/unread: post: callbacks: {} - description: Marks the given messages as `unread`. This reverses the `read` state. Read more about message engagement statuses [here](/send-notifications/message-statuses#engagement-status). + description: >- + Marks the given messages as `unread`. This reverses the `read` state. Read more about message + engagement statuses [here](/send-notifications/message-statuses#engagement-status). operationId: batchMarkMessagesAsUnread parameters: [] requestBody: @@ -14928,7 +15277,7 @@ paths: description: Params required: true responses: - "200": + '200': content: application/json: schema: @@ -14944,7 +15293,7 @@ paths: engagement_statuses: - seen id: 1jNaXzB2RZX3LY8wVQnfCKyPnv7 - inserted_at: "2021-01-01T00:00:00Z" + inserted_at: '2021-01-01T00:00:00Z' interacted_at: null link_clicked_at: null metadata: @@ -14952,7 +15301,7 @@ paths: read_at: null recipient: user_123 scheduled_at: null - seen_at: "2025-01-01T00:01:00Z" + seen_at: '2025-01-01T00:01:00Z' source: __typename: NotificationSource categories: @@ -14961,7 +15310,7 @@ paths: version_id: 123e4567-e89b-12d3-a456-426614174000 status: sent tenant: tenant_123 - updated_at: "2021-01-01T00:00:00Z" + updated_at: '2021-01-01T00:00:00Z' workflow: comment-created items: allOf: @@ -14977,7 +15326,7 @@ paths: engagement_statuses: - seen id: 1jNaXzB2RZX3LY8wVQnfCKyPnv7 - inserted_at: "2021-01-01T00:00:00Z" + inserted_at: '2021-01-01T00:00:00Z' interacted_at: null link_clicked_at: null metadata: @@ -14985,7 +15334,7 @@ paths: read_at: null recipient: user_123 scheduled_at: null - seen_at: "2025-01-01T00:01:00Z" + seen_at: '2025-01-01T00:01:00Z' source: __typename: NotificationSource categories: @@ -14994,7 +15343,7 @@ paths: version_id: 123e4567-e89b-12d3-a456-426614174000 status: sent tenant: tenant_123 - updated_at: "2021-01-01T00:00:00Z" + updated_at: '2021-01-01T00:00:00Z' workflow: comment-created x-struct: null x-validate: null @@ -15096,7 +15445,7 @@ paths: operationId: updateUserPreferenceChannelType parameters: [] responses: - "200": + '200': content: application/json: schema: @@ -15110,7 +15459,9 @@ paths: /v1/objects/{collection}: get: callbacks: {} - description: Returns a paginated list of objects from the specified collection. Optionally includes preference data for the objects. + description: >- + Returns a paginated list of objects from the specified collection. Optionally includes preference data + for the objects. operationId: listObjects parameters: - description: The cursor to fetch entries after. @@ -15160,7 +15511,7 @@ paths: x-struct: null x-validate: null responses: - "200": + '200': content: application/json: schema: @@ -15264,7 +15615,7 @@ paths: x-struct: null x-validate: null responses: - "200": + '200': content: application/json: schema: @@ -15423,7 +15774,7 @@ paths: x-struct: null x-validate: null responses: - "200": + '200': content: application/json: schema: @@ -15543,7 +15894,7 @@ paths: description: Params required: true responses: - "200": + '200': content: application/json: schema: @@ -15663,7 +16014,9 @@ paths: /v1/messages/{message_id}/archived: delete: callbacks: {} - description: Removes a message from the archived state, making it visible in the default message list in the feed again. + description: >- + Removes a message from the archived state, making it visible in the default message list in the feed + again. operationId: unarchiveMessage (2) parameters: - description: The unique identifier for the message. @@ -15676,7 +16029,7 @@ paths: x-struct: null x-validate: null responses: - "200": + '200': content: application/json: schema: @@ -15693,7 +16046,7 @@ paths: engagement_statuses: - seen id: 1jNaXzB2RZX3LY8wVQnfCKyPnv7 - inserted_at: "2021-01-01T00:00:00Z" + inserted_at: '2021-01-01T00:00:00Z' interacted_at: null link_clicked_at: null metadata: @@ -15701,7 +16054,7 @@ paths: read_at: null recipient: user_123 scheduled_at: null - seen_at: "2025-01-01T00:01:00Z" + seen_at: '2025-01-01T00:01:00Z' source: __typename: NotificationSource categories: @@ -15710,7 +16063,7 @@ paths: version_id: 123e4567-e89b-12d3-a456-426614174000 status: sent tenant: tenant_123 - updated_at: "2021-01-01T00:00:00Z" + updated_at: '2021-01-01T00:00:00Z' workflow: comment-created x-struct: null x-validate: null @@ -15792,7 +16145,9 @@ paths: puts(message) put: callbacks: {} - description: Archives a message for the user. Archived messages are hidden from the default message list in the feed but can still be accessed and unarchived later. + description: >- + Archives a message for the user. Archived messages are hidden from the default message list in the + feed but can still be accessed and unarchived later. operationId: archiveMessage parameters: - description: The unique identifier for the message. @@ -15805,7 +16160,7 @@ paths: x-struct: null x-validate: null responses: - "200": + '200': content: application/json: schema: @@ -15814,7 +16169,7 @@ paths: example: actors: - user_123 - archived_at: "2025-01-01T00:04:00Z" + archived_at: '2025-01-01T00:04:00Z' channel_id: 123e4567-e89b-12d3-a456-426614174000 clicked_at: null data: @@ -15823,7 +16178,7 @@ paths: - seen - archived id: 1jNaXzB2RZX3LY8wVQnfCKyPnv7 - inserted_at: "2021-01-01T00:00:00Z" + inserted_at: '2021-01-01T00:00:00Z' interacted_at: null link_clicked_at: null metadata: @@ -15831,7 +16186,7 @@ paths: read_at: null recipient: user_123 scheduled_at: null - seen_at: "2025-01-01T00:01:00Z" + seen_at: '2025-01-01T00:01:00Z' source: __typename: NotificationSource categories: @@ -15840,7 +16195,7 @@ paths: version_id: 123e4567-e89b-12d3-a456-426614174000 status: sent tenant: tenant_123 - updated_at: "2021-01-01T00:00:00Z" + updated_at: '2021-01-01T00:00:00Z' workflow: comment-created x-struct: null x-validate: null @@ -15923,7 +16278,9 @@ paths: /v1/messages/batch/archived: post: callbacks: {} - description: Marks the given messages as archived. Archived messages are hidden from the default message list in the feed but can still be accessed and unarchived later. + description: >- + Marks the given messages as archived. Archived messages are hidden from the default message list in + the feed but can still be accessed and unarchived later. operationId: batchMarkMessagesAsArchived parameters: [] requestBody: @@ -15938,7 +16295,7 @@ paths: description: Params required: true responses: - "200": + '200': content: application/json: schema: @@ -15946,7 +16303,7 @@ paths: example: - actors: - user_123 - archived_at: "2025-01-01T00:04:00Z" + archived_at: '2025-01-01T00:04:00Z' channel_id: 123e4567-e89b-12d3-a456-426614174000 clicked_at: null data: @@ -15955,7 +16312,7 @@ paths: - seen - archived id: 1jNaXzB2RZX3LY8wVQnfCKyPnv7 - inserted_at: "2021-01-01T00:00:00Z" + inserted_at: '2021-01-01T00:00:00Z' interacted_at: null link_clicked_at: null metadata: @@ -15963,7 +16320,7 @@ paths: read_at: null recipient: user_123 scheduled_at: null - seen_at: "2025-01-01T00:01:00Z" + seen_at: '2025-01-01T00:01:00Z' source: __typename: NotificationSource categories: @@ -15972,7 +16329,7 @@ paths: version_id: 123e4567-e89b-12d3-a456-426614174000 status: sent tenant: tenant_123 - updated_at: "2021-01-01T00:00:00Z" + updated_at: '2021-01-01T00:00:00Z' workflow: comment-created items: allOf: @@ -15980,7 +16337,7 @@ paths: example: actors: - user_123 - archived_at: "2025-01-01T00:04:00Z" + archived_at: '2025-01-01T00:04:00Z' channel_id: 123e4567-e89b-12d3-a456-426614174000 clicked_at: null data: @@ -15989,7 +16346,7 @@ paths: - seen - archived id: 1jNaXzB2RZX3LY8wVQnfCKyPnv7 - inserted_at: "2021-01-01T00:00:00Z" + inserted_at: '2021-01-01T00:00:00Z' interacted_at: null link_clicked_at: null metadata: @@ -15997,7 +16354,7 @@ paths: read_at: null recipient: user_123 scheduled_at: null - seen_at: "2025-01-01T00:01:00Z" + seen_at: '2025-01-01T00:01:00Z' source: __typename: NotificationSource categories: @@ -16006,7 +16363,7 @@ paths: version_id: 123e4567-e89b-12d3-a456-426614174000 status: sent tenant: tenant_123 - updated_at: "2021-01-01T00:00:00Z" + updated_at: '2021-01-01T00:00:00Z' workflow: comment-created x-struct: null x-validate: null @@ -16088,20 +16445,27 @@ paths: List messages = client.messages().batch().archive(params); } } - ruby: |- + ruby: >- require "knockapi" + knock = Knockapi::Client.new( api_key: ENV["KNOCK_API_KEY"] # This is the default and can be omitted ) - messages = knock.messages.batch.archive(message_ids: ["2w3YUpTTOxuDvZFji8OMsKrG176", "2w3YVRbPXMIh8Zq6oBFcVDA5xes"]) + + messages = knock.messages.batch.archive(message_ids: ["2w3YUpTTOxuDvZFji8OMsKrG176", + "2w3YVRbPXMIh8Zq6oBFcVDA5xes"]) + puts(messages) /v1/users/{user_id}/messages: get: callbacks: {} - description: Returns a paginated list of messages for a specific user. Messages are sorted with the most recent ones appearing first. Messages outside the account's retention window will not be included in the results. + description: >- + Returns a paginated list of messages for a specific user. Messages are sorted with the most recent + ones appearing first. Messages outside the account's retention window will not be included in the + results. operationId: listMessagesForUser parameters: - description: The cursor to fetch entries after. @@ -16191,7 +16555,9 @@ paths: type: array x-struct: null x-validate: null - - description: 'Limits the results to only the message IDs given (max 50). Note: when using this option, the results will be subject to any other filters applied to the query.' + - description: >- + Limits the results to only the message IDs given (max 50). Note: when using this option, the + results will be subject to any other filters applied to the query. example: - 1jNaXzB2RZX3LY8wVQnfCKyPnv7 in: query @@ -16228,7 +16594,9 @@ paths: type: string x-struct: null x-validate: null - - description: Limits the results to messages associated with the top-level workflow run ID returned by the workflow trigger request. + - description: >- + Limits the results to messages associated with the top-level workflow run ID returned by the + workflow trigger request. example: 123e4567-e89b-12d3-a456-426614174000 in: query name: workflow_run_id @@ -16248,7 +16616,9 @@ paths: type: string x-struct: null x-validate: null - - description: Limits the results to only messages that were generated with the given data. See [trigger data filtering](/api-reference/overview/trigger-data-filtering) for more information. + - description: >- + Limits the results to only messages that were generated with the given data. See [trigger data + filtering](/api-reference/overview/trigger-data-filtering) for more information. example: '{"comment_id": "123"}' in: query name: trigger_data @@ -16258,7 +16628,7 @@ paths: x-struct: null x-validate: null - description: Limits the results to messages inserted after or on the given date. - example: "2025-01-01T00:00:00Z" + example: '2025-01-01T00:00:00Z' in: query name: inserted_at.gte required: false @@ -16267,7 +16637,7 @@ paths: x-struct: null x-validate: null - description: Limits the results to messages inserted before or on the given date. - example: "2025-01-01T00:00:00Z" + example: '2025-01-01T00:00:00Z' in: query name: inserted_at.lte required: false @@ -16276,7 +16646,7 @@ paths: x-struct: null x-validate: null - description: Limits the results to messages inserted after the given date. - example: "2025-01-01T00:00:00Z" + example: '2025-01-01T00:00:00Z' in: query name: inserted_at.gt required: false @@ -16285,7 +16655,7 @@ paths: x-struct: null x-validate: null - description: Limits the results to messages inserted before the given date. - example: "2025-01-01T00:00:00Z" + example: '2025-01-01T00:00:00Z' in: query name: inserted_at.lt required: false @@ -16303,7 +16673,7 @@ paths: x-struct: null x-validate: null responses: - "200": + '200': content: application/json: schema: @@ -16436,7 +16806,7 @@ paths: description: Params required: true responses: - "200": + '200': content: application/json: schema: @@ -16536,14 +16906,18 @@ paths: HightouchEmbeddedDestinationResponse response = client.integrations().hightouch().embeddedDestination(params); } } - ruby: |- + ruby: >- require "knockapi" + knock = Knockapi::Client.new( api_key: ENV["KNOCK_API_KEY"] # This is the default and can be omitted ) - response = knock.integrations.hightouch.embedded_destination(id: "id", jsonrpc: "jsonrpc", method_: "method") + + response = knock.integrations.hightouch.embedded_destination(id: "id", jsonrpc: "jsonrpc", method_: + "method") + puts(response) /v1/objects/{collection}/{object_id}/preferences/{id}/channel_types: @@ -16554,7 +16928,7 @@ paths: operationId: updateObjectPreferenceChannelTypes parameters: [] responses: - "200": + '200': content: application/json: schema: @@ -16568,7 +16942,11 @@ paths: /v1/messages/{message_id}/interacted: put: callbacks: {} - description: Marks a message as `interacted` with by the user. This can include any user action on the message, with optional metadata about the specific interaction. Cannot include more than 5 key-value pairs, must not contain nested data. Read more about message engagement statuses [here](/send-notifications/message-statuses#engagement-status). + description: >- + Marks a message as `interacted` with by the user. This can include any user action on the message, + with optional metadata about the specific interaction. Cannot include more than 5 key-value pairs, + must not contain nested data. Read more about message engagement statuses + [here](/send-notifications/message-statuses#engagement-status). operationId: markMessageInteracted parameters: - description: The unique identifier for the message. @@ -16588,7 +16966,7 @@ paths: description: Params required: false responses: - "200": + '200': content: application/json: schema: @@ -16606,15 +16984,15 @@ paths: - seen - interacted id: 1jNaXzB2RZX3LY8wVQnfCKyPnv7 - inserted_at: "2021-01-01T00:00:00Z" - interacted_at: "2025-01-01T00:03:00Z" + inserted_at: '2021-01-01T00:00:00Z' + interacted_at: '2025-01-01T00:03:00Z' link_clicked_at: null metadata: external_id: 123e4567-e89b-12d3-a456-426614174000 read_at: null recipient: user_123 scheduled_at: null - seen_at: "2025-01-01T00:01:00Z" + seen_at: '2025-01-01T00:01:00Z' source: __typename: NotificationSource categories: @@ -16623,7 +17001,7 @@ paths: version_id: 123e4567-e89b-12d3-a456-426614174000 status: sent tenant: tenant_123 - updated_at: "2021-01-01T00:00:00Z" + updated_at: '2021-01-01T00:00:00Z' workflow: comment-created x-struct: null x-validate: null @@ -16712,7 +17090,9 @@ paths: /v1/messages/{message_id}/unarchived: delete: callbacks: {} - description: Removes a message from the archived state, making it visible in the default message list in the feed again. + description: >- + Removes a message from the archived state, making it visible in the default message list in the feed + again. operationId: unarchiveMessage parameters: - description: The unique identifier for the message. @@ -16725,7 +17105,7 @@ paths: x-struct: null x-validate: null responses: - "200": + '200': content: application/json: schema: @@ -16742,7 +17122,7 @@ paths: engagement_statuses: - seen id: 1jNaXzB2RZX3LY8wVQnfCKyPnv7 - inserted_at: "2021-01-01T00:00:00Z" + inserted_at: '2021-01-01T00:00:00Z' interacted_at: null link_clicked_at: null metadata: @@ -16750,7 +17130,7 @@ paths: read_at: null recipient: user_123 scheduled_at: null - seen_at: "2025-01-01T00:01:00Z" + seen_at: '2025-01-01T00:01:00Z' source: __typename: NotificationSource categories: @@ -16759,7 +17139,7 @@ paths: version_id: 123e4567-e89b-12d3-a456-426614174000 status: sent tenant: tenant_123 - updated_at: "2021-01-01T00:00:00Z" + updated_at: '2021-01-01T00:00:00Z' workflow: comment-created x-struct: null x-validate: null @@ -16832,7 +17212,7 @@ paths: x-struct: null x-validate: null responses: - "200": + '200': content: application/json: schema: @@ -16891,7 +17271,7 @@ paths: x-struct: null x-validate: null responses: - "200": + '200': content: application/json: schema: @@ -16988,7 +17368,7 @@ paths: description: Notify Payload required: true responses: - "200": + '200': content: application/json: schema: @@ -17001,7 +17381,9 @@ paths: /v1/providers/ms-teams/{channel_id}/teams: get: callbacks: {} - description: Get a list of teams belonging to the Microsoft Entra tenant. By default, archived and private channels are excluded from the results. + description: >- + Get a list of teams belonging to the Microsoft Entra tenant. By default, archived and private channels + are excluded from the results. operationId: listTeamsForMsTeamsProvider parameters: - description: The ID of the Knock Microsoft Teams channel to get teams for. @@ -17021,7 +17403,9 @@ paths: type: string x-struct: null x-validate: null - - description: '[OData param](https://learn.microsoft.com/en-us/graph/query-parameters) passed to the Microsoft Graph API to filter teams.' + - description: >- + [OData param](https://learn.microsoft.com/en-us/graph/query-parameters) passed to the Microsoft + Graph API to filter teams. example: displayName eq 'My Team' in: query name: query_options.$filter @@ -17030,7 +17414,9 @@ paths: type: string x-struct: null x-validate: null - - description: '[OData param](https://learn.microsoft.com/en-us/graph/query-parameters) passed to the Microsoft Graph API to select fields on a team.' + - description: >- + [OData param](https://learn.microsoft.com/en-us/graph/query-parameters) passed to the Microsoft + Graph API to select fields on a team. example: id,displayName,description in: query name: query_options.$select @@ -17039,7 +17425,9 @@ paths: type: string x-struct: null x-validate: null - - description: '[OData param](https://learn.microsoft.com/en-us/graph/query-parameters) passed to the Microsoft Graph API to limit the number of teams returned.' + - description: >- + [OData param](https://learn.microsoft.com/en-us/graph/query-parameters) passed to the Microsoft + Graph API to limit the number of teams returned. example: 10 in: query name: query_options.$top @@ -17048,7 +17436,9 @@ paths: type: integer x-struct: null x-validate: null - - description: '[OData param](https://learn.microsoft.com/en-us/graph/query-parameters) passed to the Microsoft Graph API to retrieve the next page of results.' + - description: >- + [OData param](https://learn.microsoft.com/en-us/graph/query-parameters) passed to the Microsoft + Graph API to retrieve the next page of results. in: query name: query_options.$skiptoken required: false @@ -17057,7 +17447,7 @@ paths: x-struct: null x-validate: null responses: - "200": + '200': content: application/json: schema: @@ -17144,20 +17534,26 @@ paths: MsTeamListTeamsPage page = client.providers().msTeams().listTeams(params); } } - ruby: |- + ruby: >- require "knockapi" + knock = Knockapi::Client.new( api_key: ENV["KNOCK_API_KEY"] # This is the default and can be omitted ) - page = knock.providers.ms_teams.list_teams("channel_id", ms_teams_tenant_object: "ms_teams_tenant_object") + + page = knock.providers.ms_teams.list_teams("channel_id", ms_teams_tenant_object: + "ms_teams_tenant_object") + puts(page) /v1/messages/batch/read: post: callbacks: {} - description: Marks the given messages as `read`. Read more about message engagement statuses [here](/send-notifications/message-statuses#engagement-status). + description: >- + Marks the given messages as `read`. Read more about message engagement statuses + [here](/send-notifications/message-statuses#engagement-status). operationId: batchMarkMessagesAsRead parameters: [] requestBody: @@ -17172,7 +17568,7 @@ paths: description: Params required: true responses: - "200": + '200': content: application/json: schema: @@ -17189,15 +17585,15 @@ paths: - seen - read id: 1jNaXzB2RZX3LY8wVQnfCKyPnv7 - inserted_at: "2021-01-01T00:00:00Z" + inserted_at: '2021-01-01T00:00:00Z' interacted_at: null link_clicked_at: null metadata: external_id: 123e4567-e89b-12d3-a456-426614174000 - read_at: "2025-01-01T00:02:00Z" + read_at: '2025-01-01T00:02:00Z' recipient: user_123 scheduled_at: null - seen_at: "2025-01-01T00:01:00Z" + seen_at: '2025-01-01T00:01:00Z' source: __typename: NotificationSource categories: @@ -17206,7 +17602,7 @@ paths: version_id: 123e4567-e89b-12d3-a456-426614174000 status: sent tenant: tenant_123 - updated_at: "2021-01-01T00:00:00Z" + updated_at: '2021-01-01T00:00:00Z' workflow: comment-created items: allOf: @@ -17223,15 +17619,15 @@ paths: - seen - read id: 1jNaXzB2RZX3LY8wVQnfCKyPnv7 - inserted_at: "2021-01-01T00:00:00Z" + inserted_at: '2021-01-01T00:00:00Z' interacted_at: null link_clicked_at: null metadata: external_id: 123e4567-e89b-12d3-a456-426614174000 - read_at: "2025-01-01T00:02:00Z" + read_at: '2025-01-01T00:02:00Z' recipient: user_123 scheduled_at: null - seen_at: "2025-01-01T00:01:00Z" + seen_at: '2025-01-01T00:01:00Z' source: __typename: NotificationSource categories: @@ -17240,7 +17636,7 @@ paths: version_id: 123e4567-e89b-12d3-a456-426614174000 status: sent tenant: tenant_123 - updated_at: "2021-01-01T00:00:00Z" + updated_at: '2021-01-01T00:00:00Z' workflow: comment-created x-struct: null x-validate: null @@ -17337,7 +17733,10 @@ paths: /v1/workflows/{key}/cancel: post: callbacks: {} - description: When invoked for a workflow using a specific workflow key and cancellation key, will cancel any queued workflow runs associated with that key/cancellation key pair. Can optionally be provided one or more recipients to scope the request to. + description: >- + When invoked for a workflow using a specific workflow key and cancellation key, will cancel any queued + workflow runs associated with that key/cancellation key pair. Can optionally be provided one or more + recipients to scope the request to. operationId: cancelWorkflow parameters: - description: The key of the workflow to cancel. @@ -17360,7 +17759,7 @@ paths: description: Params required: true responses: - "204": + '204': content: application/json: schema: @@ -17465,7 +17864,7 @@ paths: operationId: updateUserPreferenceWorkflow parameters: [] responses: - "200": + '200': content: application/json: schema: @@ -17479,7 +17878,10 @@ paths: /v1/schedules/bulk/create: post: callbacks: {} - description: Bulk creates up to 1,000 schedules at a time. This endpoint also handles [inline identifications](/managing-recipients/identifying-recipients#inline-identifying-recipients) for the `actor`, `recipient`, and `tenant` fields. + description: >- + Bulk creates up to 1,000 schedules at a time. This endpoint also handles [inline + identifications](/managing-recipients/identifying-recipients#inline-identifying-recipients) for the + `actor`, `recipient`, and `tenant` fields. operationId: bulkCreateSchedules parameters: [] requestBody: @@ -17536,7 +17938,7 @@ paths: description: Schedule bulk creation request required: true responses: - "200": + '200': content: application/json: schema: @@ -17733,14 +18135,18 @@ paths: BulkOperation bulkOperation = client.schedules().bulk().create(params); } } - ruby: |- + ruby: >- require "knockapi" + knock = Knockapi::Client.new( api_key: ENV["KNOCK_API_KEY"] # This is the default and can be omitted ) - bulk_operation = knock.schedules.bulk.create(schedules: [{workflow: "comment-created"}, {workflow: "comment-created"}]) + + bulk_operation = knock.schedules.bulk.create(schedules: [{workflow: "comment-created"}, {workflow: + "comment-created"}]) + puts(bulk_operation) /v1/tenants/bulk/set: @@ -17761,7 +18167,7 @@ paths: description: Params required: true responses: - "200": + '200': content: application/json: schema: @@ -17882,7 +18288,7 @@ paths: x-struct: null x-validate: null responses: - "200": + '200': content: application/json: schema: @@ -17977,7 +18383,12 @@ paths: puts(preference_set) put: callbacks: {} - description: Sets preferences within the given preference set. This is a destructive operation and will replace any existing preferences with the preferences given. If no object exists in the current environment for the given `:collection` and `:object_id`, Knock will create the object as part of this request. The preference set `:id` can be either `default` or a `tenant.id`. Learn more about [per-tenant preferences](/preferences/tenant-preferences). + description: >- + Sets preferences within the given preference set. This is a destructive operation and will replace any + existing preferences with the preferences given. If no object exists in the current environment for + the given `:collection` and `:object_id`, Knock will create the object as part of this request. The + preference set `:id` can be either `default` or a `tenant.id`. Learn more about [per-tenant + preferences](/preferences/tenant-preferences). operationId: updateObjectPreferenceSet parameters: - description: Unique identifier for the object. @@ -18026,7 +18437,7 @@ paths: description: Params required: true responses: - "200": + '200': content: application/json: schema: @@ -18173,7 +18584,7 @@ paths: x-struct: null x-validate: null responses: - "200": + '200': content: application/json: schema: @@ -18192,7 +18603,7 @@ paths: x-struct: null x-validate: null description: OK - "403": + '403': content: application/json: schema: @@ -18316,14 +18727,18 @@ paths: MsTeamRevokeAccessResponse response = client.providers().msTeams().revokeAccess(params); } } - ruby: |- + ruby: >- require "knockapi" + knock = Knockapi::Client.new( api_key: ENV["KNOCK_API_KEY"] # This is the default and can be omitted ) - response = knock.providers.ms_teams.revoke_access("channel_id", ms_teams_tenant_object: "ms_teams_tenant_object") + + response = knock.providers.ms_teams.revoke_access("channel_id", ms_teams_tenant_object: + "ms_teams_tenant_object") + puts(response) /v1/messages/{message_id}: @@ -18342,7 +18757,7 @@ paths: x-struct: null x-validate: null responses: - "200": + '200': content: application/json: schema: @@ -18457,7 +18872,7 @@ paths: x-struct: null x-validate: null responses: - "200": + '200': content: application/json: schema: @@ -18551,7 +18966,9 @@ paths: puts(preference_set) put: callbacks: {} - description: Updates a complete preference set for a user. This is a destructive operation that will replace the existing preference set for the user. + description: >- + Updates a complete preference set for a user. This is a destructive operation that will replace the + existing preference set for the user. operationId: updateUserPreferenceSet parameters: - description: The unique identifier of the user. @@ -18592,7 +19009,7 @@ paths: description: Params required: true responses: - "200": + '200': content: application/json: schema: @@ -18715,7 +19132,9 @@ paths: /v1/objects/{collection}/{object_id}/subscriptions: delete: callbacks: {} - description: Delete subscriptions for the specified recipients from an object. Returns the list of deleted subscriptions. + description: >- + Delete subscriptions for the specified recipients from an object. Returns the list of deleted + subscriptions. operationId: deleteSubscriptionsForObject parameters: - description: Unique identifier for the object. @@ -18742,7 +19161,7 @@ paths: description: Params required: true responses: - "200": + '200': content: application/json: schema: @@ -18831,22 +19250,30 @@ paths: List subscriptions = client.objects().deleteSubscriptions(params); } } - ruby: |- + ruby: >- require "knockapi" + knock = Knockapi::Client.new( api_key: ENV["KNOCK_API_KEY"] # This is the default and can be omitted ) - subscriptions = knock.objects.delete_subscriptions("collection", "object_id", recipients: ["user_123"]) + + subscriptions = knock.objects.delete_subscriptions("collection", "object_id", recipients: + ["user_123"]) + puts(subscriptions) get: callbacks: {} - description: List subscriptions for an object. Either list the recipients that subscribe to the provided object, or list the objects that the provided object is subscribed to. Determined by the `mode` query parameter. + description: >- + List subscriptions for an object. Either list the recipients that subscribe to the provided object, or + list the objects that the provided object is subscribed to. Determined by the `mode` query parameter. operationId: listSubscriptionsForObject parameters: - - description: Mode of the request. `recipient` to list the objects that the provided object is subscribed to, `object` to list the recipients that subscribe to the provided object. + - description: >- + Mode of the request. `recipient` to list the objects that the provided object is subscribed to, + `object` to list the recipients that subscribe to the provided object. in: query name: mode required: false @@ -18933,7 +19360,7 @@ paths: x-struct: null x-validate: null responses: - "200": + '200': content: application/json: schema: @@ -19029,7 +19456,11 @@ paths: puts(page) post: callbacks: {} - description: Add subscriptions for an object. If a subscription already exists, it will be updated. This endpoint also handles [inline identifications](/managing-recipients/identifying-recipients#inline-identifying-recipients) for the `recipient`. + description: >- + Add subscriptions for an object. If a subscription already exists, it will be updated. This endpoint + also handles [inline + identifications](/managing-recipients/identifying-recipients#inline-identifying-recipients) for the + `recipient`. operationId: addSubscriptionsForObject parameters: - description: Unique identifier for the object. @@ -19062,7 +19493,7 @@ paths: description: Params required: true responses: - "200": + '200': content: application/json: schema: @@ -19159,20 +19590,28 @@ paths: List subscriptions = client.objects().addSubscriptions(params); } } - ruby: |- + ruby: >- require "knockapi" + knock = Knockapi::Client.new( api_key: ENV["KNOCK_API_KEY"] # This is the default and can be omitted ) - subscriptions = knock.objects.add_subscriptions("collection", "object_id", recipients: ["user_1", "user_2"]) + + subscriptions = knock.objects.add_subscriptions("collection", "object_id", recipients: ["user_1", + "user_2"]) + puts(subscriptions) /v1/messages/batch/interacted: post: callbacks: {} - description: Marks the given messages as interacted with by the user. This can include any user action on the message, with optional metadata about the specific interaction. Cannot include more than 5 key-value pairs, must not contain nested data. Read more about message engagement statuses [here](/send-notifications/message-statuses#engagement-status). + description: >- + Marks the given messages as interacted with by the user. This can include any user action on the + message, with optional metadata about the specific interaction. Cannot include more than 5 key-value + pairs, must not contain nested data. Read more about message engagement statuses + [here](/send-notifications/message-statuses#engagement-status). operationId: batchMarkMessagesAsInteracted parameters: [] requestBody: @@ -19188,7 +19627,7 @@ paths: description: Params required: true responses: - "200": + '200': content: application/json: schema: @@ -19205,15 +19644,15 @@ paths: - seen - interacted id: 1jNaXzB2RZX3LY8wVQnfCKyPnv7 - inserted_at: "2021-01-01T00:00:00Z" - interacted_at: "2025-01-01T00:03:00Z" + inserted_at: '2021-01-01T00:00:00Z' + interacted_at: '2025-01-01T00:03:00Z' link_clicked_at: null metadata: external_id: 123e4567-e89b-12d3-a456-426614174000 read_at: null recipient: user_123 scheduled_at: null - seen_at: "2025-01-01T00:01:00Z" + seen_at: '2025-01-01T00:01:00Z' source: __typename: NotificationSource categories: @@ -19222,7 +19661,7 @@ paths: version_id: 123e4567-e89b-12d3-a456-426614174000 status: sent tenant: tenant_123 - updated_at: "2021-01-01T00:00:00Z" + updated_at: '2021-01-01T00:00:00Z' workflow: comment-created items: allOf: @@ -19239,15 +19678,15 @@ paths: - seen - interacted id: 1jNaXzB2RZX3LY8wVQnfCKyPnv7 - inserted_at: "2021-01-01T00:00:00Z" - interacted_at: "2025-01-01T00:03:00Z" + inserted_at: '2021-01-01T00:00:00Z' + interacted_at: '2025-01-01T00:03:00Z' link_clicked_at: null metadata: external_id: 123e4567-e89b-12d3-a456-426614174000 read_at: null recipient: user_123 scheduled_at: null - seen_at: "2025-01-01T00:01:00Z" + seen_at: '2025-01-01T00:01:00Z' source: __typename: NotificationSource categories: @@ -19256,7 +19695,7 @@ paths: version_id: 123e4567-e89b-12d3-a456-426614174000 status: sent tenant: tenant_123 - updated_at: "2021-01-01T00:00:00Z" + updated_at: '2021-01-01T00:00:00Z' workflow: comment-created x-struct: null x-validate: null @@ -19362,7 +19801,7 @@ paths: operationId: updateUserPreferenceChannelTypes parameters: [] responses: - "200": + '200': content: application/json: schema: @@ -19399,7 +19838,7 @@ paths: description: Params required: true responses: - "200": + '200': content: application/json: schema: @@ -19536,15 +19975,22 @@ servers: tags: - description: An Audience is a segment of users. name: Audiences - - description: A bulk operation is a set of changes applied across zero or more records triggered via a call to the Knock API and performed asynchronously. + - description: >- + A bulk operation is a set of changes applied across zero or more records triggered via a call to the + Knock API and performed asynchronously. name: Bulk operations - - description: Channel data is data that is specific to a recipient and a channel, like push tokens, or one or more Slack connections. + - description: >- + Channel data is data that is specific to a recipient and a channel, like push tokens, or one or more + Slack connections. name: Channel data - description: A message sent to a single recipient on a channel. name: Messages - description: An object represents a resource in your system that you want to map into Knock. name: Objects - - description: Preferences are a way to configure how notifications are sent to recipients. They are a set of configuration that determines whether a recipient should receive a notification for a given workflow on a specific channel. + - description: >- + Preferences are a way to configure how notifications are sent to recipients. They are a set of + configuration that determines whether a recipient should receive a notification for a given workflow on + a specific channel. name: Preferences - description: A provider represents a third-party service that Knock integrates with and is configured via a channel. name: Providers @@ -19552,11 +19998,15 @@ tags: name: Schedules - description: A subscription represents a connection between a recipient and an object, used to represent a list. name: Subscriptions - - description: A tenant represents a top-level entity from your system, like a company, organization, account, or workspace. + - description: >- + A tenant represents a top-level entity from your system, like a company, organization, account, or + workspace. name: Tenants - - description: A user is an individual from your system, represented in Knock. They are most commonly a recipient of a notification. + - description: >- + A user is an individual from your system, represented in Knock. They are most commonly a recipient of a + notification. name: Users - description: Operations for triggering and canceling workflow executions. name: Workflow Triggers - description: A workflow is a structured set of steps that is triggered to produce notifications sent over channels. - name: Workflows + name: Workflows \ No newline at end of file diff --git a/data/specs/mapi/openapi.yml b/data/specs/mapi/openapi.yml index 11034c79..f515780e 100644 --- a/data/specs/mapi/openapi.yml +++ b/data/specs/mapi/openapi.yml @@ -499,6 +499,34 @@ components: type: object x-struct: null x-validate: null + 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 + x-struct: null + x-validate: null + 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 + x-struct: null + x-validate: null + title: GuideScheduledActivationParams + type: object + x-struct: null + x-validate: null WrappedPartialResponse: description: Wraps the Partial response under the `partial` key. example: @@ -1653,18 +1681,24 @@ components: id: project_1 oneOf: - description: A user ID. + example: user_1 nullable: false title: UserRecipientReference type: string x-struct: null x-validate: null - description: An object reference. + example: + collection: projects + id: project_1 properties: collection: + description: The collection of the object. type: string x-struct: null x-validate: null id: + description: The ID of the object. type: string x-struct: null x-validate: null @@ -1822,6 +1856,23 @@ components: type: object x-struct: Elixir.ControlWeb.V1.Specs.MessageTypes.TextField x-validate: null + 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 + x-struct: null + x-validate: null + required: + - status + title: GuideBooleanActivationParams + type: object + x-struct: null + x-validate: null EmailTemplate: description: An email message template. example: @@ -2927,12 +2978,17 @@ components: x-validate: null ObjectRecipientReference: description: An object reference. + example: + collection: projects + id: project_1 properties: collection: + description: The collection of the object. type: string x-struct: null x-validate: null id: + description: The ID of the object. type: string x-struct: null x-validate: null @@ -3935,7 +3991,7 @@ components: x-struct: null x-validate: null target_audience_id: - description: The ID of the target audience for the guide. + description: The ID of the target audience for the guide. When not set, will default to targeting all users. nullable: true type: string x-struct: null @@ -3953,7 +4009,7 @@ components: x-struct: null x-validate: null type: - description: The type of the guide. + description: The type of the guide. This is derived from the message type of the guide steps. type: string x-struct: null x-validate: null @@ -4664,11 +4720,6 @@ components: type: string x-struct: null x-validate: null - semver: - description: The semver of the guide. - type: string - x-struct: null - x-validate: null steps: description: A list of guide step objects in the guide. items: @@ -4677,7 +4728,7 @@ components: x-struct: null x-validate: null target_audience_id: - description: The ID of the target audience for the guide. + description: The ID of the target audience for the guide. When not set, will default to targeting all users. nullable: true type: string x-struct: null @@ -4694,11 +4745,6 @@ components: type: object x-struct: null x-validate: null - type: - description: The type of the guide. - type: string - x-struct: null - x-validate: null required: - name - channel_key @@ -4736,6 +4782,58 @@ components: type: object x-struct: Elixir.ControlWeb.V1.Specs.TranslationRequest x-validate: null + 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 + x-struct: null + x-validate: null + required: + - status + title: GuideBooleanActivationParams + type: object + x-struct: null + x-validate: null + - 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 + x-struct: null + x-validate: null + 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 + x-struct: null + x-validate: null + title: GuideScheduledActivationParams + type: object + x-struct: null + x-validate: null + title: GuideActivationParams + type: object + x-struct: Elixir.ControlWeb.V1.Specs.GuideActivationRequest + x-validate: null PaginatedMessageTypeResponse: description: A paginated list of MessageType. Contains a list of entries and page information. example: @@ -5265,6 +5363,7 @@ components: x-validate: null UserRecipientReference: description: A user ID. + example: user_1 nullable: false title: UserRecipientReference type: string @@ -7063,47 +7162,7 @@ paths: content: application/json: schema: - example: - active: true - oneOf: - - properties: - status: - description: Whether to activate or deactivate the guide. - example: true - type: boolean - x-struct: null - x-validate: null - required: - - status - type: object - x-struct: null - x-validate: null - - description: At least one of from or until must be provided - 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 - x-struct: null - x-validate: null - 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 - x-struct: null - x-validate: null - type: object - x-struct: null - x-validate: null - type: object - x-struct: null - x-validate: null + $ref: "#/components/schemas/GuideActivationParams" description: Params required: false responses: