We have utilized Smartsheet-Change-Agent in our API requests to prevent duplication. The changeAgent field is no longer included in Smartsheet Event payloads.
Flow:
- create an asset on company software
- this creation triggers "createSmartsheetRow"
- this function utilizes "Smartsheet-Change-Agent
export const createSmartsheetRow = async (
sheetId: string,
smartsheetApiKey: string,
data: {
toTop: boolean,
cells: {
columnId: number,
value: string,
displayValue?: string,
hyperlink?: { url: string }
}[]
}[],
) => {
return await axios.post(
`https://api.smartsheet.com/2.0/sheets/${sheetId}/rows`,
data,
getSmartsheetApiHeaders(smartsheetApiKey),
).then((res) => {
console.log('createSmartsheetRow res: ', res);
return String(res.data.result[0].id);
}).catch((error) => {
if (error instanceof AxiosError) {
console.log(
'createSmartsheetRow axios err: ',
error.response?.data
);
} else {
console.log('createSmartsheetRow error: ', error);
}
return null;
});
};
export const getSmartsheetApiHeaders = (smartsheetApiKey: string) => {
return {
headers: {
'Authorization': `Bearer ${smartsheetApiKey}`,
'Content-Type': 'application/json',
'Smartsheet-Change-Agent': 'bitrip',
},
};
};
- response from Smartsheet to show "Smartsheet-Change-Agent" in the headers
> createSmartsheetRow res: {
> status: 200,
> statusText: 'OK',
> headers: Object [AxiosHeaders] {
> date: 'Wed, 24 Jun 2026 18:33:45 GMT',
> 'content-type': 'application/json;charset=UTF-8',
> 'transfer-encoding': 'chunked',
> connection: 'keep-alive',
> server: 'halo',
> 'x-ratelimit-limit': '80000',
> 'x-ratelimit-remaining': '79600',
> 'x-ratelimit-reset': '1782326085',
> vary: 'Accept-Encoding',
> 'cache-control': 'no-cache, no-store, must-revalidate',
> pragma: 'no-cache',
> expires: '0',
> 'x-envoy-upstream-service-time': '327',
> 'x-smar-halo-version': '6945394',
> 'x-smar-halo-release': 'l',
> 'strict-transport-security': 'max-age=31536000; includeSubDomains'
> },
> config: {
> transitional: {
> silentJSONParsing: true,
> forcedJSONParsing: true,
> clarifyTimeoutError: false
> },
> adapter: [ 'xhr', 'http', 'fetch' ],
> transformRequest: [ [Function: transformRequest] ],
> transformResponse: [ [Function: transformResponse] ],
> timeout: 0,
> xsrfCookieName: 'XSRF-TOKEN',
> xsrfHeaderName: 'X-XSRF-TOKEN',
> maxContentLength: -1,
> maxBodyLength: -1,
> env: { FormData: [Function [FormData]], Blob: [class Blob] },
> validateStatus: [Function: validateStatus],
> headers: Object [AxiosHeaders] {
> Accept: 'application/json, text/plain, */*',
> 'Content-Type': 'application/json',
> Authorization: 'Bearer J766A4x0tr3TdPZW4BttYc6dBRT65CqFldXXJ',
> 'Smartsheet-Change-Agent': 'bitrip',
> 'User-Agent': 'axios/1.12.2',
> 'Content-Length': '122',
> 'Accept-Encoding': 'gzip, compress, deflate, br'
> },
> method: 'post',
> url: 'https://api.smartsheet.com/2.0/sheets/3472654027673476/rows',
> data: '[{"toTop":false,"cells":[{"columnId":4963877392699268,"value":""},{"columnId":5347692510138244,"value":"Forum Example"}]}]',
> allowAbsoluteUrls: true
> },
> request: <ref *1> ClientRequest {
> _events: [Object: null prototype] {
> abort: [Function (anonymous)],
> aborted: [Function (anonymous)],
> connect: [Function (anonymous)],
> error: [Function (anonymous)],
> socket: [Function (anonymous)],
> timeout: [Function (anonymous)],
> finish: [Function: requestOnFinish]
> },
> _eventsCount: 7,
> _maxListeners: undefined,
> outputData: [],
> outputSize: 0,
> writable: true,
> destroyed: true,
> _last: false,
> chunkedEncoding: false,
> shouldKeepAlive: true,
> maxRequestsOnConnectionReached: false,
> _defaultKeepAlive: true,
> useChunkedEncodingByDefault: true,
> sendDate: false,
> _removedConnection: false,
> _removedContLen: false,
> _removedTE: false,
> strictContentLength: false,
> _contentLength: '122',
> _hasBody: true,
> _trailer: '',
> finished: true,
> _headerSent: true,
> _closed: true,
> socket: TLSSocket {
> _tlsOptions: [Object],
> _secureEstablished: true,
> _securePending: false,
> _newSessionPending: false,
> _controlReleased: true,
> secureConnecting: false,
> _SNICallback: null,
> servername: 'api.smartsheet.com',
> alpnProtocol: false,
> authorized: true,
> authorizationError: null,
> encrypted: true,
> _events: [Object: null prototype],
> _eventsCount: 9,
> connecting: false,
> _hadError: false,
> _parent: null,
> _host: 'api.smartsheet.com',
> _closeAfterHandlingError: false,
> _readableState: [ReadableState],
> _writableState: [WritableState],
> allowHalfOpen: false,
> _maxListeners: undefined,
> _sockname: null,
> _pendingData: null,
> _pendingEncoding: '',
> server: undefined,
> _server: null,
> ssl: [TLSWrap],
> _requestCert: true,
> _rejectUnauthorized: true,
> timeout: 5000,
> parser: null,
> _httpMessage: null,
> autoSelectFamilyAttemptedAddresses: [Array],
> [Symbol(alpncallback)]: null,
> [Symbol(res)]: [TLSWrap],
> [Symbol(verified)]: true,
> [Symbol(pendingSession)]: null,
> [Symbol(async_id_symbol)]: -1,
> [Symbol(kHandle)]: [TLSWrap],
> [Symbol(lastWriteQueueSize)]: 0,
> [Symbol(timeout)]: Timeout {
> _idleTimeout: 5000,
> _idlePrev: [TimersList],
> _idleNext: [Timeout],
> _idleStart: 2417,
> _onTimeout: [Function: bound ],
> _timerArgs: undefined,
> _repeat: null,
> _destroyed: false,
> [Symbol(refed)]: false,
> [Symbol(kHasPrimitive)]: false,
> [Symbol(asyncId)]: 2728,
> [Symbol(triggerId)]: 2726,
> [Symbol(kResourceStore)]: [BaseContext]
> },
> [Symbol(kBuffer)]: null,
> [Symbol(kBufferCb)]: null,
> [Symbol(kBufferGen)]: null,
> [Symbol(shapeMode)]: true,
> [Symbol(kCapture)]: false,
> [Symbol(kSetNoDelay)]: false,
> [Symbol(kSetKeepAlive)]: true,
> [Symbol(kSetKeepAliveInitialDelay)]: 1,
> [Symbol(kBytesRead)]: 0,
> [Symbol(kBytesWritten)]: 0,
> [Symbol(connect-options)]: [Object]
> },
> _header: 'POST /2.0/sheets/3472654027673476/rows HTTP/1.1\r\n' +
> 'Accept: application/json, text/plain, */*\r\n' +
> 'Content-Type: application/json\r\n' +
> 'Authorization: Bearer J766A4x0tr3TdPZW4BttYc6dBRT65CqFldXXJ\r\n' +
> 'Smartsheet-Change-Agent: bitrip\r\n' +
> 'User-Agent: axios/1.12.2\r\n' +
> 'Content-Length: 122\r\n' +
> 'Accept-Encoding: gzip, compress, deflate, br\r\n' +
> 'Host: api.smartsheet.com\r\n' +
> 'Connection: keep-alive\r\n' +
> '\r\n',
> _keepAliveTimeout: 0,
> _onPendingData: [Function: nop],
> agent: Agent {
> _events: [Object: null prototype],
> _eventsCount: 2,
> _maxListeners: undefined,
> defaultPort: 443,
> protocol: 'https:',
> options: [Object: null prototype],
> requests: [Object: null prototype] {},
> sockets: [Object: null prototype],
> freeSockets: [Object: null prototype],
> keepAliveMsecs: 1000,
> keepAlive: true,
> maxSockets: Infinity,
> maxFreeSockets: 256,
> scheduling: 'lifo',
> maxTotalSockets: Infinity,
> totalSocketCount: 2,
> maxCachedSessions: 100,
> _sessionCache: [Object],
> [Symbol(shapeMode)]: false,
> [Symbol(kCapture)]: false
> },
> socketPath: undefined,
> method: 'POST',
> maxHeaderSize: undefined,
> insecureHTTPParser: undefined,
> joinDuplicateHeaders: undefined,
> path: '/2.0/sheets/3472654027673476/rows',
> _ended: true,
> res: IncomingMessage {
> _events: [Object],
> _readableState: [ReadableState],
> _maxListeners: undefined,
> socket: null,
> httpVersionMajor: 1,
> httpVersionMinor: 1,
> httpVersion: '1.1',
> complete: true,
> rawHeaders: [Array],
> rawTrailers: [],
> joinDuplicateHeaders: undefined,
> aborted: false,
> upgrade: false,
> url: '',
> method: null,
> statusCode: 200,
> statusMessage: 'OK',
> client: [TLSSocket],
> _consuming: true,
> _dumped: false,
> req: [Circular *1],
> _eventsCount: 4,
> responseUrl: 'https://api.smartsheet.com/2.0/sheets/3472654027673476/rows',
> redirects: [],
> [Symbol(shapeMode)]: true,
> [Symbol(kCapture)]: false,
> [Symbol(kHeaders)]: [Object],
> [Symbol(kHeadersCount)]: 34,
> [Symbol(kTrailers)]: null,
> [Symbol(kTrailersCount)]: 0
> },
> aborted: false,
> timeoutCb: null,
> upgradeOrConnect: false,
> parser: null,
> maxHeadersCount: null,
> reusedSocket: false,
> host: 'api.smartsheet.com',
> protocol: 'https:',
> _redirectable: Writable {
> _events: [Object],
> _writableState: [WritableState],
> _maxListeners: undefined,
> _options: [Object],
> _ended: true,
> _ending: true,
> _redirectCount: 0,
> _redirects: [],
> _requestBodyLength: 122,
> _requestBodyBuffers: [],
> _eventsCount: 3,
> _onNativeResponse: [Function (anonymous)],
> _currentRequest: [Circular *1],
> _currentUrl: 'https://api.smartsheet.com/2.0/sheets/3472654027673476/rows',
> [Symbol(shapeMode)]: true,
> [Symbol(kCapture)]: false
> },
> [Symbol(shapeMode)]: false,
> [Symbol(kCapture)]: false,
> [Symbol(kBytesWritten)]: 0,
> [Symbol(kNeedDrain)]: false,
> [Symbol(corked)]: 0,
> [Symbol(kOutHeaders)]: [Object: null prototype] {
> accept: [Array],
> 'content-type': [Array],
> authorization: [Array],
> 'smartsheet-change-agent': [Array],
> 'user-agent': [Array],
> 'content-length': [Array],
> 'accept-encoding': [Array],
> host: [Array]
> },
> [Symbol(errored)]: null,
> [Symbol(kHighWaterMark)]: 16384,
> [Symbol(kRejectNonStandardBodyWrites)]: false,
> [Symbol(kUniqueHeaders)]: null
> },
> data: {
> message: 'SUCCESS',
> resultCode: 0,
> version: 6295,
> result: [ [Object] ]
> }
> }
- smartsheet webhook fires with "row created" event
- we have a guard checking
changeAgent in each event
Expected:
- the guard checking
changeAgent should prevent duplicates
Reality:
- the
changeAgent field is no longer present in the smartsheet event payload
> payload {
> scopeObjectId: '3472654027673476',
> webhookId: '714595032688516',
> events: [
> {
> eventType: 'created',
> userId: '8883254183913348',
> timestamp: '2026-06-24T18:39:29.000+00:00',
> objectType: 'row',
> id: '8165351306755972'
> },
> {
> eventType: 'created',
> userId: '8883254183913348',
> timestamp: '2026-06-24T18:39:29.000+00:00',
> objectType: 'cell',
> rowId: '8165351306755972',
> columnId: '4963877392699268'
> },
> {
> eventType: 'created',
> userId: '8883254183913348',
> timestamp: '2026-06-24T18:39:29.000+00:00',
> objectType: 'cell',
> rowId: '8165351306755972',
> columnId: '5347692510138244'
> },
> {
> eventType: 'created',
> userId: '8883254183913348',
> timestamp: '2026-06-24T18:39:29.000+00:00',
> objectType: 'sheet',
> id: '3472654027673476'
> }
> ],
> newWebhookStatus: null,
> nonce: '767edf7a-932b-44a2-b24e-fab0964059e8',
> scope: 'sheet',
> timestamp: '2026-06-24T18:40:37Z'
> }