@anthropic-ai/sdk 0.123.0 → 0.124.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (358) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/client.d.mts +6 -5
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +6 -5
  5. package/client.d.ts.map +1 -1
  6. package/client.js +2 -1
  7. package/client.js.map +1 -1
  8. package/client.mjs +2 -1
  9. package/client.mjs.map +1 -1
  10. package/core/streaming.js +4 -2
  11. package/core/streaming.js.map +1 -1
  12. package/core/streaming.mjs +4 -2
  13. package/core/streaming.mjs.map +1 -1
  14. package/package.json +1 -1
  15. package/resources/beta/agents/agents.d.mts +45 -0
  16. package/resources/beta/agents/agents.d.mts.map +1 -1
  17. package/resources/beta/agents/agents.d.ts +45 -0
  18. package/resources/beta/agents/agents.d.ts.map +1 -1
  19. package/resources/beta/agents/agents.js +25 -10
  20. package/resources/beta/agents/agents.js.map +1 -1
  21. package/resources/beta/agents/agents.mjs +25 -10
  22. package/resources/beta/agents/agents.mjs.map +1 -1
  23. package/resources/beta/agents/versions.d.mts +9 -0
  24. package/resources/beta/agents/versions.d.mts.map +1 -1
  25. package/resources/beta/agents/versions.d.ts +9 -0
  26. package/resources/beta/agents/versions.d.ts.map +1 -1
  27. package/resources/beta/agents/versions.js +5 -2
  28. package/resources/beta/agents/versions.js.map +1 -1
  29. package/resources/beta/agents/versions.mjs +5 -2
  30. package/resources/beta/agents/versions.mjs.map +1 -1
  31. package/resources/beta/deployment-runs.d.mts +18 -0
  32. package/resources/beta/deployment-runs.d.mts.map +1 -1
  33. package/resources/beta/deployment-runs.d.ts +18 -0
  34. package/resources/beta/deployment-runs.d.ts.map +1 -1
  35. package/resources/beta/deployment-runs.js +10 -4
  36. package/resources/beta/deployment-runs.js.map +1 -1
  37. package/resources/beta/deployment-runs.mjs +10 -4
  38. package/resources/beta/deployment-runs.mjs.map +1 -1
  39. package/resources/beta/deployments.d.mts +72 -0
  40. package/resources/beta/deployments.d.mts.map +1 -1
  41. package/resources/beta/deployments.d.ts +72 -0
  42. package/resources/beta/deployments.d.ts.map +1 -1
  43. package/resources/beta/deployments.js +40 -16
  44. package/resources/beta/deployments.js.map +1 -1
  45. package/resources/beta/deployments.mjs +40 -16
  46. package/resources/beta/deployments.mjs.map +1 -1
  47. package/resources/beta/dreams.d.mts +45 -0
  48. package/resources/beta/dreams.d.mts.map +1 -1
  49. package/resources/beta/dreams.d.ts +45 -0
  50. package/resources/beta/dreams.d.ts.map +1 -1
  51. package/resources/beta/dreams.js +25 -10
  52. package/resources/beta/dreams.js.map +1 -1
  53. package/resources/beta/dreams.mjs +25 -10
  54. package/resources/beta/dreams.mjs.map +1 -1
  55. package/resources/beta/environments/environments.d.mts +54 -0
  56. package/resources/beta/environments/environments.d.mts.map +1 -1
  57. package/resources/beta/environments/environments.d.ts +54 -0
  58. package/resources/beta/environments/environments.d.ts.map +1 -1
  59. package/resources/beta/environments/environments.js +30 -12
  60. package/resources/beta/environments/environments.js.map +1 -1
  61. package/resources/beta/environments/environments.mjs +30 -12
  62. package/resources/beta/environments/environments.mjs.map +1 -1
  63. package/resources/beta/environments/work.d.mts +36 -0
  64. package/resources/beta/environments/work.d.mts.map +1 -1
  65. package/resources/beta/environments/work.d.ts +36 -0
  66. package/resources/beta/environments/work.d.ts.map +1 -1
  67. package/resources/beta/environments/work.js +20 -8
  68. package/resources/beta/environments/work.js.map +1 -1
  69. package/resources/beta/environments/work.mjs +20 -8
  70. package/resources/beta/environments/work.mjs.map +1 -1
  71. package/resources/beta/files.d.mts +48 -1
  72. package/resources/beta/files.d.mts.map +1 -1
  73. package/resources/beta/files.d.ts +48 -1
  74. package/resources/beta/files.d.ts.map +1 -1
  75. package/resources/beta/files.js +22 -9
  76. package/resources/beta/files.js.map +1 -1
  77. package/resources/beta/files.mjs +22 -9
  78. package/resources/beta/files.mjs.map +1 -1
  79. package/resources/beta/memory-stores/memories.d.mts +45 -0
  80. package/resources/beta/memory-stores/memories.d.mts.map +1 -1
  81. package/resources/beta/memory-stores/memories.d.ts +45 -0
  82. package/resources/beta/memory-stores/memories.d.ts.map +1 -1
  83. package/resources/beta/memory-stores/memories.js +25 -10
  84. package/resources/beta/memory-stores/memories.js.map +1 -1
  85. package/resources/beta/memory-stores/memories.mjs +25 -10
  86. package/resources/beta/memory-stores/memories.mjs.map +1 -1
  87. package/resources/beta/memory-stores/memory-stores.d.mts +54 -0
  88. package/resources/beta/memory-stores/memory-stores.d.mts.map +1 -1
  89. package/resources/beta/memory-stores/memory-stores.d.ts +54 -0
  90. package/resources/beta/memory-stores/memory-stores.d.ts.map +1 -1
  91. package/resources/beta/memory-stores/memory-stores.js +30 -12
  92. package/resources/beta/memory-stores/memory-stores.js.map +1 -1
  93. package/resources/beta/memory-stores/memory-stores.mjs +30 -12
  94. package/resources/beta/memory-stores/memory-stores.mjs.map +1 -1
  95. package/resources/beta/memory-stores/memory-versions.d.mts +31 -4
  96. package/resources/beta/memory-stores/memory-versions.d.mts.map +1 -1
  97. package/resources/beta/memory-stores/memory-versions.d.ts +31 -4
  98. package/resources/beta/memory-stores/memory-versions.d.ts.map +1 -1
  99. package/resources/beta/memory-stores/memory-versions.js +15 -6
  100. package/resources/beta/memory-stores/memory-versions.js.map +1 -1
  101. package/resources/beta/memory-stores/memory-versions.mjs +15 -6
  102. package/resources/beta/memory-stores/memory-versions.mjs.map +1 -1
  103. package/resources/beta/messages/batches.d.mts +54 -0
  104. package/resources/beta/messages/batches.d.mts.map +1 -1
  105. package/resources/beta/messages/batches.d.ts +54 -0
  106. package/resources/beta/messages/batches.d.ts.map +1 -1
  107. package/resources/beta/messages/batches.js +25 -11
  108. package/resources/beta/messages/batches.js.map +1 -1
  109. package/resources/beta/messages/batches.mjs +25 -11
  110. package/resources/beta/messages/batches.mjs.map +1 -1
  111. package/resources/beta/messages/messages.d.mts +18 -0
  112. package/resources/beta/messages/messages.d.mts.map +1 -1
  113. package/resources/beta/messages/messages.d.ts +18 -0
  114. package/resources/beta/messages/messages.d.ts.map +1 -1
  115. package/resources/beta/messages/messages.js +4 -2
  116. package/resources/beta/messages/messages.js.map +1 -1
  117. package/resources/beta/messages/messages.mjs +4 -2
  118. package/resources/beta/messages/messages.mjs.map +1 -1
  119. package/resources/beta/models.d.mts +18 -0
  120. package/resources/beta/models.d.mts.map +1 -1
  121. package/resources/beta/models.d.ts +18 -0
  122. package/resources/beta/models.d.ts.map +1 -1
  123. package/resources/beta/models.js +10 -4
  124. package/resources/beta/models.js.map +1 -1
  125. package/resources/beta/models.mjs +10 -4
  126. package/resources/beta/models.mjs.map +1 -1
  127. package/resources/beta/organization/compliance-settings.d.mts +5 -3
  128. package/resources/beta/organization/compliance-settings.d.mts.map +1 -1
  129. package/resources/beta/organization/compliance-settings.d.ts +5 -3
  130. package/resources/beta/organization/compliance-settings.d.ts.map +1 -1
  131. package/resources/beta/organization/index.d.mts +1 -1
  132. package/resources/beta/organization/index.d.mts.map +1 -1
  133. package/resources/beta/organization/index.d.ts +1 -1
  134. package/resources/beta/organization/index.d.ts.map +1 -1
  135. package/resources/beta/organization/index.js.map +1 -1
  136. package/resources/beta/organization/index.mjs.map +1 -1
  137. package/resources/beta/organization/organization.d.mts +2 -2
  138. package/resources/beta/organization/organization.d.mts.map +1 -1
  139. package/resources/beta/organization/organization.d.ts +2 -2
  140. package/resources/beta/organization/organization.d.ts.map +1 -1
  141. package/resources/beta/organization/organization.js.map +1 -1
  142. package/resources/beta/organization/organization.mjs.map +1 -1
  143. package/resources/beta/sessions/events.d.mts +27 -0
  144. package/resources/beta/sessions/events.d.mts.map +1 -1
  145. package/resources/beta/sessions/events.d.ts +27 -0
  146. package/resources/beta/sessions/events.d.ts.map +1 -1
  147. package/resources/beta/sessions/events.js +15 -6
  148. package/resources/beta/sessions/events.js.map +1 -1
  149. package/resources/beta/sessions/events.mjs +15 -6
  150. package/resources/beta/sessions/events.mjs.map +1 -1
  151. package/resources/beta/sessions/resources.d.mts +45 -0
  152. package/resources/beta/sessions/resources.d.mts.map +1 -1
  153. package/resources/beta/sessions/resources.d.ts +45 -0
  154. package/resources/beta/sessions/resources.d.ts.map +1 -1
  155. package/resources/beta/sessions/resources.js +25 -10
  156. package/resources/beta/sessions/resources.js.map +1 -1
  157. package/resources/beta/sessions/resources.mjs +25 -10
  158. package/resources/beta/sessions/resources.mjs.map +1 -1
  159. package/resources/beta/sessions/sessions.d.mts +54 -0
  160. package/resources/beta/sessions/sessions.d.mts.map +1 -1
  161. package/resources/beta/sessions/sessions.d.ts +54 -0
  162. package/resources/beta/sessions/sessions.d.ts.map +1 -1
  163. package/resources/beta/sessions/sessions.js +30 -12
  164. package/resources/beta/sessions/sessions.js.map +1 -1
  165. package/resources/beta/sessions/sessions.mjs +30 -12
  166. package/resources/beta/sessions/sessions.mjs.map +1 -1
  167. package/resources/beta/sessions/threads/events.d.mts +18 -0
  168. package/resources/beta/sessions/threads/events.d.mts.map +1 -1
  169. package/resources/beta/sessions/threads/events.d.ts +18 -0
  170. package/resources/beta/sessions/threads/events.d.ts.map +1 -1
  171. package/resources/beta/sessions/threads/events.js +10 -4
  172. package/resources/beta/sessions/threads/events.js.map +1 -1
  173. package/resources/beta/sessions/threads/events.mjs +10 -4
  174. package/resources/beta/sessions/threads/events.mjs.map +1 -1
  175. package/resources/beta/sessions/threads/threads.d.mts +27 -0
  176. package/resources/beta/sessions/threads/threads.d.mts.map +1 -1
  177. package/resources/beta/sessions/threads/threads.d.ts +27 -0
  178. package/resources/beta/sessions/threads/threads.d.ts.map +1 -1
  179. package/resources/beta/sessions/threads/threads.js +15 -6
  180. package/resources/beta/sessions/threads/threads.js.map +1 -1
  181. package/resources/beta/sessions/threads/threads.mjs +15 -6
  182. package/resources/beta/sessions/threads/threads.mjs.map +1 -1
  183. package/resources/beta/skills/skills.d.mts +36 -0
  184. package/resources/beta/skills/skills.d.mts.map +1 -1
  185. package/resources/beta/skills/skills.d.ts +36 -0
  186. package/resources/beta/skills/skills.d.ts.map +1 -1
  187. package/resources/beta/skills/skills.js +20 -8
  188. package/resources/beta/skills/skills.js.map +1 -1
  189. package/resources/beta/skills/skills.mjs +20 -8
  190. package/resources/beta/skills/skills.mjs.map +1 -1
  191. package/resources/beta/skills/versions.d.mts +45 -0
  192. package/resources/beta/skills/versions.d.mts.map +1 -1
  193. package/resources/beta/skills/versions.d.ts +45 -0
  194. package/resources/beta/skills/versions.d.ts.map +1 -1
  195. package/resources/beta/skills/versions.js +22 -9
  196. package/resources/beta/skills/versions.js.map +1 -1
  197. package/resources/beta/skills/versions.mjs +22 -9
  198. package/resources/beta/skills/versions.mjs.map +1 -1
  199. package/resources/beta/tunnels/certificates.d.mts +36 -0
  200. package/resources/beta/tunnels/certificates.d.mts.map +1 -1
  201. package/resources/beta/tunnels/certificates.d.ts +36 -0
  202. package/resources/beta/tunnels/certificates.d.ts.map +1 -1
  203. package/resources/beta/tunnels/certificates.js +20 -8
  204. package/resources/beta/tunnels/certificates.js.map +1 -1
  205. package/resources/beta/tunnels/certificates.mjs +20 -8
  206. package/resources/beta/tunnels/certificates.mjs.map +1 -1
  207. package/resources/beta/tunnels/tunnels.d.mts +54 -0
  208. package/resources/beta/tunnels/tunnels.d.mts.map +1 -1
  209. package/resources/beta/tunnels/tunnels.d.ts +54 -0
  210. package/resources/beta/tunnels/tunnels.d.ts.map +1 -1
  211. package/resources/beta/tunnels/tunnels.js +30 -12
  212. package/resources/beta/tunnels/tunnels.js.map +1 -1
  213. package/resources/beta/tunnels/tunnels.mjs +30 -12
  214. package/resources/beta/tunnels/tunnels.mjs.map +1 -1
  215. package/resources/beta/vaults/credentials.d.mts +63 -0
  216. package/resources/beta/vaults/credentials.d.mts.map +1 -1
  217. package/resources/beta/vaults/credentials.d.ts +63 -0
  218. package/resources/beta/vaults/credentials.d.ts.map +1 -1
  219. package/resources/beta/vaults/credentials.js +35 -14
  220. package/resources/beta/vaults/credentials.js.map +1 -1
  221. package/resources/beta/vaults/credentials.mjs +35 -14
  222. package/resources/beta/vaults/credentials.mjs.map +1 -1
  223. package/resources/beta/vaults/vaults.d.mts +54 -0
  224. package/resources/beta/vaults/vaults.d.mts.map +1 -1
  225. package/resources/beta/vaults/vaults.d.ts +54 -0
  226. package/resources/beta/vaults/vaults.d.ts.map +1 -1
  227. package/resources/beta/vaults/vaults.js +30 -12
  228. package/resources/beta/vaults/vaults.js.map +1 -1
  229. package/resources/beta/vaults/vaults.mjs +30 -12
  230. package/resources/beta/vaults/vaults.mjs.map +1 -1
  231. package/resources/completions.d.mts +9 -0
  232. package/resources/completions.d.mts.map +1 -1
  233. package/resources/completions.d.ts +9 -0
  234. package/resources/completions.d.ts.map +1 -1
  235. package/resources/completions.js +5 -2
  236. package/resources/completions.js.map +1 -1
  237. package/resources/completions.mjs +5 -2
  238. package/resources/completions.mjs.map +1 -1
  239. package/resources/files.d.mts +104 -15
  240. package/resources/files.d.mts.map +1 -1
  241. package/resources/files.d.ts +104 -15
  242. package/resources/files.d.ts.map +1 -1
  243. package/resources/files.js +79 -10
  244. package/resources/files.js.map +1 -1
  245. package/resources/files.mjs +79 -10
  246. package/resources/files.mjs.map +1 -1
  247. package/resources/index.d.mts +2 -2
  248. package/resources/index.d.mts.map +1 -1
  249. package/resources/index.d.ts +2 -2
  250. package/resources/index.d.ts.map +1 -1
  251. package/resources/index.js.map +1 -1
  252. package/resources/index.mjs.map +1 -1
  253. package/resources/messages/batches.d.mts +68 -6
  254. package/resources/messages/batches.d.mts.map +1 -1
  255. package/resources/messages/batches.d.ts +68 -6
  256. package/resources/messages/batches.d.ts.map +1 -1
  257. package/resources/messages/batches.js +52 -13
  258. package/resources/messages/batches.js.map +1 -1
  259. package/resources/messages/batches.mjs +52 -13
  260. package/resources/messages/batches.mjs.map +1 -1
  261. package/resources/messages/index.d.mts +1 -1
  262. package/resources/messages/index.d.mts.map +1 -1
  263. package/resources/messages/index.d.ts +1 -1
  264. package/resources/messages/index.d.ts.map +1 -1
  265. package/resources/messages/index.js.map +1 -1
  266. package/resources/messages/index.mjs.map +1 -1
  267. package/resources/messages/messages.d.mts +20 -2
  268. package/resources/messages/messages.d.mts.map +1 -1
  269. package/resources/messages/messages.d.ts +20 -2
  270. package/resources/messages/messages.d.ts.map +1 -1
  271. package/resources/messages/messages.js +10 -4
  272. package/resources/messages/messages.js.map +1 -1
  273. package/resources/messages/messages.mjs +10 -4
  274. package/resources/messages/messages.mjs.map +1 -1
  275. package/resources/models.d.mts +31 -0
  276. package/resources/models.d.mts.map +1 -1
  277. package/resources/models.d.ts +31 -0
  278. package/resources/models.d.ts.map +1 -1
  279. package/resources/models.js +23 -4
  280. package/resources/models.js.map +1 -1
  281. package/resources/models.mjs +23 -4
  282. package/resources/models.mjs.map +1 -1
  283. package/resources/skills/index.d.mts +1 -1
  284. package/resources/skills/index.d.mts.map +1 -1
  285. package/resources/skills/index.d.ts +1 -1
  286. package/resources/skills/index.d.ts.map +1 -1
  287. package/resources/skills/index.js.map +1 -1
  288. package/resources/skills/index.mjs.map +1 -1
  289. package/resources/skills/skills.d.mts +75 -10
  290. package/resources/skills/skills.d.mts.map +1 -1
  291. package/resources/skills/skills.d.ts +75 -10
  292. package/resources/skills/skills.d.ts.map +1 -1
  293. package/resources/skills/skills.js +64 -8
  294. package/resources/skills/skills.js.map +1 -1
  295. package/resources/skills/skills.mjs +64 -8
  296. package/resources/skills/skills.mjs.map +1 -1
  297. package/resources/skills/versions.d.mts +75 -5
  298. package/resources/skills/versions.d.mts.map +1 -1
  299. package/resources/skills/versions.d.ts +75 -5
  300. package/resources/skills/versions.d.ts.map +1 -1
  301. package/resources/skills/versions.js +67 -7
  302. package/resources/skills/versions.js.map +1 -1
  303. package/resources/skills/versions.mjs +67 -7
  304. package/resources/skills/versions.mjs.map +1 -1
  305. package/src/client.ts +12 -1
  306. package/src/core/streaming.ts +4 -2
  307. package/src/resources/beta/agents/agents.ts +75 -10
  308. package/src/resources/beta/agents/versions.ts +15 -2
  309. package/src/resources/beta/deployment-runs.ts +30 -4
  310. package/src/resources/beta/deployments.ts +120 -16
  311. package/src/resources/beta/dreams.ts +75 -10
  312. package/src/resources/beta/environments/environments.ts +90 -12
  313. package/src/resources/beta/environments/work.ts +60 -8
  314. package/src/resources/beta/files.ts +75 -11
  315. package/src/resources/beta/memory-stores/memories.ts +75 -10
  316. package/src/resources/beta/memory-stores/memory-stores.ts +90 -12
  317. package/src/resources/beta/memory-stores/memory-versions.ts +49 -10
  318. package/src/resources/beta/messages/batches.ts +85 -11
  319. package/src/resources/beta/messages/messages.ts +24 -2
  320. package/src/resources/beta/models.ts +30 -4
  321. package/src/resources/beta/organization/compliance-settings.ts +12 -2
  322. package/src/resources/beta/organization/index.ts +2 -0
  323. package/src/resources/beta/organization/organization.ts +4 -0
  324. package/src/resources/beta/sessions/events.ts +45 -6
  325. package/src/resources/beta/sessions/resources.ts +75 -10
  326. package/src/resources/beta/sessions/sessions.ts +90 -12
  327. package/src/resources/beta/sessions/threads/events.ts +30 -4
  328. package/src/resources/beta/sessions/threads/threads.ts +45 -6
  329. package/src/resources/beta/skills/skills.ts +60 -8
  330. package/src/resources/beta/skills/versions.ts +72 -9
  331. package/src/resources/beta/tunnels/certificates.ts +60 -8
  332. package/src/resources/beta/tunnels/tunnels.ts +90 -12
  333. package/src/resources/beta/vaults/credentials.ts +105 -14
  334. package/src/resources/beta/vaults/vaults.ts +90 -12
  335. package/src/resources/completions.ts +15 -2
  336. package/src/resources/files.ts +161 -18
  337. package/src/resources/index.ts +5 -0
  338. package/src/resources/messages/batches.ts +137 -13
  339. package/src/resources/messages/index.ts +4 -0
  340. package/src/resources/messages/messages.ts +38 -4
  341. package/src/resources/models.ts +43 -4
  342. package/src/resources/skills/index.ts +2 -0
  343. package/src/resources/skills/skills.ts +127 -13
  344. package/src/resources/skills/versions.ts +115 -11
  345. package/src/tools/agent-toolset/fs-util.ts +16 -4
  346. package/src/version.ts +1 -1
  347. package/tools/agent-toolset/fs-util.d.mts +11 -4
  348. package/tools/agent-toolset/fs-util.d.mts.map +1 -1
  349. package/tools/agent-toolset/fs-util.d.ts +11 -4
  350. package/tools/agent-toolset/fs-util.d.ts.map +1 -1
  351. package/tools/agent-toolset/fs-util.js +14 -4
  352. package/tools/agent-toolset/fs-util.js.map +1 -1
  353. package/tools/agent-toolset/fs-util.mjs +14 -4
  354. package/tools/agent-toolset/fs-util.mjs.map +1 -1
  355. package/version.d.mts +1 -1
  356. package/version.d.ts +1 -1
  357. package/version.js +1 -1
  358. package/version.mjs +1 -1
@@ -36,7 +36,7 @@ export class Skills extends APIResource {
36
36
  * ```
37
37
  */
38
38
  create(params: SkillCreateParams, options?: RequestOptions): APIPromise<BetaSkill> {
39
- const { betas, ...body } = params;
39
+ const { betas, workspace_id, ...body } = params;
40
40
  return this._client.post(
41
41
  '/v1/skills?beta=true',
42
42
  multipartFormRequestOptions(
@@ -44,7 +44,10 @@ export class Skills extends APIResource {
44
44
  body,
45
45
  ...options,
46
46
  headers: buildHeaders([
47
- { ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) },
47
+ {
48
+ ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined),
49
+ ...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
50
+ },
48
51
  options?.headers,
49
52
  ]),
50
53
  },
@@ -69,11 +72,14 @@ export class Skills extends APIResource {
69
72
  params: SkillRetrieveParams | null | undefined = {},
70
73
  options?: RequestOptions,
71
74
  ): APIPromise<BetaSkill> {
72
- const { betas } = params ?? {};
75
+ const { betas, workspace_id } = params ?? {};
73
76
  return this._client.get(path`/v1/skills/${skillID}?beta=true`, {
74
77
  ...options,
75
78
  headers: buildHeaders([
76
- { ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) },
79
+ {
80
+ ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined),
81
+ ...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
82
+ },
77
83
  options?.headers,
78
84
  ]),
79
85
  });
@@ -94,12 +100,15 @@ export class Skills extends APIResource {
94
100
  params: SkillListParams | null | undefined = {},
95
101
  options?: RequestOptions,
96
102
  ): PagePromise<BetaSkillsPageCursor, BetaSkill> {
97
- const { betas, ...query } = params ?? {};
103
+ const { betas, workspace_id, ...query } = params ?? {};
98
104
  return this._client.getAPIList('/v1/skills?beta=true', PageCursor<BetaSkill>, {
99
105
  query,
100
106
  ...options,
101
107
  headers: buildHeaders([
102
- { ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) },
108
+ {
109
+ ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined),
110
+ ...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
111
+ },
103
112
  options?.headers,
104
113
  ]),
105
114
  });
@@ -120,11 +129,14 @@ export class Skills extends APIResource {
120
129
  params: SkillDeleteParams | null | undefined = {},
121
130
  options?: RequestOptions,
122
131
  ): APIPromise<BetaDeletedSkill> {
123
- const { betas } = params ?? {};
132
+ const { betas, workspace_id } = params ?? {};
124
133
  return this._client.delete(path`/v1/skills/${skillID}?beta=true`, {
125
134
  ...options,
126
135
  headers: buildHeaders([
127
- { ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) },
136
+ {
137
+ ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined),
138
+ ...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
139
+ },
128
140
  options?.headers,
129
141
  ]),
130
142
  });
@@ -234,6 +246,16 @@ export interface SkillCreateParams {
234
246
  * Header param: Optional header to specify the beta version(s) you want to use.
235
247
  */
236
248
  betas?: Array<BetaAPI.AnthropicBeta>;
249
+
250
+ /**
251
+ * Header param: Optional header to select the Workspace for this request. The
252
+ * value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
253
+ *
254
+ * Only needed for credentials that can act on more than one Workspace. A
255
+ * credential that belongs to a specific Workspace may omit it; if sent, it must
256
+ * match that Workspace.
257
+ */
258
+ workspace_id?: string;
237
259
  }
238
260
 
239
261
  export interface SkillRetrieveParams {
@@ -241,6 +263,16 @@ export interface SkillRetrieveParams {
241
263
  * Optional header to specify the beta version(s) you want to use.
242
264
  */
243
265
  betas?: Array<BetaAPI.AnthropicBeta>;
266
+
267
+ /**
268
+ * Optional header to select the Workspace for this request. The value is a
269
+ * Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
270
+ *
271
+ * Only needed for credentials that can act on more than one Workspace. A
272
+ * credential that belongs to a specific Workspace may omit it; if sent, it must
273
+ * match that Workspace.
274
+ */
275
+ workspace_id?: string;
244
276
  }
245
277
 
246
278
  export interface SkillListParams extends PageCursorParams {
@@ -258,6 +290,16 @@ export interface SkillListParams extends PageCursorParams {
258
290
  * Header param: Optional header to specify the beta version(s) you want to use.
259
291
  */
260
292
  betas?: Array<BetaAPI.AnthropicBeta>;
293
+
294
+ /**
295
+ * Header param: Optional header to select the Workspace for this request. The
296
+ * value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
297
+ *
298
+ * Only needed for credentials that can act on more than one Workspace. A
299
+ * credential that belongs to a specific Workspace may omit it; if sent, it must
300
+ * match that Workspace.
301
+ */
302
+ workspace_id?: string;
261
303
  }
262
304
 
263
305
  export interface SkillDeleteParams {
@@ -265,6 +307,16 @@ export interface SkillDeleteParams {
265
307
  * Optional header to specify the beta version(s) you want to use.
266
308
  */
267
309
  betas?: Array<BetaAPI.AnthropicBeta>;
310
+
311
+ /**
312
+ * Optional header to select the Workspace for this request. The value is a
313
+ * Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
314
+ *
315
+ * Only needed for credentials that can act on more than one Workspace. A
316
+ * credential that belongs to a specific Workspace may omit it; if sent, it must
317
+ * match that Workspace.
318
+ */
319
+ workspace_id?: string;
268
320
  }
269
321
 
270
322
  Skills.Versions = Versions;
@@ -27,7 +27,7 @@ export class Versions extends APIResource {
27
27
  params: VersionCreateParams,
28
28
  options?: RequestOptions,
29
29
  ): APIPromise<BetaSkillVersion> {
30
- const { betas, ...body } = params;
30
+ const { betas, workspace_id, ...body } = params;
31
31
  return this._client.post(
32
32
  path`/v1/skills/${skillID}/versions?beta=true`,
33
33
  multipartFormRequestOptions(
@@ -35,7 +35,10 @@ export class Versions extends APIResource {
35
35
  body,
36
36
  ...options,
37
37
  headers: buildHeaders([
38
- { ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) },
38
+ {
39
+ ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined),
40
+ ...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
41
+ },
39
42
  options?.headers,
40
43
  ]),
41
44
  },
@@ -61,11 +64,14 @@ export class Versions extends APIResource {
61
64
  params: VersionRetrieveParams,
62
65
  options?: RequestOptions,
63
66
  ): APIPromise<BetaSkillVersion> {
64
- const { skill_id, betas } = params;
67
+ const { skill_id, betas, workspace_id } = params;
65
68
  return this._client.get(path`/v1/skills/${skill_id}/versions/${version}?beta=true`, {
66
69
  ...options,
67
70
  headers: buildHeaders([
68
- { ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) },
71
+ {
72
+ ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined),
73
+ ...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
74
+ },
69
75
  options?.headers,
70
76
  ]),
71
77
  });
@@ -89,7 +95,7 @@ export class Versions extends APIResource {
89
95
  params: VersionListParams | null | undefined = {},
90
96
  options?: RequestOptions,
91
97
  ): PagePromise<BetaSkillVersionsPageCursor, BetaSkillVersion> {
92
- const { betas, ...query } = params ?? {};
98
+ const { betas, workspace_id, ...query } = params ?? {};
93
99
  return this._client.getAPIList(
94
100
  path`/v1/skills/${skillID}/versions?beta=true`,
95
101
  PageCursor<BetaSkillVersion>,
@@ -97,7 +103,10 @@ export class Versions extends APIResource {
97
103
  query,
98
104
  ...options,
99
105
  headers: buildHeaders([
100
- { ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) },
106
+ {
107
+ ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined),
108
+ ...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
109
+ },
101
110
  options?.headers,
102
111
  ]),
103
112
  },
@@ -120,11 +129,14 @@ export class Versions extends APIResource {
120
129
  params: VersionDeleteParams,
121
130
  options?: RequestOptions,
122
131
  ): APIPromise<BetaDeletedSkillVersion> {
123
- const { skill_id, betas } = params;
132
+ const { skill_id, betas, workspace_id } = params;
124
133
  return this._client.delete(path`/v1/skills/${skill_id}/versions/${version}?beta=true`, {
125
134
  ...options,
126
135
  headers: buildHeaders([
127
- { ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) },
136
+ {
137
+ ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined),
138
+ ...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
139
+ },
128
140
  options?.headers,
129
141
  ]),
130
142
  });
@@ -145,13 +157,14 @@ export class Versions extends APIResource {
145
157
  * ```
146
158
  */
147
159
  download(version: string, params: VersionDownloadParams, options?: RequestOptions): APIPromise<Response> {
148
- const { skill_id, betas } = params;
160
+ const { skill_id, betas, workspace_id } = params;
149
161
  return this._client.get(path`/v1/skills/${skill_id}/versions/${version}/content?beta=true`, {
150
162
  ...options,
151
163
  headers: buildHeaders([
152
164
  {
153
165
  Accept: 'application/binary',
154
166
  ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined),
167
+ ...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
155
168
  },
156
169
  options?.headers,
157
170
  ]),
@@ -232,6 +245,16 @@ export interface VersionCreateParams {
232
245
  * Header param: Optional header to specify the beta version(s) you want to use.
233
246
  */
234
247
  betas?: Array<BetaAPI.AnthropicBeta>;
248
+
249
+ /**
250
+ * Header param: Optional header to select the Workspace for this request. The
251
+ * value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
252
+ *
253
+ * Only needed for credentials that can act on more than one Workspace. A
254
+ * credential that belongs to a specific Workspace may omit it; if sent, it must
255
+ * match that Workspace.
256
+ */
257
+ workspace_id?: string;
235
258
  }
236
259
 
237
260
  export interface VersionRetrieveParams {
@@ -246,6 +269,16 @@ export interface VersionRetrieveParams {
246
269
  * Header param: Optional header to specify the beta version(s) you want to use.
247
270
  */
248
271
  betas?: Array<BetaAPI.AnthropicBeta>;
272
+
273
+ /**
274
+ * Header param: Optional header to select the Workspace for this request. The
275
+ * value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
276
+ *
277
+ * Only needed for credentials that can act on more than one Workspace. A
278
+ * credential that belongs to a specific Workspace may omit it; if sent, it must
279
+ * match that Workspace.
280
+ */
281
+ workspace_id?: string;
249
282
  }
250
283
 
251
284
  export interface VersionListParams extends PageCursorParams {
@@ -253,6 +286,16 @@ export interface VersionListParams extends PageCursorParams {
253
286
  * Header param: Optional header to specify the beta version(s) you want to use.
254
287
  */
255
288
  betas?: Array<BetaAPI.AnthropicBeta>;
289
+
290
+ /**
291
+ * Header param: Optional header to select the Workspace for this request. The
292
+ * value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
293
+ *
294
+ * Only needed for credentials that can act on more than one Workspace. A
295
+ * credential that belongs to a specific Workspace may omit it; if sent, it must
296
+ * match that Workspace.
297
+ */
298
+ workspace_id?: string;
256
299
  }
257
300
 
258
301
  export interface VersionDeleteParams {
@@ -267,6 +310,16 @@ export interface VersionDeleteParams {
267
310
  * Header param: Optional header to specify the beta version(s) you want to use.
268
311
  */
269
312
  betas?: Array<BetaAPI.AnthropicBeta>;
313
+
314
+ /**
315
+ * Header param: Optional header to select the Workspace for this request. The
316
+ * value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
317
+ *
318
+ * Only needed for credentials that can act on more than one Workspace. A
319
+ * credential that belongs to a specific Workspace may omit it; if sent, it must
320
+ * match that Workspace.
321
+ */
322
+ workspace_id?: string;
270
323
  }
271
324
 
272
325
  export interface VersionDownloadParams {
@@ -281,6 +334,16 @@ export interface VersionDownloadParams {
281
334
  * Header param: Optional header to specify the beta version(s) you want to use.
282
335
  */
283
336
  betas?: Array<BetaAPI.AnthropicBeta>;
337
+
338
+ /**
339
+ * Header param: Optional header to select the Workspace for this request. The
340
+ * value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
341
+ *
342
+ * Only needed for credentials that can act on more than one Workspace. A
343
+ * credential that belongs to a specific Workspace may omit it; if sent, it must
344
+ * match that Workspace.
345
+ */
346
+ workspace_id?: string;
284
347
  }
285
348
 
286
349
  export declare namespace Versions {
@@ -33,12 +33,15 @@ export class Certificates extends APIResource {
33
33
  params: CertificateCreateParams,
34
34
  options?: RequestOptions,
35
35
  ): APIPromise<BetaTunnelCertificate> {
36
- const { betas, ...body } = params;
36
+ const { betas, workspace_id, ...body } = params;
37
37
  return this._client.post(path`/v1/tunnels/${tunnelID}/certificates?beta=true`, {
38
38
  body,
39
39
  ...options,
40
40
  headers: buildHeaders([
41
- { 'anthropic-beta': [...(betas ?? []), 'mcp-tunnels-2026-06-22'].toString() },
41
+ {
42
+ 'anthropic-beta': [...(betas ?? []), 'mcp-tunnels-2026-06-22'].toString(),
43
+ ...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
44
+ },
42
45
  options?.headers,
43
46
  ]),
44
47
  });
@@ -66,11 +69,14 @@ export class Certificates extends APIResource {
66
69
  params: CertificateRetrieveParams,
67
70
  options?: RequestOptions,
68
71
  ): APIPromise<BetaTunnelCertificate> {
69
- const { tunnel_id, betas } = params;
72
+ const { tunnel_id, betas, workspace_id } = params;
70
73
  return this._client.get(path`/v1/tunnels/${tunnel_id}/certificates/${certificateID}?beta=true`, {
71
74
  ...options,
72
75
  headers: buildHeaders([
73
- { 'anthropic-beta': [...(betas ?? []), 'mcp-tunnels-2026-06-22'].toString() },
76
+ {
77
+ 'anthropic-beta': [...(betas ?? []), 'mcp-tunnels-2026-06-22'].toString(),
78
+ ...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
79
+ },
74
80
  options?.headers,
75
81
  ]),
76
82
  });
@@ -100,7 +106,7 @@ export class Certificates extends APIResource {
100
106
  params: CertificateListParams | null | undefined = {},
101
107
  options?: RequestOptions,
102
108
  ): PagePromise<BetaTunnelCertificatesPageCursor, BetaTunnelCertificate> {
103
- const { betas, ...query } = params ?? {};
109
+ const { betas, workspace_id, ...query } = params ?? {};
104
110
  return this._client.getAPIList(
105
111
  path`/v1/tunnels/${tunnelID}/certificates?beta=true`,
106
112
  PageCursor<BetaTunnelCertificate>,
@@ -108,7 +114,10 @@ export class Certificates extends APIResource {
108
114
  query,
109
115
  ...options,
110
116
  headers: buildHeaders([
111
- { 'anthropic-beta': [...(betas ?? []), 'mcp-tunnels-2026-06-22'].toString() },
117
+ {
118
+ 'anthropic-beta': [...(betas ?? []), 'mcp-tunnels-2026-06-22'].toString(),
119
+ ...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
120
+ },
112
121
  options?.headers,
113
122
  ]),
114
123
  },
@@ -140,11 +149,14 @@ export class Certificates extends APIResource {
140
149
  params: CertificateArchiveParams,
141
150
  options?: RequestOptions,
142
151
  ): APIPromise<BetaTunnelCertificate> {
143
- const { tunnel_id, betas } = params;
152
+ const { tunnel_id, betas, workspace_id } = params;
144
153
  return this._client.post(path`/v1/tunnels/${tunnel_id}/certificates/${certificateID}/archive?beta=true`, {
145
154
  ...options,
146
155
  headers: buildHeaders([
147
- { 'anthropic-beta': [...(betas ?? []), 'mcp-tunnels-2026-06-22'].toString() },
156
+ {
157
+ 'anthropic-beta': [...(betas ?? []), 'mcp-tunnels-2026-06-22'].toString(),
158
+ ...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
159
+ },
148
160
  options?.headers,
149
161
  ]),
150
162
  });
@@ -201,6 +213,16 @@ export interface CertificateCreateParams {
201
213
  * Header param: Optional header to specify the beta version(s) you want to use.
202
214
  */
203
215
  betas?: Array<BetaAPI.AnthropicBeta>;
216
+
217
+ /**
218
+ * Header param: Optional header to select the Workspace for this request. The
219
+ * value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
220
+ *
221
+ * Only needed for credentials that can act on more than one Workspace. A
222
+ * credential that belongs to a specific Workspace may omit it; if sent, it must
223
+ * match that Workspace.
224
+ */
225
+ workspace_id?: string;
204
226
  }
205
227
 
206
228
  export interface CertificateRetrieveParams {
@@ -213,6 +235,16 @@ export interface CertificateRetrieveParams {
213
235
  * Header param: Optional header to specify the beta version(s) you want to use.
214
236
  */
215
237
  betas?: Array<BetaAPI.AnthropicBeta>;
238
+
239
+ /**
240
+ * Header param: Optional header to select the Workspace for this request. The
241
+ * value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
242
+ *
243
+ * Only needed for credentials that can act on more than one Workspace. A
244
+ * credential that belongs to a specific Workspace may omit it; if sent, it must
245
+ * match that Workspace.
246
+ */
247
+ workspace_id?: string;
216
248
  }
217
249
 
218
250
  export interface CertificateListParams extends PageCursorParams {
@@ -226,6 +258,16 @@ export interface CertificateListParams extends PageCursorParams {
226
258
  * Header param: Optional header to specify the beta version(s) you want to use.
227
259
  */
228
260
  betas?: Array<BetaAPI.AnthropicBeta>;
261
+
262
+ /**
263
+ * Header param: Optional header to select the Workspace for this request. The
264
+ * value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
265
+ *
266
+ * Only needed for credentials that can act on more than one Workspace. A
267
+ * credential that belongs to a specific Workspace may omit it; if sent, it must
268
+ * match that Workspace.
269
+ */
270
+ workspace_id?: string;
229
271
  }
230
272
 
231
273
  export interface CertificateArchiveParams {
@@ -238,6 +280,16 @@ export interface CertificateArchiveParams {
238
280
  * Header param: Optional header to specify the beta version(s) you want to use.
239
281
  */
240
282
  betas?: Array<BetaAPI.AnthropicBeta>;
283
+
284
+ /**
285
+ * Header param: Optional header to select the Workspace for this request. The
286
+ * value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
287
+ *
288
+ * Only needed for credentials that can act on more than one Workspace. A
289
+ * credential that belongs to a specific Workspace may omit it; if sent, it must
290
+ * match that Workspace.
291
+ */
292
+ workspace_id?: string;
241
293
  }
242
294
 
243
295
  export declare namespace Certificates {
@@ -37,12 +37,15 @@ export class Tunnels extends APIResource {
37
37
  * ```
38
38
  */
39
39
  create(params: TunnelCreateParams, options?: RequestOptions): APIPromise<BetaTunnel> {
40
- const { betas, ...body } = params;
40
+ const { betas, workspace_id, ...body } = params;
41
41
  return this._client.post('/v1/tunnels?beta=true', {
42
42
  body,
43
43
  ...options,
44
44
  headers: buildHeaders([
45
- { 'anthropic-beta': [...(betas ?? []), 'mcp-tunnels-2026-06-22'].toString() },
45
+ {
46
+ 'anthropic-beta': [...(betas ?? []), 'mcp-tunnels-2026-06-22'].toString(),
47
+ ...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
48
+ },
46
49
  options?.headers,
47
50
  ]),
48
51
  });
@@ -68,11 +71,14 @@ export class Tunnels extends APIResource {
68
71
  params: TunnelRetrieveParams | null | undefined = {},
69
72
  options?: RequestOptions,
70
73
  ): APIPromise<BetaTunnel> {
71
- const { betas } = params ?? {};
74
+ const { betas, workspace_id } = params ?? {};
72
75
  return this._client.get(path`/v1/tunnels/${tunnelID}?beta=true`, {
73
76
  ...options,
74
77
  headers: buildHeaders([
75
- { 'anthropic-beta': [...(betas ?? []), 'mcp-tunnels-2026-06-22'].toString() },
78
+ {
79
+ 'anthropic-beta': [...(betas ?? []), 'mcp-tunnels-2026-06-22'].toString(),
80
+ ...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
81
+ },
76
82
  options?.headers,
77
83
  ]),
78
84
  });
@@ -99,12 +105,15 @@ export class Tunnels extends APIResource {
99
105
  params: TunnelListParams | null | undefined = {},
100
106
  options?: RequestOptions,
101
107
  ): PagePromise<BetaTunnelsPageCursor, BetaTunnel> {
102
- const { betas, ...query } = params ?? {};
108
+ const { betas, workspace_id, ...query } = params ?? {};
103
109
  return this._client.getAPIList('/v1/tunnels?beta=true', PageCursor<BetaTunnel>, {
104
110
  query,
105
111
  ...options,
106
112
  headers: buildHeaders([
107
- { 'anthropic-beta': [...(betas ?? []), 'mcp-tunnels-2026-06-22'].toString() },
113
+ {
114
+ 'anthropic-beta': [...(betas ?? []), 'mcp-tunnels-2026-06-22'].toString(),
115
+ ...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
116
+ },
108
117
  options?.headers,
109
118
  ]),
110
119
  });
@@ -133,11 +142,14 @@ export class Tunnels extends APIResource {
133
142
  params: TunnelArchiveParams | null | undefined = {},
134
143
  options?: RequestOptions,
135
144
  ): APIPromise<BetaTunnel> {
136
- const { betas } = params ?? {};
145
+ const { betas, workspace_id } = params ?? {};
137
146
  return this._client.post(path`/v1/tunnels/${tunnelID}/archive?beta=true`, {
138
147
  ...options,
139
148
  headers: buildHeaders([
140
- { 'anthropic-beta': [...(betas ?? []), 'mcp-tunnels-2026-06-22'].toString() },
149
+ {
150
+ 'anthropic-beta': [...(betas ?? []), 'mcp-tunnels-2026-06-22'].toString(),
151
+ ...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
152
+ },
141
153
  options?.headers,
142
154
  ]),
143
155
  });
@@ -165,11 +177,14 @@ export class Tunnels extends APIResource {
165
177
  params: TunnelRevealTokenParams | null | undefined = {},
166
178
  options?: RequestOptions,
167
179
  ): APIPromise<BetaTunnelToken> {
168
- const { betas } = params ?? {};
180
+ const { betas, workspace_id } = params ?? {};
169
181
  return this._client.post(path`/v1/tunnels/${tunnelID}/reveal_token?beta=true`, {
170
182
  ...options,
171
183
  headers: buildHeaders([
172
- { 'anthropic-beta': [...(betas ?? []), 'mcp-tunnels-2026-06-22'].toString() },
184
+ {
185
+ 'anthropic-beta': [...(betas ?? []), 'mcp-tunnels-2026-06-22'].toString(),
186
+ ...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
187
+ },
173
188
  options?.headers,
174
189
  ]),
175
190
  });
@@ -196,12 +211,15 @@ export class Tunnels extends APIResource {
196
211
  params: TunnelRotateTokenParams,
197
212
  options?: RequestOptions,
198
213
  ): APIPromise<BetaTunnelToken> {
199
- const { betas, ...body } = params;
214
+ const { betas, workspace_id, ...body } = params;
200
215
  return this._client.post(path`/v1/tunnels/${tunnelID}/rotate_token?beta=true`, {
201
216
  body,
202
217
  ...options,
203
218
  headers: buildHeaders([
204
- { 'anthropic-beta': [...(betas ?? []), 'mcp-tunnels-2026-06-22'].toString() },
219
+ {
220
+ 'anthropic-beta': [...(betas ?? []), 'mcp-tunnels-2026-06-22'].toString(),
221
+ ...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
222
+ },
205
223
  options?.headers,
206
224
  ]),
207
225
  });
@@ -272,6 +290,16 @@ export interface TunnelCreateParams {
272
290
  * Header param: Optional header to specify the beta version(s) you want to use.
273
291
  */
274
292
  betas?: Array<BetaAPI.AnthropicBeta>;
293
+
294
+ /**
295
+ * Header param: Optional header to select the Workspace for this request. The
296
+ * value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
297
+ *
298
+ * Only needed for credentials that can act on more than one Workspace. A
299
+ * credential that belongs to a specific Workspace may omit it; if sent, it must
300
+ * match that Workspace.
301
+ */
302
+ workspace_id?: string;
275
303
  }
276
304
 
277
305
  export interface TunnelRetrieveParams {
@@ -279,6 +307,16 @@ export interface TunnelRetrieveParams {
279
307
  * Optional header to specify the beta version(s) you want to use.
280
308
  */
281
309
  betas?: Array<BetaAPI.AnthropicBeta>;
310
+
311
+ /**
312
+ * Optional header to select the Workspace for this request. The value is a
313
+ * Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
314
+ *
315
+ * Only needed for credentials that can act on more than one Workspace. A
316
+ * credential that belongs to a specific Workspace may omit it; if sent, it must
317
+ * match that Workspace.
318
+ */
319
+ workspace_id?: string;
282
320
  }
283
321
 
284
322
  export interface TunnelListParams extends PageCursorParams {
@@ -292,6 +330,16 @@ export interface TunnelListParams extends PageCursorParams {
292
330
  * Header param: Optional header to specify the beta version(s) you want to use.
293
331
  */
294
332
  betas?: Array<BetaAPI.AnthropicBeta>;
333
+
334
+ /**
335
+ * Header param: Optional header to select the Workspace for this request. The
336
+ * value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
337
+ *
338
+ * Only needed for credentials that can act on more than one Workspace. A
339
+ * credential that belongs to a specific Workspace may omit it; if sent, it must
340
+ * match that Workspace.
341
+ */
342
+ workspace_id?: string;
295
343
  }
296
344
 
297
345
  export interface TunnelArchiveParams {
@@ -299,6 +347,16 @@ export interface TunnelArchiveParams {
299
347
  * Optional header to specify the beta version(s) you want to use.
300
348
  */
301
349
  betas?: Array<BetaAPI.AnthropicBeta>;
350
+
351
+ /**
352
+ * Optional header to select the Workspace for this request. The value is a
353
+ * Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
354
+ *
355
+ * Only needed for credentials that can act on more than one Workspace. A
356
+ * credential that belongs to a specific Workspace may omit it; if sent, it must
357
+ * match that Workspace.
358
+ */
359
+ workspace_id?: string;
302
360
  }
303
361
 
304
362
  export interface TunnelRevealTokenParams {
@@ -306,6 +364,16 @@ export interface TunnelRevealTokenParams {
306
364
  * Optional header to specify the beta version(s) you want to use.
307
365
  */
308
366
  betas?: Array<BetaAPI.AnthropicBeta>;
367
+
368
+ /**
369
+ * Optional header to select the Workspace for this request. The value is a
370
+ * Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
371
+ *
372
+ * Only needed for credentials that can act on more than one Workspace. A
373
+ * credential that belongs to a specific Workspace may omit it; if sent, it must
374
+ * match that Workspace.
375
+ */
376
+ workspace_id?: string;
309
377
  }
310
378
 
311
379
  export interface TunnelRotateTokenParams {
@@ -318,6 +386,16 @@ export interface TunnelRotateTokenParams {
318
386
  * Header param: Optional header to specify the beta version(s) you want to use.
319
387
  */
320
388
  betas?: Array<BetaAPI.AnthropicBeta>;
389
+
390
+ /**
391
+ * Header param: Optional header to select the Workspace for this request. The
392
+ * value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
393
+ *
394
+ * Only needed for credentials that can act on more than one Workspace. A
395
+ * credential that belongs to a specific Workspace may omit it; if sent, it must
396
+ * match that Workspace.
397
+ */
398
+ workspace_id?: string;
321
399
  }
322
400
 
323
401
  Tunnels.Certificates = Certificates;