@1claw/openapi-spec 0.43.4 → 0.44.1

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.
package/openapi.yaml CHANGED
@@ -2,7 +2,7 @@ openapi: 3.1.0
2
2
 
3
3
  info:
4
4
  title: 1Claw API
5
- version: 2.32.0
5
+ version: 2.33.0
6
6
  description: |
7
7
  Secure secret management for AI agents. Provides vaults, secrets,
8
8
  policy-based access control, agent identity, Intents API,
@@ -94,6 +94,8 @@ tags:
94
94
  description: Chat with agents via Shroud LLM proxy
95
95
  - name: Agent Channels
96
96
  description: External messaging channels (Telegram, WhatsApp, Discord)
97
+ - name: OAuth Connect
98
+ description: OAuth connected accounts for agents (provider registry, connect flows, app credentials)
97
99
 
98
100
  # =============================================================================
99
101
  # PATHS
@@ -5028,6 +5030,78 @@ paths:
5028
5030
  items:
5029
5031
  $ref: "#/components/schemas/PlatformTemplateResponse"
5030
5032
 
5033
+ /v1/platform/apps/{appId}/templates/{template_id}:
5034
+ patch:
5035
+ tags: [Platform]
5036
+ summary: Update a bootstrap template
5037
+ description: Update an existing template's name, description, spec, or active status.
5038
+ operationId: updatePlatformTemplate
5039
+ security:
5040
+ - BearerAuth: []
5041
+ parameters:
5042
+ - in: path
5043
+ name: appId
5044
+ required: true
5045
+ schema:
5046
+ type: string
5047
+ format: uuid
5048
+ - in: path
5049
+ name: template_id
5050
+ required: true
5051
+ schema:
5052
+ type: string
5053
+ format: uuid
5054
+ requestBody:
5055
+ required: true
5056
+ content:
5057
+ application/json:
5058
+ schema:
5059
+ type: object
5060
+ properties:
5061
+ name:
5062
+ type: string
5063
+ description:
5064
+ type: string
5065
+ nullable: true
5066
+ spec:
5067
+ type: object
5068
+ additionalProperties: true
5069
+ is_active:
5070
+ type: boolean
5071
+ responses:
5072
+ "200":
5073
+ description: Template updated
5074
+ content:
5075
+ application/json:
5076
+ schema:
5077
+ $ref: "#/components/schemas/PlatformTemplateResponse"
5078
+ "404":
5079
+ $ref: "#/components/responses/NotFound"
5080
+ delete:
5081
+ tags: [Platform]
5082
+ summary: Delete a bootstrap template
5083
+ operationId: deletePlatformTemplate
5084
+ security:
5085
+ - BearerAuth: []
5086
+ parameters:
5087
+ - in: path
5088
+ name: appId
5089
+ required: true
5090
+ schema:
5091
+ type: string
5092
+ format: uuid
5093
+ - in: path
5094
+ name: template_id
5095
+ required: true
5096
+ schema:
5097
+ type: string
5098
+ format: uuid
5099
+ responses:
5100
+ "204":
5101
+ description: Template deleted
5102
+ "404":
5103
+ $ref: "#/components/responses/NotFound"
5104
+
5031
5105
  /v1/platform/users/upsert:
5032
5106
  post:
5033
5107
  tags: [Platform]
@@ -5218,6 +5292,53 @@ paths:
5218
5292
  $ref: "#/components/schemas/ConnectedAppResponse"
5219
5293
 
5220
5294
  /v1/platform/connected-apps/{connectionId}:
5295
+ patch:
5296
+ tags: [Platform]
5297
+ summary: Update connection delegation
5298
+ description: Toggle delegation and update delegation scopes for a connected platform app. User-only.
5299
+ operationId: updateConnectionDelegation
5300
+ security:
5301
+ - BearerAuth: []
5302
+ parameters:
5303
+ - in: path
5304
+ name: connectionId
5305
+ required: true
5306
+ schema:
5307
+ type: string
5308
+ format: uuid
5309
+ requestBody:
5310
+ required: true
5311
+ content:
5312
+ application/json:
5313
+ schema:
5314
+ type: object
5315
+ properties:
5316
+ delegation_enabled:
5317
+ type: boolean
5318
+ delegation_scopes:
5319
+ type: array
5320
+ items:
5321
+ type: string
5322
+ description: "Scopes: vaults:read, vaults:write, agents:read, agents:write, secrets:read, secrets:write, automations:*, runtimes:*"
5323
+ responses:
5324
+ "200":
5325
+ description: Delegation settings updated
5326
+ content:
5327
+ application/json:
5328
+ schema:
5329
+ type: object
5330
+ properties:
5331
+ connection_id:
5332
+ type: string
5333
+ format: uuid
5334
+ delegation_enabled:
5335
+ type: boolean
5336
+ delegation_scopes:
5337
+ type: array
5338
+ items:
5339
+ type: string
5340
+ "404":
5341
+ $ref: "#/components/responses/NotFound"
5221
5342
  delete:
5222
5343
  tags: [Platform]
5223
5344
  summary: Disconnect a platform app
@@ -5237,6 +5358,53 @@ paths:
5237
5358
  "404":
5238
5359
  description: Connection not found
5239
5360
 
5361
+ /v1/platform/connections/{connectionId}/delegation-log:
5362
+ get:
5363
+ tags: [Platform]
5364
+ summary: Delegation audit log
5365
+ description: List delegated actions performed by a platform app on behalf of this user.
5366
+ operationId: getDelegationLog
5367
+ security:
5368
+ - BearerAuth: []
5369
+ parameters:
5370
+ - in: path
5371
+ name: connectionId
5372
+ required: true
5373
+ schema:
5374
+ type: string
5375
+ format: uuid
5376
+ responses:
5377
+ "200":
5378
+ description: Delegation log entries
5379
+ content:
5380
+ application/json:
5381
+ schema:
5382
+ type: object
5383
+ properties:
5384
+ entries:
5385
+ type: array
5386
+ items:
5387
+ type: object
5388
+ properties:
5389
+ action:
5390
+ type: string
5391
+ scope:
5392
+ type: string
5393
+ resource_type:
5394
+ type: string
5395
+ resource_id:
5396
+ type: string
5397
+ format: uuid
5398
+ timestamp:
5399
+ type: string
5400
+ format: date-time
5401
+ details:
5402
+ type: object
5403
+ additionalProperties: true
5404
+ nullable: true
5405
+ "404":
5406
+ $ref: "#/components/responses/NotFound"
5407
+
5240
5408
  /v1/platform/connections/{connectionId}/grant:
5241
5409
  post:
5242
5410
  tags: [Platform]
@@ -6781,6 +6949,37 @@ paths:
6781
6949
  "404":
6782
6950
  $ref: "#/components/responses/NotFound"
6783
6951
 
6952
+ /v1/automations/{automationId}/runs/{runId}:
6953
+ get:
6954
+ tags: [Automations]
6955
+ summary: Get automation run
6956
+ operationId: getAutomationRun
6957
+ description: Get details of a single automation run including step results and context.
6958
+ parameters:
6959
+ - name: automationId
6960
+ in: path
6961
+ required: true
6962
+ schema:
6963
+ type: string
6964
+ format: uuid
6965
+ - name: runId
6966
+ in: path
6967
+ required: true
6968
+ schema:
6969
+ type: string
6970
+ format: uuid
6971
+ responses:
6972
+ "200":
6973
+ description: Automation run detail
6974
+ content:
6975
+ application/json:
6976
+ schema:
6977
+ $ref: "#/components/schemas/AutomationRunResponse"
6978
+ "401":
6979
+ $ref: "#/components/responses/Unauthorized"
6980
+ "404":
6981
+ $ref: "#/components/responses/NotFound"
6982
+
6784
6983
  /v1/automations/assist/draft:
6785
6984
  post:
6786
6985
  tags: [Automations]
@@ -7829,6 +8028,53 @@ paths:
7829
8028
  "401":
7830
8029
  $ref: "#/components/responses/Unauthorized"
7831
8030
 
8031
+ /v1/agents/{agent_id}/channels/{channel_id}/test:
8032
+ post:
8033
+ tags: [Agent Channels]
8034
+ summary: Test channel connectivity
8035
+ description: Send a test message through the channel to verify connectivity and credentials.
8036
+ operationId: testChannel
8037
+ parameters:
8038
+ - $ref: "#/components/parameters/AgentId"
8039
+ - name: channel_id
8040
+ in: path
8041
+ required: true
8042
+ schema:
8043
+ type: string
8044
+ format: uuid
8045
+ requestBody:
8046
+ content:
8047
+ application/json:
8048
+ schema:
8049
+ type: object
8050
+ properties:
8051
+ external_chat_id:
8052
+ type: string
8053
+ description: Optional chat ID to send the test message to
8054
+ content:
8055
+ type: string
8056
+ description: Optional custom test message content
8057
+ responses:
8058
+ "200":
8059
+ description: Test result
8060
+ content:
8061
+ application/json:
8062
+ schema:
8063
+ type: object
8064
+ properties:
8065
+ success:
8066
+ type: boolean
8067
+ message:
8068
+ type: string
8069
+ nullable: true
8070
+ error:
8071
+ type: string
8072
+ nullable: true
8073
+ "401":
8074
+ $ref: "#/components/responses/Unauthorized"
8075
+ "404":
8076
+ $ref: "#/components/responses/NotFound"
8077
+
7832
8078
  # ---------------------------------------------------------------------------
7833
8079
  # Channel Webhooks (Public)
7834
8080
  # ---------------------------------------------------------------------------
@@ -7929,6 +8175,200 @@ paths:
7929
8175
  "200":
7930
8176
  description: Webhook processed
7931
8177
 
8178
+ # ---------------------------------------------------------------------------
8179
+ # OAuth Connect
8180
+ # ---------------------------------------------------------------------------
8181
+
8182
+ /v1/oauth/providers:
8183
+ get:
8184
+ tags: [OAuth Connect]
8185
+ summary: List OAuth providers
8186
+ description: |
8187
+ Returns the list of supported OAuth providers with their metadata,
8188
+ available scopes, and authorization URLs. No authentication required.
8189
+ operationId: listOAuthProviders
8190
+ security: []
8191
+ responses:
8192
+ "200":
8193
+ description: Provider list
8194
+ content:
8195
+ application/json:
8196
+ schema:
8197
+ $ref: "#/components/schemas/OAuthProviderListResponse"
8198
+
8199
+ /v1/agents/{agent_id}/oauth/connect:
8200
+ post:
8201
+ tags: [OAuth Connect]
8202
+ summary: Initiate OAuth connection
8203
+ description: |
8204
+ Start an OAuth authorization flow for the specified agent and provider.
8205
+ Returns the authorization URL to redirect the user to. Human-only.
8206
+ operationId: connectOAuth
8207
+ parameters:
8208
+ - $ref: "#/components/parameters/AgentId"
8209
+ requestBody:
8210
+ required: true
8211
+ content:
8212
+ application/json:
8213
+ schema:
8214
+ $ref: "#/components/schemas/ConnectOAuthRequest"
8215
+ responses:
8216
+ "200":
8217
+ description: Authorization URL generated
8218
+ content:
8219
+ application/json:
8220
+ schema:
8221
+ $ref: "#/components/schemas/ConnectOAuthResponse"
8222
+ "400":
8223
+ $ref: "#/components/responses/BadRequest"
8224
+ "403":
8225
+ $ref: "#/components/responses/Forbidden"
8226
+ "404":
8227
+ $ref: "#/components/responses/NotFound"
8228
+
8229
+ /v1/agents/{agent_id}/oauth/connections:
8230
+ get:
8231
+ tags: [OAuth Connect]
8232
+ summary: List OAuth connections
8233
+ description: List all active OAuth connections for the specified agent.
8234
+ operationId: listOAuthConnections
8235
+ parameters:
8236
+ - $ref: "#/components/parameters/AgentId"
8237
+ responses:
8238
+ "200":
8239
+ description: Connection list
8240
+ content:
8241
+ application/json:
8242
+ schema:
8243
+ $ref: "#/components/schemas/OAuthConnectionListResponse"
8244
+ "404":
8245
+ $ref: "#/components/responses/NotFound"
8246
+
8247
+ /v1/agents/{agent_id}/oauth/disconnect/{binding_id}:
8248
+ post:
8249
+ tags: [OAuth Connect]
8250
+ summary: Disconnect OAuth connection
8251
+ description: |
8252
+ Disconnect an OAuth connection by revoking tokens and removing the binding.
8253
+ Human-only.
8254
+ operationId: disconnectOAuth
8255
+ parameters:
8256
+ - $ref: "#/components/parameters/AgentId"
8257
+ - name: binding_id
8258
+ in: path
8259
+ required: true
8260
+ schema:
8261
+ type: string
8262
+ format: uuid
8263
+ responses:
8264
+ "204":
8265
+ description: Connection disconnected
8266
+ "403":
8267
+ $ref: "#/components/responses/Forbidden"
8268
+ "404":
8269
+ $ref: "#/components/responses/NotFound"
8270
+
8271
+ /v1/agents/{agent_id}/oauth/app-credentials:
8272
+ post:
8273
+ tags: [OAuth Connect]
8274
+ summary: Save OAuth app credentials
8275
+ description: |
8276
+ Store custom OAuth app credentials (client ID/secret) for a provider.
8277
+ Allows the agent to use a BYOA (Bring Your Own App) OAuth application
8278
+ instead of 1Claw's shared credentials. Human-only.
8279
+ operationId: saveOAuthAppCredentials
8280
+ parameters:
8281
+ - $ref: "#/components/parameters/AgentId"
8282
+ requestBody:
8283
+ required: true
8284
+ content:
8285
+ application/json:
8286
+ schema:
8287
+ $ref: "#/components/schemas/SaveOAuthAppCredentialsRequest"
8288
+ responses:
8289
+ "201":
8290
+ description: Credentials saved
8291
+ content:
8292
+ application/json:
8293
+ schema:
8294
+ $ref: "#/components/schemas/OAuthAppCredentialResponse"
8295
+ "400":
8296
+ $ref: "#/components/responses/BadRequest"
8297
+ "403":
8298
+ $ref: "#/components/responses/Forbidden"
8299
+ "404":
8300
+ $ref: "#/components/responses/NotFound"
8301
+ get:
8302
+ tags: [OAuth Connect]
8303
+ summary: List OAuth app credentials
8304
+ description: |
8305
+ List stored OAuth app credentials for the agent. Client secrets
8306
+ are never returned in the response.
8307
+ operationId: listOAuthAppCredentials
8308
+ parameters:
8309
+ - $ref: "#/components/parameters/AgentId"
8310
+ responses:
8311
+ "200":
8312
+ description: Credential list
8313
+ content:
8314
+ application/json:
8315
+ schema:
8316
+ $ref: "#/components/schemas/OAuthAppCredentialListResponse"
8317
+ "404":
8318
+ $ref: "#/components/responses/NotFound"
8319
+
8320
+ /v1/agents/{agent_id}/oauth/app-credentials/{provider_slug}:
8321
+ delete:
8322
+ tags: [OAuth Connect]
8323
+ summary: Delete OAuth app credentials
8324
+ description: |
8325
+ Remove stored OAuth app credentials for a specific provider. Human-only.
8326
+ operationId: deleteOAuthAppCredentials
8327
+ parameters:
8328
+ - $ref: "#/components/parameters/AgentId"
8329
+ - name: provider_slug
8330
+ in: path
8331
+ required: true
8332
+ schema:
8333
+ type: string
8334
+ description: Provider identifier (e.g. "github", "google", "slack")
8335
+ responses:
8336
+ "204":
8337
+ description: Credentials deleted
8338
+ "403":
8339
+ $ref: "#/components/responses/Forbidden"
8340
+ "404":
8341
+ $ref: "#/components/responses/NotFound"
8342
+
8343
+ /v1/oauth/callback:
8344
+ get:
8345
+ tags: [OAuth Connect]
8346
+ summary: OAuth callback
8347
+ description: |
8348
+ Public callback URL that OAuth providers redirect to after user authorization.
8349
+ Exchanges the authorization code for tokens and redirects to the dashboard.
8350
+ operationId: oauthConnectCallback
8351
+ security: []
8352
+ parameters:
8353
+ - name: code
8354
+ in: query
8355
+ schema:
8356
+ type: string
8357
+ description: Authorization code from the OAuth provider
8358
+ - name: state
8359
+ in: query
8360
+ schema:
8361
+ type: string
8362
+ description: Opaque state parameter for CSRF protection and session binding
8363
+ - name: error
8364
+ in: query
8365
+ schema:
8366
+ type: string
8367
+ description: Error code if the authorization was denied or failed
8368
+ responses:
8369
+ "302":
8370
+ description: Redirect to dashboard with success or error status
8371
+
7932
8372
  # =============================================================================
7933
8373
  # COMPONENTS
7934
8374
  # =============================================================================
@@ -12484,6 +12924,10 @@ components:
12484
12924
  type: string
12485
12925
  nullable: true
12486
12926
  description: One-time agent API key (ocv_ prefix). Store securely — not retrievable later.
12927
+ agent_evm_address:
12928
+ type: string
12929
+ nullable: true
12930
+ description: EOA address when provision_eoa is true in the template
12487
12931
  signing_keys:
12488
12932
  type: array
12489
12933
  description: Provisioned signing key details (chain, address, public key)
@@ -12498,6 +12942,18 @@ components:
12498
12942
  type: string
12499
12943
  address:
12500
12944
  type: string
12945
+ runtime_ids:
12946
+ type: array
12947
+ items:
12948
+ type: string
12949
+ format: uuid
12950
+ description: IDs of runtimes provisioned by the template
12951
+ automation_ids:
12952
+ type: array
12953
+ items:
12954
+ type: string
12955
+ format: uuid
12956
+ description: IDs of automations provisioned by the template
12501
12957
 
12502
12958
  ConnectedAppResponse:
12503
12959
  type: object
@@ -13510,6 +13966,22 @@ components:
13510
13966
  type: string
13511
13967
  format: date-time
13512
13968
  nullable: true
13969
+ last_run_status:
13970
+ type: string
13971
+ nullable: true
13972
+ description: Status of the most recent run (enriched list field)
13973
+ total_runs:
13974
+ type: integer
13975
+ nullable: true
13976
+ description: Total runs in the last 30 days (enriched list field)
13977
+ success_rate:
13978
+ type: number
13979
+ nullable: true
13980
+ description: Success rate percentage (enriched list field)
13981
+ agent_name:
13982
+ type: string
13983
+ nullable: true
13984
+ description: Resolved agent display name (enriched list field)
13513
13985
  created_at:
13514
13986
  type: string
13515
13987
  format: date-time
@@ -13594,7 +14066,7 @@ components:
13594
14066
  format: uuid
13595
14067
  status:
13596
14068
  type: string
13597
- enum: [pending, running, completed, failed, denied, cancelled, awaiting_approval]
14069
+ enum: [running, success, failed, timed_out, cancelled, awaiting_approval]
13598
14070
  step_results:
13599
14071
  nullable: true
13600
14072
  error:
@@ -13603,6 +14075,11 @@ components:
13603
14075
  trigger_source:
13604
14076
  type: string
13605
14077
  nullable: true
14078
+ context:
14079
+ type: object
14080
+ additionalProperties: true
14081
+ nullable: true
14082
+ description: JSONB context passed between workflow steps
13606
14083
  started_at:
13607
14084
  type: string
13608
14085
  format: date-time
@@ -14194,6 +14671,14 @@ components:
14194
14671
  type: string
14195
14672
  is_active:
14196
14673
  type: boolean
14674
+ config:
14675
+ type: object
14676
+ additionalProperties: true
14677
+ nullable: true
14678
+ description: |
14679
+ Channel-specific configuration JSON. May include:
14680
+ - sender_allowlist (array of strings): restrict which external senders can trigger the agent
14681
+ - auto_respond_enabled (boolean): whether the agent auto-responds to inbound messages
14197
14682
  created_at:
14198
14683
  type: string
14199
14684
  format: date-time
@@ -14255,3 +14740,164 @@ components:
14255
14740
  type: array
14256
14741
  items:
14257
14742
  $ref: "#/components/schemas/ChannelMessageResponse"
14743
+
14744
+ # ── OAuth Connect ──────────────────────────────────────────────
14745
+
14746
+ OAuthProviderScope:
14747
+ type: object
14748
+ properties:
14749
+ scope:
14750
+ type: string
14751
+ label:
14752
+ type: string
14753
+ description:
14754
+ type: string
14755
+ default:
14756
+ type: boolean
14757
+
14758
+ OAuthProvider:
14759
+ type: object
14760
+ properties:
14761
+ slug:
14762
+ type: string
14763
+ description: Unique provider identifier (e.g. "github", "google", "slack")
14764
+ display_name:
14765
+ type: string
14766
+ icon_url:
14767
+ type: string
14768
+ format: uri
14769
+ authorization_url:
14770
+ type: string
14771
+ format: uri
14772
+ token_url:
14773
+ type: string
14774
+ format: uri
14775
+ scopes_available:
14776
+ type: array
14777
+ items:
14778
+ $ref: "#/components/schemas/OAuthProviderScope"
14779
+ default_scopes:
14780
+ type: array
14781
+ items:
14782
+ type: string
14783
+ extra_auth_params:
14784
+ type: object
14785
+ additionalProperties:
14786
+ type: string
14787
+ nullable: true
14788
+ requires_app_credentials:
14789
+ type: boolean
14790
+ description: Whether custom app credentials are required (vs. shared 1Claw app)
14791
+ documentation_url:
14792
+ type: string
14793
+ format: uri
14794
+ nullable: true
14795
+
14796
+ OAuthProviderListResponse:
14797
+ type: object
14798
+ properties:
14799
+ providers:
14800
+ type: array
14801
+ items:
14802
+ $ref: "#/components/schemas/OAuthProvider"
14803
+
14804
+ ConnectOAuthRequest:
14805
+ type: object
14806
+ required: [provider_slug]
14807
+ properties:
14808
+ provider_slug:
14809
+ type: string
14810
+ description: Provider to connect (e.g. "github", "google", "slack")
14811
+ scopes:
14812
+ type: array
14813
+ items:
14814
+ type: string
14815
+ description: Override default scopes for this connection
14816
+ redirect_after:
14817
+ type: string
14818
+ description: URL to redirect to after the OAuth flow completes
14819
+
14820
+ ConnectOAuthResponse:
14821
+ type: object
14822
+ properties:
14823
+ authorization_url:
14824
+ type: string
14825
+ format: uri
14826
+ description: Redirect the user to this URL to authorize the connection
14827
+
14828
+ OAuthConnectionResponse:
14829
+ type: object
14830
+ properties:
14831
+ binding_id:
14832
+ type: string
14833
+ format: uuid
14834
+ provider_slug:
14835
+ type: string
14836
+ provider_name:
14837
+ type: string
14838
+ scopes:
14839
+ type: array
14840
+ items:
14841
+ type: string
14842
+ status:
14843
+ type: string
14844
+ enum: [active, expired, revoked]
14845
+ needs_reauth:
14846
+ type: boolean
14847
+ created_at:
14848
+ type: string
14849
+ format: date-time
14850
+
14851
+ OAuthConnectionListResponse:
14852
+ type: object
14853
+ properties:
14854
+ connections:
14855
+ type: array
14856
+ items:
14857
+ $ref: "#/components/schemas/OAuthConnectionResponse"
14858
+
14859
+ SaveOAuthAppCredentialsRequest:
14860
+ type: object
14861
+ required: [provider_slug, client_id, client_secret]
14862
+ properties:
14863
+ provider_slug:
14864
+ type: string
14865
+ description: Provider this credential is for
14866
+ client_id:
14867
+ type: string
14868
+ client_secret:
14869
+ type: string
14870
+ description: Write-only; never returned in responses
14871
+ redirect_uri:
14872
+ type: string
14873
+ format: uri
14874
+ description: Custom redirect URI override
14875
+
14876
+ OAuthAppCredentialResponse:
14877
+ type: object
14878
+ properties:
14879
+ id:
14880
+ type: string
14881
+ format: uuid
14882
+ provider_slug:
14883
+ type: string
14884
+ client_id:
14885
+ type: string
14886
+ redirect_uri:
14887
+ type: string
14888
+ format: uri
14889
+ nullable: true
14890
+ created_at:
14891
+ type: string
14892
+ format: date-time
14893
+ updated_at:
14894
+ type: string
14895
+ format: date-time
14896
+
14897
+ OAuthAppCredentialListResponse:
14898
+ type: object
14899
+ properties:
14900
+ credentials:
14901
+ type: array
14902
+ items:
14903
+ $ref: "#/components/schemas/OAuthAppCredentialResponse"