## Parse Unverified ### Unwrap Webhook Event
The whole hunk
from line 2, old and new numbered
/
lines
The two sides of this change are more than 400 edits apart, too far apart to line up, so this is the differ's own diff of it and the words inside a line are not marked.
from line 2
22
33## Unwrap
44
5Verifies the webhook signature from the `webhook-id`, `webhook-timestamp` and `webhook-signature`
6headers using your webhook signing key, then parses the payload into an event. Fails if the
7signature is missing or invalid.
8
9## Parse Unverified
10
11Parses a webhook payload into an event without verifying its signature. Prefer `unwrap()` unless
12you have already verified the signature yourself.
13
514## Domain types
615
716### Beta Webhook Agent Archived Event Data
from line 1792
17831792 - `type: "vault.deleted"`
17841793
17851794 - `workspace_id: string`
1786
1787### Unwrap Webhook Event
1788
1789- `UnwrapWebhookEvent object`
1790
1791 - `id: string`
1792
1793 Unique event identifier for idempotency.
1794
1795 - `created_at: string`
1796
1797 RFC 3339 timestamp when the event occurred.
1798
1799 format: date-time
1800
1801 - `data: BetaWebhookEventData`
1802
1803 - `BetaWebhookSessionCreatedEventData object`
1804
1805 - `id: string`
1806
1807 ID of the session that triggered the event.
1808
1809 - `organization_id: string`
1810
1811 - `type: "session.created"`
1812
1813 - `workspace_id: string`
1814
1815 - `BetaWebhookSessionPendingEventData object`
1816
1817 - `id: string`
1818
1819 ID of the session that triggered the event.
1820
1821 - `organization_id: string`
1822
1823 - `type: "session.pending"`
1824
1825 - `workspace_id: string`
1826
1827 - `BetaWebhookSessionRunningEventData object`
1828
1829 - `id: string`
1830
1831 ID of the session that triggered the event.
1832
1833 - `organization_id: string`
1834
1835 - `type: "session.running"`
1836
1837 - `workspace_id: string`
1838
1839 - `BetaWebhookSessionIdledEventData object`
1840
1841 - `id: string`
1842
1843 ID of the session that triggered the event.
1844
1845 - `organization_id: string`
1846
1847 - `type: "session.idled"`
1848
1849 - `workspace_id: string`
1850
1851 - `BetaWebhookSessionRequiresActionEventData object`
1852
1853 - `id: string`
1854
1855 ID of the session that triggered the event.
1856
1857 - `organization_id: string`
1858
1859 - `type: "session.requires_action"`
1860
1861 - `workspace_id: string`
1862
1863 - `BetaWebhookSessionArchivedEventData object`
1864
1865 - `id: string`
1866
1867 ID of the session that triggered the event.
1868
1869 - `organization_id: string`
1870
1871 - `type: "session.archived"`
1872
1873 - `workspace_id: string`
1874
1875 - `BetaWebhookSessionDeletedEventData object`
1876
1877 - `id: string`
1878
1879 ID of the session that triggered the event.
1880
1881 - `organization_id: string`
1882
1883 - `type: "session.deleted"`
1884
1885 - `workspace_id: string`
1886
1887 - `BetaWebhookSessionStatusRescheduledEventData object`
1888
1889 - `id: string`
1890
1891 ID of the session that triggered the event.
1892
1893 - `organization_id: string`
1894
1895 - `type: "session.status_rescheduled"`
1896
1897 - `workspace_id: string`
1898
1899 - `BetaWebhookSessionStatusRunStartedEventData object`
1900
1901 - `id: string`
1902
1903 ID of the session that triggered the event.
1904
1905 - `organization_id: string`
1906
1907 - `type: "session.status_run_started"`
1908
1909 - `workspace_id: string`
1910
1911 - `BetaWebhookSessionStatusIdledEventData object`
1912
1913 - `id: string`
1914
1915 ID of the session that triggered the event.
1916
1917 - `organization_id: string`
1918
1919 - `type: "session.status_idled"`
1920
1921 - `workspace_id: string`
1922
1923 - `BetaWebhookSessionStatusTerminatedEventData object`
1924
1925 - `id: string`
1926
1927 ID of the session that triggered the event.
1928
1929 - `organization_id: string`
1930
1931 - `type: "session.status_terminated"`
1932
1933 - `workspace_id: string`
1934
1935 - `BetaWebhookSessionThreadCreatedEventData object`
1936
1937 - `id: string`
1938
1939 ID of the session that triggered the event.
1940
1941 - `organization_id: string`
1942
1943 - `session_thread_id: string`
1944
1945 ID of the session thread this event refers to.
1946
1947 - `type: "session.thread_created"`
1948
1949 - `workspace_id: string`
1950
1951 - `BetaWebhookSessionThreadIdledEventData object`
1952
1953 - `id: string`
1954
1955 ID of the session that triggered the event.
1956
1957 - `organization_id: string`
1958
1959 - `session_thread_id: string`
1960
1961 ID of the session thread this event refers to.
1962
1963 - `type: "session.thread_idled"`
1964
1965 - `workspace_id: string`
1966
1967 - `BetaWebhookSessionThreadTerminatedEventData object`
1968
1969 - `id: string`
1970
1971 ID of the session that triggered the event.
1972
1973 - `organization_id: string`
1974
1975 - `session_thread_id: string`
1976
1977 ID of the session thread this event refers to.
1978
1979 - `type: "session.thread_terminated"`
1980
1981 - `workspace_id: string`
1982
1983 - `BetaWebhookSessionOutcomeEvaluationEndedEventData object`
1984
1985 - `id: string`
1986
1987 ID of the session that triggered the event.
1988
1989 - `organization_id: string`
1990
1991 - `type: "session.outcome_evaluation_ended"`
1992
1993 - `workspace_id: string`
1994
1995 - `BetaWebhookVaultCreatedEventData object`
1996
1997 - `id: string`
1998
1999 ID of the vault that triggered the event.
2000
2001 - `organization_id: string`
2002
2003 - `type: "vault.created"`
2004
2005 - `workspace_id: string`
2006
2007 - `BetaWebhookVaultArchivedEventData object`
2008
2009 - `id: string`
2010
2011 ID of the vault that triggered the event.
2012
2013 - `organization_id: string`
2014
2015 - `type: "vault.archived"`
2016
2017 - `workspace_id: string`
2018
2019 - `BetaWebhookVaultDeletedEventData object`
2020
2021 - `id: string`
2022
2023 ID of the vault that triggered the event.
2024
2025 - `organization_id: string`
2026
2027 - `type: "vault.deleted"`
2028
2029 - `workspace_id: string`
2030
2031 - `BetaWebhookVaultCredentialCreatedEventData object`
2032
2033 - `id: string`
2034
2035 ID of the vault credential that triggered the event.
2036
2037 - `organization_id: string`
2038
2039 - `type: "vault_credential.created"`
2040
2041 - `vault_id: string`
2042
2043 ID of the vault that owns this credential.
2044
2045 - `workspace_id: string`
2046
2047 - `BetaWebhookVaultCredentialArchivedEventData object`
2048
2049 - `id: string`
2050
2051 ID of the vault credential that triggered the event.
2052
2053 - `organization_id: string`
2054
2055 - `type: "vault_credential.archived"`
2056
2057 - `vault_id: string`
2058
2059 ID of the vault that owns this credential.
2060
2061 - `workspace_id: string`
2062
2063 - `BetaWebhookVaultCredentialDeletedEventData object`
2064
2065 - `id: string`
2066
2067 ID of the vault credential that triggered the event.
2068
2069 - `organization_id: string`
2070
2071 - `type: "vault_credential.deleted"`
2072
2073 - `vault_id: string`
2074
2075 ID of the vault that owns this credential.
2076
2077 - `workspace_id: string`
2078
2079 - `BetaWebhookVaultCredentialRefreshFailedEventData object`
2080
2081 - `id: string`
2082
2083 ID of the vault credential that triggered the event.
2084
2085 - `organization_id: string`
2086
2087 - `type: "vault_credential.refresh_failed"`
2088
2089 - `vault_id: string`
2090
2091 ID of the vault that owns this credential.
2092
2093 - `workspace_id: string`
2094
2095 - `BetaWebhookSessionUpdatedEventData object`
2096
2097 - `id: string`
2098
2099 ID of the session that triggered the event.
2100
2101 - `organization_id: string`
2102
2103 - `type: "session.updated"`
2104
2105 - `workspace_id: string`
2106
2107 - `BetaWebhookAgentCreatedEventData object`
2108
2109 - `id: string`
2110
2111 ID of the agent that triggered the event.
2112
2113 - `organization_id: string`
2114
2115 - `type: "agent.created"`
2116
2117 - `workspace_id: string`
2118
2119 - `BetaWebhookAgentArchivedEventData object`
2120
2121 - `id: string`
2122
2123 ID of the agent that triggered the event.
2124
2125 - `organization_id: string`
2126
2127 - `type: "agent.archived"`
2128
2129 - `workspace_id: string`
2130
2131 - `BetaWebhookAgentDeletedEventData object`
2132
2133 - `id: string`
2134
2135 ID of the agent that triggered the event.
2136
2137 - `organization_id: string`
2138
2139 - `type: "agent.deleted"`
2140
2141 - `workspace_id: string`
2142
2143 - `BetaWebhookDeploymentPausedEventData object`
2144
2145 - `id: string`
2146
2147 ID of the deployment that triggered the event.
2148
2149 - `organization_id: string`
2150
2151 - `type: "deployment.paused"`
2152
2153 - `workspace_id: string`
2154
2155 - `BetaWebhookDeploymentRunFailedEventData object`
2156
2157 - `id: string`
2158
2159 ID of the deployment run that triggered the event.
2160
2161 - `organization_id: string`
2162
2163 - `type: "deployment_run.failed"`
2164
2165 - `workspace_id: string`
2166
2167 - `BetaWebhookDeploymentCreatedEventData object`
2168
2169 - `id: string`
2170
2171 ID of the deployment that triggered the event.
2172
2173 - `organization_id: string`
2174
2175 - `type: "deployment.created"`
2176
2177 - `workspace_id: string`
2178
2179 - `BetaWebhookDeploymentUpdatedEventData object`
2180
2181 - `id: string`
2182
2183 ID of the deployment that triggered the event.
2184
2185 - `organization_id: string`
2186
2187 - `type: "deployment.updated"`
2188
2189 - `workspace_id: string`
2190
2191 - `BetaWebhookDeploymentUnpausedEventData object`
2192
2193 - `id: string`
2194
2195 ID of the deployment that triggered the event.
2196
2197 - `organization_id: string`
2198
2199 - `type: "deployment.unpaused"`
2200
2201 - `workspace_id: string`
2202
2203 - `BetaWebhookAgentUpdatedEventData object`
2204
2205 - `id: string`
2206
2207 ID of the agent that triggered the event.
2208
2209 - `organization_id: string`
2210
2211 - `type: "agent.updated"`
2212
2213 - `workspace_id: string`
2214
2215 - `BetaWebhookDeploymentArchivedEventData object`
2216
2217 - `id: string`
2218
2219 ID of the deployment that triggered the event.
2220
2221 - `organization_id: string`
2222
2223 - `type: "deployment.archived"`
2224
2225 - `workspace_id: string`
2226
2227 - `BetaWebhookDeploymentRunStartedEventData object`
2228
2229 - `id: string`
2230
2231 ID of the deployment run that triggered the event.
2232
2233 - `organization_id: string`
2234
2235 - `type: "deployment_run.started"`
2236
2237 - `workspace_id: string`
2238
2239 - `BetaWebhookDeploymentDeletedEventData object`
2240
2241 - `id: string`
2242
2243 ID of the deployment that triggered the event.
2244
2245 - `organization_id: string`
2246
2247 - `type: "deployment.deleted"`
2248
2249 - `workspace_id: string`
2250
2251 - `BetaWebhookDeploymentRunSucceededEventData object`
2252
2253 - `id: string`
2254
2255 ID of the deployment run that triggered the event.
2256
2257 - `organization_id: string`
2258
2259 - `type: "deployment_run.succeeded"`
2260
2261 - `workspace_id: string`
2262
2263 - `BetaWebhookEnvironmentCreatedEventData object`
2264
2265 - `id: string`
2266
2267 ID of the environment that triggered the event.
2268
2269 - `organization_id: string`
2270
2271 - `type: "environment.created"`
2272
2273 - `workspace_id: string`
2274
2275 - `BetaWebhookEnvironmentUpdatedEventData object`
2276
2277 - `id: string`
2278
2279 ID of the environment that triggered the event.
2280
2281 - `organization_id: string`
2282
2283 - `type: "environment.updated"`
2284
2285 - `workspace_id: string`
2286
2287 - `BetaWebhookEnvironmentArchivedEventData object`
2288
2289 - `id: string`
2290
2291 ID of the environment that triggered the event.
2292
2293 - `organization_id: string`
2294
2295 - `type: "environment.archived"`
2296
2297 - `workspace_id: string`
2298
2299 - `BetaWebhookEnvironmentDeletedEventData object`
2300
2301 - `id: string`
2302
2303 ID of the environment that triggered the event.
2304
2305 - `organization_id: string`
2306
2307 - `type: "environment.deleted"`
2308
2309 - `workspace_id: string`
2310
2311 - `BetaWebhookMemoryStoreCreatedEventData object`
2312
2313 - `id: string`
2314
2315 ID of the memory store that triggered the event.
2316
2317 - `organization_id: string`
2318
2319 - `type: "memory_store.created"`
2320
2321 - `workspace_id: string`
2322
2323 - `BetaWebhookMemoryStoreArchivedEventData object`
2324
2325 - `id: string`
2326
2327 ID of the memory store that triggered the event.
2328
2329 - `organization_id: string`
2330
2331 - `type: "memory_store.archived"`
2332
2333 - `workspace_id: string`
2334
2335 - `BetaWebhookMemoryStoreDeletedEventData object`
2336
2337 - `id: string`
2338
2339 ID of the memory store that triggered the event.
2340
2341 - `organization_id: string`
2342
2343 - `type: "memory_store.deleted"`
2344
2345 - `workspace_id: string`
2346
2347 - `BetaWebhookSessionBudgetReachedEventData object`
2348
2349 - `id: string`
2350
2351 ID of the session that triggered the event.
2352
2353 - `organization_id: string`
2354
2355 - `type: "session.budget_reached"`
2356
2357 - `workspace_id: string`
2358
2359 - `type: "event"`
2360
2361 Object type. Always `event` for webhook payloads.
23621795