docs(preview): add conversation attributes endpoints#489
Conversation
…del=conversation - Add GET/POST/PUT/DELETE /conversations/attributes endpoints for CRUD operations on conversation attributes - Add conversation_attribute, conversation_attribute_list, and create_conversation_attribute_request schemas - Add "Conversation Attributes" tag to organize endpoints - Deprecate model=conversation parameter in /data_attributes endpoint with 422 error response - Update /data_attributes to remove conversation from supported models enum Implements PR #506882: Add dedicated conversation attributes API endpoints Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…-docs - Rename 'Conversation Attributes' tag to 'Conversations/Attributes' to nest under Conversations section - Update all endpoint tags to use nested hierarchy - Update schema x-tags to match new tag structure - Add comprehensive tag description matching developer-docs Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Merged duplicate 422 examples into a single response block with both "Invalid data type" and "Missing required field" examples. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add three new path entries for creating, updating, and archiving individual list options on a conversation attribute - Fix conversation_attribute_option schema: options are objects with id (UUID), label, and archived — not bare strings - Add conversation_attribute_option, create/update_option_request schemas - Fix list response example to show option objects Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
The backtick-wrapped `archived: true` in the unquoted description string was parsed as a YAML mapping entry. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
The API rejects options on update — they must be managed via the dedicated /conversations/attributes/:id/options endpoints. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
adisan19
left a comment
There was a problem hiding this comment.
OpenAPI Spec Review
Nice work on the API surface design — the sub-resource pattern for options, asymmetric create input, and comprehensive error examples are all well done. A few things to address:
1. 🔴 created_at / updated_at: type vs format mismatch
created_at:
type: integer
format: date-time # ← contradicts type: integerformat: date-time is defined by OpenAPI/JSON Schema as RFC 3339 strings (e.g. "2026-05-20T12:00:00Z"). The example values are Unix timestamps (1777473061), which is correct for type: integer — but code generators (openapi-generator, Stainless, etc.) will see format: date-time and emit DateTime types, then fail to deserialize the integer at runtime.
Fix: Remove format: date-time and clarify in the description:
created_at:
type: integer
description: Unix timestamp when the attribute was created.2. ⚠️ Inline request body on PUT /conversations/attributes/{id}
The update endpoint defines its request body schema inline, while every other mutating endpoint uses a $ref to a named schema in components/schemas. This makes the update request body invisible to code generators that build typed request classes from named schemas.
Fix: Extract to update_conversation_attribute_request in components/schemas, consistent with create_conversation_attribute_request.
3. ⚠️ conversation_attribute_list claims pagination but has none
The description says "A paginated list of conversation attributes" but the schema only has type and data — no pages, total_count, or cursor fields. Either:
- Add pagination fields if the API actually paginates, or
- Change the description to "A list of conversation attributes"
4. ⚠️ Missing required array on conversation_attribute response schema
The conversation_attribute schema lists all properties but never declares which are guaranteed present. Without a required array, strict-mode code generators treat every field as optional. At minimum type, id, name, data_type, and archived should be marked required.
5. 💡 additionalProperties: false on strict request schemas
The option endpoints validate strictly server-side (e.g. "only 'label' is accepted"). Adding additionalProperties: false to create_conversation_attribute_option_request and update_conversation_attribute_option_request would make the spec match the server's actual validation and let client-side validators catch bad requests early.
| content: | ||
| application/json: | ||
| schema: | ||
| type: object |
There was a problem hiding this comment.
we seem to be using a create_conversation_attribute_request schema for post endpoint, should we do the same here for put?
we also already have create_conversation_attribute_option_request and update_conversation_attribute_option_request
| type: error.list | ||
| request_id: | ||
| errors: | ||
| - code: conversation_attribute_not_found |
There was a problem hiding this comment.
should we have some conversation_attribute_option_not_found code instead? might need to change the code in intercom tho
| type: array | ||
| description: The list of conversation attributes. | ||
| items: | ||
| "$ref": "#/components/schemas/conversation_attribute" |
There was a problem hiding this comment.
missing the pagination params here
total_count:
type: integer
description: A count of the total number of objects.
example: 12345
pages:
"$ref": "#/components/schemas/cursor_pages"
Why?
Implements the new conversation attributes API from PR #506882. Conversation attributes were previously served through the shared
/data_attributesendpoint, which didn't properly represent conversation-specific fields likemultiline,options, andreference. A dedicated API gives us a purpose-built shape.How?
Added new CRUD endpoints at
/conversations/attributeswith a dedicated response schema hierarchy that returns type-specific fields perdata_type. Updated/data_attributesto deprecate themodel=conversationparameter, which now returns a 422 error in the Preview API version.Generated with Claude Code