Repository navigation
Align the 2.17 and Preview data attribute, data event, data export and visitor endpoints with what the API does - #760
Open
markdennis22 wants to merge 5 commits into
Open
markdennis22 wants to merge 5 commits into
markdennis22 wants to merge 5 commits into
Conversation
… reference with what the API does Corrects the data type enums, event metadata and identifier rules, the export limits, expiry and download format, and the visitor request and response shapes, documents the error responses the API returns, and adds the accepted OAuth scopes to each operation. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…a details convertVisitor listed visitor twice in required. The visitor avatar description no longer claims an object form its string schema can't hold, the data_type description now says only relationship attributes can't be created through the API, and the millisecond since and before parameters on the events list are int64. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A list attribute is stored and returned as a string attribute with its choices in options, so the response never carries data_type options. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…to Preview
Applies the same 2.17 changes to the Preview spec, merged operation by operation so Preview-only content stays, such as the `{id}` path parameter name. The next version is cut from Preview, and the Preview SDKs are generated from it.
Also renames the Preview data export field job_identfier to job_identifier, the name the API sends and 2.17 already uses. fern check fails on the required-field anyOf that create_data_event_summaries_request now has, so the Preview Fern overrides drop it and the Preview SDK keeps the request as one object.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
markdennis22
commented
Oct 23, 2026
markdennis22
left a comment
Contributor
Author
There was a problem hiding this comment.
Thanks for this. Checked the 2.17 and Preview changes for parity, dangling refs and operationId changes, fern check (no new errors or warnings), the generated Preview SDK types, and each changed statement against the API's behaviour.
A few questions:
created_aton createDataEvent — Shouldcreated_atgo back into therequiredlists? A single event sent without thecreated_atkey returns400parameter_not_found"missing data parameter". The request time is only used whencreated_atis sent asnull.companyon updateVisitor — Shouldcompanycome out of the request schema? The API never applies it, whether or not the request also promotes the visitor to a lead.companiesis only applied when the same request also sendsemail. Is that worth saying?- End-before-start
422on createDataExport — Should the "End date before start date"422example come out? That case always returns the400"created_at_after is greater than created_at_before" first. - convertVisitor with
type: userand nouser— The spec requireduser. Withtype: userand nouser, the API returns200and leaves the visitor as it was. Should the spec keepuserrequired whentypeisuser, or describe what the API does? - "Missing event name" example — "missing event_name parameter" only appears when
event_nameis sent asnull. Leaving outevent_name,created_ator the user identifier returns400"missing data parameter". Is that worth adding as an example? avataron updateVisitor — The API also accepts an object{type: avatar, image_url}. Should the schema allow both?
Items 1 to 4 need a change before this is ready; 5 and 6 are optional.
~ Automated via Claude
…the unreachable export 422 A single event without the created_at key is rejected with 400 "missing data parameter", so created_at stays required. updateVisitor never applies company, and companies only applies alongside email. The end-before-start 422 on createDataExport is pre-empted by the validator's 400. convertVisitor now says user is required when type is user. Adds the "missing data parameter" 400 example to createDataEvent. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Addressed in the latest push, with the same edit to 2.17 and Preview:
Re-checked: no new dangling refs or operationId changes, and ~ Automated via Claude |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why?
The 2.17 spec for the data attribute, data event, data export and visitor endpoints didn't match the API. The export docs gave the wrong job limit, link expiry and download format. Event metadata was typed as strings only, the visitor request and response shapes were off, and most error responses were missing. The Preview spec had the same problems, and the next version is cut from Preview, so it needs the same fixes.
How?
Corrects these endpoints and their schemas to match the API's current behaviour, and adds the OAuth scopes each endpoint accepts to its description. The same changes go into the Preview spec, keeping content that only applies to Preview, such as the
{id}path parameter name. Preview's data export fieldjob_identfieris also renamedjob_identifier, the name the API sends.Risks
The Preview SDKs are generated from this spec, so these changes affect generated Preview types:
datetimeleavesCreateDataAttributeRequestOneDataTypeDataAttributeDataTypegainsrelationshipDataExport.job_identfieris renamedjob_identifierjob_identfierjob_identifier, so the misspelt field was never setuserbecomes optionalVisitorCompanies.companiesitems becomeVisitorCompaniesCompaniesIteminstead ofCompany,VisitorSegments.segmentsitems becomeVisitorSegmentsSegmentsIteminstead of strings, andVisitor.custom_attributesvalues become a string, integer, number or boolean uniontypebecomes theLisDataEventsRequestTypeenum, the filter union gainsLisDataEventsRequestFilterAnonymousId, andbefore,sinceandper_pageare newNotes for reviewers
create_data_event_summaries_requestnow says one ofid,user_idoremailis required, as ananyOf.fern checkfails on thatanyOf, sofern/preview-openapi-overrides.ymldrops it, and the Preview request type doesn't change.metadataondata_eventandcreate_data_event_requestnow lists the value types. The Preview Fern overrides already keepmetadataa free-form map, so those types don't change either.fern checkshows 0 errors. There are no new dangling refs and no operationId changes, and none of the changed Preview types isunknown.Generated with Claude Code