OptionalallowOptionalapiOptionalapiv2025-02-19, the default perspective has changed from raw to published. https://www.sanity.io/changelog/676aaa9d-2da6-44fb-abe5-580f28047c10|ChangelogOptional AlphacollaborationOrganization-scoped configuration for collaboration APIs.
Currently this is used by collaboration.comments methods.
Optional BetacontextOrganization-scoped configuration for Context APIs.
Currently this is used by context.insights methods.
OptionaldatasetOptionalfetchOptionalheadersOptional default headers to include with all requests
OptionalignoreOptionalignoreIgnore specific warning messages from the client.
// Ignore warnings containing "experimental"
ignoreWarnings: 'experimental'
// Ignore multiple warning types
ignoreWarnings: ['experimental', 'deprecated']
// Use regex for exact matching
ignoreWarnings: /^This is an experimental API version$/
// Mix strings and regex patterns
ignoreWarnings: ['rate limit', /^deprecated/i]
OptionallineageLineage token for recursion control
OptionalmaxNumber of retries for requests. Defaults to 5.
OptionalorganizationID of the organization owning the blueprints stack
OptionalperspectiveWhat perspective to use for the client. See documentation
As of API version v2025-02-19, the default perspective has changed from raw to published. https://www.sanity.io/changelog/676aaa9d-2da6-44fb-abe5-580f28047c10|Changelog
OptionalprojectOptionalproxyRoute requests through an HTTP(S) proxy. Node.js only. Can be replaced
on an existing client via client.config({proxy}) or
client.withConfig({proxy}). For environment-driven proxying, set
HTTP_PROXY/HTTPS_PROXY/NO_PROXY before the process starts.
OptionalrequestIntercepts requests after the client has resolved their URL, headers, and
transport options. The handler wraps the normal client pipeline, so errors
from next are already converted to ClientError or
ServerError.
A handler supplied through withConfig() replaces the current handler.
To compose handlers, read the current handler from client.config() and
call it from the replacement.
Browser asset uploads and server-sent event connections are not intercepted.
OptionalrequestOptional request tag prefix for all request tags
OptionalresourceConfigure the client to work with a specific Sanity resource (Media Library, Canvas, etc.)
OptionalresultAdds a resultSourceMap key to the API response, with the type ContentSourceMap
OptionalretryThe amount of time, in milliseconds, to wait before retrying, given an attemptNumber (starting at 0).
Defaults to exponential back-off, starting at 100ms, doubling for each attempt, together with random jitter between 0 and 100 milliseconds. More specifically the following algorithm is used:
Delay = 100 * 2^attemptNumber + randomNumberBetween0and100
OptionalstackID of the blueprints stack that functions.invoke() resolves function
names against. Function names are unique within a stack
OptionalstegaOptions for how, if enabled, Content Source Maps are encoded into query results using steganography
OptionaltimeoutOptionaltokenOptionaluseOptionaluseOptional BetavariantOptionalwith
Deprecated
-- use
ClientConfiginstead