@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.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "openapi": "3.1.0",
3
3
  "info": {
4
4
  "title": "1Claw API",
5
- "version": "2.32.0",
5
+ "version": "2.33.0",
6
6
  "description": "Secure secret management for AI agents. Provides vaults, secrets,\npolicy-based access control, agent identity, Intents API,\nsharing, billing, and audit logging. Automations (workflow_spec,\nwebhook tokens, event triggers, Assist), cloud runtimes with\ninteractive shell sessions, agent memory, and discovery.\n\nAll endpoints require JWT Bearer authentication unless marked with\n`security: []`.\n",
7
7
  "contact": {
8
8
  "email": "ops@1claw.xyz"
@@ -158,6 +158,10 @@
158
158
  {
159
159
  "name": "Agent Channels",
160
160
  "description": "External messaging channels (Telegram, WhatsApp, Discord)"
161
+ },
162
+ {
163
+ "name": "OAuth Connect",
164
+ "description": "OAuth connected accounts for agents (provider registry, connect flows, app credentials)"
161
165
  }
162
166
  ],
163
167
  "paths": {
@@ -7792,6 +7796,122 @@
7792
7796
  }
7793
7797
  }
7794
7798
  },
7799
+ "/v1/platform/apps/{appId}/templates/{template_id}": {
7800
+ "patch": {
7801
+ "tags": [
7802
+ "Platform"
7803
+ ],
7804
+ "summary": "Update a bootstrap template",
7805
+ "description": "Update an existing template's name, description, spec, or active status.",
7806
+ "operationId": "updatePlatformTemplate",
7807
+ "security": [
7808
+ {
7809
+ "BearerAuth": []
7810
+ }
7811
+ ],
7812
+ "parameters": [
7813
+ {
7814
+ "in": "path",
7815
+ "name": "appId",
7816
+ "required": true,
7817
+ "schema": {
7818
+ "type": "string",
7819
+ "format": "uuid"
7820
+ }
7821
+ },
7822
+ {
7823
+ "in": "path",
7824
+ "name": "template_id",
7825
+ "required": true,
7826
+ "schema": {
7827
+ "type": "string",
7828
+ "format": "uuid"
7829
+ }
7830
+ }
7831
+ ],
7832
+ "requestBody": {
7833
+ "required": true,
7834
+ "content": {
7835
+ "application/json": {
7836
+ "schema": {
7837
+ "type": "object",
7838
+ "properties": {
7839
+ "name": {
7840
+ "type": "string"
7841
+ },
7842
+ "description": {
7843
+ "type": "string",
7844
+ "nullable": true
7845
+ },
7846
+ "spec": {
7847
+ "type": "object",
7848
+ "additionalProperties": true
7849
+ },
7850
+ "is_active": {
7851
+ "type": "boolean"
7852
+ }
7853
+ }
7854
+ }
7855
+ }
7856
+ }
7857
+ },
7858
+ "responses": {
7859
+ "200": {
7860
+ "description": "Template updated",
7861
+ "content": {
7862
+ "application/json": {
7863
+ "schema": {
7864
+ "$ref": "#/components/schemas/PlatformTemplateResponse"
7865
+ }
7866
+ }
7867
+ }
7868
+ },
7869
+ "404": {
7870
+ "$ref": "#/components/responses/NotFound"
7871
+ }
7872
+ }
7873
+ },
7874
+ "delete": {
7875
+ "tags": [
7876
+ "Platform"
7877
+ ],
7878
+ "summary": "Delete a bootstrap template",
7879
+ "operationId": "deletePlatformTemplate",
7880
+ "security": [
7881
+ {
7882
+ "BearerAuth": []
7883
+ }
7884
+ ],
7885
+ "parameters": [
7886
+ {
7887
+ "in": "path",
7888
+ "name": "appId",
7889
+ "required": true,
7890
+ "schema": {
7891
+ "type": "string",
7892
+ "format": "uuid"
7893
+ }
7894
+ },
7895
+ {
7896
+ "in": "path",
7897
+ "name": "template_id",
7898
+ "required": true,
7899
+ "schema": {
7900
+ "type": "string",
7901
+ "format": "uuid"
7902
+ }
7903
+ }
7904
+ ],
7905
+ "responses": {
7906
+ "204": {
7907
+ "description": "Template deleted"
7908
+ },
7909
+ "404": {
7910
+ "$ref": "#/components/responses/NotFound"
7911
+ }
7912
+ }
7913
+ }
7914
+ },
7795
7915
  "/v1/platform/users/upsert": {
7796
7916
  "post": {
7797
7917
  "tags": [
@@ -8106,6 +8226,82 @@
8106
8226
  }
8107
8227
  },
8108
8228
  "/v1/platform/connected-apps/{connectionId}": {
8229
+ "patch": {
8230
+ "tags": [
8231
+ "Platform"
8232
+ ],
8233
+ "summary": "Update connection delegation",
8234
+ "description": "Toggle delegation and update delegation scopes for a connected platform app. User-only.",
8235
+ "operationId": "updateConnectionDelegation",
8236
+ "security": [
8237
+ {
8238
+ "BearerAuth": []
8239
+ }
8240
+ ],
8241
+ "parameters": [
8242
+ {
8243
+ "in": "path",
8244
+ "name": "connectionId",
8245
+ "required": true,
8246
+ "schema": {
8247
+ "type": "string",
8248
+ "format": "uuid"
8249
+ }
8250
+ }
8251
+ ],
8252
+ "requestBody": {
8253
+ "required": true,
8254
+ "content": {
8255
+ "application/json": {
8256
+ "schema": {
8257
+ "type": "object",
8258
+ "properties": {
8259
+ "delegation_enabled": {
8260
+ "type": "boolean"
8261
+ },
8262
+ "delegation_scopes": {
8263
+ "type": "array",
8264
+ "items": {
8265
+ "type": "string"
8266
+ },
8267
+ "description": "Scopes: vaults:read, vaults:write, agents:read, agents:write, secrets:read, secrets:write, automations:*, runtimes:*"
8268
+ }
8269
+ }
8270
+ }
8271
+ }
8272
+ }
8273
+ },
8274
+ "responses": {
8275
+ "200": {
8276
+ "description": "Delegation settings updated",
8277
+ "content": {
8278
+ "application/json": {
8279
+ "schema": {
8280
+ "type": "object",
8281
+ "properties": {
8282
+ "connection_id": {
8283
+ "type": "string",
8284
+ "format": "uuid"
8285
+ },
8286
+ "delegation_enabled": {
8287
+ "type": "boolean"
8288
+ },
8289
+ "delegation_scopes": {
8290
+ "type": "array",
8291
+ "items": {
8292
+ "type": "string"
8293
+ }
8294
+ }
8295
+ }
8296
+ }
8297
+ }
8298
+ }
8299
+ },
8300
+ "404": {
8301
+ "$ref": "#/components/responses/NotFound"
8302
+ }
8303
+ }
8304
+ },
8109
8305
  "delete": {
8110
8306
  "tags": [
8111
8307
  "Platform"
@@ -8138,6 +8334,79 @@
8138
8334
  }
8139
8335
  }
8140
8336
  },
8337
+ "/v1/platform/connections/{connectionId}/delegation-log": {
8338
+ "get": {
8339
+ "tags": [
8340
+ "Platform"
8341
+ ],
8342
+ "summary": "Delegation audit log",
8343
+ "description": "List delegated actions performed by a platform app on behalf of this user.",
8344
+ "operationId": "getDelegationLog",
8345
+ "security": [
8346
+ {
8347
+ "BearerAuth": []
8348
+ }
8349
+ ],
8350
+ "parameters": [
8351
+ {
8352
+ "in": "path",
8353
+ "name": "connectionId",
8354
+ "required": true,
8355
+ "schema": {
8356
+ "type": "string",
8357
+ "format": "uuid"
8358
+ }
8359
+ }
8360
+ ],
8361
+ "responses": {
8362
+ "200": {
8363
+ "description": "Delegation log entries",
8364
+ "content": {
8365
+ "application/json": {
8366
+ "schema": {
8367
+ "type": "object",
8368
+ "properties": {
8369
+ "entries": {
8370
+ "type": "array",
8371
+ "items": {
8372
+ "type": "object",
8373
+ "properties": {
8374
+ "action": {
8375
+ "type": "string"
8376
+ },
8377
+ "scope": {
8378
+ "type": "string"
8379
+ },
8380
+ "resource_type": {
8381
+ "type": "string"
8382
+ },
8383
+ "resource_id": {
8384
+ "type": "string",
8385
+ "format": "uuid"
8386
+ },
8387
+ "timestamp": {
8388
+ "type": "string",
8389
+ "format": "date-time"
8390
+ },
8391
+ "details": {
8392
+ "type": "object",
8393
+ "additionalProperties": true,
8394
+ "nullable": true
8395
+ }
8396
+ }
8397
+ }
8398
+ }
8399
+ }
8400
+ }
8401
+ }
8402
+ }
8403
+ },
8404
+ "404": {
8405
+ "$ref": "#/components/responses/NotFound"
8406
+ }
8407
+ }
8408
+ }
8409
+ },
8141
8410
  "/v1/platform/connections/{connectionId}/grant": {
8142
8411
  "post": {
8143
8412
  "tags": [
@@ -10648,34 +10917,82 @@
10648
10917
  }
10649
10918
  }
10650
10919
  },
10651
- "/v1/automations/assist/draft": {
10652
- "post": {
10920
+ "/v1/automations/{automationId}/runs/{runId}": {
10921
+ "get": {
10653
10922
  "tags": [
10654
10923
  "Automations"
10655
10924
  ],
10656
- "summary": "Draft automation from natural language",
10657
- "operationId": "assistDraftAutomation",
10658
- "requestBody": {
10659
- "required": true,
10660
- "content": {
10661
- "application/json": {
10662
- "schema": {
10663
- "type": "object",
10664
- "required": [
10665
- "message"
10666
- ],
10667
- "properties": {
10668
- "message": {
10669
- "type": "string"
10670
- },
10671
- "agent_id": {
10672
- "type": "string",
10673
- "format": "uuid"
10674
- },
10675
- "timezone": {
10676
- "type": "string"
10677
- }
10678
- }
10925
+ "summary": "Get automation run",
10926
+ "operationId": "getAutomationRun",
10927
+ "description": "Get details of a single automation run including step results and context.",
10928
+ "parameters": [
10929
+ {
10930
+ "name": "automationId",
10931
+ "in": "path",
10932
+ "required": true,
10933
+ "schema": {
10934
+ "type": "string",
10935
+ "format": "uuid"
10936
+ }
10937
+ },
10938
+ {
10939
+ "name": "runId",
10940
+ "in": "path",
10941
+ "required": true,
10942
+ "schema": {
10943
+ "type": "string",
10944
+ "format": "uuid"
10945
+ }
10946
+ }
10947
+ ],
10948
+ "responses": {
10949
+ "200": {
10950
+ "description": "Automation run detail",
10951
+ "content": {
10952
+ "application/json": {
10953
+ "schema": {
10954
+ "$ref": "#/components/schemas/AutomationRunResponse"
10955
+ }
10956
+ }
10957
+ }
10958
+ },
10959
+ "401": {
10960
+ "$ref": "#/components/responses/Unauthorized"
10961
+ },
10962
+ "404": {
10963
+ "$ref": "#/components/responses/NotFound"
10964
+ }
10965
+ }
10966
+ }
10967
+ },
10968
+ "/v1/automations/assist/draft": {
10969
+ "post": {
10970
+ "tags": [
10971
+ "Automations"
10972
+ ],
10973
+ "summary": "Draft automation from natural language",
10974
+ "operationId": "assistDraftAutomation",
10975
+ "requestBody": {
10976
+ "required": true,
10977
+ "content": {
10978
+ "application/json": {
10979
+ "schema": {
10980
+ "type": "object",
10981
+ "required": [
10982
+ "message"
10983
+ ],
10984
+ "properties": {
10985
+ "message": {
10986
+ "type": "string"
10987
+ },
10988
+ "agent_id": {
10989
+ "type": "string",
10990
+ "format": "uuid"
10991
+ },
10992
+ "timezone": {
10993
+ "type": "string"
10994
+ }
10995
+ }
10679
10996
  }
10680
10997
  }
10681
10998
  }
@@ -12279,6 +12596,80 @@
12279
12596
  }
12280
12597
  }
12281
12598
  },
12599
+ "/v1/agents/{agent_id}/channels/{channel_id}/test": {
12600
+ "post": {
12601
+ "tags": [
12602
+ "Agent Channels"
12603
+ ],
12604
+ "summary": "Test channel connectivity",
12605
+ "description": "Send a test message through the channel to verify connectivity and credentials.",
12606
+ "operationId": "testChannel",
12607
+ "parameters": [
12608
+ {
12609
+ "$ref": "#/components/parameters/AgentId"
12610
+ },
12611
+ {
12612
+ "name": "channel_id",
12613
+ "in": "path",
12614
+ "required": true,
12615
+ "schema": {
12616
+ "type": "string",
12617
+ "format": "uuid"
12618
+ }
12619
+ }
12620
+ ],
12621
+ "requestBody": {
12622
+ "content": {
12623
+ "application/json": {
12624
+ "schema": {
12625
+ "type": "object",
12626
+ "properties": {
12627
+ "external_chat_id": {
12628
+ "type": "string",
12629
+ "description": "Optional chat ID to send the test message to"
12630
+ },
12631
+ "content": {
12632
+ "type": "string",
12633
+ "description": "Optional custom test message content"
12634
+ }
12635
+ }
12636
+ }
12637
+ }
12638
+ }
12639
+ },
12640
+ "responses": {
12641
+ "200": {
12642
+ "description": "Test result",
12643
+ "content": {
12644
+ "application/json": {
12645
+ "schema": {
12646
+ "type": "object",
12647
+ "properties": {
12648
+ "success": {
12649
+ "type": "boolean"
12650
+ },
12651
+ "message": {
12652
+ "type": "string",
12653
+ "nullable": true
12654
+ },
12655
+ "error": {
12656
+ "type": "string",
12657
+ "nullable": true
12658
+ }
12659
+ }
12660
+ }
12661
+ }
12662
+ }
12663
+ },
12664
+ "401": {
12665
+ "$ref": "#/components/responses/Unauthorized"
12666
+ },
12667
+ "404": {
12668
+ "$ref": "#/components/responses/NotFound"
12669
+ }
12670
+ }
12671
+ }
12672
+ },
12282
12673
  "/v1/webhooks/telegram/{webhook_path}": {
12283
12674
  "post": {
12284
12675
  "tags": [
@@ -12396,38 +12787,323 @@
12396
12787
  }
12397
12788
  }
12398
12789
  },
12399
- "/v1/webhooks/discord/{webhook_path}": {
12400
- "post": {
12790
+ "/v1/webhooks/discord/{webhook_path}": {
12791
+ "post": {
12792
+ "tags": [
12793
+ "Agent Channels"
12794
+ ],
12795
+ "summary": "Discord webhook",
12796
+ "description": "Public webhook endpoint for receiving Discord bot interactions.",
12797
+ "operationId": "discordWebhook",
12798
+ "security": [],
12799
+ "parameters": [
12800
+ {
12801
+ "name": "webhook_path",
12802
+ "in": "path",
12803
+ "required": true,
12804
+ "schema": {
12805
+ "type": "string"
12806
+ }
12807
+ }
12808
+ ],
12809
+ "requestBody": {
12810
+ "required": true,
12811
+ "content": {
12812
+ "application/json": {
12813
+ "schema": {
12814
+ "type": "object"
12815
+ }
12816
+ }
12817
+ }
12818
+ },
12819
+ "responses": {
12820
+ "200": {
12821
+ "description": "Webhook processed"
12822
+ }
12823
+ }
12824
+ }
12825
+ },
12826
+ "/v1/oauth/providers": {
12827
+ "get": {
12828
+ "tags": [
12829
+ "OAuth Connect"
12830
+ ],
12831
+ "summary": "List OAuth providers",
12832
+ "description": "Returns the list of supported OAuth providers with their metadata,\navailable scopes, and authorization URLs. No authentication required.\n",
12833
+ "operationId": "listOAuthProviders",
12834
+ "security": [],
12835
+ "responses": {
12836
+ "200": {
12837
+ "description": "Provider list",
12838
+ "content": {
12839
+ "application/json": {
12840
+ "schema": {
12841
+ "$ref": "#/components/schemas/OAuthProviderListResponse"
12842
+ }
12843
+ }
12844
+ }
12845
+ }
12846
+ }
12847
+ }
12848
+ },
12849
+ "/v1/agents/{agent_id}/oauth/connect": {
12850
+ "post": {
12851
+ "tags": [
12852
+ "OAuth Connect"
12853
+ ],
12854
+ "summary": "Initiate OAuth connection",
12855
+ "description": "Start an OAuth authorization flow for the specified agent and provider.\nReturns the authorization URL to redirect the user to. Human-only.\n",
12856
+ "operationId": "connectOAuth",
12857
+ "parameters": [
12858
+ {
12859
+ "$ref": "#/components/parameters/AgentId"
12860
+ }
12861
+ ],
12862
+ "requestBody": {
12863
+ "required": true,
12864
+ "content": {
12865
+ "application/json": {
12866
+ "schema": {
12867
+ "$ref": "#/components/schemas/ConnectOAuthRequest"
12868
+ }
12869
+ }
12870
+ }
12871
+ },
12872
+ "responses": {
12873
+ "200": {
12874
+ "description": "Authorization URL generated",
12875
+ "content": {
12876
+ "application/json": {
12877
+ "schema": {
12878
+ "$ref": "#/components/schemas/ConnectOAuthResponse"
12879
+ }
12880
+ }
12881
+ }
12882
+ },
12883
+ "400": {
12884
+ "$ref": "#/components/responses/BadRequest"
12885
+ },
12886
+ "403": {
12887
+ "$ref": "#/components/responses/Forbidden"
12888
+ },
12889
+ "404": {
12890
+ "$ref": "#/components/responses/NotFound"
12891
+ }
12892
+ }
12893
+ }
12894
+ },
12895
+ "/v1/agents/{agent_id}/oauth/connections": {
12896
+ "get": {
12897
+ "tags": [
12898
+ "OAuth Connect"
12899
+ ],
12900
+ "summary": "List OAuth connections",
12901
+ "description": "List all active OAuth connections for the specified agent.",
12902
+ "operationId": "listOAuthConnections",
12903
+ "parameters": [
12904
+ {
12905
+ "$ref": "#/components/parameters/AgentId"
12906
+ }
12907
+ ],
12908
+ "responses": {
12909
+ "200": {
12910
+ "description": "Connection list",
12911
+ "content": {
12912
+ "application/json": {
12913
+ "schema": {
12914
+ "$ref": "#/components/schemas/OAuthConnectionListResponse"
12915
+ }
12916
+ }
12917
+ }
12918
+ },
12919
+ "404": {
12920
+ "$ref": "#/components/responses/NotFound"
12921
+ }
12922
+ }
12923
+ }
12924
+ },
12925
+ "/v1/agents/{agent_id}/oauth/disconnect/{binding_id}": {
12926
+ "post": {
12927
+ "tags": [
12928
+ "OAuth Connect"
12929
+ ],
12930
+ "summary": "Disconnect OAuth connection",
12931
+ "description": "Disconnect an OAuth connection by revoking tokens and removing the binding.\nHuman-only.\n",
12932
+ "operationId": "disconnectOAuth",
12933
+ "parameters": [
12934
+ {
12935
+ "$ref": "#/components/parameters/AgentId"
12936
+ },
12937
+ {
12938
+ "name": "binding_id",
12939
+ "in": "path",
12940
+ "required": true,
12941
+ "schema": {
12942
+ "type": "string",
12943
+ "format": "uuid"
12944
+ }
12945
+ }
12946
+ ],
12947
+ "responses": {
12948
+ "204": {
12949
+ "description": "Connection disconnected"
12950
+ },
12951
+ "403": {
12952
+ "$ref": "#/components/responses/Forbidden"
12953
+ },
12954
+ "404": {
12955
+ "$ref": "#/components/responses/NotFound"
12956
+ }
12957
+ }
12958
+ }
12959
+ },
12960
+ "/v1/agents/{agent_id}/oauth/app-credentials": {
12961
+ "post": {
12962
+ "tags": [
12963
+ "OAuth Connect"
12964
+ ],
12965
+ "summary": "Save OAuth app credentials",
12966
+ "description": "Store custom OAuth app credentials (client ID/secret) for a provider.\nAllows the agent to use a BYOA (Bring Your Own App) OAuth application\ninstead of 1Claw's shared credentials. Human-only.\n",
12967
+ "operationId": "saveOAuthAppCredentials",
12968
+ "parameters": [
12969
+ {
12970
+ "$ref": "#/components/parameters/AgentId"
12971
+ }
12972
+ ],
12973
+ "requestBody": {
12974
+ "required": true,
12975
+ "content": {
12976
+ "application/json": {
12977
+ "schema": {
12978
+ "$ref": "#/components/schemas/SaveOAuthAppCredentialsRequest"
12979
+ }
12980
+ }
12981
+ }
12982
+ },
12983
+ "responses": {
12984
+ "201": {
12985
+ "description": "Credentials saved",
12986
+ "content": {
12987
+ "application/json": {
12988
+ "schema": {
12989
+ "$ref": "#/components/schemas/OAuthAppCredentialResponse"
12990
+ }
12991
+ }
12992
+ }
12993
+ },
12994
+ "400": {
12995
+ "$ref": "#/components/responses/BadRequest"
12996
+ },
12997
+ "403": {
12998
+ "$ref": "#/components/responses/Forbidden"
12999
+ },
13000
+ "404": {
13001
+ "$ref": "#/components/responses/NotFound"
13002
+ }
13003
+ }
13004
+ },
13005
+ "get": {
13006
+ "tags": [
13007
+ "OAuth Connect"
13008
+ ],
13009
+ "summary": "List OAuth app credentials",
13010
+ "description": "List stored OAuth app credentials for the agent. Client secrets\nare never returned in the response.\n",
13011
+ "operationId": "listOAuthAppCredentials",
13012
+ "parameters": [
13013
+ {
13014
+ "$ref": "#/components/parameters/AgentId"
13015
+ }
13016
+ ],
13017
+ "responses": {
13018
+ "200": {
13019
+ "description": "Credential list",
13020
+ "content": {
13021
+ "application/json": {
13022
+ "schema": {
13023
+ "$ref": "#/components/schemas/OAuthAppCredentialListResponse"
13024
+ }
13025
+ }
13026
+ }
13027
+ },
13028
+ "404": {
13029
+ "$ref": "#/components/responses/NotFound"
13030
+ }
13031
+ }
13032
+ }
13033
+ },
13034
+ "/v1/agents/{agent_id}/oauth/app-credentials/{provider_slug}": {
13035
+ "delete": {
13036
+ "tags": [
13037
+ "OAuth Connect"
13038
+ ],
13039
+ "summary": "Delete OAuth app credentials",
13040
+ "description": "Remove stored OAuth app credentials for a specific provider. Human-only.\n",
13041
+ "operationId": "deleteOAuthAppCredentials",
13042
+ "parameters": [
13043
+ {
13044
+ "$ref": "#/components/parameters/AgentId"
13045
+ },
13046
+ {
13047
+ "name": "provider_slug",
13048
+ "in": "path",
13049
+ "required": true,
13050
+ "schema": {
13051
+ "type": "string"
13052
+ },
13053
+ "description": "Provider identifier (e.g. \"github\", \"google\", \"slack\")"
13054
+ }
13055
+ ],
13056
+ "responses": {
13057
+ "204": {
13058
+ "description": "Credentials deleted"
13059
+ },
13060
+ "403": {
13061
+ "$ref": "#/components/responses/Forbidden"
13062
+ },
13063
+ "404": {
13064
+ "$ref": "#/components/responses/NotFound"
13065
+ }
13066
+ }
13067
+ }
13068
+ },
13069
+ "/v1/oauth/callback": {
13070
+ "get": {
12401
13071
  "tags": [
12402
- "Agent Channels"
13072
+ "OAuth Connect"
12403
13073
  ],
12404
- "summary": "Discord webhook",
12405
- "description": "Public webhook endpoint for receiving Discord bot interactions.",
12406
- "operationId": "discordWebhook",
13074
+ "summary": "OAuth callback",
13075
+ "description": "Public callback URL that OAuth providers redirect to after user authorization.\nExchanges the authorization code for tokens and redirects to the dashboard.\n",
13076
+ "operationId": "oauthConnectCallback",
12407
13077
  "security": [],
12408
13078
  "parameters": [
12409
13079
  {
12410
- "name": "webhook_path",
12411
- "in": "path",
12412
- "required": true,
13080
+ "name": "code",
13081
+ "in": "query",
12413
13082
  "schema": {
12414
13083
  "type": "string"
12415
- }
13084
+ },
13085
+ "description": "Authorization code from the OAuth provider"
13086
+ },
13087
+ {
13088
+ "name": "state",
13089
+ "in": "query",
13090
+ "schema": {
13091
+ "type": "string"
13092
+ },
13093
+ "description": "Opaque state parameter for CSRF protection and session binding"
13094
+ },
13095
+ {
13096
+ "name": "error",
13097
+ "in": "query",
13098
+ "schema": {
13099
+ "type": "string"
13100
+ },
13101
+ "description": "Error code if the authorization was denied or failed"
12416
13102
  }
12417
13103
  ],
12418
- "requestBody": {
12419
- "required": true,
12420
- "content": {
12421
- "application/json": {
12422
- "schema": {
12423
- "type": "object"
12424
- }
12425
- }
12426
- }
12427
- },
12428
13104
  "responses": {
12429
- "200": {
12430
- "description": "Webhook processed"
13105
+ "302": {
13106
+ "description": "Redirect to dashboard with success or error status"
12431
13107
  }
12432
13108
  }
12433
13109
  }
@@ -18939,6 +19615,11 @@
18939
19615
  "nullable": true,
18940
19616
  "description": "One-time agent API key (ocv_ prefix). Store securely — not retrievable later."
18941
19617
  },
19618
+ "agent_evm_address": {
19619
+ "type": "string",
19620
+ "nullable": true,
19621
+ "description": "EOA address when provision_eoa is true in the template"
19622
+ },
18942
19623
  "signing_keys": {
18943
19624
  "type": "array",
18944
19625
  "description": "Provisioned signing key details (chain, address, public key)",
@@ -18959,6 +19640,22 @@
18959
19640
  }
18960
19641
  }
18961
19642
  }
19643
+ },
19644
+ "runtime_ids": {
19645
+ "type": "array",
19646
+ "items": {
19647
+ "type": "string",
19648
+ "format": "uuid"
19649
+ },
19650
+ "description": "IDs of runtimes provisioned by the template"
19651
+ },
19652
+ "automation_ids": {
19653
+ "type": "array",
19654
+ "items": {
19655
+ "type": "string",
19656
+ "format": "uuid"
19657
+ },
19658
+ "description": "IDs of automations provisioned by the template"
18962
19659
  }
18963
19660
  }
18964
19661
  }
@@ -20527,6 +21224,26 @@
20527
21224
  "format": "date-time",
20528
21225
  "nullable": true
20529
21226
  },
21227
+ "last_run_status": {
21228
+ "type": "string",
21229
+ "nullable": true,
21230
+ "description": "Status of the most recent run (enriched list field)"
21231
+ },
21232
+ "total_runs": {
21233
+ "type": "integer",
21234
+ "nullable": true,
21235
+ "description": "Total runs in the last 30 days (enriched list field)"
21236
+ },
21237
+ "success_rate": {
21238
+ "type": "number",
21239
+ "nullable": true,
21240
+ "description": "Success rate percentage (enriched list field)"
21241
+ },
21242
+ "agent_name": {
21243
+ "type": "string",
21244
+ "nullable": true,
21245
+ "description": "Resolved agent display name (enriched list field)"
21246
+ },
20530
21247
  "created_at": {
20531
21248
  "type": "string",
20532
21249
  "format": "date-time"
@@ -20664,11 +21381,10 @@
20664
21381
  "status": {
20665
21382
  "type": "string",
20666
21383
  "enum": [
20667
- "pending",
20668
21384
  "running",
20669
- "completed",
21385
+ "success",
20670
21386
  "failed",
20671
- "denied",
21387
+ "timed_out",
20672
21388
  "cancelled",
20673
21389
  "awaiting_approval"
20674
21390
  ]
@@ -20684,6 +21400,12 @@
20684
21400
  "type": "string",
20685
21401
  "nullable": true
20686
21402
  },
21403
+ "context": {
21404
+ "type": "object",
21405
+ "additionalProperties": true,
21406
+ "nullable": true,
21407
+ "description": "JSONB context passed between workflow steps"
21408
+ },
20687
21409
  "started_at": {
20688
21410
  "type": "string",
20689
21411
  "format": "date-time"
@@ -21556,6 +22278,12 @@
21556
22278
  "is_active": {
21557
22279
  "type": "boolean"
21558
22280
  },
22281
+ "config": {
22282
+ "type": "object",
22283
+ "additionalProperties": true,
22284
+ "nullable": true,
22285
+ "description": "Channel-specific configuration JSON. May include:\n- sender_allowlist (array of strings): restrict which external senders can trigger the agent\n- auto_respond_enabled (boolean): whether the agent auto-responds to inbound messages\n"
22286
+ },
21559
22287
  "created_at": {
21560
22288
  "type": "string",
21561
22289
  "format": "date-time"
@@ -21646,6 +22374,231 @@
21646
22374
  }
21647
22375
  }
21648
22376
  }
22377
+ },
22378
+ "OAuthProviderScope": {
22379
+ "type": "object",
22380
+ "properties": {
22381
+ "scope": {
22382
+ "type": "string"
22383
+ },
22384
+ "label": {
22385
+ "type": "string"
22386
+ },
22387
+ "description": {
22388
+ "type": "string"
22389
+ },
22390
+ "default": {
22391
+ "type": "boolean"
22392
+ }
22393
+ }
22394
+ },
22395
+ "OAuthProvider": {
22396
+ "type": "object",
22397
+ "properties": {
22398
+ "slug": {
22399
+ "type": "string",
22400
+ "description": "Unique provider identifier (e.g. \"github\", \"google\", \"slack\")"
22401
+ },
22402
+ "display_name": {
22403
+ "type": "string"
22404
+ },
22405
+ "icon_url": {
22406
+ "type": "string",
22407
+ "format": "uri"
22408
+ },
22409
+ "authorization_url": {
22410
+ "type": "string",
22411
+ "format": "uri"
22412
+ },
22413
+ "token_url": {
22414
+ "type": "string",
22415
+ "format": "uri"
22416
+ },
22417
+ "scopes_available": {
22418
+ "type": "array",
22419
+ "items": {
22420
+ "$ref": "#/components/schemas/OAuthProviderScope"
22421
+ }
22422
+ },
22423
+ "default_scopes": {
22424
+ "type": "array",
22425
+ "items": {
22426
+ "type": "string"
22427
+ }
22428
+ },
22429
+ "extra_auth_params": {
22430
+ "type": "object",
22431
+ "additionalProperties": {
22432
+ "type": "string"
22433
+ },
22434
+ "nullable": true
22435
+ },
22436
+ "requires_app_credentials": {
22437
+ "type": "boolean",
22438
+ "description": "Whether custom app credentials are required (vs. shared 1Claw app)"
22439
+ },
22440
+ "documentation_url": {
22441
+ "type": "string",
22442
+ "format": "uri",
22443
+ "nullable": true
22444
+ }
22445
+ }
22446
+ },
22447
+ "OAuthProviderListResponse": {
22448
+ "type": "object",
22449
+ "properties": {
22450
+ "providers": {
22451
+ "type": "array",
22452
+ "items": {
22453
+ "$ref": "#/components/schemas/OAuthProvider"
22454
+ }
22455
+ }
22456
+ }
22457
+ },
22458
+ "ConnectOAuthRequest": {
22459
+ "type": "object",
22460
+ "required": [
22461
+ "provider_slug"
22462
+ ],
22463
+ "properties": {
22464
+ "provider_slug": {
22465
+ "type": "string",
22466
+ "description": "Provider to connect (e.g. \"github\", \"google\", \"slack\")"
22467
+ },
22468
+ "scopes": {
22469
+ "type": "array",
22470
+ "items": {
22471
+ "type": "string"
22472
+ },
22473
+ "description": "Override default scopes for this connection"
22474
+ },
22475
+ "redirect_after": {
22476
+ "type": "string",
22477
+ "description": "URL to redirect to after the OAuth flow completes"
22478
+ }
22479
+ }
22480
+ },
22481
+ "ConnectOAuthResponse": {
22482
+ "type": "object",
22483
+ "properties": {
22484
+ "authorization_url": {
22485
+ "type": "string",
22486
+ "format": "uri",
22487
+ "description": "Redirect the user to this URL to authorize the connection"
22488
+ }
22489
+ }
22490
+ },
22491
+ "OAuthConnectionResponse": {
22492
+ "type": "object",
22493
+ "properties": {
22494
+ "binding_id": {
22495
+ "type": "string",
22496
+ "format": "uuid"
22497
+ },
22498
+ "provider_slug": {
22499
+ "type": "string"
22500
+ },
22501
+ "provider_name": {
22502
+ "type": "string"
22503
+ },
22504
+ "scopes": {
22505
+ "type": "array",
22506
+ "items": {
22507
+ "type": "string"
22508
+ }
22509
+ },
22510
+ "status": {
22511
+ "type": "string",
22512
+ "enum": [
22513
+ "active",
22514
+ "expired",
22515
+ "revoked"
22516
+ ]
22517
+ },
22518
+ "needs_reauth": {
22519
+ "type": "boolean"
22520
+ },
22521
+ "created_at": {
22522
+ "type": "string",
22523
+ "format": "date-time"
22524
+ }
22525
+ }
22526
+ },
22527
+ "OAuthConnectionListResponse": {
22528
+ "type": "object",
22529
+ "properties": {
22530
+ "connections": {
22531
+ "type": "array",
22532
+ "items": {
22533
+ "$ref": "#/components/schemas/OAuthConnectionResponse"
22534
+ }
22535
+ }
22536
+ }
22537
+ },
22538
+ "SaveOAuthAppCredentialsRequest": {
22539
+ "type": "object",
22540
+ "required": [
22541
+ "provider_slug",
22542
+ "client_id",
22543
+ "client_secret"
22544
+ ],
22545
+ "properties": {
22546
+ "provider_slug": {
22547
+ "type": "string",
22548
+ "description": "Provider this credential is for"
22549
+ },
22550
+ "client_id": {
22551
+ "type": "string"
22552
+ },
22553
+ "client_secret": {
22554
+ "type": "string",
22555
+ "description": "Write-only; never returned in responses"
22556
+ },
22557
+ "redirect_uri": {
22558
+ "type": "string",
22559
+ "format": "uri",
22560
+ "description": "Custom redirect URI override"
22561
+ }
22562
+ }
22563
+ },
22564
+ "OAuthAppCredentialResponse": {
22565
+ "type": "object",
22566
+ "properties": {
22567
+ "id": {
22568
+ "type": "string",
22569
+ "format": "uuid"
22570
+ },
22571
+ "provider_slug": {
22572
+ "type": "string"
22573
+ },
22574
+ "client_id": {
22575
+ "type": "string"
22576
+ },
22577
+ "redirect_uri": {
22578
+ "type": "string",
22579
+ "format": "uri",
22580
+ "nullable": true
22581
+ },
22582
+ "created_at": {
22583
+ "type": "string",
22584
+ "format": "date-time"
22585
+ },
22586
+ "updated_at": {
22587
+ "type": "string",
22588
+ "format": "date-time"
22589
+ }
22590
+ }
22591
+ },
22592
+ "OAuthAppCredentialListResponse": {
22593
+ "type": "object",
22594
+ "properties": {
22595
+ "credentials": {
22596
+ "type": "array",
22597
+ "items": {
22598
+ "$ref": "#/components/schemas/OAuthAppCredentialResponse"
22599
+ }
22600
+ }
22601
+ }
21649
22602
  }
21650
22603
  }
21651
22604
  }