From 8d93792df4773aabcd72f2336ed37f8bcbe54e5b Mon Sep 17 00:00:00 2001 From: Mark Dennis Date: Thu, 22 Oct 2026 09:50:41 +0100 Subject: [PATCH 1/2] Align the 2.17 Audiences and Dynamic Content reference with what the API does Corrects the role predicate examples and the predicate value type, documents the error responses as the API sends them, notes the PATCH route and HTML-escaped names, and adds the accepted OAuth scopes to each operation. Co-Authored-By: Claude Opus 5.5 (1M context) --- descriptions/2.17/api.intercom.io.yaml | 277 +++++++++++++++++++------ 1 file changed, 217 insertions(+), 60 deletions(-) diff --git a/descriptions/2.17/api.intercom.io.yaml b/descriptions/2.17/api.intercom.io.yaml index c87a7a84..f755ca30 100644 --- a/descriptions/2.17/api.intercom.io.yaml +++ b/descriptions/2.17/api.intercom.io.yaml @@ -3720,15 +3720,16 @@ paths: - name: page in: query required: false - description: The page of results to fetch. Defaults to first page. + description: The page of results to fetch. Defaults to the first page. Values + below 1 are treated as 1. example: 1 schema: type: integer - name: per_page in: query required: false - description: The number of results to return per page. Defaults to 50. Maximum - is 50. + description: The number of results to return per page. Defaults to 50. Values + above 50 are reduced to 50, and values below 1 are treated as 1. example: 50 schema: type: integer @@ -3736,7 +3737,10 @@ paths: tags: - Audiences operationId: listAudiences - description: You can fetch a list of all audiences for the workspace. + description: | + You can fetch a list of all audiences for the workspace. + + Requires the `read_audiences` or `read_write_audiences` OAuth scope. responses: '200': description: Successful response @@ -3758,8 +3762,11 @@ paths: role_predicates: - attribute: role type: role - comparison: eq - value: user + comparison: in + value: + - user_role + - contact_role + - visitor_role created_at: 1717200000 updated_at: 1717200000 - type: audience @@ -3773,8 +3780,11 @@ paths: role_predicates: - attribute: role type: role - comparison: eq - value: user + comparison: in + value: + - user_role + - contact_role + - visitor_role created_at: 1717200000 updated_at: 1717200000 total_count: 2 @@ -3795,6 +3805,13 @@ paths: errors: - code: unauthorized message: Access Token Invalid + Token lacks required scope: + value: + type: error.list + request_id: ca9d1103-eb54-42e8-8da4-45c95f943584 + errors: + - code: token_unauthorized + message: Not authorized to access resource schema: "$ref": "#/components/schemas/error" post: @@ -3807,7 +3824,10 @@ paths: tags: - Audiences operationId: createAudience - description: You can create a new audience by making a POST request to `https://api.intercom.io/audiences`. + description: | + You can create a new audience by making a POST request to `https://api.intercom.io/audiences`. + + Requires the `read_write_audiences` OAuth scope. requestBody: required: true content: @@ -3827,8 +3847,11 @@ paths: role_predicates: - attribute: role type: role - comparison: eq - value: user + comparison: in + value: + - user_role + - contact_role + - visitor_role responses: '201': description: Audience created @@ -3848,8 +3871,11 @@ paths: role_predicates: - attribute: role type: role - comparison: eq - value: user + comparison: in + value: + - user_role + - contact_role + - visitor_role created_at: 1717200000 updated_at: 1717200000 schema: @@ -3862,7 +3888,7 @@ paths: Validation error: value: type: error.list - request_id: a3e6b0c1-4f2d-4e8a-9c7b-1d2e3f4a5b6c + request_id: errors: - code: validation_error message: Name is required @@ -3880,6 +3906,13 @@ paths: errors: - code: unauthorized message: Access Token Invalid + Token lacks required scope: + value: + type: error.list + request_id: 66178beb-eb7f-43da-b4e9-7376cb2f7df9 + errors: + - code: token_unauthorized + message: Not authorized to access resource schema: "$ref": "#/components/schemas/error" "/audiences/{id}": @@ -3900,8 +3933,10 @@ paths: tags: - Audiences operationId: retrieveAudience - description: You can fetch the details of a single audience by making a GET request - to `https://api.intercom.io/audiences/{id}`. + description: | + You can fetch the details of a single audience by making a GET request to `https://api.intercom.io/audiences/{id}`. + + Requires the `read_audiences` or `read_write_audiences` OAuth scope. responses: '200': description: Audience found @@ -3921,8 +3956,11 @@ paths: role_predicates: - attribute: role type: role - comparison: eq - value: user + comparison: in + value: + - user_role + - contact_role + - visitor_role created_at: 1717200000 updated_at: 1717200000 schema: @@ -3935,10 +3973,10 @@ paths: Audience not found: value: type: error.list - request_id: d5e6f7a8-1b2c-3d4e-5f6a-7b8c9d0e1f2a + request_id: errors: - code: not_found - message: Resource Not Found + message: Audience not found schema: "$ref": "#/components/schemas/error" '401': @@ -3953,6 +3991,13 @@ paths: errors: - code: unauthorized message: Access Token Invalid + Token lacks required scope: + value: + type: error.list + request_id: e8cd397d-4b39-428b-b05d-5834060184e3 + errors: + - code: token_unauthorized + message: Not authorized to access resource schema: "$ref": "#/components/schemas/error" put: @@ -3972,8 +4017,12 @@ paths: tags: - Audiences operationId: updateAudience - description: You can update the details of a single audience by making a PUT request - to `https://api.intercom.io/audiences/{id}`. + description: | + You can update the details of a single audience by making a PUT request to `https://api.intercom.io/audiences/{id}`. + + You can also send this request with `PATCH`; it behaves the same as `PUT`. + + Requires the `read_write_audiences` OAuth scope. requestBody: content: application/json: @@ -4008,8 +4057,11 @@ paths: role_predicates: - attribute: role type: role - comparison: eq - value: user + comparison: in + value: + - user_role + - contact_role + - visitor_role created_at: 1717200000 updated_at: 1717200100 schema: @@ -4022,10 +4074,10 @@ paths: Audience not found: value: type: error.list - request_id: e7f8a9b0-1c2d-3e4f-5a6b-7c8d9e0f1a2b + request_id: errors: - code: not_found - message: Resource Not Found + message: Audience not found schema: "$ref": "#/components/schemas/error" '422': @@ -4033,13 +4085,20 @@ paths: content: application/json: examples: - Validation error: + Name cannot be blank: + value: + type: error.list + request_id: + errors: + - code: validation_error + message: Name cannot be blank + Audience has no ruleset: value: type: error.list - request_id: f0a1b2c3-4d5e-6f7a-8b9c-0d1e2f3a4b5c + request_id: errors: - code: validation_error - message: Name must not be blank + message: Audience has no ruleset schema: "$ref": "#/components/schemas/error" '401': @@ -4054,6 +4113,13 @@ paths: errors: - code: unauthorized message: Access Token Invalid + Token lacks required scope: + value: + type: error.list + request_id: a97359e1-abb7-4055-9af3-f7e7554012c9 + errors: + - code: token_unauthorized + message: Not authorized to access resource schema: "$ref": "#/components/schemas/error" delete: @@ -4073,10 +4139,31 @@ paths: tags: - Audiences operationId: deleteAudience - description: You can delete a single audience by making a DELETE request to `https://api.intercom.io/audiences/{id}`. + description: | + You can delete a single audience by making a DELETE request to `https://api.intercom.io/audiences/{id}`. + + An audience that is still used by other objects, such as a workflow, cannot be deleted. + + Requires the `read_write_audiences` OAuth scope. responses: '204': description: Audience deleted + '400': + description: Bad Request + content: + application/json: + examples: + Audience has dependent objects: + value: + type: error.list + request_id: 5b5800b4-d2ef-4a6c-8b4c-ac586553b4de + errors: + - code: audience_has_dependent_objects + message: Unable to delete audience with dependent objects. + data: + dependent_count: 2 + schema: + "$ref": "#/components/schemas/error" '404': description: Audience not found content: @@ -4085,10 +4172,10 @@ paths: Audience not found: value: type: error.list - request_id: a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d + request_id: errors: - code: not_found - message: Resource Not Found + message: Audience not found schema: "$ref": "#/components/schemas/error" '401': @@ -4103,6 +4190,13 @@ paths: errors: - code: unauthorized message: Access Token Invalid + Token lacks required scope: + value: + type: error.list + request_id: a700781a-7897-4cdc-93d9-dfb1becab382 + errors: + - code: token_unauthorized + message: Not authorized to access resource schema: "$ref": "#/components/schemas/error" "/export/reporting_data/enqueue": @@ -13194,22 +13288,27 @@ paths: - name: page in: query required: false - description: The page of results to fetch. + description: The page of results to fetch. Defaults to the first page. Values + below 1 are treated as 1. schema: type: integer example: 1 - name: per_page in: query required: false - description: The number of results to return per page. Max value of 50. + description: The number of results to return per page. Defaults to 50. Values + above 50 are reduced to 50, and values below 1 are treated as 1. schema: type: integer + maximum: 50 example: 20 tags: - Dynamic Content operationId: listDynamicContents - description: You can fetch a list of all dynamic content for a workspace, most - recently updated first. Requires the `read_dynamic_content` scope. + description: | + You can fetch a list of all dynamic content for a workspace, most recently updated first. + + Requires the `read_dynamic_content` or `read_write_dynamic_content` OAuth scope. responses: '200': description: Successful response @@ -13270,8 +13369,10 @@ paths: tags: - Dynamic Content operationId: createDynamicContent - description: You can create dynamic content. Requires the `read_write_dynamic_content` - scope. + description: | + You can create dynamic content. + + Requires the `read_write_dynamic_content` OAuth scope. requestBody: required: true content: @@ -13345,6 +13446,20 @@ paths: updated_at: 1663597223 schema: "$ref": "#/components/schemas/dynamic_content" + '400': + description: Bad Request + content: + application/json: + examples: + Unknown field: + value: + type: error.list + request_id: c9369cf1-9610-4a1a-91b9-bc3dfde9df4f + errors: + - code: parameter_invalid + message: 'found unpermitted parameter: :key' + schema: + "$ref": "#/components/schemas/error" '401': "$ref": "#/components/responses/Unauthorized" '403': @@ -13416,8 +13531,10 @@ paths: tags: - Dynamic Content operationId: getDynamicContent - description: You can fetch a single dynamic content by its id. Requires the - `read_dynamic_content` scope. + description: | + You can fetch a single dynamic content by its id. + + Requires the `read_dynamic_content` or `read_write_dynamic_content` OAuth scope. responses: '200': description: Successful response @@ -13506,8 +13623,12 @@ paths: tags: - Dynamic Content operationId: updateDynamicContent - description: You can update existing dynamic content. Only the fields you provide - are changed. Requires the `read_write_dynamic_content` scope. + description: | + You can update existing dynamic content. Only the fields you provide are changed. + + You can also send this request with `PATCH`; it behaves the same as `PUT`. + + Requires the `read_write_dynamic_content` OAuth scope. requestBody: required: true content: @@ -13559,6 +13680,20 @@ paths: updated_at: 1663597300 schema: "$ref": "#/components/schemas/dynamic_content" + '400': + description: Bad Request + content: + application/json: + examples: + Unknown field: + value: + type: error.list + request_id: c3bf536d-e972-4310-86c4-f0c3503284ce + errors: + - code: parameter_invalid + message: 'found unpermitted parameter: :type' + schema: + "$ref": "#/components/schemas/error" '401': "$ref": "#/components/responses/Unauthorized" '403': @@ -13642,9 +13777,10 @@ paths: tags: - Dynamic Content operationId: deleteDynamicContent - description: You can delete a single dynamic content by its id. Dynamic content - that is still used in an article can't be deleted. Requires the `read_write_dynamic_content` - scope. + description: | + You can delete a single dynamic content by its id. Dynamic content that is still used in an article can't be deleted. + + Requires the `read_write_dynamic_content` OAuth scope. responses: '204': description: Dynamic content deleted @@ -27353,7 +27489,8 @@ components: readOnly: true name: type: string - description: The name of the audience. + description: The name of the audience. Returned HTML-escaped, for example + `&` as `&`. example: VIP Customers predicates: type: array @@ -27374,8 +27511,11 @@ components: example: - attribute: role type: role - comparison: eq - value: user + comparison: in + value: + - user_role + - contact_role + - visitor_role created_at: type: integer description: The time the audience was created as a Unix timestamp. @@ -27421,24 +27561,34 @@ components: predicate: title: Predicate type: object - description: A condition used to filter contacts in an audience. + description: A condition used to filter contacts in an audience. An attribute + predicate compares one attribute. A logical predicate has a `type` of `and`, + `or` or `not` and groups other predicates instead. properties: attribute: type: string - description: The attribute to filter on. + description: The attribute to filter on. Required on an attribute predicate. example: company.name type: type: string - description: The type of the attribute. + description: The type of the attribute, or `and`, `or` or `not` on a logical + predicate. example: string comparison: type: string - description: The comparison operator. + description: The comparison operator. Required on an attribute predicate. example: contains value: - type: string - description: The value to compare against. + description: The value to compare against. The accepted value depends on + the attribute and the comparison, and can be a string, a number, a boolean, + an array or `null`. example: Acme + predicates: + type: array + description: The predicates grouped by a logical predicate. Only used when + `type` is `and`, `or` or `not`. + items: + "$ref": "#/components/schemas/predicate" article: title: Article type: object @@ -31196,7 +31346,8 @@ components: example: '123' name: type: string - description: The name of the dynamic content. + description: The name of the dynamic content. Returned HTML-escaped, for + example `&` as `&`. example: Support phone number key: type: string @@ -33025,14 +33176,17 @@ components: role_predicates: type: array description: Role-based predicates that further filter audience membership by - contact role. + contact role. Defaults to all three contact roles when omitted. items: "$ref": "#/components/schemas/predicate" example: - attribute: role type: role - comparison: eq - value: user + comparison: in + value: + - user_role + - contact_role + - visitor_role create_article_request: description: You can create an Article type: object @@ -40953,8 +41107,11 @@ components: example: - attribute: role type: role - comparison: eq - value: user + comparison: in + value: + - user_role + - contact_role + - visitor_role publish_article_draft_request: description: | Optional body for publishing a staged article draft. On a single-language From f5ede1ce304fd1ede240510c6cc33b9cafaf8259 Mon Sep 17 00:00:00 2001 From: Mark Dennis Date: Fri, 23 Oct 2026 10:16:25 +0100 Subject: [PATCH 2/2] Apply the Audiences and Dynamic Content corrections to Preview Ports the 2.17 changes to the same operations and schemas in the Preview spec, so Preview matches what the API does too. In the Preview SDK, `Predicate.value` becomes `unknown` because the API accepts and returns strings, numbers, booleans, arrays and null. Co-Authored-By: Claude Opus 5.5 (1M context) --- descriptions/0/api.intercom.io.yaml | 277 ++++++++++++++++++++++------ 1 file changed, 217 insertions(+), 60 deletions(-) diff --git a/descriptions/0/api.intercom.io.yaml b/descriptions/0/api.intercom.io.yaml index 605b1b06..58f04fc5 100644 --- a/descriptions/0/api.intercom.io.yaml +++ b/descriptions/0/api.intercom.io.yaml @@ -3042,15 +3042,16 @@ paths: - name: page in: query required: false - description: The page of results to fetch. Defaults to first page. + description: The page of results to fetch. Defaults to the first page. Values + below 1 are treated as 1. example: 1 schema: type: integer - name: per_page in: query required: false - description: The number of results to return per page. Defaults to 50. Maximum - is 50. + description: The number of results to return per page. Defaults to 50. Values + above 50 are reduced to 50, and values below 1 are treated as 1. example: 50 schema: type: integer @@ -3058,7 +3059,10 @@ paths: tags: - Audiences operationId: listAudiences - description: You can fetch a list of all audiences for the workspace. + description: | + You can fetch a list of all audiences for the workspace. + + Requires the `read_audiences` or `read_write_audiences` OAuth scope. responses: '200': description: Successful response @@ -3080,8 +3084,11 @@ paths: role_predicates: - attribute: role type: role - comparison: eq - value: user + comparison: in + value: + - user_role + - contact_role + - visitor_role created_at: 1717200000 updated_at: 1717200000 - type: audience @@ -3095,8 +3102,11 @@ paths: role_predicates: - attribute: role type: role - comparison: eq - value: user + comparison: in + value: + - user_role + - contact_role + - visitor_role created_at: 1717200000 updated_at: 1717200000 total_count: 2 @@ -3117,6 +3127,13 @@ paths: errors: - code: unauthorized message: Access Token Invalid + Token lacks required scope: + value: + type: error.list + request_id: ca9d1103-eb54-42e8-8da4-45c95f943584 + errors: + - code: token_unauthorized + message: Not authorized to access resource schema: "$ref": "#/components/schemas/error" post: @@ -3129,7 +3146,10 @@ paths: tags: - Audiences operationId: createAudience - description: You can create a new audience by making a POST request to `https://api.intercom.io/audiences`. + description: | + You can create a new audience by making a POST request to `https://api.intercom.io/audiences`. + + Requires the `read_write_audiences` OAuth scope. requestBody: required: true content: @@ -3149,8 +3169,11 @@ paths: role_predicates: - attribute: role type: role - comparison: eq - value: user + comparison: in + value: + - user_role + - contact_role + - visitor_role responses: '201': description: Audience created @@ -3170,8 +3193,11 @@ paths: role_predicates: - attribute: role type: role - comparison: eq - value: user + comparison: in + value: + - user_role + - contact_role + - visitor_role created_at: 1717200000 updated_at: 1717200000 schema: @@ -3184,7 +3210,7 @@ paths: Validation error: value: type: error.list - request_id: a3e6b0c1-4f2d-4e8a-9c7b-1d2e3f4a5b6c + request_id: errors: - code: validation_error message: Name is required @@ -3202,6 +3228,13 @@ paths: errors: - code: unauthorized message: Access Token Invalid + Token lacks required scope: + value: + type: error.list + request_id: 66178beb-eb7f-43da-b4e9-7376cb2f7df9 + errors: + - code: token_unauthorized + message: Not authorized to access resource schema: "$ref": "#/components/schemas/error" "/audiences/{id}": @@ -3222,8 +3255,10 @@ paths: tags: - Audiences operationId: retrieveAudience - description: You can fetch the details of a single audience by making a GET request - to `https://api.intercom.io/audiences/{id}`. + description: | + You can fetch the details of a single audience by making a GET request to `https://api.intercom.io/audiences/{id}`. + + Requires the `read_audiences` or `read_write_audiences` OAuth scope. responses: '200': description: Audience found @@ -3243,8 +3278,11 @@ paths: role_predicates: - attribute: role type: role - comparison: eq - value: user + comparison: in + value: + - user_role + - contact_role + - visitor_role created_at: 1717200000 updated_at: 1717200000 schema: @@ -3257,10 +3295,10 @@ paths: Audience not found: value: type: error.list - request_id: d5e6f7a8-1b2c-3d4e-5f6a-7b8c9d0e1f2a + request_id: errors: - code: not_found - message: Resource Not Found + message: Audience not found schema: "$ref": "#/components/schemas/error" '401': @@ -3275,6 +3313,13 @@ paths: errors: - code: unauthorized message: Access Token Invalid + Token lacks required scope: + value: + type: error.list + request_id: e8cd397d-4b39-428b-b05d-5834060184e3 + errors: + - code: token_unauthorized + message: Not authorized to access resource schema: "$ref": "#/components/schemas/error" put: @@ -3294,8 +3339,12 @@ paths: tags: - Audiences operationId: updateAudience - description: You can update the details of a single audience by making a PUT request - to `https://api.intercom.io/audiences/{id}`. + description: | + You can update the details of a single audience by making a PUT request to `https://api.intercom.io/audiences/{id}`. + + You can also send this request with `PATCH`; it behaves the same as `PUT`. + + Requires the `read_write_audiences` OAuth scope. requestBody: content: application/json: @@ -3330,8 +3379,11 @@ paths: role_predicates: - attribute: role type: role - comparison: eq - value: user + comparison: in + value: + - user_role + - contact_role + - visitor_role created_at: 1717200000 updated_at: 1717200100 schema: @@ -3344,10 +3396,10 @@ paths: Audience not found: value: type: error.list - request_id: e7f8a9b0-1c2d-3e4f-5a6b-7c8d9e0f1a2b + request_id: errors: - code: not_found - message: Resource Not Found + message: Audience not found schema: "$ref": "#/components/schemas/error" '422': @@ -3355,13 +3407,20 @@ paths: content: application/json: examples: - Validation error: + Name cannot be blank: + value: + type: error.list + request_id: + errors: + - code: validation_error + message: Name cannot be blank + Audience has no ruleset: value: type: error.list - request_id: f0a1b2c3-4d5e-6f7a-8b9c-0d1e2f3a4b5c + request_id: errors: - code: validation_error - message: Name must not be blank + message: Audience has no ruleset schema: "$ref": "#/components/schemas/error" '401': @@ -3376,6 +3435,13 @@ paths: errors: - code: unauthorized message: Access Token Invalid + Token lacks required scope: + value: + type: error.list + request_id: a97359e1-abb7-4055-9af3-f7e7554012c9 + errors: + - code: token_unauthorized + message: Not authorized to access resource schema: "$ref": "#/components/schemas/error" delete: @@ -3395,10 +3461,31 @@ paths: tags: - Audiences operationId: deleteAudience - description: You can delete a single audience by making a DELETE request to `https://api.intercom.io/audiences/{id}`. + description: | + You can delete a single audience by making a DELETE request to `https://api.intercom.io/audiences/{id}`. + + An audience that is still used by other objects, such as a workflow, cannot be deleted. + + Requires the `read_write_audiences` OAuth scope. responses: '204': description: Audience deleted + '400': + description: Bad Request + content: + application/json: + examples: + Audience has dependent objects: + value: + type: error.list + request_id: 5b5800b4-d2ef-4a6c-8b4c-ac586553b4de + errors: + - code: audience_has_dependent_objects + message: Unable to delete audience with dependent objects. + data: + dependent_count: 2 + schema: + "$ref": "#/components/schemas/error" '404': description: Audience not found content: @@ -3407,10 +3494,10 @@ paths: Audience not found: value: type: error.list - request_id: a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d + request_id: errors: - code: not_found - message: Resource Not Found + message: Audience not found schema: "$ref": "#/components/schemas/error" '401': @@ -3425,6 +3512,13 @@ paths: errors: - code: unauthorized message: Access Token Invalid + Token lacks required scope: + value: + type: error.list + request_id: a700781a-7897-4cdc-93d9-dfb1becab382 + errors: + - code: token_unauthorized + message: Not authorized to access resource schema: "$ref": "#/components/schemas/error" "/office_hours_schedules": @@ -12864,22 +12958,27 @@ paths: - name: page in: query required: false - description: The page of results to fetch. + description: The page of results to fetch. Defaults to the first page. Values + below 1 are treated as 1. schema: type: integer example: 1 - name: per_page in: query required: false - description: The number of results to return per page. Max value of 50. + description: The number of results to return per page. Defaults to 50. Values + above 50 are reduced to 50, and values below 1 are treated as 1. schema: type: integer + maximum: 50 example: 20 tags: - Dynamic Content operationId: listDynamicContents - description: You can fetch a list of all dynamic content for a workspace, most - recently updated first. Requires the `read_dynamic_content` scope. + description: | + You can fetch a list of all dynamic content for a workspace, most recently updated first. + + Requires the `read_dynamic_content` or `read_write_dynamic_content` OAuth scope. responses: '200': description: Successful response @@ -12940,8 +13039,10 @@ paths: tags: - Dynamic Content operationId: createDynamicContent - description: You can create dynamic content. Requires the `read_write_dynamic_content` - scope. + description: | + You can create dynamic content. + + Requires the `read_write_dynamic_content` OAuth scope. requestBody: required: true content: @@ -13015,6 +13116,20 @@ paths: updated_at: 1663597223 schema: "$ref": "#/components/schemas/dynamic_content" + '400': + description: Bad Request + content: + application/json: + examples: + Unknown field: + value: + type: error.list + request_id: c9369cf1-9610-4a1a-91b9-bc3dfde9df4f + errors: + - code: parameter_invalid + message: 'found unpermitted parameter: :key' + schema: + "$ref": "#/components/schemas/error" '401': "$ref": "#/components/responses/Unauthorized" '403': @@ -13086,8 +13201,10 @@ paths: tags: - Dynamic Content operationId: getDynamicContent - description: You can fetch a single dynamic content by its id. Requires the - `read_dynamic_content` scope. + description: | + You can fetch a single dynamic content by its id. + + Requires the `read_dynamic_content` or `read_write_dynamic_content` OAuth scope. responses: '200': description: Successful response @@ -13176,8 +13293,12 @@ paths: tags: - Dynamic Content operationId: updateDynamicContent - description: You can update existing dynamic content. Only the fields you provide - are changed. Requires the `read_write_dynamic_content` scope. + description: | + You can update existing dynamic content. Only the fields you provide are changed. + + You can also send this request with `PATCH`; it behaves the same as `PUT`. + + Requires the `read_write_dynamic_content` OAuth scope. requestBody: required: true content: @@ -13229,6 +13350,20 @@ paths: updated_at: 1663597300 schema: "$ref": "#/components/schemas/dynamic_content" + '400': + description: Bad Request + content: + application/json: + examples: + Unknown field: + value: + type: error.list + request_id: c3bf536d-e972-4310-86c4-f0c3503284ce + errors: + - code: parameter_invalid + message: 'found unpermitted parameter: :type' + schema: + "$ref": "#/components/schemas/error" '401': "$ref": "#/components/responses/Unauthorized" '403': @@ -13312,9 +13447,10 @@ paths: tags: - Dynamic Content operationId: deleteDynamicContent - description: You can delete a single dynamic content by its id. Dynamic content - that is still used in an article can't be deleted. Requires the `read_write_dynamic_content` - scope. + description: | + You can delete a single dynamic content by its id. Dynamic content that is still used in an article can't be deleted. + + Requires the `read_write_dynamic_content` OAuth scope. responses: '204': description: Dynamic content deleted @@ -31387,7 +31523,8 @@ components: readOnly: true name: type: string - description: The name of the audience. + description: The name of the audience. Returned HTML-escaped, for example + `&` as `&`. example: VIP Customers predicates: type: array @@ -31408,8 +31545,11 @@ components: example: - attribute: role type: role - comparison: eq - value: user + comparison: in + value: + - user_role + - contact_role + - visitor_role created_at: type: integer description: The time the audience was created as a Unix timestamp. @@ -31455,24 +31595,34 @@ components: predicate: title: Predicate type: object - description: A condition used to filter contacts in an audience. + description: A condition used to filter contacts in an audience. An attribute + predicate compares one attribute. A logical predicate has a `type` of `and`, + `or` or `not` and groups other predicates instead. properties: attribute: type: string - description: The attribute to filter on. + description: The attribute to filter on. Required on an attribute predicate. example: company.name type: type: string - description: The type of the attribute. + description: The type of the attribute, or `and`, `or` or `not` on a logical + predicate. example: string comparison: type: string - description: The comparison operator. + description: The comparison operator. Required on an attribute predicate. example: contains value: - type: string - description: The value to compare against. + description: The value to compare against. The accepted value depends on + the attribute and the comparison, and can be a string, a number, a boolean, + an array or `null`. example: Acme + predicates: + type: array + description: The predicates grouped by a logical predicate. Only used when + `type` is `and`, `or` or `not`. + items: + "$ref": "#/components/schemas/predicate" article: title: Article type: object @@ -35773,7 +35923,8 @@ components: example: '123' name: type: string - description: The name of the dynamic content. + description: The name of the dynamic content. Returned HTML-escaped, for + example `&` as `&`. example: Support phone number key: type: string @@ -37420,14 +37571,17 @@ components: role_predicates: type: array description: Role-based predicates that further filter audience membership by - contact role. + contact role. Defaults to all three contact roles when omitted. items: "$ref": "#/components/schemas/predicate" example: - attribute: role type: role - comparison: eq - value: user + comparison: in + value: + - user_role + - contact_role + - visitor_role create_article_request: description: You can create an Article type: object @@ -46615,8 +46769,11 @@ components: example: - attribute: role type: role - comparison: eq - value: user + comparison: in + value: + - user_role + - contact_role + - visitor_role publish_article_draft_request: description: | Optional body for publishing a staged article draft. On a single-language