@somewhere-cloud/cli 0.38.154 → 0.38.155
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/CHANGELOG.md +7 -0
- package/dist/docs/adopt.md +39 -0
- package/dist/docs/analytics.md +161 -0
- package/dist/docs/api-reference.md +339 -0
- package/dist/docs/api-surface.md +2067 -0
- package/dist/docs/app-mcp.md +162 -0
- package/dist/docs/architecture-patterns.md +334 -0
- package/dist/docs/auth-client.md +531 -0
- package/dist/docs/billing.md +76 -0
- package/dist/docs/browser.md +639 -0
- package/dist/docs/calendar.md +298 -0
- package/dist/docs/changes.md +323 -0
- package/dist/docs/cli.md +407 -0
- package/dist/docs/common-mistakes.md +199 -0
- package/dist/docs/connect-agent.md +72 -0
- package/dist/docs/cors.md +114 -0
- package/dist/docs/cron.md +167 -0
- package/dist/docs/database-engine.md +167 -0
- package/dist/docs/declared-data.md +1656 -0
- package/dist/docs/declared-files.md +475 -0
- package/dist/docs/deploy-intelligence.md +188 -0
- package/dist/docs/deploy.md +733 -0
- package/dist/docs/design-system.md +273 -0
- package/dist/docs/dev-environments.md +496 -0
- package/dist/docs/domain-ownership.md +31 -0
- package/dist/docs/domains.md +370 -0
- package/dist/docs/feedback.md +88 -0
- package/dist/docs/file-tools.md +116 -0
- package/dist/docs/functions.md +489 -0
- package/dist/docs/getting-started.md +238 -0
- package/dist/docs/github.md +95 -0
- package/dist/docs/google-calendar.md +212 -0
- package/dist/docs/groups.md +836 -0
- package/dist/docs/guarantees.md +58 -0
- package/dist/docs/handled-for-you.md +224 -0
- package/dist/docs/inspect.md +171 -0
- package/dist/docs/limits.md +68 -0
- package/dist/docs/live-data.md +197 -0
- package/dist/docs/live.md +92 -0
- package/dist/docs/local-dev.md +30 -0
- package/dist/docs/migration-supabase.md +58 -0
- package/dist/docs/payments.md +1102 -0
- package/dist/docs/portability.md +194 -0
- package/dist/docs/postgres.md +301 -0
- package/dist/docs/pricing-comparison.md +42 -0
- package/dist/docs/pricing.md +39 -0
- package/dist/docs/project-groups.md +107 -0
- package/dist/docs/projects.md +380 -0
- package/dist/docs/recipe-ai-agent.md +112 -0
- package/dist/docs/recipe-ai-features.md +227 -0
- package/dist/docs/recipe-ai-receipts.md +783 -0
- package/dist/docs/recipe-background-jobs.md +369 -0
- package/dist/docs/recipe-booking.md +348 -0
- package/dist/docs/recipe-csv-import.md +390 -0
- package/dist/docs/recipe-ecommerce.md +127 -0
- package/dist/docs/recipe-email.md +282 -0
- package/dist/docs/recipe-escalation.md +133 -0
- package/dist/docs/recipe-file-uploads.md +159 -0
- package/dist/docs/recipe-import-app.md +110 -0
- package/dist/docs/recipe-login.md +457 -0
- package/dist/docs/recipe-multi-chat.md +198 -0
- package/dist/docs/recipe-paid-api.md +161 -0
- package/dist/docs/recipe-pdfs.md +205 -0
- package/dist/docs/recipe-push-notifications.md +107 -0
- package/dist/docs/recipe-seo.md +200 -0
- package/dist/docs/recipe-signed-in-app.md +330 -0
- package/dist/docs/render.md +99 -0
- package/dist/docs/rooms.md +554 -0
- package/dist/docs/sdk.md +287 -0
- package/dist/docs/sdks.md +24 -0
- package/dist/docs/search.md +199 -0
- package/dist/docs/security-model.md +168 -0
- package/dist/docs/setup.md +212 -0
- package/dist/docs/smoke.md +102 -0
- package/dist/docs/speed.md +298 -0
- package/dist/docs/sql-compatibility.md +96 -0
- package/dist/docs/sw.agent.md +248 -0
- package/dist/docs/sw.ai.md +1291 -0
- package/dist/docs/sw.auth.md +1811 -0
- package/dist/docs/sw.billing.md +171 -0
- package/dist/docs/sw.db.md +2128 -0
- package/dist/docs/sw.email.md +661 -0
- package/dist/docs/sw.endpoint.md +187 -0
- package/dist/docs/sw.env.md +303 -0
- package/dist/docs/sw.fetch.md +115 -0
- package/dist/docs/sw.fs.md +424 -0
- package/dist/docs/sw.groups.md +836 -0
- package/dist/docs/sw.image.md +69 -0
- package/dist/docs/sw.jobs.md +520 -0
- package/dist/docs/sw.logs.md +61 -0
- package/dist/docs/sw.mail.md +106 -0
- package/dist/docs/sw.notifications.md +78 -0
- package/dist/docs/sw.push.md +161 -0
- package/dist/docs/sw.rateLimit.md +67 -0
- package/dist/docs/sw.web.md +128 -0
- package/dist/docs/tasks.md +269 -0
- package/dist/docs/test.md +220 -0
- package/dist/docs/tool-reference-account.md +7 -0
- package/dist/docs/tool-reference-ai.md +121 -0
- package/dist/docs/tool-reference-analytics.md +37 -0
- package/dist/docs/tool-reference-api.md +19 -0
- package/dist/docs/tool-reference-artifacts.md +35 -0
- package/dist/docs/tool-reference-auth.md +163 -0
- package/dist/docs/tool-reference-browser.md +114 -0
- package/dist/docs/tool-reference-code.md +26 -0
- package/dist/docs/tool-reference-connect.md +21 -0
- package/dist/docs/tool-reference-cron.md +48 -0
- package/dist/docs/tool-reference-db.md +282 -0
- package/dist/docs/tool-reference-domains.md +107 -0
- package/dist/docs/tool-reference-email.md +55 -0
- package/dist/docs/tool-reference-env.md +19 -0
- package/dist/docs/tool-reference-feedback.md +56 -0
- package/dist/docs/tool-reference-fs.md +265 -0
- package/dist/docs/tool-reference-github.md +57 -0
- package/dist/docs/tool-reference-groups.md +85 -0
- package/dist/docs/tool-reference-help.md +29 -0
- package/dist/docs/tool-reference-jobs.md +39 -0
- package/dist/docs/tool-reference-live.md +48 -0
- package/dist/docs/tool-reference-logs.md +16 -0
- package/dist/docs/tool-reference-payments.md +44 -0
- package/dist/docs/tool-reference-project.md +706 -0
- package/dist/docs/tool-reference-push.md +78 -0
- package/dist/docs/tool-reference-rate-limit.md +18 -0
- package/dist/docs/tool-reference-search.md +68 -0
- package/dist/docs/tool-reference-security.md +42 -0
- package/dist/docs/tool-reference-smoke.md +17 -0
- package/dist/docs/tool-reference-stock-photos.md +20 -0
- package/dist/docs/tool-reference-tasks.md +73 -0
- package/dist/docs/tool-reference-telegram.md +32 -0
- package/dist/docs/tool-reference-usage.md +9 -0
- package/dist/docs/tool-reference-web.md +71 -0
- package/dist/docs/tool-reference-webhooks.md +9 -0
- package/dist/docs/troubleshooting.md +411 -0
- package/dist/docs/typed-functions.md +94 -0
- package/dist/docs/verify-before-deploy.md +67 -0
- package/dist/docs/vs-supabase.md +75 -0
- package/dist/docs/vs-vercel.md +103 -0
- package/dist/lib/bundle.js +303 -221
- package/dist/lib/bundle.js.map +3 -3
- package/dist/types/lib/test-session.d.ts +8 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +3 -2
|
@@ -0,0 +1,2067 @@
|
|
|
1
|
+
# Discovered API surface
|
|
2
|
+
|
|
3
|
+
# Discovered API surface
|
|
4
|
+
|
|
5
|
+
Use this index to find an operation, then open its focused guide for a working example. Inside a deployed function, use the `sw.*` bindings: the platform supplies their project credentials. In a server integration or CI job, call the REST routes with a developer key; keep that key out of browser code. Connected coding agents use the matching MCP tools.
|
|
6
|
+
|
|
7
|
+
Read one family with `docs({ topic: "api-surface", section: "runtime-bindings" })`. For app data, start with `declared-data`; for sign-in, `sw.auth`; for uploads, `declared-files`. Each guide shows the access rules and request shapes for that feature.
|
|
8
|
+
|
|
9
|
+
Generated from the live runtime and route registrations. This page is the catch-all discovery index for public primitives; the focused topic pages remain the best starting point for examples and workflows.
|
|
10
|
+
|
|
11
|
+
## Behavioral primitives discovered from source
|
|
12
|
+
|
|
13
|
+
- **Database batch atomicity refusal** - `sw.db.batch` refuses to run when it cannot assemble an atomic batch and throws `DB_BATCH_NOT_ATOMIC` instead of falling back to sequential writes.
|
|
14
|
+
- **File conditional write** - `sw.fs.write(path, body, { ifMatch })` sends `If-Match`; stale versions throw `FS_VERSION_CONFLICT` with the current version so editors can re-read instead of clobbering concurrent writes.
|
|
15
|
+
- **Queue dead-letter inspection** - `GET /v1/queue/dead-letters` lists queue messages that exhausted their retries, scoped by `project_id` when supplied or by the caller otherwise.
|
|
16
|
+
|
|
17
|
+
## Runtime bindings
|
|
18
|
+
|
|
19
|
+
### sw.agent
|
|
20
|
+
|
|
21
|
+
- `sw.agent(opts)`
|
|
22
|
+
- `sw.agent.cancel(agentId)`
|
|
23
|
+
- `sw.agent.run(opts)`
|
|
24
|
+
- `sw.agent.start(opts)`
|
|
25
|
+
- `sw.agent.status(agentId)`
|
|
26
|
+
|
|
27
|
+
### sw.ai
|
|
28
|
+
|
|
29
|
+
- `sw.ai.catalog()`
|
|
30
|
+
- `sw.ai.chat(opts)`
|
|
31
|
+
- `sw.ai.chatWithTools(opts)`
|
|
32
|
+
- `sw.ai.complete(opts)`
|
|
33
|
+
- `sw.ai.conversations.delete(id)`
|
|
34
|
+
- `sw.ai.conversations.fork(sourceId, newId, opts)`
|
|
35
|
+
- `sw.ai.conversations.forUser(userId)`
|
|
36
|
+
- `sw.ai.conversations.get(id, opts)`
|
|
37
|
+
- `sw.ai.conversations.list(opts)`
|
|
38
|
+
- `sw.ai.embeddings(opts)`
|
|
39
|
+
- `sw.ai.evaluate(opts)`
|
|
40
|
+
- `sw.ai.forUser(userId)`
|
|
41
|
+
- `sw.ai.generateImage(opts)`
|
|
42
|
+
- `sw.ai.moderate(text)`
|
|
43
|
+
- `sw.ai.scoped(subjectId, subjectType)`
|
|
44
|
+
- `sw.ai.transcribe(opts)`
|
|
45
|
+
- `sw.ai.tts(opts)`
|
|
46
|
+
- `sw.ai.userMemory.clear()`
|
|
47
|
+
- `sw.ai.userMemory.compact(schema, opts)`
|
|
48
|
+
- `sw.ai.userMemory.get()`
|
|
49
|
+
- `sw.ai.userMemory.update(patch)`
|
|
50
|
+
|
|
51
|
+
### sw.analytics
|
|
52
|
+
|
|
53
|
+
- `sw.analytics.query(opts)`
|
|
54
|
+
- `sw.analytics.track(event, opts)`
|
|
55
|
+
|
|
56
|
+
### sw.auth
|
|
57
|
+
|
|
58
|
+
- `sw.auth.anonSession()`
|
|
59
|
+
- `sw.auth.clearSessionCookies()`
|
|
60
|
+
- `sw.auth.deleteUser(token, opts)`
|
|
61
|
+
- `sw.auth.deleteUserWithCookie(req, opts)`
|
|
62
|
+
- `sw.auth.discordCallbackWithCookie(req, redirectTo)`
|
|
63
|
+
- `sw.auth.discordExchange(opts)`
|
|
64
|
+
- `sw.auth.discordUrl()`
|
|
65
|
+
- `sw.auth.exportUser(token)`
|
|
66
|
+
- `sw.auth.forgot(opts)`
|
|
67
|
+
- `sw.auth.fromRequest(req, enrich)`
|
|
68
|
+
- `sw.auth.getAcceptedInvite(req, id)`
|
|
69
|
+
- `sw.auth.getInvite(id)`
|
|
70
|
+
- `sw.auth.githubCallbackWithCookie(req, redirectTo)`
|
|
71
|
+
- `sw.auth.githubExchange(opts)`
|
|
72
|
+
- `sw.auth.githubUrl()`
|
|
73
|
+
- `sw.auth.googleCallbackWithCookie(req, redirectTo)`
|
|
74
|
+
- `sw.auth.googleExchange(opts)`
|
|
75
|
+
- `sw.auth.googleUrl()`
|
|
76
|
+
- `sw.auth.invite(opts)`
|
|
77
|
+
- `sw.auth.listInvites(opts)`
|
|
78
|
+
- `sw.auth.login(opts)`
|
|
79
|
+
- `sw.auth.loginWithCookie(req, email, password)`
|
|
80
|
+
- `sw.auth.logout(opts)`
|
|
81
|
+
- `sw.auth.logoutWithCookie(req)`
|
|
82
|
+
- `sw.auth.me(token, opts)`
|
|
83
|
+
- `sw.auth.mfa.cancelRecovery(opts)`
|
|
84
|
+
- `sw.auth.mfa.challenge(opts)`
|
|
85
|
+
- `sw.auth.mfa.challengeWithCookie(opts)`
|
|
86
|
+
- `sw.auth.mfa.enroll(opts)`
|
|
87
|
+
- `sw.auth.mfa.enrollWithCookie(req)`
|
|
88
|
+
- `sw.auth.mfa.recover(opts)`
|
|
89
|
+
- `sw.auth.mfa.resend(opts)`
|
|
90
|
+
- `sw.auth.mfa.unenroll(opts)`
|
|
91
|
+
- `sw.auth.mfa.unenrollWithCookie(req, opts)`
|
|
92
|
+
- `sw.auth.mfa.verify(opts)`
|
|
93
|
+
- `sw.auth.mfa.verifyWithCookie(req, opts)`
|
|
94
|
+
- `sw.auth.moderation.ban(req, userId, opts)`
|
|
95
|
+
- `sw.auth.moderation.deleteUser(req, userId)`
|
|
96
|
+
- `sw.auth.moderation.revokeSessions(req, userId)`
|
|
97
|
+
- `sw.auth.moderation.setRole(req, userId, role)`
|
|
98
|
+
- `sw.auth.moderation.unban(req, userId)`
|
|
99
|
+
- `sw.auth.oauthStart(provider, opts)`
|
|
100
|
+
- `sw.auth.refresh(opts)`
|
|
101
|
+
- `sw.auth.refreshSession(req)`
|
|
102
|
+
- `sw.auth.requestEmailVerification(token)`
|
|
103
|
+
- `sw.auth.requestEmailVerificationWithCookie(req)`
|
|
104
|
+
- `sw.auth.requireRole(req, role, enrich)`
|
|
105
|
+
- `sw.auth.requireUser(req, options)`
|
|
106
|
+
- `sw.auth.resendVerification(token)`
|
|
107
|
+
- `sw.auth.reset(opts)`
|
|
108
|
+
- `sw.auth.revokeInvite(id)`
|
|
109
|
+
- `sw.auth.server.listUsers(input)`
|
|
110
|
+
- `sw.auth.server.setRoles(userId, changes)`
|
|
111
|
+
- `sw.auth.setSessionCookies(access, refresh)`
|
|
112
|
+
- `sw.auth.signInWithOtp(opts)`
|
|
113
|
+
- `sw.auth.signup(opts)`
|
|
114
|
+
- `sw.auth.signupWithCookie(req, email, password, opts)`
|
|
115
|
+
- `sw.auth.updatePassword(token, opts)`
|
|
116
|
+
- `sw.auth.updatePasswordWithCookie(req, opts)`
|
|
117
|
+
- `sw.auth.updateProfile(token, opts)`
|
|
118
|
+
- `sw.auth.updateProfileWithCookie(req, opts)`
|
|
119
|
+
- `sw.auth.verifyEmail(token, opts)`
|
|
120
|
+
- `sw.auth.verifyEmailChangeCurrentWithCookie(req, opts)`
|
|
121
|
+
- `sw.auth.verifyEmailChangeWithCookie(req, opts)`
|
|
122
|
+
- `sw.auth.verifyEmailWithCookie(req, opts)`
|
|
123
|
+
- `sw.auth.verifyOtp(opts)`
|
|
124
|
+
|
|
125
|
+
### sw.billing
|
|
126
|
+
|
|
127
|
+
- `sw.billing.definePlans(plans)`
|
|
128
|
+
- `sw.billing.entitlements()`
|
|
129
|
+
- `sw.billing.has(feature)`
|
|
130
|
+
- `sw.billing.plans()`
|
|
131
|
+
|
|
132
|
+
### sw.calendar
|
|
133
|
+
|
|
134
|
+
- `sw.calendar.availability(resourceOrOpts, range)`
|
|
135
|
+
- `sw.calendar.blackout(resourceOrOpts, range, opts)`
|
|
136
|
+
- `sw.calendar.cancel(idOrOpts, opts)`
|
|
137
|
+
- `sw.calendar.confirm(tokenOrOpts, opts)`
|
|
138
|
+
- `sw.calendar.expire(opts)`
|
|
139
|
+
- `sw.calendar.get(idOrOpts)`
|
|
140
|
+
- `sw.calendar.getPolicy(resourceOrOpts)`
|
|
141
|
+
- `sw.calendar.hold(resourceOrOpts, range, ttl)`
|
|
142
|
+
- `sw.calendar.list(resourceOrOpts, opts)`
|
|
143
|
+
- `sw.calendar.pending(tokenOrOpts, opts)`
|
|
144
|
+
- `sw.calendar.rebook(idOrOpts, newRange)`
|
|
145
|
+
- `sw.calendar.release(tokenOrOpts, opts)`
|
|
146
|
+
- `sw.calendar.removeBlackout(idOrOpts, opts)`
|
|
147
|
+
- `sw.calendar.setPolicy(resourceOrOpts, policy)`
|
|
148
|
+
- `sw.calendar.slots(resourceOrOpts, range, opts)`
|
|
149
|
+
|
|
150
|
+
### sw.connect
|
|
151
|
+
|
|
152
|
+
- `sw.connect.googleCalendar.connect(req, opts)`
|
|
153
|
+
- `sw.connect.googleCalendar.createEvent(opts)`
|
|
154
|
+
- `sw.connect.googleCalendar.deleteEvent(opts)`
|
|
155
|
+
- `sw.connect.googleCalendar.disconnect(opts)`
|
|
156
|
+
- `sw.connect.googleCalendar.status(opts)`
|
|
157
|
+
- `sw.connect.googleCalendar.updateEvent(opts)`
|
|
158
|
+
- `sw.connect.stripe.connect(opts)`
|
|
159
|
+
- `sw.connect.stripe.disconnect()`
|
|
160
|
+
- `sw.connect.stripe.status()`
|
|
161
|
+
- `sw.connect.stripe.subscribers(opts)`
|
|
162
|
+
|
|
163
|
+
### sw.contacts
|
|
164
|
+
|
|
165
|
+
- `sw.contacts.get(idOrEmail)`
|
|
166
|
+
- `sw.contacts.list(opts)`
|
|
167
|
+
- `sw.contacts.upsert(opts)`
|
|
168
|
+
|
|
169
|
+
### sw.cron
|
|
170
|
+
|
|
171
|
+
- `sw.cron.create(opts)`
|
|
172
|
+
- `sw.cron.delete(id)`
|
|
173
|
+
- `sw.cron.list()`
|
|
174
|
+
- `sw.cron.update(id, opts)`
|
|
175
|
+
|
|
176
|
+
### sw.crypto
|
|
177
|
+
|
|
178
|
+
- `sw.crypto.bcrypt.verify(password, hash)`
|
|
179
|
+
- `sw.crypto.hmacSha256Hex(message, secret)`
|
|
180
|
+
- `sw.crypto.timingSafeEqual(a, b)`
|
|
181
|
+
|
|
182
|
+
### sw.db
|
|
183
|
+
|
|
184
|
+
- `sw.db.aggregate(table, opts, legacyScope)`
|
|
185
|
+
- `sw.db.batch(statements, options)`
|
|
186
|
+
- `sw.db.count(table, opts, legacyScope)`
|
|
187
|
+
- `sw.db.delete(table, spec, legacyScope)`
|
|
188
|
+
- `sw.db.from(table, opts, legacyScope)`
|
|
189
|
+
- `sw.db.insert(table, values, opts)`
|
|
190
|
+
- `sw.db.query(sql, params, options)`
|
|
191
|
+
- `sw.db.remove(table, spec, legacyScope)`
|
|
192
|
+
- `sw.db.scope.get(table)`
|
|
193
|
+
- `sw.db.scope.list()`
|
|
194
|
+
- `sw.db.server.aggregate(table, opts)`
|
|
195
|
+
- `sw.db.server.batch(statements)`
|
|
196
|
+
- `sw.db.server.count(table, opts)`
|
|
197
|
+
- `sw.db.server.from(table, opts)`
|
|
198
|
+
- `sw.db.server.insert(table, values, opts)`
|
|
199
|
+
- `sw.db.server.query(sql, params)`
|
|
200
|
+
- `sw.db.server.remove(table, spec)`
|
|
201
|
+
- `sw.db.server.tx(intents)`
|
|
202
|
+
- `sw.db.server.update(table, spec)`
|
|
203
|
+
- `sw.db.tables()`
|
|
204
|
+
- `sw.db.tx(intents)`
|
|
205
|
+
- `sw.db.update(table, spec, legacyScope)`
|
|
206
|
+
|
|
207
|
+
### sw.email
|
|
208
|
+
|
|
209
|
+
- `sw.email.bounces(opts)`
|
|
210
|
+
- `sw.email.checkSuppression(address)`
|
|
211
|
+
- `sw.email.history(opts)`
|
|
212
|
+
- `sw.email.inbox(address, opts)`
|
|
213
|
+
- `sw.email.send(opts)`
|
|
214
|
+
- `sw.email.status(id)`
|
|
215
|
+
|
|
216
|
+
### sw.fetch
|
|
217
|
+
|
|
218
|
+
- `sw.fetch()`
|
|
219
|
+
|
|
220
|
+
### sw.fs
|
|
221
|
+
|
|
222
|
+
- `sw.fs.copy(from, to)`
|
|
223
|
+
- `sw.fs.delete(path)`
|
|
224
|
+
- `sw.fs.list(path, opts)`
|
|
225
|
+
- `sw.fs.move(from, to, opts)`
|
|
226
|
+
- `sw.fs.public_url(path, opts)`
|
|
227
|
+
- `sw.fs.publicUrl(path, opts)`
|
|
228
|
+
- `sw.fs.read(path, opts)`
|
|
229
|
+
- `sw.fs.replace(opts)`
|
|
230
|
+
- `sw.fs.restore(path, version)`
|
|
231
|
+
- `sw.fs.server.copy()`
|
|
232
|
+
- `sw.fs.server.delete()`
|
|
233
|
+
- `sw.fs.server.list()`
|
|
234
|
+
- `sw.fs.server.move()`
|
|
235
|
+
- `sw.fs.server.public_url()`
|
|
236
|
+
- `sw.fs.server.publicUrl()`
|
|
237
|
+
- `sw.fs.server.read()`
|
|
238
|
+
- `sw.fs.server.replace()`
|
|
239
|
+
- `sw.fs.server.restore()`
|
|
240
|
+
- `sw.fs.server.setOwner()`
|
|
241
|
+
- `sw.fs.server.signedUrl()`
|
|
242
|
+
- `sw.fs.server.stat()`
|
|
243
|
+
- `sw.fs.server.uploadFromRequest()`
|
|
244
|
+
- `sw.fs.server.uploadUrl()`
|
|
245
|
+
- `sw.fs.server.versions()`
|
|
246
|
+
- `sw.fs.server.write()`
|
|
247
|
+
- `sw.fs.setOwner(path, user, opts)`
|
|
248
|
+
- `sw.fs.signedUrl(path, opts)`
|
|
249
|
+
- `sw.fs.stat(path)`
|
|
250
|
+
- `sw.fs.uploadFromRequest(req, opts)`
|
|
251
|
+
- `sw.fs.uploadUrl(opts)`
|
|
252
|
+
- `sw.fs.versions(path)`
|
|
253
|
+
- `sw.fs.write(path, body, opts)`
|
|
254
|
+
|
|
255
|
+
### sw.groups
|
|
256
|
+
|
|
257
|
+
- `sw.groups.add(req, groupId, userId, role)`
|
|
258
|
+
- `sw.groups.appRoles.grant(req, userId, role)`
|
|
259
|
+
- `sw.groups.appRoles.list(req, userId?, opts?)`
|
|
260
|
+
- `sw.groups.appRoles.revoke(req, userId, role)`
|
|
261
|
+
- `sw.groups.create(req, input)`
|
|
262
|
+
- `sw.groups.delete(req, groupId)`
|
|
263
|
+
- `sw.groups.get(req, groupId)`
|
|
264
|
+
- `sw.groups.invitations(req, groupId, opts?)`
|
|
265
|
+
- `sw.groups.invite(req, groupId, input)`
|
|
266
|
+
- `sw.groups.leave(req, groupId)`
|
|
267
|
+
- `sw.groups.list(req, opts?)`
|
|
268
|
+
- `sw.groups.members(req, groupId, opts?)`
|
|
269
|
+
- `sw.groups.remove(req, groupId, userId)`
|
|
270
|
+
- `sw.groups.revokeInvitation(req, inviteId)`
|
|
271
|
+
- `sw.groups.setRole(req, groupId, userId, role)`
|
|
272
|
+
|
|
273
|
+
### sw.image
|
|
274
|
+
|
|
275
|
+
- `sw.image.resize(source, opts)`
|
|
276
|
+
|
|
277
|
+
### sw.jobs
|
|
278
|
+
|
|
279
|
+
- `sw.jobs.cancel(jobId)`
|
|
280
|
+
- `sw.jobs.create(opts)`
|
|
281
|
+
- `sw.jobs.status(jobId)`
|
|
282
|
+
- `sw.jobs.verifyInvocation(req)`
|
|
283
|
+
|
|
284
|
+
### sw.logs
|
|
285
|
+
|
|
286
|
+
- `sw.logs.debug(msg, data)`
|
|
287
|
+
- `sw.logs.error(msg, data)`
|
|
288
|
+
- `sw.logs.info(msg, data)`
|
|
289
|
+
- `sw.logs.tail(opts)`
|
|
290
|
+
- `sw.logs.trace(traceId)`
|
|
291
|
+
- `sw.logs.warn(msg, data)`
|
|
292
|
+
|
|
293
|
+
### sw.mail
|
|
294
|
+
|
|
295
|
+
- `sw.mail.addresses.create(address)`
|
|
296
|
+
- `sw.mail.addresses.list()`
|
|
297
|
+
- `sw.mail.addresses.remove(address)`
|
|
298
|
+
- `sw.mail.attachment(id, n)`
|
|
299
|
+
- `sw.mail.get(id)`
|
|
300
|
+
- `sw.mail.list(opts)`
|
|
301
|
+
- `sw.mail.project.addresses.create(address)`
|
|
302
|
+
- `sw.mail.project.addresses.list()`
|
|
303
|
+
- `sw.mail.project.addresses.remove(address)`
|
|
304
|
+
- `sw.mail.project.attachment(id, n)`
|
|
305
|
+
- `sw.mail.project.get(id)`
|
|
306
|
+
- `sw.mail.project.list(opts)`
|
|
307
|
+
- `sw.mail.project.search(text, opts)`
|
|
308
|
+
- `sw.mail.project.send(opts)`
|
|
309
|
+
- `sw.mail.search(text, opts)`
|
|
310
|
+
- `sw.mail.send(opts)`
|
|
311
|
+
|
|
312
|
+
### sw.notifications
|
|
313
|
+
|
|
314
|
+
- `sw.notifications.list(opts)`
|
|
315
|
+
- `sw.notifications.markAllRead()`
|
|
316
|
+
- `sw.notifications.markRead(notificationId)`
|
|
317
|
+
- `sw.notifications.send(userId, opts)`
|
|
318
|
+
- `sw.notifications.unreadCount()`
|
|
319
|
+
|
|
320
|
+
### sw.payments
|
|
321
|
+
|
|
322
|
+
- `sw.payments.cancelForUser(opts)`
|
|
323
|
+
- `sw.payments.cancelSubscription(opts)`
|
|
324
|
+
- `sw.payments.checkout(opts)`
|
|
325
|
+
- `sw.payments.checkoutForUser(opts)`
|
|
326
|
+
- `sw.payments.dashboardLink()`
|
|
327
|
+
- `sw.payments.events(opts)`
|
|
328
|
+
- `sw.payments.onboard(opts)`
|
|
329
|
+
- `sw.payments.portal(opts)`
|
|
330
|
+
- `sw.payments.portalForUser(opts)`
|
|
331
|
+
- `sw.payments.quote(resource, range, opts)`
|
|
332
|
+
- `sw.payments.refund(opts)`
|
|
333
|
+
- `sw.payments.status(opts)`
|
|
334
|
+
- `sw.payments.subscriptionForUser(opts)`
|
|
335
|
+
- `sw.payments.transactions(opts)`
|
|
336
|
+
|
|
337
|
+
### sw.postgres
|
|
338
|
+
|
|
339
|
+
- `sw.postgres()`
|
|
340
|
+
- `sw.postgres.query()`
|
|
341
|
+
- `sw.postgres.transaction()`
|
|
342
|
+
- `sw.postgres.unsafe()`
|
|
343
|
+
|
|
344
|
+
### sw.push
|
|
345
|
+
|
|
346
|
+
- `sw.push.deliveries(opts)`
|
|
347
|
+
- `sw.push.send(opts)`
|
|
348
|
+
- `sw.push.subscribe(subscription, opts)`
|
|
349
|
+
- `sw.push.subscriptions(opts)`
|
|
350
|
+
- `sw.push.unsubscribe(target)`
|
|
351
|
+
- `sw.push.vapidPublicKey()`
|
|
352
|
+
|
|
353
|
+
### sw.queue
|
|
354
|
+
|
|
355
|
+
- `sw.queue.push(opts)`
|
|
356
|
+
- `sw.queue.verifyInvocation(req)`
|
|
357
|
+
|
|
358
|
+
### sw.quote
|
|
359
|
+
|
|
360
|
+
- `sw.quote(resource, range, opts)`
|
|
361
|
+
|
|
362
|
+
### sw.rateLimit
|
|
363
|
+
|
|
364
|
+
- `sw.rateLimit.check(key, max, windowSeconds)`
|
|
365
|
+
|
|
366
|
+
### sw.render
|
|
367
|
+
|
|
368
|
+
- `sw.render.pdf(opts)`
|
|
369
|
+
- `sw.render.screenshot(opts)`
|
|
370
|
+
|
|
371
|
+
### sw.rooms
|
|
372
|
+
|
|
373
|
+
- `sw.rooms.act(table, id, action)`
|
|
374
|
+
- `sw.rooms.event(req)`
|
|
375
|
+
- `sw.rooms.get(table, id)`
|
|
376
|
+
- `sw.rooms.live(name, read)`
|
|
377
|
+
- `sw.rooms.send(table, id, message)`
|
|
378
|
+
- `sw.rooms.server.act(table, id, action)`
|
|
379
|
+
- `sw.rooms.server.get(table, id)`
|
|
380
|
+
- `sw.rooms.server.send(table, id, message)`
|
|
381
|
+
- `sw.rooms.server.set(table, id, patch)`
|
|
382
|
+
- `sw.rooms.set(table, id, patch)`
|
|
383
|
+
|
|
384
|
+
### sw.search
|
|
385
|
+
|
|
386
|
+
- `sw.search.add(path)`
|
|
387
|
+
- `sw.search.createIndex(name)`
|
|
388
|
+
- `sw.search.deleteIndex(name)`
|
|
389
|
+
- `sw.search.listIndexes()`
|
|
390
|
+
- `sw.search.query(opts)`
|
|
391
|
+
- `sw.search.remove(opts)`
|
|
392
|
+
- `sw.search.upsert(opts)`
|
|
393
|
+
|
|
394
|
+
### sw.tasks
|
|
395
|
+
|
|
396
|
+
- `sw.tasks.comment(id, body, author)`
|
|
397
|
+
- `sw.tasks.create(opts)`
|
|
398
|
+
- `sw.tasks.delete(id)`
|
|
399
|
+
- `sw.tasks.get(id, opts)`
|
|
400
|
+
- `sw.tasks.list(opts)`
|
|
401
|
+
- `sw.tasks.listPage(opts)`
|
|
402
|
+
- `sw.tasks.overview(opts)`
|
|
403
|
+
- `sw.tasks.settings.get()`
|
|
404
|
+
- `sw.tasks.settings.update(opts)`
|
|
405
|
+
- `sw.tasks.update(id, opts)`
|
|
406
|
+
|
|
407
|
+
### sw.web
|
|
408
|
+
|
|
409
|
+
- `sw.web.scrape(url, opts)`
|
|
410
|
+
- `sw.web.search(query, opts)`
|
|
411
|
+
|
|
412
|
+
## REST routes
|
|
413
|
+
|
|
414
|
+
### /v1/account
|
|
415
|
+
|
|
416
|
+
- `GET /v1/account/connections`
|
|
417
|
+
- Contract: response fields: connections, not_listed, not_listed='Browsers signed in to your account are not listed here. Signing out everywhere ends them all. Sprite, the helper in your dashboard, ends when you sign out.'
|
|
418
|
+
- `DELETE /v1/account/connections/connector/:param`
|
|
419
|
+
- Contract: response fields: ended, stops_within_seconds, ended=true. rejects with: NOT_FOUND (No such connection.); NOT_FOUND (No such connection, or it has already ended.). error codes: NOT_FOUND
|
|
420
|
+
- `GET /v1/account/overview`
|
|
421
|
+
- Contract: response fields: account, id, email, name, plan, trial, temporary_expires_at, ai_tools, pinned_apps, last_visit_at, apps, apps_truncated, needs_you, helper. rejects with: AUTH_INVALID_CREDS (Authentication required.); AUTH_INVALID_CREDS (User not found.). error codes: AUTH_INVALID_CREDS
|
|
422
|
+
- `GET /v1/account/pageviews`
|
|
423
|
+
- Contract: response fields: days, apps. rejects with: AUTH_INVALID_CREDS (Authentication required.). error codes: AUTH_INVALID_CREDS
|
|
424
|
+
- `GET /v1/account/waiting`
|
|
425
|
+
- Contract: response fields: items, total, more, next_cursor, projects_read, unread_projects, projects_checked, projects_total, cached. rejects with: AUTH_INVALID_CREDS (Authentication required.); FORBIDDEN (This credential belongs to one app. Read its tasks with GET /v1/tasks.); FORBIDDEN (This key is limited. Read tasks one project at a time with GET /v1/tasks.); VALIDATION_ERROR (cursor must be the next_cursor of an earlier answer.); VALIDATION_ERROR (limit must be a positive whole number.). error codes: AUTH_INVALID_CREDS, FORBIDDEN, VALIDATION_ERROR, TABLE_NOT_FOUND, SCHEMA_ERROR
|
|
426
|
+
|
|
427
|
+
### /v1/agent
|
|
428
|
+
|
|
429
|
+
- `GET /v1/agent/instructions`
|
|
430
|
+
- Contract: response fields: instructions, start_url, connector, claude_url, chatgpt_url, claude_directory_url, first_command_permission, everything_you_get
|
|
431
|
+
|
|
432
|
+
### /v1/ai
|
|
433
|
+
|
|
434
|
+
- `GET /v1/ai/catalog`
|
|
435
|
+
- Contract: response fields (partial): your_tier, own_key_guide, section, command, url, rate_limits, requests_per_minute, requests_per_day, route_scope, rate_limits_by_tier, free, builder, free_complete_default, limits, estimated_input_tokens, output_tokens, scope, models, section='use-any-model-with-your-own-key', command='somewhere docs sw.ai --section use-any-model-with-your-own-key', url='https://somewhere.cloud/docs/sw.ai#use-any-model-with-your-own-key', scope='owner_across_projects', feature, model, provider, label, pricing, at_cost, note, feature='complete', label='Free starter chat', pricing='Included within the plan allowance', at_cost=false, free=true, note='With provider and model both omitted, requests use the account allowance and published request/token limits. Explicit model selection uses normal billing. No automatic prepaid fallback.'
|
|
436
|
+
- `POST /v1/ai/complete`
|
|
437
|
+
- Contract: response fields (partial): cost, fallback_used, fallback_provider, fallback_used=false, fallback_provider=null. rejects with: AI_INPUT_TOO_LARGE (Requested output for … exceeds its supported output limit. Nothing was sent or charged.); VALIDATION_ERROR (effort needs an explicit model: the free default runs with reasoning off. Name a model, for example …, to set effort.); VALIDATION_ERROR (effort is not available for ….); VALIDATION_ERROR (effort must be one of … for ….); VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (messages must be a non-empty array.); VALIDATION_ERROR (stream=true is not supported on the … provider yet. Streaming works on: …. Without stream, the same call returns a complete response; the providers above also accept stream.); VALIDATION_ERROR (service_tier must be "standard" or "flex".); VALIDATION_ERROR (Flex is unavailable for …. Use service_tier: "standard". Nothing was sent or charged.); VALIDATION_ERROR (conversation_id must be a non-empty string up to 128 chars.); VALIDATION_ERROR (conversation_id is not supported with stream=true yet.); VALIDATION_ERROR (response_schema must be a JSON Schema object.); VALIDATION_ERROR (response_schema and tools are mutually exclusive; with tools, the tool_use output is returned without schema validation.); VALIDATION_ERROR (response_schema is not supported with stream=true.); VALIDATION_ERROR (… runs tools without extended reasoning, so effort cannot be set on a request with tools or response_schema. Leave effort out, or choose a Claude model to reason with tools. Nothing was sent or charged.); VALIDATION_ERROR (Claude Opus 5.5 does not support forced tool choice or response_schema; it accepts tool_choice:auto, and its response is not schema-validated by the platform.); PROJECT_NOT_FOUND (Project not found.); AI_MODEL_REQUIRED (This project has its own AI provider key, so name the model in this call to use it, for example { provider: '…', model: '<model id>' }. A call without a model would run on the free default model instead and not use your key. To use the free default, remove the key.); VALIDATION_ERROR (Model "…" is not available through platform-funded completions. Supported models are listed by /v1/ai/catalog. …); VALIDATION_ERROR (Model "…" is not available on the free default tier.); VALIDATION_ERROR (Unknown free-tier model "…".); UPSTREAM_ERROR (This provider is not configured on this deployment.); VALIDATION_ERROR (Input too large for free tier (~… tokens, cap …). A shorter prompt or a paid provider is accepted.); VALIDATION_ERROR (subject_id must be a non-empty string up to 128 chars.); VALIDATION_ERROR (subject_type must match /^[a-z][a-z0-9_-]{0,31}$/.); CONVERSATION_SCOPE_MISMATCH (This conversation_id is not available to this caller: it belongs to a different user or session. No history was read and no model call was made. Accepted: a conversation_id owned by this caller, or a new one.); CONV_HISTORY_UNAVAILABLE (Could not replay prior turns for this conversation_id. A request without conversation_id starts a fresh thread; a different conversation_id is also accepted.); INTERNAL_ERROR (Could not load conversation history.); CONVERSATION_COMMIT_FAILED (The model answered, but the durable conversation turn could not be committed. The turn remains pending; the conversation state shows its outcome.); MIGRATION_FAILED (Could not apply …: …); SCHEMA_DRIFT (Conversation tables are missing columns after migration — …. The platform team has been alerted.). error codes: VALIDATION_ERROR, MODEL_CAPABILITY_UNSUPPORTED, AI_INPUT_TOO_LARGE, AI_TOOLS_INVALID, AI_TOOL_CHOICE_INVALID, UNSUPPORTED_FEATURE, MODEL_RETIRED, PROJECT_NOT_FOUND, AI_MODEL_REQUIRED, UPSTREAM_ERROR, RATE_LIMITED, CONVERSATION_SCOPE_MISMATCH, CONV_HISTORY_UNAVAILABLE, INTERNAL_ERROR, CONVERSATION_COMMIT_FAILED, CONV_HISTORY_REJECTED, MIGRATION_FAILED, SCHEMA_DRIFT
|
|
438
|
+
- `GET /v1/ai/conversations`
|
|
439
|
+
- Contract: response fields: conversations. rejects with: VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found or not accessible.); INTERNAL_ERROR (Could not set up conversation storage.); AUTH_INVALID_CREDS (Token missing user id.); VALIDATION_ERROR (subject_type and subject_id are required.); VALIDATION_ERROR (subject_id must be a non-empty string up to 128 chars.); VALIDATION_ERROR (subject_type must match /^[a-z][a-z0-9_-]{0,31}$/.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, INTERNAL_ERROR, AUTH_INVALID_CREDS
|
|
440
|
+
- `DELETE /v1/ai/conversations/:param`
|
|
441
|
+
- Contract: response fields: deleted, conversation_id. rejects with: VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found or not accessible.); INTERNAL_ERROR (Could not set up conversation storage.); AUTH_INVALID_CREDS (Token missing user id.); VALIDATION_ERROR (subject_type and subject_id are required.); VALIDATION_ERROR (subject_id must be a non-empty string up to 128 chars.); VALIDATION_ERROR (subject_type must match /^[a-z][a-z0-9_-]{0,31}$/.); MIGRATION_FAILED (Could not apply …: …); SCHEMA_DRIFT (Conversation tables are missing columns after migration — …. The platform team has been alerted.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, INTERNAL_ERROR, AUTH_INVALID_CREDS, MIGRATION_FAILED, SCHEMA_DRIFT
|
|
442
|
+
- `GET /v1/ai/conversations/:param`
|
|
443
|
+
- Contract: response fields (partial): messages. rejects with: VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found or not accessible.); INTERNAL_ERROR (Could not set up conversation storage.); NOT_FOUND (Conversation not found.); AUTH_INVALID_CREDS (Token missing user id.); VALIDATION_ERROR (subject_type and subject_id are required.); VALIDATION_ERROR (subject_id must be a non-empty string up to 128 chars.); VALIDATION_ERROR (subject_type must match /^[a-z][a-z0-9_-]{0,31}$/.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, INTERNAL_ERROR, NOT_FOUND, AUTH_INVALID_CREDS
|
|
444
|
+
- `POST /v1/ai/conversations/:param/fork`
|
|
445
|
+
- Contract: request fields: project_id, new_conversation_id, up_to_message_id, subject_id, subject_type. response fields: forked, source_conversation_id, new_conversation_id, message_count, subject_type, subject_id, forked=true. rejects with: VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (new_conversation_id is required and must be 1-128 chars.); VALIDATION_ERROR (new_conversation_id must differ from the source id.); PROJECT_NOT_FOUND (Project not found or not accessible.); INTERNAL_ERROR (Could not set up conversation storage.); NOT_FOUND (Source conversation not found.); CONFLICT (new_conversation_id "…" already exists or holds messages with no owner; another id is accepted.); CONFLICT (The source or destination changed while forking; nothing was copied, and a request with a fresh new_conversation_id is accepted.); AUTH_INVALID_CREDS (Token missing user id.); VALIDATION_ERROR (subject_type and subject_id are required.); VALIDATION_ERROR (subject_id must be a non-empty string up to 128 chars.); VALIDATION_ERROR (subject_type must match /^[a-z][a-z0-9_-]{0,31}$/.); MIGRATION_FAILED (Could not apply …: …); SCHEMA_DRIFT (Conversation tables are missing columns after migration — …. The platform team has been alerted.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, INTERNAL_ERROR, NOT_FOUND, CONFLICT, AUTH_INVALID_CREDS, CONSTRAINT_VIOLATION, MIGRATION_FAILED, SCHEMA_DRIFT
|
|
446
|
+
- `POST /v1/ai/embeddings`
|
|
447
|
+
- Contract: request fields: project_id, model, text, dimensions. response fields: model, provider, dimensions, count, embeddings, usage, cost, provider='workers-ai'. rejects with: VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (text is required (string or string[]).); VALIDATION_ERROR (text must contain at least one string.); VALIDATION_ERROR (text array exceeds 100 items per call.); VALIDATION_ERROR (text items must be non-empty strings.); VALIDATION_ERROR (Unknown embedding model "…". Allowed: …); PROJECT_NOT_FOUND (Project not found.); VALIDATION_ERROR (Combined text too large (~… tokens, cap …). Smaller batches fit under the cap.); AI_ALLOWANCE_EXHAUSTED (The included AI allowance for this billing period is exhausted. A paid model uses prepaid balance.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, RATE_LIMITED, AI_ALLOWANCE_EXHAUSTED, UPSTREAM_AUTH_FAILED, UPSTREAM_BILLING, UPSTREAM_RATE_LIMITED, UPSTREAM_DOWN, PROVIDER_ERROR
|
|
448
|
+
- `POST /v1/ai/evaluate`
|
|
449
|
+
- Contract: response fields: model, provider_model, routed_by, answers, usage, cost. rejects with: VALIDATION_ERROR (project_id is required.); UPSTREAM_ERROR (Jev provider setting is invalid; operator configuration is required.); UPSTREAM_ERROR (Model "…" is not configured on this deployment; model "clef-flash" is configured and also reads text.); RATE_LIMIT_UNAVAILABLE (Decision request limit is not configured correctly.); RATE_LIMIT_UNAVAILABLE (Decision request limit could not be checked.); RATE_LIMITED (Jev project request limit reached.). error codes: VALIDATION_ERROR, UPSTREAM_ERROR, RATE_LIMIT_UNAVAILABLE, RATE_LIMITED, JEV_USAGE_EXCEEDED_HOLD, EVALUATE_ACCOUNTING_UNCONFIRMED, UPSTREAM_AUTH_FAILED, UPSTREAM_BILLING, UPSTREAM_RATE_LIMITED, UPSTREAM_DOWN, PROVIDER_ERROR, AI_UPSTREAM_TIMEOUT
|
|
450
|
+
- `POST /v1/ai/generate`
|
|
451
|
+
- Contract: request fields: project_id, prompt. rejects with: VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.); GENERATION_ENDPOINT_RETIRED (POST /v1/ai/generate does not generate or publish files. Source files are published with `somewhere deploy` — the platform compiles raw source, so there is no build step. `somewhere docs deploy` returns the exact command and the project layout it expects.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, GENERATION_ENDPOINT_RETIRED
|
|
452
|
+
- `POST /v1/ai/generate-image`
|
|
453
|
+
- Contract: request fields: project_id, prompt, model, width, height, steps, quality, background, storage. response fields (partial): storage_path, size_bytes, content_type, width, steps, model, quality, background, cost. rejects with: VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (prompt is required.); VALIDATION_ERROR (prompt exceeds 2000 chars.); VALIDATION_ERROR (model is required: the previous default was removed, so image requests without a model are not supported by "…"; explicitly set model to … to use the available paid image model. Nothing was sent or charged.); VALIDATION_ERROR (Unknown model "…".); VALIDATION_ERROR (… Available: ….); VALIDATION_ERROR (quality and background are not supported by "…"; "gpt-image-2.5-flare" supports them.); VALIDATION_ERROR (quality must be one of: ….); VALIDATION_ERROR (background must be one of: ….); PROJECT_NOT_FOUND (Project not found.); UPSTREAM_ERROR (Model "…" is not configured on this deployment; this applies to this model only.); VALIDATION_ERROR (The image provider's safety check blocked this prompt; nothing was charged. A different prompt is checked again.); VALIDATION_ERROR (storage must be a destination path string, for example "/audio/greeting.mp3"….); VALIDATION_ERROR (Path is a directory; cannot overwrite with file content.); FORBIDDEN (You do not have access to this file.); UPSTREAM_ERROR (Image generation did not complete and no image was delivered. We could not confirm that the amount reserved for this call was returned to your balance, so it may still appear as reserved until the platform resolves it.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, UPSTREAM_ERROR, FORBIDDEN, UPSTREAM_AUTH_FAILED, UPSTREAM_BILLING, UPSTREAM_RATE_LIMITED, UPSTREAM_DOWN, PROVIDER_ERROR
|
|
454
|
+
- `GET /v1/ai/jobs/:param`
|
|
455
|
+
- Contract: response fields: job_id, project_id, status, message, files. rejects with: PROJECT_NOT_FOUND (Job not found.). error codes: PROJECT_NOT_FOUND
|
|
456
|
+
- `GET /v1/ai/list`
|
|
457
|
+
- Contract: response fields: calls, offset. rejects with: VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
458
|
+
- `POST /v1/ai/moderate`
|
|
459
|
+
- Contract: request fields: project_id, text. rejects with: VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (text is required (non-empty string).); VALIDATION_ERROR (text too long (max 50000 chars).); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, RATE_LIMITED
|
|
460
|
+
- `GET /v1/ai/provider-keys`
|
|
461
|
+
- Contract: response fields: project_id, keys. rejects with: VALIDATION_ERROR (project_id is required (query).); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
462
|
+
- `POST /v1/ai/provider-keys`
|
|
463
|
+
- Contract: request fields: project_id, provider, key. response fields: project_id, provider, set, set=true. rejects with: VALIDATION_ERROR (project_id is required (string).); VALIDATION_ERROR (key is required (string).); VALIDATION_ERROR (key max 4096 characters.); PROJECT_NOT_FOUND (Project not found.); PROJECT_EDITOR_REQUIRED (Editor access is required to set AI provider keys.); PROJECT_OWNER_CHANGED (Project ownership changed before the key was saved. Open the project again.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, PROJECT_EDITOR_REQUIRED, PROJECT_OWNER_CHANGED
|
|
464
|
+
- `DELETE /v1/ai/provider-keys/:param/:param`
|
|
465
|
+
- Contract: response fields: project_id, provider, deleted=true. rejects with: PROJECT_NOT_FOUND (Project not found.); PROJECT_EDITOR_REQUIRED (Editor access is required to delete AI provider keys.); NOT_FOUND (AI provider key not found.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, PROJECT_EDITOR_REQUIRED, NOT_FOUND
|
|
466
|
+
- `POST /v1/ai/transcribe`
|
|
467
|
+
- Contract: request fields: project_id, audio, audio_url, model, language, prompt. response fields: text, duration_seconds, words, model, cost. rejects with: VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (audio (base64) or audio_url is required.); VALIDATION_ERROR (Unknown model "…".); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, AUDIO_URL_NOT_AUDIO, UPSTREAM_AUTH_FAILED, UPSTREAM_BILLING, UPSTREAM_RATE_LIMITED, UPSTREAM_DOWN, PROVIDER_ERROR
|
|
468
|
+
- `POST /v1/ai/tts`
|
|
469
|
+
- Contract: request fields: project_id, text, lang, storage, model, voice, word_timings. response fields: storage_path, size_bytes, content_type, duration_seconds_estimate, model. rejects with: VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (text is required.); VALIDATION_ERROR (text exceeds 15000 chars.); VALIDATION_ERROR (Unsupported TTS model "…". Supported: ….); VALIDATION_ERROR (… Supported: ….); VALIDATION_ERROR (text exceeds … chars for the selected model. Split longer text into several requests.); VALIDATION_ERROR (word_timings is available on the default voice (…) only.); PROJECT_NOT_FOUND (Project not found.); UPSTREAM_ERROR (Model "…" is not configured on this deployment.); UPSTREAM_ERROR (Model "…" requires a DeepInfra key but none is configured.); VALIDATION_ERROR (The voice model "…" has one built-in voice. Omit "voice", or pick another model from GET /v1/ai/catalog (ai_catalog).); VALIDATION_ERROR (Unknown voice "…" for this model. This model accepts … voice IDs across … languages; GET /v1/ai/catalog (ai_catalog) returns the full list grouped by language. Example: "af_bella" (American English).); VALIDATION_ERROR (Unknown voice "…" for the default voice model. It accepts … English voice names, listed by GET /v1/ai/catalog (ai_catalog). Example: "…".); RATE_LIMITED (Free voice limit reached: … requests/minute. Resets at the start of the next minute. / Free voice daily limit reached: … requests/day. Resets at UTC midnight.); RATE_LIMITED (Free voice monthly character limit reached: … characters/month. Resets at the start of next month.); AI_ALLOWANCE_EXHAUSTED (The included AI allowance for this billing period is exhausted. A paid voice uses prepaid balance.); VALIDATION_ERROR (storage must be a destination path string, for example "/audio/greeting.mp3"….). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, UPSTREAM_ERROR, RATE_LIMITED, AI_ALLOWANCE_EXHAUSTED, VOICE_UNAVAILABLE, UPSTREAM_DOWN, UPSTREAM_AUTH_FAILED, UPSTREAM_BILLING, UPSTREAM_RATE_LIMITED, PROVIDER_ERROR
|
|
470
|
+
- `GET /v1/ai/usage`
|
|
471
|
+
|
|
472
|
+
### /v1/analytics
|
|
473
|
+
|
|
474
|
+
- `GET /v1/analytics/consent`
|
|
475
|
+
- Contract: response fields: policy, undefined. rejects with: PROJECT_NOT_FOUND (Project not found.). error codes: PROJECT_NOT_FOUND
|
|
476
|
+
- `POST /v1/analytics/query`
|
|
477
|
+
- Contract: Runtime method: sw.analytics.query. request fields: project_id, event, from, to, group_by, limit. group_by values: hour | day | event | user. response fields: rows, count, group_by. rejects with: VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (event must be a string.); VALIDATION_ERROR (event name exceeds … chars.); PROJECT_NOT_FOUND (Project not found.); CONFIG_ERROR (Analytics query is not configured on this platform.); VALIDATION_ERROR (from is not a valid timestamp.); VALIDATION_ERROR (to is not a valid timestamp.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, CONFIG_ERROR
|
|
478
|
+
- `POST /v1/analytics/track`
|
|
479
|
+
- Contract: request fields: project_id, event, properties, page, referrer, user_agent. response fields: recorded, reason, recorded=false, event, user_id, attribution, recorded=true. rejects with: VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (event is required.); VALIDATION_ERROR (event name exceeds … chars.); PROJECT_NOT_FOUND (Project not found.); FORBIDDEN (Editor access is required.); IDENTITY_CLAIM_NOT_ALLOWED (Analytics attribution is derived by the deployed runtime and cannot be supplied by a caller.); AUTH_REQUIRED (A verified app-user subject is required.); CONFIG_ERROR (Analytics is not configured on this platform.); VALIDATION_ERROR (properties exceed … bytes.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, FORBIDDEN, IDENTITY_CLAIM_NOT_ALLOWED, AUTH_REQUIRED, CONFIG_ERROR
|
|
480
|
+
|
|
481
|
+
### /v1/app-mcp
|
|
482
|
+
|
|
483
|
+
- `POST /v1/app-mcp/:param/approve`
|
|
484
|
+
- `GET /v1/app-mcp/:param/authorize`
|
|
485
|
+
- `GET /v1/app-mcp/:param/consent`
|
|
486
|
+
- `ALL /v1/app-mcp/:param/mcp`
|
|
487
|
+
- `GET /v1/app-mcp/:param/metadata`
|
|
488
|
+
- `POST /v1/app-mcp/:param/register`
|
|
489
|
+
- `GET /v1/app-mcp/:param/resource`
|
|
490
|
+
- `POST /v1/app-mcp/:param/revoke`
|
|
491
|
+
- `PUT /v1/app-mcp/:param/settings`
|
|
492
|
+
- `POST /v1/app-mcp/:param/token`
|
|
493
|
+
- `POST /v1/app-mcp/:param/verify-invocation`
|
|
494
|
+
|
|
495
|
+
### /v1/app-notifications
|
|
496
|
+
|
|
497
|
+
- `GET /v1/app-notifications/list`
|
|
498
|
+
- Contract: response fields: notifications. rejects with: AUTH_REQUIRED (The notification inbox needs a request from a signed-in user.); VALIDATION_ERROR (project_id is required.). error codes: AUTH_REQUIRED, VALIDATION_ERROR
|
|
499
|
+
- `POST /v1/app-notifications/mark-all-read`
|
|
500
|
+
- Contract: response fields: changes. rejects with: AUTH_REQUIRED (The notification inbox needs a request from a signed-in user.); VALIDATION_ERROR (project_id is required.). error codes: AUTH_REQUIRED, VALIDATION_ERROR
|
|
501
|
+
- `POST /v1/app-notifications/mark-read`
|
|
502
|
+
- Contract: response fields: changes, id. rejects with: VALIDATION_ERROR (id is required.); AUTH_REQUIRED (The notification inbox needs a request from a signed-in user.); VALIDATION_ERROR (project_id is required.). error codes: VALIDATION_ERROR, AUTH_REQUIRED
|
|
503
|
+
- `POST /v1/app-notifications/send`
|
|
504
|
+
- Contract: response fields: id. rejects with: VALIDATION_ERROR (Request body must be a JSON object.); VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (user_id is required.); APP_USER_NOT_FOUND (user_id is not a user of this app.); JOB_ENDED (This job has ended, so the notification was not sent.); VALIDATION_ERROR (… must be a string of at most … characters.); FORBIDDEN (Sending notifications needs server authority: sw.notifications.send in a deployed function has it.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, APP_USER_NOT_FOUND, JOB_ENDED, FORBIDDEN, PROJECT_NOT_FOUND
|
|
505
|
+
- `GET /v1/app-notifications/unread-count`
|
|
506
|
+
- Contract: response fields: count. rejects with: AUTH_REQUIRED (The notification inbox needs a request from a signed-in user.); VALIDATION_ERROR (project_id is required.). error codes: AUTH_REQUIRED, VALIDATION_ERROR
|
|
507
|
+
|
|
508
|
+
### /v1/artifacts
|
|
509
|
+
|
|
510
|
+
- `POST /v1/artifacts`
|
|
511
|
+
- Contract: rejects with: VALIDATION_ERROR (project is required.); VALIDATION_ERROR (path is required.); VALIDATION_ERROR (title is required.); VALIDATION_ERROR (title must be at most … characters.); VALIDATION_ERROR (agent is required — the producer's label, e.g. 'claude-code', 'cursor', 'human'.); VALIDATION_ERROR (agent must be at most … characters.); VALIDATION_ERROR (summary must be a string of at most … characters.); VALIDATION_ERROR (schema must be a string of at most … characters.); VALIDATION_ERROR (media_type must be a string of at most … characters.); VALIDATION_ERROR (media_type must be a valid "type/subtype" media type.); VALIDATION_ERROR (derived_from must be an array of at most … artifact ids.); VALIDATION_ERROR (supersedes must be an artifact id.); VALIDATION_ERROR (invalid path); VALIDATION_ERROR (supersedes does not name an artifact in this project.); VALIDATION_ERROR (derived_from must reference artifacts in this project.); NOT_FOUND (No file at …. Artifacts publish existing project files, so the file has to exist before it is published.); CONFLICT (This file has no publication identity yet; rewriting the file assigns one, and it can be published after that.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, NOT_FOUND, CONFLICT, PROJECT_NOT_FOUND
|
|
512
|
+
- `GET /v1/artifacts/:param`
|
|
513
|
+
- Contract: rejects with: VALIDATION_ERROR (Invalid artifact id.); NOT_FOUND (Artifact not found.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, NOT_FOUND, PROJECT_NOT_FOUND
|
|
514
|
+
- `GET /v1/artifacts/:param/content`
|
|
515
|
+
- Contract: rejects with: VALIDATION_ERROR (Invalid artifact id.); NOT_FOUND (Artifact not found.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, NOT_FOUND, PROJECT_NOT_FOUND
|
|
516
|
+
- `GET /v1/artifacts/resolve`
|
|
517
|
+
- Contract: rejects with: VALIDATION_ERROR (uri must look like sw://{project}/artifact/{artifact_id}.); NOT_FOUND (Artifact not found.); VALIDATION_ERROR (Invalid artifact id.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, NOT_FOUND, PROJECT_NOT_FOUND
|
|
518
|
+
|
|
519
|
+
### /v1/auth
|
|
520
|
+
|
|
521
|
+
- `ALL /v1/auth/.well-known/*`
|
|
522
|
+
- `ALL /v1/auth/agent/*`
|
|
523
|
+
- `GET /v1/auth/app-roles`
|
|
524
|
+
- Contract: response fields (partial): items, email, email_verified, banned, email=null when unavailable, email_verified=null when unavailable, banned=null when unavailable. rejects with: UNSUPPORTED_FEATURE (App roles are granted with a developer smt_ key from your own tooling (CLI, MCP or REST), never from an app-user session or a deployed function.); USER_NOT_FOUND (No app user with that id in this project. / No app user signed up with that exact address in this project. The person signs up first; then grant the role.); VALIDATION_ERROR (Name the app user with exactly one of user_id (from auth_users_list or the sign-up response) or email (the exact address they signed up with).); VALIDATION_ERROR (user_id must be a string.); VALIDATION_ERROR (email must be a string.); VALIDATION_ERROR (email must be the exact address the user signed up with.). error codes: UNSUPPORTED_FEATURE, USER_NOT_FOUND, VALIDATION_ERROR
|
|
525
|
+
- `POST /v1/auth/app-roles/grant`
|
|
526
|
+
- Contract: response fields (partial): email, email_verified, already_granted, role. rejects with: VALIDATION_ERROR (role is required: an app role declared in db/schema.ts appRoles.); UNSUPPORTED_FEATURE (App roles are granted with a developer smt_ key from your own tooling (CLI, MCP or REST), never from an app-user session or a deployed function.); USER_NOT_FOUND (No app user with that id in this project. / No app user signed up with that exact address in this project. The person signs up first; then grant the role.). error codes: VALIDATION_ERROR, UNSUPPORTED_FEATURE, USER_NOT_FOUND
|
|
527
|
+
- `POST /v1/auth/app-roles/revoke`
|
|
528
|
+
- Contract: response fields (partial): email, email_verified, already_granted, role. rejects with: VALIDATION_ERROR (role is required: an app role declared in db/schema.ts appRoles.); UNSUPPORTED_FEATURE (App roles are granted with a developer smt_ key from your own tooling (CLI, MCP or REST), never from an app-user session or a deployed function.); USER_NOT_FOUND (No app user with that id in this project. / No app user signed up with that exact address in this project. The person signs up first; then grant the role.). error codes: VALIDATION_ERROR, UNSUPPORTED_FEATURE, USER_NOT_FOUND
|
|
529
|
+
- `ALL /v1/auth/auth.md`
|
|
530
|
+
- `POST /v1/auth/bcrypt-verify`
|
|
531
|
+
- Contract: request fields: password, hash. response fields: valid
|
|
532
|
+
- `POST /v1/auth/beta-request`
|
|
533
|
+
- Contract: request fields: message. response fields: submitted, ticket_id, requested_at, submitted=true. rejects with: AUTH_INVALID_CREDS (Missing platform auth.); AUTH_INVALID_CREDS (Invalid or expired platform token.); VALIDATION_ERROR (message is required.); VALIDATION_ERROR (message must be 4000 characters or fewer.). error codes: AUTH_INVALID_CREDS, VALIDATION_ERROR
|
|
534
|
+
- `GET /v1/auth/callback`
|
|
535
|
+
- Contract: rejects with: VALIDATION_ERROR (Missing state parameter.); AUTHORITY_UNAVAILABLE (Sign-in could not be verified; a new sign-in starts a fresh attempt.); AUTH_INVALID_CREDS (Invalid or expired OAuth state; a new sign-in starts a fresh attempt.); VALIDATION_ERROR (Sign-in callback host mismatch.); VALIDATION_ERROR (Missing code parameter.). error codes: VALIDATION_ERROR, AUTHORITY_UNAVAILABLE, AUTH_INVALID_CREDS
|
|
536
|
+
- `GET /v1/auth/check-username`
|
|
537
|
+
- Contract: response fields: available, username, available=false, reason='invalid', reason='reserved', reason, available=true
|
|
538
|
+
- `POST /v1/auth/claim`
|
|
539
|
+
- `GET /v1/auth/cli`
|
|
540
|
+
- Contract: rejects with: VALIDATION_ERROR (Unsupported sign-in host.); UNSUPPORTED_FEATURE (Google OAuth is not configured (missing GOOGLE_CLIENT_ID).). error codes: VALIDATION_ERROR, UNSUPPORTED_FEATURE
|
|
541
|
+
- `POST /v1/auth/cli-logout`
|
|
542
|
+
- Contract: response fields: logged_out, logged_out=true. rejects with: INVALID_REFRESH_TOKEN (Refresh token is invalid or unavailable.). error codes: INVALID_REFRESH_TOKEN, RATE_LIMITED
|
|
543
|
+
- `GET /v1/auth/connect`
|
|
544
|
+
- `GET /v1/auth/connect-codes`
|
|
545
|
+
- Contract: response fields: codes, next_cursor. rejects with: VALIDATION_ERROR (The list cursor is invalid.). error codes: VALIDATION_ERROR
|
|
546
|
+
- `POST /v1/auth/connect-codes`
|
|
547
|
+
- Contract: rejects with: CONNECT_CODE_ORIGIN (Manage connect codes from the Somewhere dashboard.); CONNECT_CODE_ACCOUNT_REQUIRED (Sign in to a permanent account to issue a connect code.); CONNECT_CODE_RATE_LIMITED (This account has reached its connect code limit. Try again after the wait shown.); AUTH_INVALID_CREDS (The account session changed. Sign in again to issue a code.). error codes: CONNECT_CODE_ORIGIN, CONNECT_CODE_ACCOUNT_REQUIRED, CONNECT_CODE_RATE_LIMITED, AUTH_INVALID_CREDS
|
|
548
|
+
- `DELETE /v1/auth/connect-codes/:param`
|
|
549
|
+
- Contract: response fields: revoked, revoked=true, disconnected, disconnected=true. rejects with: CONNECT_CODE_UNAVAILABLE (This connect code is unavailable: it is unknown, expired, or its agent is already disconnected.); CONNECT_CODE_ORIGIN (Manage connect codes from the Somewhere dashboard.). error codes: CONNECT_CODE_UNAVAILABLE, CONNECT_CODE_ORIGIN
|
|
550
|
+
- `GET /v1/auth/connect-codes/authorize`
|
|
551
|
+
- `POST /v1/auth/connect-codes/authorize`
|
|
552
|
+
- Contract: rejects with: VALIDATION_ERROR (Unknown app.); CONNECT_CODE_ORIGIN (Manage connect codes from the Somewhere dashboard.); CONNECT_CODE_ACCOUNT_REQUIRED (Sign in to a permanent account to issue a connect code.); CONNECT_CODE_RATE_LIMITED (This account has reached its connect code limit. Try again after the wait shown.); AUTH_INVALID_CREDS (The account session changed. Sign in again to issue a code.). error codes: VALIDATION_ERROR, CONNECT_CODE_ORIGIN, CONNECT_CODE_ACCOUNT_REQUIRED, CONNECT_CODE_RATE_LIMITED, AUTH_INVALID_CREDS
|
|
553
|
+
- `POST /v1/auth/connect-codes/redeem`
|
|
554
|
+
- Contract: request fields: connect_code. response fields: key, projects_remaining, revoked_at. rejects with: CONNECT_CODE_INVALID (Use a connect code copied from the Somewhere dashboard.); CONNECT_CODE_USED (This connect code was already used. Ask the owner for a new code.); CONNECT_CODE_REVOKED (The owner revoked this connect code. Ask for a new code.); CONNECT_CODE_EXPIRED (This connect code expired. Ask the owner for a new code.); CONNECT_CODE_INVALID (This connect code is unavailable. Ask the owner for a new code.). error codes: CONNECT_CODE_INVALID, CONNECT_CODE_USED, CONNECT_CODE_REVOKED, CONNECT_CODE_EXPIRED
|
|
555
|
+
- `POST /v1/auth/device-code`
|
|
556
|
+
- Contract: response fields: code, verifier_bound, expires_in, approval_url, verifier_bound=true. rejects with: VALIDATION_ERROR (code must match pattern XXXX-XXXX (uppercase A-Z, 2-9).); DEVICE_VERIFIER_REQUIRED (This login lacks the verifier that current CLI versions send; a login started from an updated CLI carries it.); AUTH_INVALID_CREDS (A temporary CLI credential is required to save its projects.); AUTH_INVALID_CREDS (The temporary CLI credential is invalid or expired.); VALIDATION_ERROR (code already in use; a different code is required.). error codes: VALIDATION_ERROR, DEVICE_VERIFIER_REQUIRED, AUTH_INVALID_CREDS
|
|
557
|
+
- `POST /v1/auth/device-code/approve`
|
|
558
|
+
- Contract: response fields: approved, device_name, email, session_id, scope, approved=true. rejects with: VALIDATION_ERROR (code must match pattern XXXX-XXXX.); FORBIDDEN (scope.projects names a project you cannot access: …. A session can only be scoped to your own projects.); TEMP_CLAIM_ACCOUNT_CHANGED (Reload the approval page to confirm where the temporary projects will be saved.); AUTH_INVALID_CREDS (This requires a signed-in platform session.); PERSON_APPROVAL_REQUIRED (Only the person signed in to Somewhere can do this, from the dashboard. A key or an agent cannot.); AUTH_INVALID_CREDS (Invalid or expired platform token.); DEVICE_VERIFIER_REQUIRED (This login lacks the verifier that current CLI versions send; a login started from an updated CLI carries it.); DEVICE_CODE_DENIED (This sign-in was denied; a new `somewhere login` starts a fresh sign-in.); AUTH_INVALID_CREDS (Code already approved.); DEVICE_CODE_APPROVAL_UNAVAILABLE (Sign-in approval could not be confirmed. The same approval can be repeated, or a new `somewhere login` issues a fresh code.); AUTH_INVALID_CREDS (This code is invalid or expired. Codes last … minutes. Run somewhere login again for a fresh code.). error codes: VALIDATION_ERROR, FORBIDDEN, TEMP_CLAIM_ACCOUNT_CHANGED, AUTH_INVALID_CREDS, PERSON_APPROVAL_REQUIRED, DEVICE_VERIFIER_REQUIRED, DEVICE_CODE_DENIED, DEVICE_CODE_APPROVAL_UNAVAILABLE
|
|
559
|
+
- `POST /v1/auth/device-code/deny`
|
|
560
|
+
- Contract: response fields: denied, device_name, denied=true. rejects with: VALIDATION_ERROR (code must match pattern XXXX-XXXX.); AUTH_INVALID_CREDS (This requires a signed-in platform session.); PERSON_APPROVAL_REQUIRED (Only the person signed in to Somewhere can do this, from the dashboard. A key or an agent cannot.); AUTH_INVALID_CREDS (Invalid or expired platform token.); DEVICE_VERIFIER_REQUIRED (This login lacks the verifier that current CLI versions send; a login started from an updated CLI carries it.); DEVICE_CODE_DENIED (This sign-in was denied; a new `somewhere login` starts a fresh sign-in.); AUTH_INVALID_CREDS (Code already approved.); DEVICE_CODE_APPROVAL_UNAVAILABLE (Sign-in approval could not be confirmed. The same approval can be repeated, or a new `somewhere login` issues a fresh code.); AUTH_INVALID_CREDS (This code is invalid or expired. Codes last … minutes. Run somewhere login again for a fresh code.). error codes: VALIDATION_ERROR, AUTH_INVALID_CREDS, PERSON_APPROVAL_REQUIRED, DEVICE_VERIFIER_REQUIRED, DEVICE_CODE_DENIED, DEVICE_CODE_APPROVAL_UNAVAILABLE
|
|
561
|
+
- `GET /v1/auth/device-code/inspect`
|
|
562
|
+
- Contract: response fields: status, code, temporary_project_count, destination_user_id, destination_email, status='pending'. rejects with: VALIDATION_ERROR (code must match pattern XXXX-XXXX.); AUTH_INVALID_CREDS (This requires a signed-in platform session.); PERSON_APPROVAL_REQUIRED (Only the person signed in to Somewhere can do this, from the dashboard. A key or an agent cannot.); AUTH_INVALID_CREDS (Invalid or expired platform token.); DEVICE_VERIFIER_REQUIRED (This login lacks the verifier that current CLI versions send; a login started from an updated CLI carries it.); DEVICE_CODE_DENIED (This sign-in was denied; a new `somewhere login` starts a fresh sign-in.); AUTH_INVALID_CREDS (Code already approved.); AUTH_INVALID_CREDS (This code is invalid or expired. Codes last … minutes. Run somewhere login again for a fresh code.). error codes: VALIDATION_ERROR, AUTH_INVALID_CREDS, PERSON_APPROVAL_REQUIRED, DEVICE_VERIFIER_REQUIRED, DEVICE_CODE_DENIED
|
|
563
|
+
- `GET /v1/auth/device-code/status`
|
|
564
|
+
- Contract: rejects with: DEVICE_VERIFIER_REQUIRED (This login lacks the verifier that current CLI versions send; a login started from an updated CLI carries it.). error codes: DEVICE_VERIFIER_REQUIRED
|
|
565
|
+
- `POST /v1/auth/device-code/status`
|
|
566
|
+
- Contract: response fields: status, status='pending', token, email, refresh_token, expires_at, scope, session_id, merged_project_count, status='approved', scope=null when unavailable. rejects with: DEVICE_VERIFIER_REQUIRED (This login lacks the verifier that current CLI versions send; a login started from an updated CLI carries it.); AUTH_INVALID_CREDS (Login is invalid or already redeemed; a new login is required.); DEVICE_CODE_REDEMPTION_UNAVAILABLE (Login delivery could not be confirmed. Repeating this redemption is not safe; a new login starts fresh.). error codes: DEVICE_VERIFIER_REQUIRED, AUTH_INVALID_CREDS, DEVICE_CODE_REDEMPTION_UNAVAILABLE
|
|
567
|
+
- `GET /v1/auth/erasures/:param`
|
|
568
|
+
- Contract: rejects with: VALIDATION_ERROR (project_id query param is required.); NOT_FOUND (Erase receipt not found in this project.). error codes: VALIDATION_ERROR, NOT_FOUND
|
|
569
|
+
- `POST /v1/auth/forgot`
|
|
570
|
+
- Contract: request fields: project_id, email. response fields: message, message='If that email exists, a reset link has been sent.'. rejects with: VALIDATION_ERROR (project_id and email are required (strings).); PROJECT_NOT_FOUND (Project not found.); AUTH_FEATURE_UNAVAILABLE (Password reset cannot be requested from a background job; signed-in requests can request it.); JOB_ENDED (This job has ended, so no reset link was sent.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, AUTH_FEATURE_UNAVAILABLE, JOB_ENDED
|
|
571
|
+
- `GET /v1/auth/google`
|
|
572
|
+
- Contract: rejects with: VALIDATION_ERROR (Unsupported sign-in host.); VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (redirect_uri is required.); PROJECT_NOT_FOUND (Project not found.); VALIDATION_ERROR (redirect_uri host must be this project's production/dev host, a verified custom domain attached to the project, or a localhost dev origin.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
573
|
+
- `GET /v1/auth/google/callback`
|
|
574
|
+
- Contract: rejects with: AUTHORITY_UNAVAILABLE (Sign-in could not be verified; a new sign-in starts a fresh attempt.); OAUTH_ERROR (Sign-in was cancelled or could not be completed; a new sign-in from the app starts a fresh attempt.); VALIDATION_ERROR (Missing code or state parameter.); VALIDATION_ERROR (Invalid or expired OAuth state.); VALIDATION_ERROR (Sign-in callback host mismatch.); VALIDATION_ERROR (Invalid state: missing project_id or redirect_uri.); AUTHORITY_UNAVAILABLE (Sign-in could not be completed; a new sign-in starts a fresh attempt.). error codes: AUTHORITY_UNAVAILABLE, OAUTH_ERROR, VALIDATION_ERROR
|
|
575
|
+
- `POST /v1/auth/google/exchange`
|
|
576
|
+
- Contract: request fields: code, attempt, verifier. rejects with: VALIDATION_ERROR (code is required.); AUTHORITY_UNAVAILABLE (Sign-in could not be verified; a new sign-in starts a fresh attempt.); INVALID_CODE (Authorization code is invalid or expired.); PROJECT_NOT_FOUND (This token is not authorized for the requested project.); FORBIDDEN (This developer key cannot edit the project the code was issued for.); AUTH_INVALID_CREDS (This account changed; a new sign-in is required.); AUTH_INVALID_CREDS (This account changed; a new sign-in is required. / This account cannot sign in.). error codes: VALIDATION_ERROR, AUTHORITY_UNAVAILABLE, INVALID_CODE, PROJECT_NOT_FOUND, FORBIDDEN, AUTH_INVALID_CREDS
|
|
577
|
+
- `GET /v1/auth/invites`
|
|
578
|
+
- Contract: response fields: invites. rejects with: VALIDATION_ERROR (status must be one of ….); VALIDATION_ERROR (limit must be a whole number from 1 to ….); VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found or not owned by you.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
579
|
+
- `POST /v1/auth/invites`
|
|
580
|
+
- Contract: rejects with: VALIDATION_ERROR (A JSON body is required.); VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found or not owned by you.). error codes: VALIDATION_ERROR, JOB_ENDED, PROJECT_NOT_FOUND
|
|
581
|
+
- `GET /v1/auth/invites/:param`
|
|
582
|
+
- Contract: response fields: invite. rejects with: INVITE_NOT_FOUND (No invitation with that id in this project.); VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found or not owned by you.). error codes: INVITE_NOT_FOUND, VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
583
|
+
- `POST /v1/auth/invites/:param/revoke`
|
|
584
|
+
- Contract: response fields: invite. rejects with: INVITE_NOT_FOUND (No invitation with that id in this project.); INVITE_NOT_PENDING (This invitation is already …; only a pending invitation can be revoked.); VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found or not owned by you.). error codes: INVITE_NOT_FOUND, INVITE_NOT_PENDING, VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
585
|
+
- `POST /v1/auth/login`
|
|
586
|
+
- Contract: request fields: project_id, email, password. response fields (partial): mfa_required, mfa_token, mfa_required=true, user, email, role, display_name, token, access_token, refresh_token, session_token. rejects with: VALIDATION_ERROR (project_id, email, and password are required (strings).); RATE_LIMITED (Too many login attempts. A later attempt is accepted after retry_after_ms.); RATE_LIMITED (Too many failed login attempts. A later attempt is accepted after retry_after_ms.); AUTH_INVALID_CREDS (Wrong email or password.). error codes: VALIDATION_ERROR, RATE_LIMITED, AUTH_INVALID_CREDS
|
|
587
|
+
- `POST /v1/auth/logout`
|
|
588
|
+
- Contract: request fields: project_id, session_token, refresh_token, access_token. response fields: logged_out, already_signed_out, logged_out=true, already_signed_out=true. rejects with: VALIDATION_ERROR (project_id is required (string).); VALIDATION_ERROR (session_token must be a string.); VALIDATION_ERROR (refresh_token must be a string.); VALIDATION_ERROR (access_token must be a string.); VALIDATION_ERROR (session_token or refresh_token (or both) is required.); AUTH_INVALID_CREDS (A preview session is not valid for the live app.); PROJECT_NOT_FOUND (Project not found.); SESSION_NOT_FOUND (No session matched the supplied session_token or refresh_token; nothing was signed out.). error codes: VALIDATION_ERROR, AUTH_INVALID_CREDS, PROJECT_NOT_FOUND, SESSION_NOT_FOUND
|
|
589
|
+
- `POST /v1/auth/magic-link`
|
|
590
|
+
- Contract: request fields: project_id, email, redirect_uri, purpose. response fields: message, message='If that email exists or can be created, a sign-in link has been sent.', status, message_id, status='pending', message='Your sign-in email is pending.'. rejects with: VALIDATION_ERROR (project_id and email are required.); VALIDATION_ERROR (purpose must be 'sign_in' or 'confirm'.); PROJECT_NOT_FOUND (Project not found or not owned by you.); VALIDATION_ERROR (email must be a string.); VALIDATION_ERROR (email must be a valid email address no longer than 320 characters.); VALIDATION_ERROR (redirect_uri host must be the project's somewhere.site address, a verified custom domain attached to the project, or a localhost dev origin.); AUTH_FEATURE_UNAVAILABLE (Sign-in links cannot be requested from a background job; signed-in and server requests can request one.); AUTH_INVALID_CREDS (This sign-in request is no longer valid; a new link request issues a fresh one.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, AUTH_FEATURE_UNAVAILABLE, AUTH_INVALID_CREDS, EMAIL_DELIVERY_UNKNOWN, EMAIL_SEND_PENDING, EMAIL_SUPPRESSED, EMAIL_PROJECT_PAUSED
|
|
591
|
+
- `POST /v1/auth/magic-link/verify`
|
|
592
|
+
- Contract: request fields: project_id, token. response fields: mfa_required, mfa_token, redirect_uri, mfa_required=true, invite_id, user, token, access_token, refresh_token, session_token, expires_in. rejects with: VALIDATION_ERROR (project_id and token are required.); PROJECT_NOT_FOUND (Project not found or not owned by you.); AUTH_INVALID_CREDS (Invalid, used, or expired sign-in link; a new link request issues a fresh one.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, AUTH_INVALID_CREDS
|
|
593
|
+
- `GET /v1/auth/me`
|
|
594
|
+
- Contract: response fields: user. rejects with: AUTH_INVALID_CREDS (Invalid session token; a new sign-in is required.); AUTH_INVALID_CREDS (User not found.); AUTH_BANNED (This account has been suspended.); VALIDATION_ERROR (X-App-Token header or app_token query param is required with a developer smt_ key; an app-user JWT in the Authorization header is accepted instead.); AUTH_INVALID_CREDS (Invalid or expired app token.); PROJECT_NOT_FOUND (Project not found or not owned by you.); AUTH_INVALID_CREDS (This session is not valid for this app. Please sign in again.). error codes: AUTH_INVALID_CREDS, AUTH_BANNED, VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
595
|
+
- `POST /v1/auth/mfa/challenge`
|
|
596
|
+
- Contract: request fields: project_id, mfa_token, code, resend. response fields: user, email, role, display_name, token, access_token, refresh_token, session_token, expires_in. rejects with: VALIDATION_ERROR (code is required (or resend: true).); PROJECT_NOT_FOUND (Project not found or not owned by you.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
597
|
+
- `POST /v1/auth/mfa/enroll`
|
|
598
|
+
- Contract: request fields: method. rejects with: UNSUPPORTED_FEATURE (Sign-in codes are turned on by the signed-in user, with their own app session.); AUTH_INVALID_CREDS (User not found.). error codes: UNSUPPORTED_FEATURE, AUTH_INVALID_CREDS
|
|
599
|
+
- `GET /v1/auth/mfa/policy`
|
|
600
|
+
- Contract: rejects with: FORBIDDEN (The app owner sets the sign-in code policy with a developer key.); PROJECT_NOT_FOUND (Project not found or not owned by you.). error codes: FORBIDDEN, PROJECT_NOT_FOUND
|
|
601
|
+
- `PUT /v1/auth/mfa/policy`
|
|
602
|
+
- Contract: request fields: project_id, mode. rejects with: FORBIDDEN (The app owner sets the sign-in code policy with a developer key.); PROJECT_NOT_FOUND (Project not found or not owned by you.). error codes: FORBIDDEN, PROJECT_NOT_FOUND
|
|
603
|
+
- `POST /v1/auth/mfa/recovery`
|
|
604
|
+
- Contract: request fields: project_id, email, password. rejects with: VALIDATION_ERROR (project_id, email, and password are required (strings).); PROJECT_NOT_FOUND (Project not found or not owned by you.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
605
|
+
- `GET /v1/auth/mfa/recovery/cancel`
|
|
606
|
+
- `POST /v1/auth/mfa/recovery/cancel`
|
|
607
|
+
- Contract: request fields: token. response fields: outcome. error codes: AUTH_INVALID_CREDS
|
|
608
|
+
- `POST /v1/auth/mfa/unenroll`
|
|
609
|
+
- Contract: request fields: password, challenge_id, code. rejects with: AUTH_INVALID_CREDS (Wrong email or password.); UNSUPPORTED_FEATURE (Sign-in codes are turned on by the signed-in user, with their own app session.); AUTH_INVALID_CREDS (User not found.). error codes: AUTH_INVALID_CREDS, UNSUPPORTED_FEATURE
|
|
610
|
+
- `POST /v1/auth/mfa/verify`
|
|
611
|
+
- Contract: request fields: challenge_id, code. rejects with: UNSUPPORTED_FEATURE (Sign-in codes are turned on by the signed-in user, with their own app session.); AUTH_INVALID_CREDS (User not found.). error codes: UNSUPPORTED_FEATURE, AUTH_INVALID_CREDS
|
|
612
|
+
- `ALL /v1/auth/oauth2/*`
|
|
613
|
+
- `POST /v1/auth/platform-delete-account`
|
|
614
|
+
- Contract: request fields: code. response fields: deleted, deleted=true. rejects with: AUTH_INVALID_CREDS (Missing platform auth.); AUTH_INVALID_CREDS (Invalid token.); VALIDATION_ERROR (code is required.); INVALID_CODE (That code is wrong, has expired, or was already used. Ask for a new one.); DELETE_INCOMPLETE (Your projects could not be fully removed, so nothing was deleted; a later identical request can succeed.); DELETE_INCOMPLETE (A custom domain could not be released, so the account was not deleted; a later identical request can succeed.); DELETE_INCOMPLETE (Your subscription could not be cancelled, so the account was not deleted; a later identical request can succeed.). error codes: AUTH_INVALID_CREDS, VALIDATION_ERROR, INVALID_CODE, DELETE_INCOMPLETE
|
|
615
|
+
- `POST /v1/auth/platform-forgot`
|
|
616
|
+
- Contract: request fields: email. response fields: sent, message, sent=true, message='If that email is on file, a reset link is on its way.'. rejects with: RATE_LIMITED (Too many reset requests from this IP; a later request can succeed.); VALIDATION_ERROR (email is required.). error codes: RATE_LIMITED, VALIDATION_ERROR
|
|
617
|
+
- `GET /v1/auth/platform-github`
|
|
618
|
+
- Contract: rejects with: VALIDATION_ERROR (Unsupported sign-in host.); UNSUPPORTED_FEATURE (GitHub sign-in is not configured on this platform (missing GITHUB_CLIENT_ID secret).). error codes: VALIDATION_ERROR, UNSUPPORTED_FEATURE
|
|
619
|
+
- `GET /v1/auth/platform-google`
|
|
620
|
+
- Contract: rejects with: VALIDATION_ERROR (Unsupported sign-in host.); UNSUPPORTED_FEATURE (Google OAuth is not configured on this platform (missing GOOGLE_CLIENT_ID secret).). error codes: VALIDATION_ERROR, UNSUPPORTED_FEATURE
|
|
621
|
+
- `GET /v1/auth/platform-google/callback`
|
|
622
|
+
- Contract: rejects with: VALIDATION_ERROR (Missing code or state parameter.); AUTHORITY_UNAVAILABLE (Sign-in could not be verified; a new sign-in starts a fresh attempt.); AUTH_INVALID_CREDS (Invalid or expired OAuth state; a new sign-in starts a fresh attempt.); VALIDATION_ERROR (Sign-in callback host mismatch.). error codes: VALIDATION_ERROR, AUTHORITY_UNAVAILABLE, AUTH_INVALID_CREDS
|
|
623
|
+
- `GET /v1/auth/platform-google/client-id`
|
|
624
|
+
- Contract: response fields: client_id. rejects with: UNSUPPORTED_FEATURE (Google sign-in is not configured on this platform (missing GOOGLE_CLIENT_ID).). error codes: UNSUPPORTED_FEATURE
|
|
625
|
+
- `POST /v1/auth/platform-google/onetap`
|
|
626
|
+
- Contract: request fields: credential. response fields: user, email, name, is_new_user, name=null when unavailable, second_step_required, methods, expires_in, complete_url, second_step_required=true. rejects with: RATE_LIMITED (Too many sign-in attempts from this IP; a later request can succeed.); UNSUPPORTED_FEATURE (Google sign-in is not configured on this platform (missing GOOGLE_CLIENT_ID).); GOOGLE_CREDENTIAL_INVALID (Sign-in could not be verified; a new sign-in starts a fresh attempt.). error codes: RATE_LIMITED, UNSUPPORTED_FEATURE, GOOGLE_CREDENTIAL_INVALID
|
|
627
|
+
- `DELETE /v1/auth/platform-identities/:param`
|
|
628
|
+
- Contract: response fields: provider, linked=false. rejects with: VALIDATION_ERROR (provider is google or github.); FRESH_SIGN_IN_REQUIRED (Removing a way to sign in needs a sign-in from the last 10 minutes. Sign out and in again, then try again.); AUTH_INVALID_CREDS (Account not found.); LAST_SIGN_IN_METHOD (… is the only way into this account. Set a password or confirm your email address first.); TARGET_CHANGED (The account changed while this was being removed. Nothing was changed; the same request can be repeated.); AUTH_INVALID_CREDS (This needs a signed-in browser session.); AUTHORITY_UNAVAILABLE (Your account authority could not be verified; nothing changed, and the same request can be repeated.); FORBIDDEN (An impersonation session cannot change the account's sign-in steps.). error codes: VALIDATION_ERROR, FRESH_SIGN_IN_REQUIRED, AUTH_INVALID_CREDS, LAST_SIGN_IN_METHOD, TARGET_CHANGED, AUTHORITY_UNAVAILABLE, FORBIDDEN
|
|
629
|
+
- `POST /v1/auth/platform-login`
|
|
630
|
+
- Contract: request fields: email, password, turnstile_token. response fields: user, email, name, second_step_required, methods, expires_in, complete_url, second_step_required=true. rejects with: RATE_LIMITED (Too many login attempts from this IP; a later request can succeed.); VALIDATION_ERROR (email and password are required.); AUTH_INVALID_CREDS (Captcha verification failed; a page refresh issues a new captcha.); VALIDATION_ERROR (turnstile_token is required.); AUTH_INVALID_CREDS (Wrong email or password.). error codes: RATE_LIMITED, VALIDATION_ERROR, AUTH_INVALID_CREDS
|
|
631
|
+
- `POST /v1/auth/platform-logout`
|
|
632
|
+
- Contract: request fields: all_devices. response fields: logged_out, logged_out=true
|
|
633
|
+
- `POST /v1/auth/platform-magic-link`
|
|
634
|
+
- Contract: request fields: email, turnstile_token, redirect, arrival. response fields: sent, email, sent=true. rejects with: VALIDATION_ERROR (A valid email is required.); AUTH_INVALID_CREDS (Captcha verification failed; a page refresh issues a new captcha.); VALIDATION_ERROR (turnstile_token is required.); RATE_LIMITED (Too many sign-in link requests from this network; a later request can succeed.); RATE_LIMITED (Too many sign-in links requested for this email; the limit resets in …s.); RATE_LIMITED (This fixture project has used its sign-in links for today.). error codes: VALIDATION_ERROR, AUTH_INVALID_CREDS, RATE_LIMITED
|
|
635
|
+
- `GET /v1/auth/platform-magic-link/consume`
|
|
636
|
+
- `POST /v1/auth/platform-magic-link/consume`
|
|
637
|
+
- Contract: rejects with: FORBIDDEN (This sign-in must be confirmed from the sign-in page.); FORBIDDEN (This sign-in could not be verified; the link in the email can be opened again.). error codes: FORBIDDEN
|
|
638
|
+
- `GET /v1/auth/platform-me`
|
|
639
|
+
- Contract: response fields: signed_in, undefined, helper, email_signin_handoff, subjectId, user, id, signup_policy_versions, current_policies, email, name, username, created_at, last_login_at, onboarding_complete, email_verified, tech_tier, effective_tier, trial, temporary_expires_at, is_admin, beta_approved, beta_request, beta_requested_at, signup_source, welcome_dismissed_at, onboarding_dismissed_at, auth_methods, password, google, github, stats, api_keys, projects, projects_pending_deletion, welcome_dismissed_at=null when unavailable, onboarding_dismissed_at=null when unavailable. rejects with: AUTH_INVALID_CREDS (Missing platform auth.); AUTH_INVALID_CREDS (Invalid or expired platform token.); AUTH_INVALID_CREDS (User not found.); AUTHORITY_UNAVAILABLE (Your account authority could not be verified; nothing ran, and the same request can be repeated.). error codes: AUTH_INVALID_CREDS, AUTHORITY_UNAVAILABLE
|
|
640
|
+
- `PATCH /v1/auth/platform-me`
|
|
641
|
+
- Contract: request fields: name, dismiss_welcome, dismiss_onboarding, ai_tools, pinned_apps. response fields: updated, updated=true. rejects with: AUTH_INVALID_CREDS (Missing platform auth.); AUTH_INVALID_CREDS (Invalid or expired platform token.); VALIDATION_ERROR (ai_tools must be a list of up to … of: ….); VALIDATION_ERROR (pinned_apps must be a list of up to 20 app ids.); VALIDATION_ERROR (No valid fields to update.). error codes: AUTH_INVALID_CREDS, VALIDATION_ERROR
|
|
642
|
+
- `POST /v1/auth/platform-mint-key`
|
|
643
|
+
- Contract: request fields: name. response fields: id, prefix, scopes. rejects with: AUTH_INVALID_CREDS (Missing platform auth.); AUTHORITY_UNAVAILABLE (Your account authority could not be verified; nothing was created, and the same request can be repeated.); AUTH_INVALID_CREDS (Invalid or expired platform token.). error codes: AUTH_INVALID_CREDS, AUTHORITY_UNAVAILABLE
|
|
644
|
+
- `POST /v1/auth/platform-onboarding-complete`
|
|
645
|
+
- Contract: response fields: onboarding_complete, onboarding_complete=true. rejects with: AUTH_INVALID_CREDS (Missing platform auth.); AUTH_INVALID_CREDS (Invalid or expired platform token.). error codes: AUTH_INVALID_CREDS
|
|
646
|
+
- `POST /v1/auth/platform-refresh`
|
|
647
|
+
- Contract: response fields: refreshed, refreshed=true. rejects with: AUTH_INVALID_CREDS (Missing platform refresh cookie.); AUTH_INVALID_CREDS (Refresh token is invalid or expired; a new sign-in is required.); AUTH_INVALID_CREDS (Your session was ended for security; a new sign-in is required.); AUTH_INVALID_CREDS (Refresh token is invalid or revoked; a new sign-in is required.). error codes: AUTH_INVALID_CREDS
|
|
648
|
+
- `POST /v1/auth/platform-request-delete`
|
|
649
|
+
- Contract: response fields: code_sent, expires_in_seconds, code_sent=true. rejects with: AUTH_INVALID_CREDS (Missing platform auth.); AUTH_INVALID_CREDS (Invalid token.); AUTH_INVALID_CREDS (User not found.); RATE_LIMITED (This fixture project has used its captured codes for today.); EMAIL_SEND_FAILED (We couldn't send the code just now. Try again in a minute.). error codes: AUTH_INVALID_CREDS, RATE_LIMITED, EMAIL_SEND_FAILED
|
|
650
|
+
- `POST /v1/auth/platform-resend-verification`
|
|
651
|
+
- Contract: response fields: sent, already_verified, email, sent=false. rejects with: AUTH_INVALID_CREDS (Missing platform auth.); AUTH_INVALID_CREDS (Invalid or expired platform token.); AUTH_INVALID_CREDS (Account not found.); RATE_LIMITED (Too many verification emails; the limit resets in …s.); FORBIDDEN (Verification requests are made from the dashboard.); AUTHORITY_UNAVAILABLE | AUTH_INVALID_CREDS (Could not verify your session; the same request can be repeated.); AUTHORITY_UNAVAILABLE (Your account authority could not be verified; nothing ran, and the same request can be repeated.). error codes: AUTH_INVALID_CREDS, RATE_LIMITED, FORBIDDEN, AUTHORITY_UNAVAILABLE
|
|
652
|
+
- `GET /v1/auth/platform-second-step`
|
|
653
|
+
- `POST /v1/auth/platform-second-step`
|
|
654
|
+
- Contract: response fields: user, redirect. rejects with: FORBIDDEN (This step must be submitted from the sign-in page.); STEP_TICKET_INVALID (This sign-in step has expired or was already used; signing in again starts a new one.); VALIDATION_ERROR (Send either code (six digits) or recovery_code.); VALIDATION_ERROR (This CLI sign-in continues on its own sign-in page.). error codes: FORBIDDEN, STEP_TICKET_INVALID, VALIDATION_ERROR
|
|
655
|
+
- `GET /v1/auth/platform-security`
|
|
656
|
+
- Contract: response fields: authenticator, fresh_sign_in. rejects with: AUTH_INVALID_CREDS (This needs a signed-in browser session.); AUTHORITY_UNAVAILABLE (Your account authority could not be verified; nothing changed, and the same request can be repeated.); FORBIDDEN (An impersonation session cannot change the account's sign-in steps.). error codes: AUTH_INVALID_CREDS, AUTHORITY_UNAVAILABLE, FORBIDDEN
|
|
657
|
+
- `POST /v1/auth/platform-security/authenticator/confirm`
|
|
658
|
+
- Contract: response fields: authenticator, recovery_codes. rejects with: VALIDATION_ERROR (code (six digits from the authenticator app) is required.); AUTH_INVALID_CREDS (This needs a signed-in browser session.); AUTHORITY_UNAVAILABLE (Your account authority could not be verified; nothing changed, and the same request can be repeated.); FORBIDDEN (An impersonation session cannot change the account's sign-in steps.). error codes: VALIDATION_ERROR, AUTH_INVALID_CREDS, AUTHORITY_UNAVAILABLE, FORBIDDEN
|
|
659
|
+
- `POST /v1/auth/platform-security/authenticator/disable`
|
|
660
|
+
- Contract: response fields: authenticator. rejects with: VALIDATION_ERROR (Send either code (six digits) or recovery_code.); AUTH_INVALID_CREDS (This needs a signed-in browser session.); AUTHORITY_UNAVAILABLE (Your account authority could not be verified; nothing changed, and the same request can be repeated.); FORBIDDEN (An impersonation session cannot change the account's sign-in steps.). error codes: VALIDATION_ERROR, AUTH_INVALID_CREDS, AUTHORITY_UNAVAILABLE, FORBIDDEN
|
|
661
|
+
- `POST /v1/auth/platform-security/authenticator/start`
|
|
662
|
+
- Contract: response fields: otpauth_uri, secret, expires_at. rejects with: AUTH_INVALID_CREDS (This needs a signed-in browser session.); AUTHORITY_UNAVAILABLE (Your account authority could not be verified; nothing changed, and the same request can be repeated.); FORBIDDEN (An impersonation session cannot change the account's sign-in steps.). error codes: AUTH_INVALID_CREDS, AUTHORITY_UNAVAILABLE, FORBIDDEN
|
|
663
|
+
- `POST /v1/auth/platform-security/recovery-codes`
|
|
664
|
+
- Contract: response fields: authenticator, recovery_codes. rejects with: VALIDATION_ERROR (Send either code (six digits) or recovery_code.); AUTH_INVALID_CREDS (This needs a signed-in browser session.); AUTHORITY_UNAVAILABLE (Your account authority could not be verified; nothing changed, and the same request can be repeated.); FORBIDDEN (An impersonation session cannot change the account's sign-in steps.). error codes: VALIDATION_ERROR, AUTH_INVALID_CREDS, AUTHORITY_UNAVAILABLE, FORBIDDEN
|
|
665
|
+
- `POST /v1/auth/platform-set-password`
|
|
666
|
+
- Contract: response fields: user, email, name, second_step_required, methods, expires_in, complete_url, second_step_required=true. rejects with: VALIDATION_ERROR (Request body must be valid JSON.); VALIDATION_ERROR (This link is incomplete. Open it again from the email, or ask for a new one on the sign-in page.); VALIDATION_ERROR (Choose a password of at least 8 characters.); AUTH_INVALID_CREDS (This link has expired or was already used. Ask for a new one on the sign-in page under "Forgot your password?".); AUTH_INVALID_CREDS (The account this link was for no longer exists.). error codes: VALIDATION_ERROR, AUTH_INVALID_CREDS
|
|
667
|
+
- `POST /v1/auth/platform-signup`
|
|
668
|
+
- Contract: request fields: email, password, name, claim_anonymous. response fields: use_magic_link, signup_url, message, use_magic_link=true, message='A sign-in link is sent to the account email. A password can be set once the email is verified.'. rejects with: CLAIM_SESSION_UNAVAILABLE (Could not verify the guest session. Your work is unchanged, and the same request can be repeated.); ANONYMOUS_CLAIM_REQUIRED (This save link needs the original guest session, which is in the browser where the project was built.); FORBIDDEN (This account claim starts from the dashboard.); AUTHORITY_UNAVAILABLE (Could not verify the guest session; the same request can be repeated.); AUTH_INVALID_CREDS (The original guest session is no longer current.); VALIDATION_ERROR (A valid email is required.); VALIDATION_ERROR (Choose a password of at least 8 characters.); RATE_LIMITED (Too many verification emails; the limit resets in …s.). error codes: CLAIM_SESSION_UNAVAILABLE, ANONYMOUS_CLAIM_REQUIRED, FORBIDDEN, AUTHORITY_UNAVAILABLE, AUTH_INVALID_CREDS, VALIDATION_ERROR, RATE_LIMITED
|
|
669
|
+
- `GET /v1/auth/platform-turnstile-sitekey`
|
|
670
|
+
- Contract: response fields: sitekey, enforced. rejects with: CONFIG_ERROR (Turnstile is not configured.). error codes: CONFIG_ERROR
|
|
671
|
+
- `POST /v1/auth/platform-username`
|
|
672
|
+
- Contract: request fields: username. response fields: username, profile_url. rejects with: AUTH_INVALID_CREDS (Missing platform auth.); AUTH_INVALID_CREDS (Invalid or expired platform token.); VALIDATION_ERROR (Username must be 3-40 lowercase letters, numbers, and hyphens.); VALIDATION_ERROR (This username is reserved.); VALIDATION_ERROR (Username is already taken.). error codes: AUTH_INVALID_CREDS, VALIDATION_ERROR
|
|
673
|
+
- `POST /v1/auth/refresh`
|
|
674
|
+
- Contract: request fields: project_id, refresh_token. response fields (partial): access_token, refresh_token, token_type, token_type='Bearer'. rejects with: VALIDATION_ERROR (project_id and refresh_token are required.); AUTH_INVALID_CREDS (A preview session is not valid for the live app.); PROJECT_NOT_FOUND (Project not found or not owned by you.); AUTH_INVALID_CREDS (Refresh token not found, already used, or expired; a new sign-in is required.); AUTH_BANNED (This account has been suspended.); AUTH_INVALID_CREDS (Refresh token is invalid or revoked; a new sign-in is required.). error codes: VALIDATION_ERROR, AUTH_INVALID_CREDS, PROJECT_NOT_FOUND, AUTH_BANNED
|
|
675
|
+
- `POST /v1/auth/request-email-verification`
|
|
676
|
+
- Contract: response fields: already_verified, already_verified=true. rejects with: UNSUPPORTED_FEATURE (request-email-verification requires an app_user JWT (the end user verifies their own email).); AUTH_INVALID_CREDS (Token missing required claims.); AUTH_INVALID_CREDS (User not found.); RATE_LIMITED (Too many requests); AUTH_INVALID_CREDS (This session is not valid for this app. Please sign in again.). error codes: UNSUPPORTED_FEATURE, AUTH_INVALID_CREDS, RATE_LIMITED
|
|
677
|
+
- `POST /v1/auth/resend-verification`
|
|
678
|
+
- Contract: response fields: already_verified, already_verified=true. rejects with: UNSUPPORTED_FEATURE (resend-verification requires an app_user JWT.); AUTH_INVALID_CREDS (Token missing required claims.); AUTH_INVALID_CREDS (User not found.); RATE_LIMITED (Too many requests); AUTH_INVALID_CREDS (This session is not valid for this app. Please sign in again.). error codes: UNSUPPORTED_FEATURE, AUTH_INVALID_CREDS, RATE_LIMITED
|
|
679
|
+
- `POST /v1/auth/reset`
|
|
680
|
+
- Contract: request fields: project_id, token, new_password. response fields: message, message='Password reset successfully. The new password is now the sign-in password.'. rejects with: VALIDATION_ERROR (project_id, token, and new_password are required (strings).); VALIDATION_ERROR (Password must be at least 8 characters.); PROJECT_NOT_FOUND (Project not found.); AUTH_INVALID_CREDS (Invalid, used, or expired reset token; POST /v1/auth/forgot issues a new one.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, AUTH_INVALID_CREDS
|
|
681
|
+
- `DELETE /v1/auth/sessions/:param`
|
|
682
|
+
- Contract: response fields: revoked, revoked_refresh_tokens, revoked=true. rejects with: VALIDATION_ERROR (project_id query param is required.); VALIDATION_ERROR (sessionId path param is required.); PROJECT_NOT_FOUND (Project not found or not owned by you.); AUTH_INVALID_CREDS (Session not found in this project.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, AUTH_INVALID_CREDS
|
|
683
|
+
- `POST /v1/auth/signup`
|
|
684
|
+
- Contract: rejects with: VALIDATION_ERROR (display_name must be a string or null.); VALIDATION_ERROR (project_id is required (string).); VALIDATION_ERROR (email is required (string).); VALIDATION_ERROR (email must be a valid email address no longer than 320 characters.); VALIDATION_ERROR (password must be a string with at least 8 characters.); VALIDATION_ERROR (locale must be a string.); VALIDATION_ERROR (timezone must be a string.); VALIDATION_ERROR (turnstile_token must be a string.); VALIDATION_ERROR (locale must be a BCP-47 tag like "en-US".); VALIDATION_ERROR (timezone must be an IANA zone like "America/Los_Angeles".); PROJECT_NOT_FOUND (Project not found or not accessible.); VALIDATION_ERROR (turnstile_token is required for signup.); VALIDATION_ERROR (CAPTCHA verification failed; a request with a new turnstile_token is accepted.); AUTH_EMAIL_EXISTS (That email is already registered.); AUTH_INVALID_CREDS (This account changed during sign-in, so no session was issued; a new sign-in reflects the current account.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, AUTH_EMAIL_EXISTS, AUTH_INVALID_CREDS, AUTH_STORE_READ_RETRY, RATE_LIMITED
|
|
685
|
+
- `GET /v1/auth/templates`
|
|
686
|
+
- Contract: response fields: templates. rejects with: VALIDATION_ERROR (project_id query param is required.); PROJECT_NOT_FOUND (Project not found or not owned by you.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
687
|
+
- `DELETE /v1/auth/templates/:param`
|
|
688
|
+
- Contract: response fields: key, html, is_custom, updated_at, is_custom=false, updated_at=null. rejects with: VALIDATION_ERROR (Unknown template key. Must be one of: ….); VALIDATION_ERROR (project_id query param is required.); PROJECT_NOT_FOUND (Project not found or not owned by you.); UPGRADE_REQUIRED (Customizing auth email templates requires a paid plan. Free projects send the built-in default templates. Plans are changed at https://somewhere.cloud/app/account/billing.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, UPGRADE_REQUIRED
|
|
689
|
+
- `PUT /v1/auth/templates/:param`
|
|
690
|
+
- Contract: request fields: project_id, subject, html. response fields: key, html, updated_at, is_custom=true. rejects with: VALIDATION_ERROR (Unknown template key. Must be one of: ….); VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (subject is required.); VALIDATION_ERROR (html is required.); VALIDATION_ERROR (subject max 200 chars.); VALIDATION_ERROR (html max 64 KB.); PROJECT_NOT_FOUND (Project not found or not owned by you.); UPGRADE_REQUIRED (Customizing auth email templates requires a paid plan. Free projects send the built-in default templates. Plans are changed at https://somewhere.cloud/app/account/billing.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, UPGRADE_REQUIRED
|
|
691
|
+
- `DELETE /v1/auth/test-users`
|
|
692
|
+
- Contract: response fields: deleted, ids. rejects with: VALIDATION_ERROR (A JSON body is required.); PROJECT_ACCESS_DENIED (Test identities are managed with a developer key or the CLI, not from app code.); VALIDATION_ERROR (project_id is required.); PROJECT_ACCESS_DENIED (Editor access to this project is required to manage its test identities.); PROJECT_ACCESS_DENIED (A temporary account manages test users only in its own project.); VALIDATION_ERROR (A temporary account's test users are ordinary users (role 'user').). error codes: VALIDATION_ERROR, PROJECT_ACCESS_DENIED
|
|
693
|
+
- `GET /v1/auth/test-users`
|
|
694
|
+
- Contract: response fields: identities. rejects with: PROJECT_ACCESS_DENIED (Test identities are managed with a developer key or the CLI, not from app code.); VALIDATION_ERROR (project_id is required.); PROJECT_ACCESS_DENIED (Editor access to this project is required to manage its test identities.); PROJECT_ACCESS_DENIED (A temporary account manages test users only in its own project.); VALIDATION_ERROR (A temporary account's test users are ordinary users (role 'user').). error codes: PROJECT_ACCESS_DENIED, VALIDATION_ERROR
|
|
695
|
+
- `POST /v1/auth/test-users`
|
|
696
|
+
- Contract: rejects with: VALIDATION_ERROR (A JSON body is required.); AUTH_INVALID_CREDS (The test identity could not be signed in.); PROJECT_ACCESS_DENIED (Test identities are managed with a developer key or the CLI, not from app code.); VALIDATION_ERROR (project_id is required.); PROJECT_ACCESS_DENIED (Editor access to this project is required to manage its test identities.); PROJECT_ACCESS_DENIED (A temporary account manages test users only in its own project.); VALIDATION_ERROR (A temporary account's test users are ordinary users (role 'user').). error codes: VALIDATION_ERROR, AUTH_INVALID_CREDS, PROJECT_ACCESS_DENIED
|
|
697
|
+
- `POST /v1/auth/update-password`
|
|
698
|
+
- Contract: request fields: current_password, new_password. response fields: updated, updated=true. rejects with: UNSUPPORTED_FEATURE (update-password requires an app_user JWT (the end user changes their own password).); AUTH_INVALID_CREDS (Token missing required claims.); VALIDATION_ERROR (current_password must be a string when supplied.); VALIDATION_ERROR (new_password must be at least 8 characters.); AUTH_INVALID_CREDS (User not found.); AUTH_PASSWORD_RESET_REQUIRED (This account has no password; /v1/auth/forgot and /v1/auth/reset set one through its current email.); VALIDATION_ERROR (current_password is required for accounts that already have a password.); AUTH_INVALID_CREDS (Current password is incorrect.); AUTH_CREDENTIAL_CHANGED (Your password changed while this request was being processed, so this update was not applied; it is accepted again after a new sign-in.). error codes: UNSUPPORTED_FEATURE, AUTH_INVALID_CREDS, VALIDATION_ERROR, AUTH_PASSWORD_RESET_REQUIRED, AUTH_CREDENTIAL_CHANGED
|
|
699
|
+
- `GET /v1/auth/users`
|
|
700
|
+
- Contract: response fields: users, count, next_cursor, next_cursor=null, id, email, role, display_name, email_verified, created_at, last_login_at. rejects with: VALIDATION_ERROR (project_id query param is required.); PROJECT_NOT_FOUND (Project not found or not owned by you.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
701
|
+
- `DELETE /v1/auth/users/:param`
|
|
702
|
+
- Contract: response fields (partial): deleted, user_id, deleted=true. rejects with: VALIDATION_ERROR (project_id query param is required.); VALIDATION_ERROR (user id path param is required.); PROJECT_NOT_FOUND (Project not found or not owned by you.); AUTH_INVALID_CREDS (User not found in this project.); LAST_OWNER (Nothing was deleted: this account is the only owner of a group. Make another member an owner, or delete the group, then delete the account again.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, AUTH_INVALID_CREDS, LAST_OWNER
|
|
703
|
+
- `PATCH /v1/auth/users/:param`
|
|
704
|
+
- Contract: request fields: display_name, metadata, role, banned, banned_reason, email. response fields: user, id, email, role, display_name, email_verified, created_at, last_login_at, metadata, banned, banned_at, banned_reason. rejects with: VALIDATION_ERROR (project_id query param is required.); VALIDATION_ERROR (user id path param is required.); PROJECT_NOT_FOUND (Project not found or not owned by you.); VALIDATION_ERROR (email must be a valid email address no longer than 320 characters.); VALIDATION_ERROR (display_name must be a string or null.); VALIDATION_ERROR (display_name max 200 chars.); VALIDATION_ERROR (metadata must be JSON-serializable.); VALIDATION_ERROR (metadata max 16 KB.); VALIDATION_ERROR (role must be one of: user, admin.); VALIDATION_ERROR (banned must be a boolean.); VALIDATION_ERROR (banned_reason must be a string or null.); VALIDATION_ERROR (banned_reason max 1000 chars.); VALIDATION_ERROR (No updatable fields provided. The updatable fields are display_name, metadata, role, banned, banned_reason and email.); AUTH_INVALID_CREDS (User not found in this project.); AUTH_INVALID_CREDS (User vanished mid-update.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, AUTH_INVALID_CREDS
|
|
705
|
+
- `GET /v1/auth/users/:param/export`
|
|
706
|
+
- Contract: rejects with: VALIDATION_ERROR (project_id query param is required.); PROJECT_NOT_FOUND (Project not found or not owned by you.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
707
|
+
- `DELETE /v1/auth/users/:param/mfa`
|
|
708
|
+
- Contract: rejects with: VALIDATION_ERROR (project_id query param is required.); PROJECT_NOT_FOUND (Project not found or not owned by you.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
709
|
+
- `DELETE /v1/auth/users/:param/sessions`
|
|
710
|
+
- Contract: response fields: revoked_sessions, revoked_refresh_tokens. rejects with: VALIDATION_ERROR (project_id query param is required.); VALIDATION_ERROR (user id path param is required.); PROJECT_NOT_FOUND (Project not found or not owned by you.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
711
|
+
- `GET /v1/auth/users/:param/sessions`
|
|
712
|
+
- Contract: response fields: sessions, id, created_at, expires_at. rejects with: VALIDATION_ERROR (project_id query param is required.); VALIDATION_ERROR (user id path param is required.); PROJECT_NOT_FOUND (Project not found or not owned by you.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
713
|
+
- `POST /v1/auth/users/delete`
|
|
714
|
+
- Contract: request fields: ids, delete_groups_only_they_belong_to. response fields: results, groups_deleted. rejects with: VALIDATION_ERROR (project_id query param is required.); VALIDATION_ERROR (Send ids: an array of 1 to 50 exact user ids. Users are never deleted by email.); VALIDATION_ERROR (delete_groups_only_they_belong_to must be true or false.); PROJECT_NOT_FOUND (Project not found or not owned by you.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
715
|
+
- `GET /v1/auth/users/inventory`
|
|
716
|
+
- Contract: response fields: source, project_id, project_name, days, new_signups, source='project_auth_store', total, count, ids, checksum, users, email, created_at. rejects with: VALIDATION_ERROR (project_id query param is required.); PROJECT_NOT_FOUND (Project not found or not owned by you.); VALIDATION_ERROR (aggregate must be 1 when supplied.); VALIDATION_ERROR (days must be 7 or 30.); VALIDATION_ERROR (Aggregate inventory does not accept pagination.); INTERNAL_ERROR (User summary is unavailable.); VALIDATION_ERROR (cursor is not a cursor this endpoint issued.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, INTERNAL_ERROR
|
|
717
|
+
- `DELETE /v1/auth/users/me`
|
|
718
|
+
- Contract: response fields (partial): deleted, deleted=true. rejects with: UNSUPPORTED_FEATURE (DELETE /v1/auth/users/me requires an app_user JWT (not a developer smt_ key). The end user calls this endpoint themselves to delete their own account.); AUTH_INVALID_CREDS (Token missing required claims.); AUTH_INVALID_CREDS (User not found.); AUTH_INVALID_CREDS (This session is not valid for this app. Please sign in again.); LAST_OWNER (Nothing was deleted: this account is the only owner of a group. Make another member an owner, or delete the group, then delete the account again.). error codes: UNSUPPORTED_FEATURE, AUTH_INVALID_CREDS, LAST_OWNER
|
|
719
|
+
- `GET /v1/auth/users/me/export`
|
|
720
|
+
- Contract: rejects with: UNSUPPORTED_FEATURE (GET /v1/auth/users/me/export requires an app_user session. A developer reads one user with GET /v1/auth/users/<id>/export?project_id=<project>.); AUTH_INVALID_CREDS (Token missing required claims.). error codes: UNSUPPORTED_FEATURE, AUTH_INVALID_CREDS
|
|
721
|
+
- `POST /v1/auth/users/me/step-up`
|
|
722
|
+
- Contract: request fields: action. rejects with: UNSUPPORTED_FEATURE (The my-data code is asked for by the signed-in person, with their own app session.); AUTH_INVALID_CREDS (Token missing required claims.). error codes: UNSUPPORTED_FEATURE, AUTH_INVALID_CREDS
|
|
723
|
+
- `POST /v1/auth/users/me/step-up/verify`
|
|
724
|
+
- Contract: request fields: action, code. rejects with: UNSUPPORTED_FEATURE (The my-data code is asked for by the signed-in person, with their own app session.); AUTH_INVALID_CREDS (Token missing required claims.). error codes: UNSUPPORTED_FEATURE, AUTH_INVALID_CREDS
|
|
725
|
+
- `POST /v1/auth/verify-email`
|
|
726
|
+
- Contract: request fields: code. response fields: verified, verified=true. rejects with: UNSUPPORTED_FEATURE (verify-email requires an app_user JWT.); AUTH_INVALID_CREDS (Token missing required claims.); VALIDATION_ERROR (code must be a 6-digit string.); AUTH_INVALID_CREDS (A current app session is required; a new sign-in issues one.); AUTH_INVALID_CREDS (This session is not valid for this app. Please sign in again.). error codes: UNSUPPORTED_FEATURE, AUTH_INVALID_CREDS, VALIDATION_ERROR
|
|
727
|
+
- `DELETE /v1/auth/webhook`
|
|
728
|
+
- Contract: response fields: deleted, deleted=true. rejects with: VALIDATION_ERROR (project_id query param is required.); PROJECT_NOT_FOUND (Project not found or not owned by you.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
729
|
+
- `PUT /v1/auth/webhook`
|
|
730
|
+
- Contract: request fields: url, rotate_secret. response fields: url. rejects with: VALIDATION_ERROR (project_id query param is required.); PROJECT_NOT_FOUND (Project not found or not owned by you.); VALIDATION_ERROR (url (string) is required.); VALIDATION_ERROR (url must be a valid absolute URL.); VALIDATION_ERROR (url must be http:// or https://.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
731
|
+
- `GET /v1/auth/whoami`
|
|
732
|
+
- Contract: response fields: session, user, id, email, name, username, created_at, last_login_at, onboarding_complete, tech_tier, effective_tier, stats, api_keys, projects. rejects with: AUTH_INVALID_CREDS (API key required.); AUTH_INVALID_CREDS (User not found.). error codes: AUTH_INVALID_CREDS
|
|
733
|
+
|
|
734
|
+
### /v1/billing
|
|
735
|
+
|
|
736
|
+
- `GET /v1/billing/balance`
|
|
737
|
+
- Contract: response fields: balance_microdollars, pending_microdollars, available_microdollars, balance_dollars, available_dollars, has_payment_method, auto_reload_enabled, auto_reload_threshold_dollars, auto_reload_amount_dollars, auto_reload_last_attempted_at, auto_reload_last_error, included_ai
|
|
738
|
+
- `PATCH /v1/billing/balance/auto-reload`
|
|
739
|
+
- Contract: request fields: enabled, threshold_dollars, amount_dollars. response fields: enabled, enabled=false, threshold_dollars, amount_dollars, enabled=true. rejects with: VALIDATION_ERROR (amount_dollars must be between $… and $….); VALIDATION_ERROR (amount_dollars must be greater than threshold_dollars.); NO_PAYMENT_METHOD (Auto-reload needs a saved payment method, which the first funds load saves.). error codes: VALIDATION_ERROR, NO_PAYMENT_METHOD
|
|
740
|
+
- `POST /v1/billing/balance/load`
|
|
741
|
+
- Contract: request fields: amount_dollars, success_url, cancel_url. response fields: checkout_url, session_id, amount_dollars. rejects with: VALIDATION_ERROR (amount_dollars must be between $… and $….). error codes: VALIDATION_ERROR, BALANCE_LOAD_FAILED, BILLING_UNAVAILABLE
|
|
742
|
+
- `GET /v1/billing/balance/transactions`
|
|
743
|
+
- Contract: response fields (partial): transactions, amount_dollars, balance_after_dollars, created_at
|
|
744
|
+
- `POST /v1/billing/checkout`
|
|
745
|
+
- Contract: response fields: checkout_url, session_id, plan, session_id=null. rejects with: VALIDATION_ERROR (Request body must be a JSON object with exactly one field: "plan".); VALIDATION_ERROR (Request body must contain exactly one field: "plan".); VALIDATION_ERROR (plan must be "builder", "pro", or "scale".); VALIDATION_ERROR (Enterprise plans are contract-priced; they are arranged through support@somewhere.cloud.); VALIDATION_ERROR (Free plan does not require checkout.); VALIDATION_ERROR (Unknown plan "…". Accepted plans: "builder", "pro", "scale".); ALREADY_SUBSCRIBED (This account is already on the … plan; /v1/billing/portal manages the subscription.). error codes: VALIDATION_ERROR, ALREADY_SUBSCRIBED, CHECKOUT_FAILED, BILLING_UNAVAILABLE
|
|
746
|
+
- `GET /v1/billing/invoices`
|
|
747
|
+
- Contract: response fields: invoices. error codes: INVOICES_FAILED
|
|
748
|
+
- `GET /v1/billing/payment-method`
|
|
749
|
+
- Contract: response fields: has_card, has_card=false, brand, last4, exp_month, exp_year, has_card=true. rejects with: BILLING_CARD_UNAVAILABLE (Sandbox saved card identity could not be confirmed.). error codes: BILLING_CARD_UNAVAILABLE, BILLING_CARD_IDENTITY_MISMATCH
|
|
750
|
+
- `POST /v1/billing/portal`
|
|
751
|
+
- Contract: request fields: flow. response fields: portal_url. rejects with: NO_SUBSCRIPTION (No Stripe subscription on this account; /v1/billing/checkout starts one.); VALIDATION_ERROR (flow is "card" or "cancel" (or left out for the whole billing page).); NO_SUBSCRIPTION (There is no plan subscription to cancel on this account.); ALREADY_CANCELLING (This plan is already set to end at the close of the billing period.). error codes: NO_SUBSCRIPTION, VALIDATION_ERROR, ALREADY_CANCELLING, PORTAL_FAILED, BILLING_UNAVAILABLE
|
|
752
|
+
- `GET /v1/billing/status`
|
|
753
|
+
- Contract: response fields: tier, billing_mode, is_unlimited, apps_used, trial_active, trial_ends_at, plan_source, free_until, subscription_status, current_period_end, cancel_at_period_end, monthly_cost, usage_this_month, ai_proxy_cost, ai_proxy_cost_cents, by_feature
|
|
754
|
+
|
|
755
|
+
### /v1/bootstrap
|
|
756
|
+
|
|
757
|
+
- `POST /v1/bootstrap`
|
|
758
|
+
- Contract: rejects with: FORBIDDEN (Bootstrap requires a valid X-Bootstrap-Secret.); ALREADY_BOOTSTRAPPED (Platform already has API keys, so bootstrap issues no new key; an existing key authenticates.). error codes: FORBIDDEN, ALREADY_BOOTSTRAPPED
|
|
759
|
+
|
|
760
|
+
### /v1/browser
|
|
761
|
+
|
|
762
|
+
- `POST /v1/browser/test`
|
|
763
|
+
- Contract: response fields (partial): passed, inspection_diagnostic, finalPageAdmitted, checkout_frames, frames_truncated, session_expires_at, screenshots, environment, target_url, auth_context. rejects with: PAYLOAD_TOO_LARGE (Request body exceeds … bytes (16 MiB). Inline upload files are capped at 10 MB; larger files are read from project files with { "upload": "<selector>", "fs_path": "/path" }. No browser was started.); VALIDATION_ERROR (capture_after must be boolean.); VALIDATION_ERROR (session_id must be 1–64 characters of letters, digits, dot, dash, or underscore (e.g. "checkout-flow").); VALIDATION_ERROR (require_existing_session must be boolean.); VALIDATION_ERROR (require_existing_session needs the session_id of the live session to continue.); VALIDATION_ERROR (require_existing_session continues the identity already in that browser, so it cannot be combined with auth, cookies, local_storage or headers; those belong on the call that starts the session.); VALIDATION_ERROR (This endpoint drives a deployed page; it does not render an HTML snippet. Markup is rendered by POST /v1/render/screenshot (or /v1/render/pdf for print) — both accept html and storage, and return the artifact. No browser was started and nothing was written.); VALIDATION_ERROR (viewports is a multi-viewport flow input; this endpoint runs ONE viewport per call. Coverage across viewports comes from site_verify (somewhere verify --flow), which opens a fresh browser per viewport. A single geometry is checked here with viewport (e.g. viewport:"mobile" or viewport:{width,height}). No browser was started.); VALIDATION_ERROR (actions and steps are mutually exclusive; a call takes one of them.); VALIDATION_ERROR (A browser call needs a target: project_id (the project's own URL) or url.); VALIDATION_ERROR (project_id is required when an upload uses fs_path — the file is read from that project's files. No browser was started.); VALIDATION_ERROR (project_id is required when storage is set — it owns the files path.); PROJECT_NOT_FOUND (Project not found or not owned by you.); VALIDATION_ERROR (Project has no deployed subdomain to test.); VALIDATION_ERROR (Project has no active hosted route to test.); VALIDATION_ERROR (url is not valid.); VALIDATION_ERROR (url exceeds max length.); VALIDATION_ERROR (This browser runs on Somewhere, so it cannot reach an address on your own machine; it reaches deployed URLs. The CLI command `somewhere browser <your local url>` drives the browser installed on your machine, which reaches a local dev server.); VALIDATION_ERROR (url failed safe-URL validation.); VALIDATION_ERROR (url is a preview origin for another project.); CLAIM_ACCOUNT_REQUIRED (Testing an unrelated public URL requires a claimed account. This temporary account can still test its own deployed app.); CLAIM_ACCOUNT_REQUIRED (Persistent browser sessions require a claimed account. This temporary account can still run a non-persistent test against its own deployed app.); AUTHORITY_UNAVAILABLE (Browser target authority could not be verified; nothing ran.); VALIDATION_ERROR (Checkout inspection starts a fresh read-only page; this session name is already live.); AUTHORITY_UNAVAILABLE (The checkout record for this browser session could not be read; nothing ran.); AUTH_INVALID_CREDS (Developer account not found.); SECOND_STEP_REQUIRED (Opening a draft preview in the browser tool signs in as the developer, and this account has an authenticator step: it works from a browser session on somewhere.cloud after the step, not from a key.); VALIDATION_ERROR (auth.user_id requires a project (a project_id, or a url on a project you own) — impersonation is project-scoped.); TEST_IDENTITY_EXPIRED (This test identity is past its 24 hour lifetime; a new test identity is accepted.); AUTH_BANNED (Cannot test as a banned user; an unbanned user is accepted.); IMPERSONATION_RETIRED (auth.user_id accepts only a test identity of this project. Real app users cannot be impersonated; test identities created by POST /v1/auth/test-users sign in as users.); AUTHORITY_UNAVAILABLE (This project's sign-in store could not be read; nothing ran.); VALIDATION_ERROR (local_storage/cookies/headers require a url (sessions belong to an origin).); VALIDATION_ERROR (local_storage/cookies/headers require a project — it scopes the allowed origins.); PROJECT_NOT_FOUND (Project not found.); AUTHORITY_UNAVAILABLE (Browser admission could not be verified; nothing ran.); BROWSER_STARTUP_UNAVAILABLE (Browser startup or cleanup could not be confirmed. Work may still be pending, so an automatic repeat of the same request is not safe.…); BROWSER_STARTUP_UNAVAILABLE (Browser test could not start after one retry; the browser pool is temporarily unavailable. / Browser test could not start because its startup request was refused.); BROWSER_STARTUP_UNAVAILABLE | BROWSER_STARTUP_RATE_LIMITED (Browser admission is temporarily unavailable. / Browser startup is busy; the supplied delay is when capacity is expected.). error codes: PAYLOAD_TOO_LARGE, VALIDATION_ERROR, PROJECT_NOT_FOUND, CLAIM_ACCOUNT_REQUIRED, AUTHORITY_UNAVAILABLE, SESSION_EXPIRED, SESSION_TARGET_LOST, CHECKOUT_NOT_VERIFIED, AUTH_INVALID_CREDS, SECOND_STEP_REQUIRED, TEST_IDENTITY_EXPIRED, AUTH_BANNED, IMPERSONATION_RETIRED, FORBIDDEN, BROWSER_SESSION_LIMIT, BROWSER_DAILY_LIMIT, BROWSER_STARTUP_UNAVAILABLE, BROWSER_STARTUP_RATE_LIMITED
|
|
764
|
+
|
|
765
|
+
### /v1/build
|
|
766
|
+
|
|
767
|
+
- `POST /v1/build/token`
|
|
768
|
+
- Contract: request fields: project_id. response fields: token, ttl_seconds. rejects with: BUILDER_UNAVAILABLE (The AI builder isn't available on your account yet.); VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.). error codes: BUILDER_UNAVAILABLE, VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
769
|
+
- `GET /v1/build/verify`
|
|
770
|
+
- Contract: response fields: user_id, project_id, token_version, expires_at. rejects with: VALIDATION_ERROR (token and project_id are required.); AUTHORITY_UNAVAILABLE (Account authority could not be verified; nothing ran, and the same request can be repeated.); TOKEN_INVALID (Invalid or expired build token.); PROJECT_NOT_FOUND (Token does not authorize this project.). error codes: VALIDATION_ERROR, AUTHORITY_UNAVAILABLE, TOKEN_INVALID, PROJECT_NOT_FOUND
|
|
771
|
+
|
|
772
|
+
### /v1/builder
|
|
773
|
+
|
|
774
|
+
- `POST /v1/builder/run`
|
|
775
|
+
- Contract: request fields: model. rejects with: VALIDATION_ERROR (Request body must be a JSON object.). error codes: VALIDATION_ERROR
|
|
776
|
+
|
|
777
|
+
### /v1/calendar
|
|
778
|
+
|
|
779
|
+
- `POST /v1/calendar/availability`
|
|
780
|
+
- Contract: Runtime method: sw.calendar.availability. rejects with: VALIDATION_ERROR (Request body must be valid JSON.); VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.); CALENDAR_ERROR (Calendar operation failed.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, CALENDAR_ERROR
|
|
781
|
+
- `POST /v1/calendar/blackout`
|
|
782
|
+
- Contract: Runtime method: sw.calendar.blackout. rejects with: VALIDATION_ERROR (Request body must be valid JSON.); VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.); CALENDAR_ERROR (Calendar operation failed.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, CALENDAR_ERROR
|
|
783
|
+
- `POST /v1/calendar/blackout/remove`
|
|
784
|
+
- Contract: Runtime method: sw.calendar.removeBlackout. rejects with: VALIDATION_ERROR (Request body must be valid JSON.); VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.); CALENDAR_ERROR (Calendar operation failed.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, CALENDAR_ERROR
|
|
785
|
+
- `POST /v1/calendar/cancel`
|
|
786
|
+
- Contract: Runtime method: sw.calendar.cancel. response fields (partial): canceled, reservation, refund, canceled=false, refund=null. rejects with: VALIDATION_ERROR (Request body must be valid JSON.); CALENDAR_REFUND_STATE_UNAVAILABLE (The reservation is canceled, but its durable refund intent is missing. Another refund is not needed; platform support requests are accepted at POST /v1/platform-feedback.); PROJECT_NOT_FOUND (Project not found.); BILLING_UNAVAILABLE (The refund provider is unavailable. The reservation remains active; a later identical cancellation request is accepted.); CALENDAR_REFUND_UNAVAILABLE (Could not start the cancellation refund. The reservation remains active; a later identical cancellation request is accepted.); JOB_ENDED (This job has ended, so the reservation was not canceled.); CALENDAR_REFUND_STATE_UNAVAILABLE (Could not verify the durable cancellation refund intent. The reservation remains active; a later identical cancellation request is accepted.); BILLING_UNAVAILABLE (The refund provider is unavailable. The reservation remains active; a later identical cancellation request is accepted. / The reservation is canceled, but its refund provider is unavailable; a repeated cancellation request resumes the durable refund.); VALIDATION_ERROR (project_id is required.); PAYMENTS_REFUND_FAILED (The reservation is canceled, but its refund was rejected; the reservation cancellation state records the refund outcome.); BILLING_UNAVAILABLE (The cancellation refund provider is unavailable; a later identical cancellation request is accepted.); CALENDAR_REFUND_STATE_UNAVAILABLE (The reservation is canceled and the refund is pending, but its durable state could not be committed. Another refund is not needed; a repeated cancellation request reconciles it.); CALENDAR_REFUND_PENDING (The reservation is canceled and the refund is still pending at the provider.); CALENDAR_REFUND_STATE_UNAVAILABLE (The reservation is canceled and the refund failed, but its durable state could not be committed; a repeated cancellation request reconciles it.); PAYMENTS_REFUND_FAILED (The reservation is canceled, but the provider refund failed or was canceled.); CALENDAR_REFUND_STATE_UNAVAILABLE (The reservation is canceled and the refund may have completed, but its durable state could not be committed. Another refund is not needed; a repeated cancellation request reconciles it.); CALENDAR_REFUND_INDETERMINATE (The reservation is canceled, but the refund outcome is not yet known. Another refund is not needed; a repeated cancellation request reconciles it.); CALENDAR_ERROR (Calendar operation failed.). error codes: VALIDATION_ERROR, CALENDAR_REFUND_STATE_UNAVAILABLE, PROJECT_NOT_FOUND, BILLING_UNAVAILABLE, CALENDAR_REFUND_UNAVAILABLE, JOB_ENDED, PAYMENTS_REFUND_FAILED, CALENDAR_REFUND_PENDING, CALENDAR_REFUND_INDETERMINATE, CALENDAR_ERROR
|
|
787
|
+
- `POST /v1/calendar/confirm`
|
|
788
|
+
- Contract: Runtime method: sw.calendar.confirm. response fields: reservation, body, jobGuard. rejects with: VALIDATION_ERROR (Request body must be valid JSON.); VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.); CALENDAR_ERROR (Calendar operation failed.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, CALENDAR_ERROR
|
|
789
|
+
- `POST /v1/calendar/expire`
|
|
790
|
+
- Contract: Runtime method: sw.calendar.expire. rejects with: VALIDATION_ERROR (Request body must be valid JSON.); VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.); CALENDAR_ERROR (Calendar operation failed.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, CALENDAR_ERROR
|
|
791
|
+
- `POST /v1/calendar/get`
|
|
792
|
+
- Contract: Runtime method: sw.calendar.get. response fields: reservation, body. rejects with: VALIDATION_ERROR (Request body must be valid JSON.); VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.); CALENDAR_ERROR (Calendar operation failed.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, CALENDAR_ERROR
|
|
793
|
+
- `POST /v1/calendar/hold`
|
|
794
|
+
- Contract: Runtime method: sw.calendar.hold. rejects with: VALIDATION_ERROR (Request body must be valid JSON.); VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.); CALENDAR_ERROR (Calendar operation failed.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, CALENDAR_ERROR
|
|
795
|
+
- `POST /v1/calendar/list`
|
|
796
|
+
- Contract: Runtime method: sw.calendar.list. rejects with: VALIDATION_ERROR (Request body must be valid JSON.); VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.); CALENDAR_ERROR (Calendar operation failed.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, CALENDAR_ERROR
|
|
797
|
+
- `POST /v1/calendar/pending`
|
|
798
|
+
- Contract: Runtime method: sw.calendar.pending. response fields: reservation, body, jobGuard. rejects with: VALIDATION_ERROR (Request body must be valid JSON.); VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.); CALENDAR_ERROR (Calendar operation failed.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, CALENDAR_ERROR
|
|
799
|
+
- `POST /v1/calendar/policy/get`
|
|
800
|
+
- Contract: Runtime method: sw.calendar.getPolicy. response fields: policy, body. rejects with: VALIDATION_ERROR (Request body must be valid JSON.); VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.); CALENDAR_ERROR (Calendar operation failed.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, CALENDAR_ERROR
|
|
801
|
+
- `POST /v1/calendar/policy/set`
|
|
802
|
+
- Contract: Runtime method: sw.calendar.setPolicy. response fields: policy, body, jobGuard. rejects with: VALIDATION_ERROR (Request body must be valid JSON.); VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.); CALENDAR_ERROR (Calendar operation failed.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, CALENDAR_ERROR
|
|
803
|
+
- `POST /v1/calendar/rebook`
|
|
804
|
+
- Contract: Runtime method: sw.calendar.rebook. rejects with: VALIDATION_ERROR (Request body must be valid JSON.); VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.); CALENDAR_ERROR (Calendar operation failed.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, CALENDAR_ERROR
|
|
805
|
+
- `POST /v1/calendar/release`
|
|
806
|
+
- Contract: Runtime method: sw.calendar.release. rejects with: VALIDATION_ERROR (Request body must be valid JSON.); VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.); CALENDAR_ERROR (Calendar operation failed.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, CALENDAR_ERROR
|
|
807
|
+
- `POST /v1/calendar/slots`
|
|
808
|
+
- Contract: Runtime method: sw.calendar.slots. rejects with: VALIDATION_ERROR (Request body must be valid JSON.); VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.); CALENDAR_ERROR (Calendar operation failed.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, CALENDAR_ERROR
|
|
809
|
+
|
|
810
|
+
### /v1/code-egress
|
|
811
|
+
|
|
812
|
+
- `GET /v1/code-egress/fetch`
|
|
813
|
+
- Contract: error codes: CODE_EGRESS_REJECTED
|
|
814
|
+
- `POST /v1/code-egress/fetch`
|
|
815
|
+
- Contract: error codes: CODE_EGRESS_REJECTED
|
|
816
|
+
|
|
817
|
+
### /v1/connect
|
|
818
|
+
|
|
819
|
+
- `POST /v1/connect/google-calendar/callback`
|
|
820
|
+
- Contract: rejects with: GOOGLE_CALENDAR_NOT_AVAILABLE (Google Calendar is not available on this platform yet.). error codes: GOOGLE_CALENDAR_NOT_AVAILABLE
|
|
821
|
+
- `POST /v1/connect/google-calendar/choose`
|
|
822
|
+
- Contract: rejects with: GOOGLE_CALENDAR_NOT_AVAILABLE (Google Calendar is not available on this platform yet.). error codes: GOOGLE_CALENDAR_NOT_AVAILABLE, GOOGLE_CALENDAR_RECONNECT_REQUIRED
|
|
823
|
+
- `POST /v1/connect/google-calendar/disconnect`
|
|
824
|
+
- Contract: response fields: disconnected, google_permissions_url. rejects with: FORBIDDEN (Google Calendar is used from the app's deployed functions (sw.connect.googleCalendar), not with this credential.); VALIDATION_ERROR (user_id must be one of this app's user ids.); AUTH_REQUIRED (Connecting needs the person's own signed-in request.); SCOPE_VIOLATION (Only a signed-in person using this app can use their Google Calendar.); IDENTITY_CLAIM_NOT_ALLOWED (With a signed-in caller, sw.connect.googleCalendar acts only for that caller. user_id is for scheduled and background jobs.); AUTH_REQUIRED (Connecting needs a request from a signed-in user: a person connects their own Google Calendar.); AUTH_REQUIRED (No signed-in caller. In a scheduled or background job, name the person with user_id.); JOB_REQUIRED (user_id is accepted only inside a scheduled or background job. In a request, calls act for the signed-in caller.); APP_USER_NOT_FOUND (No user with that user_id in this app.); GOOGLE_CALENDAR_NOT_AVAILABLE (Google Calendar is not available on this platform yet.). error codes: FORBIDDEN, VALIDATION_ERROR, AUTH_REQUIRED, SCOPE_VIOLATION, IDENTITY_CLAIM_NOT_ALLOWED, JOB_REQUIRED, APP_USER_NOT_FOUND, GOOGLE_CALENDAR_NOT_AVAILABLE
|
|
825
|
+
- `POST /v1/connect/google-calendar/events/create`
|
|
826
|
+
- Contract: rejects with: GOOGLE_CALENDAR_EVENT_EXISTS (This app already added an event with that id for this person. Update it, or use another id.); FORBIDDEN (Google Calendar is used from the app's deployed functions (sw.connect.googleCalendar), not with this credential.); VALIDATION_ERROR (user_id must be one of this app's user ids.); AUTH_REQUIRED (Connecting needs the person's own signed-in request.); SCOPE_VIOLATION (Only a signed-in person using this app can use their Google Calendar.); IDENTITY_CLAIM_NOT_ALLOWED (With a signed-in caller, sw.connect.googleCalendar acts only for that caller. user_id is for scheduled and background jobs.); AUTH_REQUIRED (Connecting needs a request from a signed-in user: a person connects their own Google Calendar.); AUTH_REQUIRED (No signed-in caller. In a scheduled or background job, name the person with user_id.); JOB_REQUIRED (user_id is accepted only inside a scheduled or background job. In a request, calls act for the signed-in caller.); APP_USER_NOT_FOUND (No user with that user_id in this app.); GOOGLE_CALENDAR_NOT_AVAILABLE (Google Calendar is not available on this platform yet.). error codes: FORBIDDEN, VALIDATION_ERROR, AUTH_REQUIRED, SCOPE_VIOLATION, IDENTITY_CLAIM_NOT_ALLOWED, JOB_REQUIRED, APP_USER_NOT_FOUND, GOOGLE_CALENDAR_NOT_AVAILABLE, GOOGLE_CALENDAR_EVENT_EXISTS, GOOGLE_CALENDAR_UNAVAILABLE
|
|
827
|
+
- `POST /v1/connect/google-calendar/events/delete`
|
|
828
|
+
- Contract: rejects with: GOOGLE_CALENDAR_INVALID_EVENT (event_id must be the id the app gave the event (1 to 200 letters, digits or . _ : -).); FORBIDDEN (Google Calendar is used from the app's deployed functions (sw.connect.googleCalendar), not with this credential.); VALIDATION_ERROR (user_id must be one of this app's user ids.); AUTH_REQUIRED (Connecting needs the person's own signed-in request.); SCOPE_VIOLATION (Only a signed-in person using this app can use their Google Calendar.); IDENTITY_CLAIM_NOT_ALLOWED (With a signed-in caller, sw.connect.googleCalendar acts only for that caller. user_id is for scheduled and background jobs.); AUTH_REQUIRED (Connecting needs a request from a signed-in user: a person connects their own Google Calendar.); AUTH_REQUIRED (No signed-in caller. In a scheduled or background job, name the person with user_id.); JOB_REQUIRED (user_id is accepted only inside a scheduled or background job. In a request, calls act for the signed-in caller.); APP_USER_NOT_FOUND (No user with that user_id in this app.); GOOGLE_CALENDAR_NOT_AVAILABLE (Google Calendar is not available on this platform yet.). error codes: GOOGLE_CALENDAR_INVALID_EVENT, FORBIDDEN, VALIDATION_ERROR, AUTH_REQUIRED, SCOPE_VIOLATION, IDENTITY_CLAIM_NOT_ALLOWED, JOB_REQUIRED, APP_USER_NOT_FOUND, GOOGLE_CALENDAR_NOT_AVAILABLE, GOOGLE_CALENDAR_EVENT_NOT_FOUND
|
|
829
|
+
- `POST /v1/connect/google-calendar/events/update`
|
|
830
|
+
- Contract: rejects with: GOOGLE_CALENDAR_INVALID_EVENT (event_id must be the id the app gave the event (1 to 200 letters, digits or . _ : -).); FORBIDDEN (Google Calendar is used from the app's deployed functions (sw.connect.googleCalendar), not with this credential.); VALIDATION_ERROR (user_id must be one of this app's user ids.); AUTH_REQUIRED (Connecting needs the person's own signed-in request.); SCOPE_VIOLATION (Only a signed-in person using this app can use their Google Calendar.); IDENTITY_CLAIM_NOT_ALLOWED (With a signed-in caller, sw.connect.googleCalendar acts only for that caller. user_id is for scheduled and background jobs.); AUTH_REQUIRED (Connecting needs a request from a signed-in user: a person connects their own Google Calendar.); AUTH_REQUIRED (No signed-in caller. In a scheduled or background job, name the person with user_id.); JOB_REQUIRED (user_id is accepted only inside a scheduled or background job. In a request, calls act for the signed-in caller.); APP_USER_NOT_FOUND (No user with that user_id in this app.); GOOGLE_CALENDAR_NOT_AVAILABLE (Google Calendar is not available on this platform yet.). error codes: GOOGLE_CALENDAR_INVALID_EVENT, FORBIDDEN, VALIDATION_ERROR, AUTH_REQUIRED, SCOPE_VIOLATION, IDENTITY_CLAIM_NOT_ALLOWED, JOB_REQUIRED, APP_USER_NOT_FOUND, GOOGLE_CALENDAR_NOT_AVAILABLE
|
|
831
|
+
- `POST /v1/connect/google-calendar/finish`
|
|
832
|
+
- Contract: response fields: connected, return_to, connected=true. rejects with: GOOGLE_CALENDAR_CONNECT_EXPIRED (This connection could not be finished here: it was started by another person or in another browser, or it expired. Start connecting again.); FORBIDDEN (Google Calendar is used from the app's deployed functions (sw.connect.googleCalendar), not with this credential.); VALIDATION_ERROR (user_id must be one of this app's user ids.); AUTH_REQUIRED (Connecting needs the person's own signed-in request.); SCOPE_VIOLATION (Only a signed-in person using this app can use their Google Calendar.); IDENTITY_CLAIM_NOT_ALLOWED (With a signed-in caller, sw.connect.googleCalendar acts only for that caller. user_id is for scheduled and background jobs.); AUTH_REQUIRED (Connecting needs a request from a signed-in user: a person connects their own Google Calendar.); AUTH_REQUIRED (No signed-in caller. In a scheduled or background job, name the person with user_id.); JOB_REQUIRED (user_id is accepted only inside a scheduled or background job. In a request, calls act for the signed-in caller.); APP_USER_NOT_FOUND (No user with that user_id in this app.); GOOGLE_CALENDAR_NOT_AVAILABLE (Google Calendar is not available on this platform yet.). error codes: GOOGLE_CALENDAR_CONNECT_EXPIRED, FORBIDDEN, VALIDATION_ERROR, AUTH_REQUIRED, SCOPE_VIOLATION, IDENTITY_CLAIM_NOT_ALLOWED, JOB_REQUIRED, APP_USER_NOT_FOUND, GOOGLE_CALENDAR_NOT_AVAILABLE
|
|
833
|
+
- `POST /v1/connect/google-calendar/flows`
|
|
834
|
+
- Contract: response fields: url. rejects with: VALIDATION_ERROR (Connect from an endpoint on the app's own address or an attached custom domain (not localhost or a preview), with return_to a path on the same site.); FORBIDDEN (Google Calendar is used from the app's deployed functions (sw.connect.googleCalendar), not with this credential.); VALIDATION_ERROR (user_id must be one of this app's user ids.); AUTH_REQUIRED (Connecting needs the person's own signed-in request.); SCOPE_VIOLATION (Only a signed-in person using this app can use their Google Calendar.); IDENTITY_CLAIM_NOT_ALLOWED (With a signed-in caller, sw.connect.googleCalendar acts only for that caller. user_id is for scheduled and background jobs.); AUTH_REQUIRED (Connecting needs a request from a signed-in user: a person connects their own Google Calendar.); AUTH_REQUIRED (No signed-in caller. In a scheduled or background job, name the person with user_id.); JOB_REQUIRED (user_id is accepted only inside a scheduled or background job. In a request, calls act for the signed-in caller.); APP_USER_NOT_FOUND (No user with that user_id in this app.); GOOGLE_CALENDAR_NOT_AVAILABLE (Google Calendar is not available on this platform yet.). error codes: VALIDATION_ERROR, GOOGLE_CALENDAR_RATE_LIMITED, FORBIDDEN, AUTH_REQUIRED, SCOPE_VIOLATION, IDENTITY_CLAIM_NOT_ALLOWED, JOB_REQUIRED, APP_USER_NOT_FOUND, GOOGLE_CALENDAR_NOT_AVAILABLE
|
|
835
|
+
- `GET /v1/connect/google-calendar/start`
|
|
836
|
+
- Contract: rejects with: GOOGLE_CALENDAR_NOT_AVAILABLE (Google Calendar is not available on this platform yet.). error codes: GOOGLE_CALENDAR_NOT_AVAILABLE
|
|
837
|
+
- `POST /v1/connect/google-calendar/status`
|
|
838
|
+
- Contract: response fields: connected, connected=false, reconnect_needed, calendar, time_zone, connected_at, connected=true. rejects with: FORBIDDEN (Google Calendar is used from the app's deployed functions (sw.connect.googleCalendar), not with this credential.); VALIDATION_ERROR (user_id must be one of this app's user ids.); AUTH_REQUIRED (Connecting needs the person's own signed-in request.); SCOPE_VIOLATION (Only a signed-in person using this app can use their Google Calendar.); IDENTITY_CLAIM_NOT_ALLOWED (With a signed-in caller, sw.connect.googleCalendar acts only for that caller. user_id is for scheduled and background jobs.); AUTH_REQUIRED (Connecting needs a request from a signed-in user: a person connects their own Google Calendar.); AUTH_REQUIRED (No signed-in caller. In a scheduled or background job, name the person with user_id.); JOB_REQUIRED (user_id is accepted only inside a scheduled or background job. In a request, calls act for the signed-in caller.); APP_USER_NOT_FOUND (No user with that user_id in this app.); GOOGLE_CALENDAR_NOT_AVAILABLE (Google Calendar is not available on this platform yet.). error codes: FORBIDDEN, VALIDATION_ERROR, AUTH_REQUIRED, SCOPE_VIOLATION, IDENTITY_CLAIM_NOT_ALLOWED, JOB_REQUIRED, APP_USER_NOT_FOUND, GOOGLE_CALENDAR_NOT_AVAILABLE
|
|
839
|
+
- `GET /v1/connect/stripe/callback`
|
|
840
|
+
- `POST /v1/connect/stripe/connect`
|
|
841
|
+
- Contract: response fields: url. rejects with: CONNECT_NOT_CONFIGURED (Stripe connections are not enabled on this platform yet. Platform support requests are accepted at POST /v1/platform-feedback.); VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found or not owned by you.). error codes: CONNECT_NOT_CONFIGURED, VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
842
|
+
- `POST /v1/connect/stripe/disconnect`
|
|
843
|
+
- Contract: request fields: project_id. response fields: ok, ok=true. rejects with: VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found or not owned by you.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
844
|
+
- `GET /v1/connect/stripe/status`
|
|
845
|
+
- Contract: response fields: connected, account_id, scope, status, sync_error, connected_at, updated_at, account_id=null when unavailable, scope=null when unavailable, connected_at=null when unavailable, updated_at=null when unavailable. rejects with: VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found or not owned by you.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
846
|
+
- `GET /v1/connect/stripe/subscribers`
|
|
847
|
+
- Contract: response fields: data, next_cursor, sync_status, updated_at. rejects with: CONNECT_NOT_CONNECTED (No Stripe account is connected for this project; POST /v1/connect/stripe/connect connects one.); CONNECT_SYNC_IN_PROGRESS (The initial Stripe subscriber sync is still in progress; a later identical request is accepted.); CONNECT_SYNC_FAILED (The Stripe subscriber cache is not current because synchronization failed; reconnecting the account reruns the initial sync.); CONNECT_NOT_CONNECTED (No active Stripe account is connected for this project; POST /v1/connect/stripe/connect connects one.); VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found or not owned by you.). error codes: CONNECT_NOT_CONNECTED, CONNECT_SYNC_IN_PROGRESS, CONNECT_SYNC_FAILED, VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
848
|
+
- `POST /v1/connect/stripe/webhook`
|
|
849
|
+
- Contract: response fields: received, received=true. rejects with: INVALID_SIGNATURE (Invalid webhook signature.); CONNECT_NOT_CONFIGURED (Stripe connections are not enabled on this platform yet. Platform support requests are accepted at POST /v1/platform-feedback.). error codes: INVALID_SIGNATURE, CONNECT_NOT_CONFIGURED, CONNECT_SYNC_FAILED
|
|
850
|
+
|
|
851
|
+
### /v1/cron
|
|
852
|
+
|
|
853
|
+
- `GET /v1/cron`
|
|
854
|
+
- Contract: Runtime method: sw.cron.delete. Runtime method: sw.cron.update. Runtime method: sw.cron.list. response fields: crons, policy. rejects with: PROJECT_NOT_FOUND (Project not found.). error codes: PROJECT_NOT_FOUND
|
|
855
|
+
- `POST /v1/cron`
|
|
856
|
+
- Contract: Runtime method: sw.cron.create. request fields: project_id, schedule, timezone, handler, payload, name, enabled. response fields: cron_id, schedule, timezone, next_run. rejects with: VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (schedule is required (5-field cron expression in the selected timezone; UTC when omitted).); VALIDATION_ERROR (handler is required.); VALIDATION_ERROR (timezone must be a valid IANA timezone, e.g. "America/Los_Angeles".); VALIDATION_ERROR (Invalid cron expression: …. Accepted: 5-field standard cron, e.g. "0 8 * * *".); PROJECT_NOT_FOUND (Project not found.); CRON_QUOTA_EXCEEDED (Cron trigger limit reached (… per project on the … plan).); JOB_ENDED (The job creating this schedule has ended, so the schedule was not created.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, CRON_SCHEDULE_TOO_FREQUENT, CRON_QUOTA_EXCEEDED, JOB_ENDED
|
|
857
|
+
- `DELETE /v1/cron/:param`
|
|
858
|
+
- Contract: response fields: deleted, cron_id, deleted=true. rejects with: NOT_FOUND (Cron trigger not found.); JOB_ENDED (The job deleting this schedule has ended, so the schedule was not deleted.). error codes: NOT_FOUND, JOB_ENDED
|
|
859
|
+
- `PATCH /v1/cron/:param`
|
|
860
|
+
- Contract: request fields: schedule, timezone, handler, payload, enabled, name. rejects with: NOT_FOUND (Cron trigger not found.); VALIDATION_ERROR (timezone must be a valid IANA timezone, e.g. "America/Los_Angeles".); VALIDATION_ERROR (Invalid cron expression.); VALIDATION_ERROR (No fields to update.); JOB_ENDED (The job changing this schedule has ended, so the schedule was not changed.). error codes: NOT_FOUND, VALIDATION_ERROR, CRON_SCHEDULE_TOO_FREQUENT, JOB_ENDED
|
|
861
|
+
- `DELETE /v1/cron/:param/preview-schedule`
|
|
862
|
+
- `POST /v1/cron/:param/preview-schedule`
|
|
863
|
+
- `GET /v1/cron/:param/preview-schedules`
|
|
864
|
+
- `POST /v1/cron/:param/run`
|
|
865
|
+
- Contract: response fields: cron_id, job_id, status, recovery, trigger. rejects with: VALIDATION_ERROR (This route runs the live app. To run this task once in a preview, use `somewhere cron run <name> --preview` (POST /v1/cron/:id/run-preview with preview_session_id and preview_id). Nothing ran.); PROJECT_NOT_FOUND (Project not found.); NOT_FOUND (Scheduled task not found.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, NOT_FOUND
|
|
866
|
+
- `GET /v1/cron/:param/run-preview`
|
|
867
|
+
- Contract: rejects with: ROUTE_FORBIDDEN (Preview job tests require a developer connection.); NOT_FOUND (Scheduled task not found.). error codes: ROUTE_FORBIDDEN, NOT_FOUND
|
|
868
|
+
- `POST /v1/cron/:param/run-preview`
|
|
869
|
+
- Contract: rejects with: NOT_FOUND (Scheduled task not found.). error codes: NOT_FOUND
|
|
870
|
+
|
|
871
|
+
### /v1/dashboard
|
|
872
|
+
|
|
873
|
+
- `GET /v1/dashboard/first-run`
|
|
874
|
+
- Contract: rejects with: AUTH_INVALID_CREDS (Authentication required.). error codes: AUTH_INVALID_CREDS
|
|
875
|
+
- `GET /v1/dashboard/portfolio`
|
|
876
|
+
- Contract: rejects with: VALIDATION_ERROR (window must be '7d'.); AUTH_INVALID_CREDS (Authentication required.). error codes: VALIDATION_ERROR, AUTH_INVALID_CREDS
|
|
877
|
+
|
|
878
|
+
### /v1/db
|
|
879
|
+
|
|
880
|
+
- `POST /v1/db/access-explain`
|
|
881
|
+
- Contract: request fields: project_id, table, id, operation, user. rejects with: UNSUPPORTED_FEATURE (Access explanations are a developer-only view, available with a platform smt_ API key.); VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.). error codes: UNSUPPORTED_FEATURE, VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
882
|
+
- `GET /v1/db/access-map`
|
|
883
|
+
- Contract: response fields: release, intelligence, browser_data, app_description, note, intelligence=null, note='This release carries no data-access artifact — it either predates the intelligence layer or declares no user-owned/shared/server_only tables.', schema_hash, granularity, summary, tables, scoped, shared, server_only, member, policy, observed, fingerprints, overflow, raw_sql_note, granularity='per-table', granularity='per-fingerprint', note='Observed from queries the platform composed at runtime — a byproduct of execution, never source inspection. Observations accumulate across releases; raw SQL is not observed here. Shape metadata only: no query values or row contents are recorded.', raw_sql_note='Raw SQL is not analyzed or listed above. Managed projects require explicit sw.db.server.query / sw.db.server.batch for intentional server-authority reads; SQL-mode projects retain ordinary sw.db.query / sw.db.batch.'. rejects with: UNSUPPORTED_FEATURE (The data-access map is a developer-only view, available with a platform smt_ API key.); VALIDATION_ERROR (project_id query param is required.); PROJECT_NOT_FOUND (Project not found.); NOT_FOUND (Release not found on this project. / This project has no active release yet.). error codes: UNSUPPORTED_FEATURE, VALIDATION_ERROR, PROJECT_NOT_FOUND, NOT_FOUND
|
|
884
|
+
- `POST /v1/db/batch`
|
|
885
|
+
- Contract: response fields: results, statement_count, database_created. rejects with: VALIDATION_ERROR (project_id is required (string).); VALIDATION_ERROR (statements must be a non-empty array of { sql, params? }.); VALIDATION_ERROR (batch supports at most 1000 statements per call; larger imports run as multiple batches.); FORBIDDEN (Database batches require editor access.); VALIDATION_ERROR (statements[…] must be an object.); VALIDATION_ERROR (statements[…].sql is required (string).); VALIDATION_ERROR (statements[…].params must be an array.); VALIDATION_ERROR (statements[…]: …); UNSUPPORTED_SQL (statements[…]: …). error codes: VALIDATION_ERROR, FORBIDDEN, UNSUPPORTED_SQL, INTERNAL_ERROR, PROJECT_NOT_FOUND, SCHEMA_LOCKED, SCHEMA_AUTHORITY_UNAVAILABLE, DB_BATCH_OUTCOME_UNKNOWN, DRAFT_LEGACY_SLOT_BLOCKED, DEV_DB_NOT_ISOLATED. behavior: This project uses previews; the older workspace isn't available. Previews run with `somewhere preview`.. behavior: This project is in Review mode but its isolated test database is not ready yet, so there is no safe place to run drafts without touching live data. Re-enter Review mode to re-provision it, then retry.
|
|
886
|
+
- `POST /v1/db/bookmark`
|
|
887
|
+
- Contract: request fields: project_id, label. response fields: label, bookmark_at. rejects with: VALIDATION_ERROR (project_id is required (string).); VALIDATION_ERROR (label is required (string).); VALIDATION_ERROR (label exceeds … chars.); PROJECT_NOT_FOUND (Project not found.); NOT_FOUND (Project has no database to bookmark yet; its first query or migration creates it.); BOOKMARK_SAVE_FAILED (Could not save the bookmark. A later identical request can succeed.); DATABASE_AUTHORITY_UNAVAILABLE (Project database authority is temporarily unavailable. Nothing was recorded or restored.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, NOT_FOUND, BOOKMARK_SAVE_FAILED, DATABASE_AUTHORITY_UNAVAILABLE, SPLIT_RESTORE_UNSUPPORTED
|
|
888
|
+
- `DELETE /v1/db/bookmark/:param`
|
|
889
|
+
- Contract: response fields: label, deleted=true. rejects with: VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
890
|
+
- `GET /v1/db/bookmarks`
|
|
891
|
+
- Contract: response fields: bookmarks, label, bookmark_at. rejects with: VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
892
|
+
- `POST /v1/db/dump`
|
|
893
|
+
- Contract: request fields: project_id, plane, format. rejects with: VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (plane must be managed or raw.); VALIDATION_ERROR (format must be sql or manifest.); VALIDATION_ERROR (The manifest describes both planes; it takes no plane.); DUMP_UNSUPPORTED_SCHEMA (SQL download cannot preserve this database sequence state. No SQL download was produced.); INTERNAL_ERROR (Database dump failed.). error codes: VALIDATION_ERROR, DUMP_UNSUPPORTED_SCHEMA, PROJECT_NOT_FOUND, INTERNAL_ERROR
|
|
894
|
+
- `POST /v1/db/export`
|
|
895
|
+
- Contract: request fields: project_id, table, plane, filters. rejects with: VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (table is required and must match [a-zA-Z_][a-zA-Z0-9_]*.); TABLE_NOT_FOUND (Table "…" not found.); VALIDATION_ERROR (plane must be managed or raw.); PROJECT_NOT_FOUND (Project not found.); PLANE_REQUIRED ("…" names both a declared (managed) table and a raw SQL table in this project. Repeat the request with plane "managed" or "raw". Nothing was exported.); DATABASE_NOT_INITIALIZED (This project has no database to read yet.); INTERNAL_ERROR (Export failed.); VALIDATION_ERROR (A managed table exports whole; filters are not supported. Nothing was exported.). error codes: VALIDATION_ERROR, TABLE_NOT_FOUND, PROJECT_NOT_FOUND, PLANE_REQUIRED, DATABASE_NOT_INITIALIZED, INTERNAL_ERROR
|
|
896
|
+
- `POST /v1/db/import`
|
|
897
|
+
- Contract: response fields: table, entry, report, loosened, owner_column. rejects with: UNSUPPORTED_FEATURE (Importing a table into schema management is a developer-only operation, available with a platform key, not an app-user JWT.); VALIDATION_ERROR (This endpoint generates a db/schema.ts entry from an existing table and takes { project_id, table, with? }. CSV rows are loaded into a table by POST /v1/db/import-csv. Nothing was read or changed.); VALIDATION_ERROR (project_id is required (string).); VALIDATION_ERROR (table is required (string).); VALIDATION_ERROR (with must be an array of table names.); FORBIDDEN (Importing a table requires editor access.); IMPORT_TABLE_NOT_FOUND (This project has no database yet, so there is no table to import.); DRAFT_SLOT_NOT_SUPPORTED (This operation always acts on the project's live database, so a request declaring the draft or development workspace is refused instead of silently changing production.). error codes: UNSUPPORTED_FEATURE, VALIDATION_ERROR, FORBIDDEN, IMPORT_TABLE_NOT_FOUND, IMPORT_REFUSED, PROJECT_NOT_FOUND, SCHEMA_LOCKED, SCHEMA_AUTHORITY_UNAVAILABLE, DB_BATCH_OUTCOME_UNKNOWN, DRAFT_SLOT_NOT_SUPPORTED
|
|
898
|
+
- `POST /v1/db/import-csv`
|
|
899
|
+
- Contract: request fields: project_id, table, csv, file_path, create_table. response fields: rows_imported, table, created_table, warnings. rejects with: UNSUPPORTED_FEATURE (CSV import is a developer-only operation, available with a platform smt_ API key.); VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (table is required and must match [a-zA-Z_][a-zA-Z0-9_]*.); RESERVED_TABLE (Table "…" uses a reserved prefix and cannot be imported into.); FORBIDDEN (Database imports require editor access.); VALIDATION_ERROR (Inline CSV body is capped at 5 MB. A larger CSV is imported from files: a CSV stored through /v1/fs/* is read via file_path.); FILE_NOT_FOUND (File not found at ….); VALIDATION_ERROR (CSV at … is over the 50 MB per-import limit; smaller CSV files import separately.); FILE_NOT_FOUND (File not found in storage at ….); VALIDATION_ERROR (Either csv (string) or file_path (string) is required.); VALIDATION_ERROR (CSV is empty.); VALIDATION_ERROR (CSV has no header row.); VALIDATION_ERROR (CSV header "…" is not a valid column name. Column names match [a-zA-Z_][a-zA-Z0-9_]*.); VALIDATION_ERROR (CSV has a duplicate column header "…". Column names must be unique (case-insensitive).); INTERNAL_ERROR (Failed to open project database.); TABLE_NOT_FOUND (Table "…" does not exist. create_table: true creates it from the CSV headers.); VALIDATION_ERROR (None of the CSV headers (…) match columns in table "…".); INTERNAL_ERROR (CSV import failed.); DRAFT_SLOT_NOT_SUPPORTED (This operation always acts on the project's live database, so a request declaring the draft or development workspace is refused instead of silently changing production.). error codes: UNSUPPORTED_FEATURE, VALIDATION_ERROR, RESERVED_TABLE, FORBIDDEN, FILE_NOT_FOUND, PROJECT_NOT_FOUND, INTERNAL_ERROR, TABLE_NOT_FOUND, DRAFT_SLOT_NOT_SUPPORTED
|
|
900
|
+
- `POST /v1/db/migrate`
|
|
901
|
+
- Contract: response fields: statements_run, results, success, success=true. rejects with: UNSUPPORTED_FEATURE (Database migrations are a developer-only operation, available with a platform smt_ API key, not an app-user JWT.); VALIDATION_ERROR (project_id is required (string).); VALIDATION_ERROR (sql is required (string).); FORBIDDEN (Database migrations require editor access.); VALIDATION_ERROR (No SQL statements found to run.); RESTORE_POINT_FAILED (Could not record the automatic pre-migration bookmark, so the migration was not applied. Nothing changed; a later identical request can succeed.). error codes: UNSUPPORTED_FEATURE, VALIDATION_ERROR, FORBIDDEN, UNSUPPORTED_SQL, SCHEMA_LOCKED, RESTORE_POINT_FAILED, MIGRATION_FAILED, PROJECT_NOT_FOUND, SCHEMA_AUTHORITY_UNAVAILABLE, DB_BATCH_OUTCOME_UNKNOWN, DRAFT_LEGACY_SLOT_BLOCKED, DEV_DB_NOT_ISOLATED. behavior: This project uses previews; the older workspace isn't available. Previews run with `somewhere preview`.. behavior: This project is in Review mode but its isolated test database is not ready yet, so there is no safe place to run drafts without touching live data. Re-enter Review mode to re-provision it, then retry.
|
|
902
|
+
- `POST /v1/db/query`
|
|
903
|
+
- Contract: response fields (partial): data, error, count, database_created, error=null, serialized, serialized=false. rejects with: VALIDATION_ERROR (Cannot use both table and sql; a request takes one format.); VALIDATION_ERROR (Either table (structured) or sql (raw) is required.); VALIDATION_ERROR (project_id is required (string).); DB_UNAVAILABLE (The database could not be reached for this request. Nothing was changed; the same request can be repeated.); VALIDATION_ERROR (params must be an array.); VALIDATION_ERROR (sql is required.); DATABASE_TARGET_AMBIGUOUS (The request named conflicting database targets; nothing changed.); DATABASE_TARGET_INVALID (The request named an unsupported database target; nothing changed.); PREVIEW_TARGET_INVALID (The named preview is unknown, closed, expired, or mismatched; production was not used as a fallback.); DRAFT_DB_NOT_ISOLATED (The exact preview database is not ready; production was not used as a fallback.). error codes: VALIDATION_ERROR, DB_UNAVAILABLE, QUERY_TIMEOUT, UNSUPPORTED_SQL, TABLE_NOT_FOUND, PROJECT_NOT_FOUND, SCHEMA_LOCKED, SCHEMA_AUTHORITY_UNAVAILABLE, DB_BATCH_OUTCOME_UNKNOWN, DATABASE_TARGET_AMBIGUOUS, DATABASE_TARGET_INVALID, PREVIEW_TARGET_INVALID, DRAFT_DB_NOT_ISOLATED, DRAFT_LEGACY_SLOT_BLOCKED, DEV_DB_NOT_ISOLATED. behavior: Use a developer credential for direct REST requests.. behavior: This project uses previews; the older workspace isn't available. Previews run with `somewhere preview`.. behavior: This project is in Review mode but its isolated test database is not ready yet, so there is no safe place to run drafts without touching live data. Re-enter Review mode to re-provision it, then retry.. validation: select must be a string. / filters must be an array. / order must be an object with a string column and optional boolean ascending. / insert must be an object or array of objects. / update must be an object. / upsert must be an object. / delete must be a boolean. / onConflict must be a string. / count must be exact, planned, or estimated. / head must be a boolean. / single must be a boolean. / Only one mutation type allowed per request. Found: … / insert requires at least one row. / insert row must have at least one column. / All insert rows must have the same columns. / upsert requires onConflict to specify the conflict column(s). / upsert row must have at least one column. / upsert must include at least one column besides the conflict key(s). / update must set at least one column. / DELETE without filters is not allowed in the structured query; raw SQL accepts unfiltered deletes. / limit must be a non-negative number. / offset must be a non-negative number. / "or" filter requires a non-empty array of sub-filters. / "in" sub-filter on "…" requires a non-empty array value. / Unsupported operator "…" in or-group. Supported: … / "in" filter on "…" requires a non-empty array value. / Unsupported filter operator "…". Supported: …
|
|
904
|
+
- `POST /v1/db/query-observations`
|
|
905
|
+
- Contract: response fields: accepted, recorded, dropped_fingerprints, accepted=true. rejects with: FORBIDDEN (Query observations require a project runtime credential.); FORBIDDEN (Project runtime scope is missing.). error codes: FORBIDDEN, VALIDATION_ERROR
|
|
906
|
+
- `POST /v1/db/raw-read`
|
|
907
|
+
- Contract: response fields (partial): database_created, results, statement_count. rejects with: FORBIDDEN (Managed-mode raw reads require a project runtime credential.); VALIDATION_ERROR (project_id is required (string).); MANAGED_READ_UNAVAILABLE (Managed-mode read capability is temporarily unavailable; a later identical request can succeed.); VALIDATION_ERROR (Exactly one of sql (string) or statements (array) is required.); VALIDATION_ERROR (statements must be a non-empty array of { sql, params? }.); VALIDATION_ERROR (batch supports at most 1000 statements per call.); VALIDATION_ERROR (statements[…].sql is required (string). / sql is required (string).); VALIDATION_ERROR (statements[…].params must be an array. / params must be an array.); VALIDATION_ERROR (statements[…]: …); UNSUPPORTED_SQL (statements[…]: …); DRAFT_CONTEXT_INVALID (Draft identity headers require the draft execution slot.); DRAFT_DB_NOT_ISOLATED (The exact draft database capability is missing or invalid; production was not used as a fallback.). error codes: FORBIDDEN, VALIDATION_ERROR, MANAGED_READ_UNAVAILABLE, UNSUPPORTED_SQL, QUERY_TIMEOUT, MANAGED_RAW_WRITE_FORBIDDEN, DATATYPE_MISMATCH, PROJECT_NOT_FOUND, SCHEMA_LOCKED, SCHEMA_AUTHORITY_UNAVAILABLE, DB_BATCH_OUTCOME_UNKNOWN, DRAFT_CONTEXT_INVALID, DRAFT_DB_NOT_ISOLATED, DRAFT_LEGACY_SLOT_BLOCKED, DEV_DB_NOT_ISOLATED. behavior: This project uses previews; the older workspace isn't available. Previews run with `somewhere preview`.. behavior: This project is in Review mode but its isolated test database is not ready yet, so there is no safe place to run drafts without touching live data. Re-enter Review mode to re-provision it, then retry.
|
|
908
|
+
- `POST /v1/db/rows`
|
|
909
|
+
- Contract: request fields: project_id, table, plane, limit, offset, order_by, order, order_dir, filters. response fields: rows, columns, total, limit, offset. rejects with: VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (table is required and must match [a-zA-Z_][a-zA-Z0-9_]*.); TABLE_NOT_FOUND (Table "…" not found.); VALIDATION_ERROR (plane must be managed or raw.); PROJECT_NOT_FOUND (Project not found.); INTERNAL_ERROR (Managed rows could not be read.); DATABASE_NOT_INITIALIZED (This project has no database to read yet.); VALIDATION_ERROR (Unknown order_by column "…".); INTERNAL_ERROR (Row browse failed.). error codes: VALIDATION_ERROR, TABLE_NOT_FOUND, PROJECT_NOT_FOUND, DRAFT_SLOT_NOT_SUPPORTED, INTERNAL_ERROR, DATABASE_NOT_INITIALIZED
|
|
910
|
+
- `GET /v1/db/schema`
|
|
911
|
+
- Contract: rejects with: VALIDATION_ERROR (plane must be managed or raw.); VALIDATION_ERROR (project_id query param is required.); VALIDATION_ERROR (table query param is required.); VALIDATION_ERROR (table must match [A-Za-z_][A-Za-z0-9_]*); TABLE_NOT_FOUND (Table "…" not found in this project's database.); DRAFT_SLOT_NOT_SUPPORTED (This operation always acts on the project's live database, so a request declaring the draft or development workspace is refused instead of silently changing production.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, TABLE_NOT_FOUND, PROJECT_NOT_FOUND, UNSUPPORTED_FEATURE, SCHEMA_LOCKED, SCHEMA_AUTHORITY_UNAVAILABLE, DB_BATCH_OUTCOME_UNKNOWN, DRAFT_SLOT_NOT_SUPPORTED
|
|
912
|
+
- `POST /v1/db/schema/apply`
|
|
913
|
+
- Contract: rejects with: SCHEMA_APPLY_RETIRED (There is no standalone schema apply. Schema changes come from db/schema.ts and are applied with a release of the complete app source: a deploy (POST /v1/deploy, or `somewhere deploy` from the app root in the CLI) or a preview. Nothing was changed.). error codes: SCHEMA_APPLY_RETIRED
|
|
914
|
+
- `GET /v1/db/scopes`
|
|
915
|
+
- Contract: response fields: scopes, scopes_are, live_rules, scopes_are='recorded declarations; live_rules is what the live version serves'. rejects with: UNSUPPORTED_FEATURE (Scope listing is a developer-only operation, available with a platform smt_ API key.); VALIDATION_ERROR (project_id query param is required.); PROJECT_NOT_FOUND (Project not found.). error codes: UNSUPPORTED_FEATURE, VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
916
|
+
- `POST /v1/db/scopes/reveal`
|
|
917
|
+
- Contract: response fields: logged, logged=true. rejects with: UNSUPPORTED_FEATURE (Scope reveals are a developer-only operation.); VALIDATION_ERROR (project_id is required (string).); VALIDATION_ERROR (table is required (valid SQL identifier).); VALIDATION_ERROR (column is required (valid SQL identifier).); PROJECT_NOT_FOUND (Project not found.). error codes: UNSUPPORTED_FEATURE, VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
918
|
+
- `GET /v1/db/scopes/reveals`
|
|
919
|
+
- Contract: response fields: reveals, id, user_id, table, column, row_pk, reason, created_at. rejects with: UNSUPPORTED_FEATURE (Scope reveal log is a developer-only operation.); VALIDATION_ERROR (project_id query param is required.); PROJECT_NOT_FOUND (Project not found.). error codes: UNSUPPORTED_FEATURE, VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
920
|
+
- `POST /v1/db/size-observation`
|
|
921
|
+
- Contract: response fields: accepted, accepted=true. rejects with: FORBIDDEN (Database size observations require a project runtime credential.); FORBIDDEN (Project runtime scope is missing.); VALIDATION_ERROR (database_id and a non-negative finite size_after are required.). error codes: FORBIDDEN, VALIDATION_ERROR
|
|
922
|
+
- `GET /v1/db/tables`
|
|
923
|
+
- Contract: rejects with: VALIDATION_ERROR (plane must be managed or raw.); VALIDATION_ERROR (project_id query param is required.); DRAFT_SLOT_NOT_SUPPORTED (This operation always acts on the project's live database, so a request declaring the draft or development workspace is refused instead of silently changing production.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, UNSUPPORTED_FEATURE, PROJECT_NOT_FOUND, SCHEMA_LOCKED, SCHEMA_AUTHORITY_UNAVAILABLE, DB_BATCH_OUTCOME_UNKNOWN, DRAFT_SLOT_NOT_SUPPORTED
|
|
924
|
+
- `GET /v1/db/types`
|
|
925
|
+
- Contract: response fields: source, tables. rejects with: VALIDATION_ERROR (project_id query param is required.); DRAFT_SLOT_NOT_SUPPORTED (This operation always acts on the project's live database, so a request declaring the draft or development workspace is refused instead of silently changing production.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, SCHEMA_LOCKED, SCHEMA_AUTHORITY_UNAVAILABLE, DB_BATCH_OUTCOME_UNKNOWN, DRAFT_SLOT_NOT_SUPPORTED
|
|
926
|
+
- `DELETE /v1/db/webhook`
|
|
927
|
+
- Contract: response fields: deleted. rejects with: UNSUPPORTED_FEATURE (Webhook registration requires a platform smt_ API key.); VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found or access denied.). error codes: UNSUPPORTED_FEATURE, VALIDATION_ERROR, PROJECT_NOT_FOUND, WEBHOOK_CHANGE_PENDING
|
|
928
|
+
- `GET /v1/db/webhook`
|
|
929
|
+
- Contract: response fields: webhook, webhook=null. rejects with: UNSUPPORTED_FEATURE (Webhook registration requires a platform smt_ API key.); VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found or access denied.). error codes: UNSUPPORTED_FEATURE, VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
930
|
+
- `PUT /v1/db/webhook`
|
|
931
|
+
- Contract: response fields (partial): delivery, note, delivery='pending'. rejects with: UNSUPPORTED_FEATURE (Webhook registration requires a platform smt_ API key.); VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (url is required.); VALIDATION_ERROR (url must be a valid absolute URL.); VALIDATION_ERROR (url must use http or https.); PROJECT_NOT_FOUND (Project not found or access denied.). error codes: UNSUPPORTED_FEATURE, VALIDATION_ERROR, PROJECT_NOT_FOUND, WEBHOOK_CHANGE_PENDING
|
|
932
|
+
|
|
933
|
+
### /v1/deploy
|
|
934
|
+
|
|
935
|
+
- `POST /v1/deploy`
|
|
936
|
+
- `GET /v1/deploy/architecture`
|
|
937
|
+
- Contract: response fields: project_id, version, mermaid, generated_at, status, source, version_source, routes, symbols, graph, tables, task_refs, coverage, partial, flags, harvest, files, docs, superseded_by, status='ready', source='docs_sidecar', superseded_by='/v1/project-docs', docs=null when unavailable, hint, mermaid='', generated_at=null, status='pending', hint='No docs sidecar is available for the selected version.'. rejects with: VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (version must be a positive integer.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
938
|
+
- `GET /v1/deploy/backend-routes`
|
|
939
|
+
- Contract: response fields: project_id, version, release_id, release_seq, source_authority, status, routes, count, version=null, release_id=null, release_seq=null, status='no_deploy', source. rejects with: VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
940
|
+
- `POST /v1/deploy/check`
|
|
941
|
+
- Contract: response fields (partial): counts, warnings, lint, ok, errors, file, error_count, artifact_verified, ok=false, file='frontend bundle', artifact_verified=false, publication_verified, artifact_verified=null, publication_verified=true, artifact_verified=true. rejects with: PROJECT_NOT_FOUND (Project not found.); FORBIDDEN (Editor access is required to run deploy checks.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, FORBIDDEN, SCHEMA_DECLARATION_INVALID, ENV_PREPARATION_FAILED, BROWSER_ENV_SECRET
|
|
942
|
+
- `POST /v1/deploy/check/run`
|
|
943
|
+
- Contract: rejects with: CHECK_RUNS_ON_RUNNER (Handler checks run on the runner, not this API: POST https://runner.somewhere.cloud/check-handler accepts the same body with the same Authorization header. In the CLI, `somewhere deploy-check --run` reaches the runner after `somewhere update`.). error codes: CHECK_RUNS_ON_RUNNER
|
|
944
|
+
- `POST /v1/deploy/checks`
|
|
945
|
+
- Contract: request fields: project_id, check, id, subdomain, release_id, live_seq. rejects with: VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (Choose access, crawl, or a saved check path like checks/add-note.json.); PROJECT_NOT_FOUND (Project not found, or it has no live release.); NOT_FOUND (This project has no live release to check.); NOT_FOUND (This project has no live app address to check.); CHECK_NOT_QUEUED (Could not confirm that the selected check started.); CHECK_NOT_QUEUED (The check could not be started; nothing ran. Try again.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, NOT_FOUND, CHECK_NOT_QUEUED
|
|
946
|
+
- `POST /v1/deploy/checks/targeted`
|
|
947
|
+
- Contract: request fields: project_id, check, id, subdomain, release_id, live_seq. rejects with: VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (Choose access, crawl, or a saved check path like checks/add-note.json.); PROJECT_NOT_FOUND (Project not found, or it has no live release.); NOT_FOUND (This project has no live release to check.); NOT_FOUND (This project has no live app address to check.); CHECK_NOT_QUEUED (Could not confirm that the selected check started.); CHECK_NOT_QUEUED (The check could not be started; nothing ran. Try again.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, NOT_FOUND, CHECK_NOT_QUEUED
|
|
948
|
+
- `GET /v1/deploy/dependencies`
|
|
949
|
+
- Contract: response fields: version, status, counts, packages, version=null, status='no_deploy', counts=null, status='unavailable', direct, scanned, listed, flagged, malicious, status='ok', direct=null when unavailable. rejects with: VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
950
|
+
- `GET /v1/deploy/description`
|
|
951
|
+
- Contract: response fields: project_id, text, generated_at, status, hint, text='', generated_at=null, status='pending', hint='Generated automatically after each promote, usually within seconds; a later identical request returns it once ready. A project with no deployed homepage has nothing to describe.', version, generated_at=null when unavailable, version=null. rejects with: VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
952
|
+
- `GET /v1/deploy/design-tokens`
|
|
953
|
+
- Contract: response fields (partial): cached, cached=true, project_id, version, release_id, source_manifest_hash, source_scope, input_characters, truncated, source_scope='authored_css', cached=false. rejects with: VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.); FORBIDDEN (Editor access is required to extract design tokens.); ACTIVE_RELEASE_MISSING (This project has no active release.); NO_CSS_FOUND (The selected release has no authored CSS files to inspect.); CONFIG_ERROR (Token extraction is temporarily unavailable.); PARSE_ERROR (Token extraction returned an unparseable response; nothing was extracted, and the same request can be repeated.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, FORBIDDEN, ACTIVE_RELEASE_MISSING, NO_CSS_FOUND, CONFIG_ERROR, PARSE_ERROR, UPSTREAM_ERROR
|
|
954
|
+
- `GET /v1/deploy/failure/:param`
|
|
955
|
+
- Contract: response fields: failure_id, project_id, attempted_version, recorded_code, classification, summary, remediation, retry, known_cause, surface, route, phase, at. rejects with: NOT_FOUND (Deploy failure reference not found.). error codes: NOT_FOUND
|
|
956
|
+
- `GET /v1/deploy/file`
|
|
957
|
+
- Contract: response fields (partial): content, encoding, size, encoding='base64', project_id, path, source_release_id, active_release_id, type, fatal, fatal=false, type='function', encoding='utf-8', env, type='static', type='binary'. rejects with: VALIDATION_ERROR (version must be a positive whole number.); VALIDATION_ERROR (version selects production source. Use it with env:prod or omit env.); VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (path is required.); VALIDATION_ERROR (env must be "dev" or "prod".); PROJECT_NOT_FOUND (Project not found.); FILE_NOT_FOUND | DEPLOY_PATH_REJECTED (No file at "…" in env "…". / Invalid project path: ….); NOT_FOUND (No release stored for version ….); RELEASE_SOURCE_UNAVAILABLE (Source for version … could not be verified.); FILE_NOT_FOUND (No file at "…" in version ….); FILE_NOT_FOUND (No file at "…" in env "…".). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, FILE_NOT_FOUND, DEPLOY_PATH_REJECTED, NOT_FOUND, RELEASE_SOURCE_UNAVAILABLE
|
|
958
|
+
- `GET /v1/deploy/files-list`
|
|
959
|
+
- Contract: response fields (partial): project_id, env, files, counts, static, binary, functions, active_release_id. rejects with: VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (env must be "dev" or "prod".); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
960
|
+
- `GET /v1/deploy/log`
|
|
961
|
+
- Contract: response fields: run_id, access_check, last_failure, created_at, created_at=null when unavailable, release_id, version, active_release_id, is_live, project_id, recent_failures, status, build_log, warnings, reference_check, log_available, stage_timing_ms, history, message, files_count, has_functions, promoted_at, total_bytes, function_sizes, commit_sha, commit_message, source, created_by, message=null, promoted_at=null, total_bytes=null, function_sizes=null, commit_sha=null, commit_message=null, source='release', last_failed_build, version=null, status='success', log_available=false, status='failed'. rejects with: VALIDATION_ERROR (project_id is required.); NOT_FOUND (No such targeted check run.); PROJECT_NOT_FOUND (Project not found.); NOT_FOUND (No release … in this project.); SOURCE_SELECTOR_UNSUPPORTED (version and release_id must identify the same release; no log was returned.); VALIDATION_ERROR (version must be a positive integer; without version, the latest is returned.); NOT_FOUND (No release stored for version …. / The active release history could not be found.); RELEASE_SOURCE_UNAVAILABLE (The release source could not be verified, so its deploy log was not returned.); NOT_FOUND (No build log stored for version …. Build logs are captured on every deploy going forward; deploys before this feature shipped have none.). error codes: VALIDATION_ERROR, NOT_FOUND, PROJECT_NOT_FOUND, SOURCE_SELECTOR_UNSUPPORTED, RELEASE_SOURCE_UNAVAILABLE
|
|
962
|
+
- `PATCH /v1/deploy/note`
|
|
963
|
+
- Contract: request fields: project_id, version, message, id. response fields: project_id, release_id, version. rejects with: VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (version must be a positive whole number.); PROJECT_NOT_FOUND (Project not found.); FORBIDDEN (Changing a deploy note requires editor access.); VALIDATION_ERROR (message must contain a note.); NOT_FOUND (No release stored for version ….). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, FORBIDDEN, NOT_FOUND
|
|
964
|
+
- `PATCH /v1/deploy/patch`
|
|
965
|
+
- `POST /v1/deploy/patch`
|
|
966
|
+
- `POST /v1/deploy/prestart`
|
|
967
|
+
- Contract: request fields: project_id. response fields: project_id, prestarted, prestarted=true. rejects with: VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.); FORBIDDEN (Deploying requires editor access to this project.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, FORBIDDEN
|
|
968
|
+
- `POST /v1/deploy/preview/close`
|
|
969
|
+
- Contract: request fields: project_id, preview_session_id, draft_id. response fields: preview_session_id, draft_id, status, idempotent_replay, cleanup_complete, cleanup_pending, partial. rejects with: VALIDATION_ERROR (preview_session_id and its draft_id alias must match when both are sent.); VALIDATION_ERROR (project_id and preview_session_id are required.); PROJECT_NOT_FOUND (Project not found.); FORBIDDEN (Closing a preview requires editor access to this project.); DRAFT_NOT_FOUND (Preview not found.); DRAFT_TERMINAL_CONFLICT (This preview was already promoted; promotion owns its cleanup. / The preview lifecycle changed while CLOSE was being committed; the preview was not closed, and the same operation can be repeated.); PROJECT_DELETING (This project is deleted. Deleting it closed its previews for you… — there is nothing left to close and no action is required.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, FORBIDDEN, DRAFT_NOT_FOUND, DRAFT_TERMINAL_CONFLICT, PROJECT_DELETING
|
|
970
|
+
- `POST /v1/deploy/preview/invoke`
|
|
971
|
+
- Contract: rejects with: RUNNER_REQUIRED (Use POST https://runner.somewhere.cloud/v1/deploy/preview/invoke with the same body and Authorization header.). error codes: RUNNER_REQUIRED
|
|
972
|
+
- `GET /v1/deploy/screenshot/:param/:param`
|
|
973
|
+
- Contract: rejects with: VALIDATION_ERROR (Bad screenshot file name.); PROJECT_NOT_FOUND (Project not found.); NOT_FOUND (No screenshot for this project.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, NOT_FOUND
|
|
974
|
+
- `GET /v1/deploy/screenshots`
|
|
975
|
+
- Contract: rejects with: VALIDATION_ERROR (project_id and project_ids are mutually exclusive; a request takes one of them.); VALIDATION_ERROR (project_ids requires 1-… comma-separated project IDs.); VALIDATION_ERROR (version must be a positive integer.); VALIDATION_ERROR (version is available only with project_id.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
976
|
+
- `GET /v1/deploy/source`
|
|
977
|
+
- Contract: response fields (partial): project_id, env, version, files, static_files, binary_files, functions, service_tables, counts, total, bundled, active_release_id. rejects with: VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (env must be "dev" or "prod".); PROJECT_NOT_FOUND (Project not found.); LEGACY_SOURCE_CHANGED (The project changed while its source was being read. Nothing was returned; the same export can be repeated.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, LEGACY_SOURCE_CHANGED, LEGACY_SOURCE_INCONSISTENT, LEGACY_SOURCE_INCOMPLETE
|
|
978
|
+
- `GET /v1/deploy/status`
|
|
979
|
+
- Contract: response fields: preview_comparison, published, active_release_id, retained_release_id, production_release, live_release, promoted_from_preview_id, promoted_from_candidate_id, production_content_hash, prod_updated_at, prod_version, prod_file_count, prod_has_functions, in_sync, dev_ahead, files_changed, dev_file_count, dev_has_functions, dev_updated_at, dev_version, added_files, removed_files, modified_files, preview_id, candidate_release_id, current_candidate, preview_candidates, previews, preview_session, draft, last_change_source, last_change_at, preview_comparison='unavailable', in_sync=null, dev_ahead=null, files_changed=null, dev_file_count=null, dev_has_functions=null, dev_updated_at=null, dev_version=null, preview_id=null, candidate_release_id=null, current_candidate=null, preview_session=null, draft=null, promoted_from_preview_id=null when unavailable, promoted_from_candidate_id=null when unavailable, production_content_hash=null when unavailable, prod_version=null when unavailable, last_change_at=null when unavailable, draft_id, created_at, preview_id=null when unavailable, candidate_release_id=null when unavailable, production_release=null when unavailable, live_release=null when unavailable, current_candidate=null when unavailable, dev_version=null when unavailable. rejects with: VALIDATION_ERROR (project_id query param is required.); PROJECT_NOT_FOUND (Project not found.); RELEASE_SOURCE_UNAVAILABLE (The production release state could not be selected.); RELEASE_SOURCE_UNAVAILABLE (The current preview source could not be verified.); RELEASE_SOURCE_UNAVAILABLE (The production release source could not be verified. Nothing was returned; editing needs a verifiable source, which a deploy of the complete source creates.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, RELEASE_SOURCE_UNAVAILABLE
|
|
980
|
+
|
|
981
|
+
### /v1/docs-query
|
|
982
|
+
|
|
983
|
+
- `GET /v1/docs-query`
|
|
984
|
+
- Contract: rejects with: VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.); DOCS_QUERY_FILTER_REQUIRED (This filter keeps too much of the docs artifact to answer: reading it would exceed … (…) at …. An exact path, symbol, or METHOD + route filter retains less.); DOCS_QUERY_FILTER_REQUIRED (This docs artifact is larger than the unbounded-read limit. artifact_bytes and max_unfiltered_bytes give the exact sizes. An exact path, symbol, or METHOD + route filter is accepted: a filtered read streams the artifact instead of holding it, so its total size does not apply — a filtered read is bounded by how much the filter retains, in filtered_read_bounds.); DOCS_SIDECAR_NOT_FOUND (No deployed docs sidecar is stored for this project yet. / No deployed docs sidecar is stored for version ….); DOCS_QUERY_NOT_FOUND (No entry in the deployed docs sidecar matched the requested filter.); VALIDATION_ERROR (version must be a positive integer.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, DOCS_QUERY_FILTER_REQUIRED, DOCS_SIDECAR_NOT_FOUND, DOCS_QUERY_NOT_FOUND
|
|
985
|
+
|
|
986
|
+
### /v1/domains
|
|
987
|
+
|
|
988
|
+
- `GET /v1/domains`
|
|
989
|
+
- Contract: response fields: domains, stored_only, stored_only=true
|
|
990
|
+
- `DELETE /v1/domains/:param`
|
|
991
|
+
- Contract: response fields: deleted, detached, domain, message, deleted=false, detached=true, sending_removed, deleted=true. rejects with: NOT_FOUND (Domain not found.); NOT_FOUND (Domain not found in your account.); SENDER_DOMAIN_REMOVE_FAILED (… was not removed from its page: sending as … could not be released right now. Nothing changed; removing it again retries.); SENDER_DOMAIN_REMOVE_FAILED (… was not removed: sending as … could not be released right now. Nothing changed; removing it again retries.); UPSTREAM_ERROR (… was not removed: its address could not be released. Sending as … from this project was removed; removing it again retries the rest. / … was not removed: its address could not be released. Nothing changed; removing it again retries.); UPSTREAM_ERROR (… was detached from its page, but one of its addresses could not be released. Removing it again finishes the removal.). error codes: NOT_FOUND, SENDER_DOMAIN_REMOVE_FAILED, UPSTREAM_ERROR
|
|
992
|
+
- `POST /v1/domains/:param/attach`
|
|
993
|
+
- Contract: request fields: project_id, host. response fields: id, domain, fqdn, attached_project_id, attached_host, publish_failures. rejects with: VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (host must be "apex", "www", or a single subdomain label.); NOT_FOUND (Domain not found.); NOT_FOUND (Domain not found in your account.); NOT_VERIFIED (Nameservers are not active yet; this is accepted once /check-ns returns claim_status=active.); PROJECT_NOT_FOUND (Project not found.); DOMAIN_ATTACHED_ELSEWHERE (… is attached to …. Nothing changed. To move it, detach it there first (domain_detach, POST /v1/domains/…/detach), then attach it here.); DOMAIN_OWNER_ONLY (… was bought or claimed by another account. Only that account can change where it points or read its DNS setup; ask its owner.); HOSTNAME_TAKEN (This hostname is already attached to another project.); ROUTE_PROJECT_NOT_LIVE (The target project is not live and cannot receive a domain.). error codes: VALIDATION_ERROR, NOT_FOUND, NOT_VERIFIED, PROJECT_NOT_FOUND, DOMAIN_ATTACHED_ELSEWHERE, DOMAIN_OWNER_ONLY, HOSTNAME_TAKEN, ROUTE_PROJECT_NOT_LIVE
|
|
994
|
+
- `PATCH /v1/domains/:param/auto-renew`
|
|
995
|
+
- Contract: rejects with: AUTO_RENEW_REMOVED (Domains do not renew automatically. To keep one for another year, POST /v1/domains/<domain>/renew opens a payment page.). error codes: AUTO_RENEW_REMOVED
|
|
996
|
+
- `POST /v1/domains/:param/check-ns`
|
|
997
|
+
- Contract: response fields: id, domain, claim_status, ns_verified_at, verified, ssl_status, retry, retry=true, claim_status='active', zone_status, hint, claim_status='pending_ns', verified=false, hint='Nameservers have not propagated yet. The change is detected within minutes once your registrar saves the new NS records.'. rejects with: NOT_FOUND (Domain not found.); NOT_FOUND (Domain not found in your account.); VALIDATION_ERROR (Domain has no zone; /v1/domains/claim creates one.); DOMAIN_OWNER_ONLY (… was bought or claimed by another account. Only that account can change where it points or read its DNS setup; ask its owner.). error codes: NOT_FOUND, VALIDATION_ERROR, DOMAIN_OWNER_ONLY
|
|
998
|
+
- `POST /v1/domains/:param/detach`
|
|
999
|
+
- Contract: response fields: id, domain, detached, already_detached, detached=true, already_detached=true, fqdn. rejects with: NOT_FOUND (Domain not found.); NOT_FOUND (Domain not found in your account.); SENDER_DOMAIN_REMOVE_FAILED (… was not detached: sending as … from its app could not be released right now. Nothing changed; detaching it again retries.); DOMAIN_OWNER_ONLY (… was bought or claimed by another account. Only that account can change where it points or read its DNS setup; ask its owner.). error codes: NOT_FOUND, SENDER_DOMAIN_REMOVE_FAILED, DOMAIN_OWNER_ONLY
|
|
1000
|
+
- `POST /v1/domains/:param/enable-email`
|
|
1001
|
+
- Contract: response fields: id, domain, email_routing_enabled, receiving_host, already_enabled, email_routing_enabled=true, already_enabled=true, pending, note, receivingHost, email_routing_enabled=false, pending=true, note='Your inbox is being set up — this usually takes a few minutes. A later enable-email request finishes activation.', default_addresses. rejects with: NOT_FOUND (Domain not found.); NOT_FOUND (Domain not found in your account.); NOT_VERIFIED (Email is enabled only once nameservers are active; /v1/domains/:id/check-ns reports their status.); NOT_AVAILABLE (Inbox on this domain is being set up and isn’t available yet. We’ll let you know when it’s ready.); CONFIG_ERROR (Inbox setup isn’t available right now. Operators have been alerted; a later identical request can succeed.); DOMAIN_OWNER_ONLY (… was bought or claimed by another account. Only that account can change where it points or read its DNS setup; ask its owner.). error codes: NOT_FOUND, NOT_VERIFIED, NOT_AVAILABLE, CONFIG_ERROR, MAIL_PROVIDER_PRESENT, DOMAIN_OWNER_ONLY
|
|
1002
|
+
- `POST /v1/domains/:param/publish`
|
|
1003
|
+
- Contract: response fields: id, domain, zone_id, nameservers, email_routing_enabled, failures. rejects with: NOT_FOUND (Domain not found.); NOT_FOUND (Domain not found in your account.); NOT_VERIFIED (Nameservers are not active yet; publishing is accepted once /check-ns returns claim_status=active.); PUBLISH_FAILED (Could not publish records for this domain. Operators were alerted.); DOMAIN_OWNER_ONLY (… was bought or claimed by another account. Only that account can change where it points or read its DNS setup; ask its owner.). error codes: NOT_FOUND, NOT_VERIFIED, PUBLISH_FAILED, DOMAIN_OWNER_ONLY
|
|
1004
|
+
- `PATCH /v1/domains/:param/reassign`
|
|
1005
|
+
- Contract: request fields: project_id. response fields: reassigned, domain, message, reassigned=false, message='Domain is already on that project.', reassigned=true. rejects with: VALIDATION_ERROR (project_id is required.); NOT_FOUND (Domain not found.); NOT_FOUND (Domain not found in your account or editable projects.); PROJECT_NOT_FOUND (Target project not found or not editable by you.); SENDER_DOMAIN_CONFLICT (… is set up for sending on both projects. Remove its sender configuration from one project with DELETE /v1/email/sender-domains/<domain>?project_id=<project>, then retry the reassignment.); ROUTING_UPDATE_FAILED (Could not update edge routing for …. Reassignment aborted, so the domain is still on its previous project; a later identical request can succeed.); DOMAIN_OWNER_ONLY (… was bought or claimed by another account. Only that account can change where it points or read its DNS setup; ask its owner.); HOSTNAME_TAKEN (This hostname is already attached to another project.); ROUTE_PROJECT_NOT_LIVE (The target project is not live and cannot receive a domain.). error codes: VALIDATION_ERROR, NOT_FOUND, PROJECT_NOT_FOUND, SENDER_DOMAIN_CONFLICT, ROUTING_UPDATE_FAILED, DOMAIN_OWNER_ONLY, HOSTNAME_TAKEN, ROUTE_PROJECT_NOT_LIVE
|
|
1006
|
+
- `POST /v1/domains/:param/renew`
|
|
1007
|
+
- Contract: response fields: checkout_url, session_id, price_cents, renews_expiry, reused, reused=true. rejects with: NOT_FOUND (Domain not found in your account.); VALIDATION_ERROR (Only domains bought here can be renewed here.); DOMAIN_EXPIRED (This domain has already expired and cannot be renewed here.); CONFIG_ERROR (Domain registration not configured); CONFIG_ERROR (Checkout is not configured on the platform.). error codes: NOT_FOUND, VALIDATION_ERROR, DOMAIN_EXPIRED, CONFIG_ERROR, DOMAIN_RENEWAL_QUOTE_FAILED, CHECKOUT_FAILED
|
|
1008
|
+
- `GET /v1/domains/:param/serving`
|
|
1009
|
+
- Contract: rejects with: UNAUTHORIZED (Sign in to check this domain.); NOT_FOUND (Domain not found in your account.). error codes: UNAUTHORIZED, NOT_FOUND
|
|
1010
|
+
- `GET /v1/domains/:param/status`
|
|
1011
|
+
- Contract: response fields (partial): stored_only, stored_only=true. rejects with: NOT_FOUND (Domain not found.). error codes: NOT_FOUND
|
|
1012
|
+
- `POST /v1/domains/add`
|
|
1013
|
+
- Contract: request fields: project_id, domain. response fields (partial): domain, verified, already_exists, verification_txt_name, verification_txt_value, already_exists=true, cname_target, dns_records, instructions, verified=false. rejects with: VALIDATION_ERROR (project_id is required (string).); VALIDATION_ERROR (domain is required (string).); VALIDATION_ERROR (Invalid domain. A real DNS name like "myapp.com" is accepted; *.somewhere.site subdomains are managed automatically.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, DOMAIN_TAKEN, BARE_DOMAIN_NEEDS_CLAIM_OR_WWW
|
|
1014
|
+
- `POST /v1/domains/admin/reconcile-www`
|
|
1015
|
+
- Contract: response fields: reconciled_count, reconciled, skipped. rejects with: FORBIDDEN (Admin only.). error codes: FORBIDDEN
|
|
1016
|
+
- `POST /v1/domains/buy/preview`
|
|
1017
|
+
- Contract: request fields: domain, project_id. rejects with: VALIDATION_ERROR (domain and project_id required); CONFIG_ERROR (Domain registration not configured); PROJECT_NOT_FOUND (Project not found, or you are a collaborator (only the owner can purchase a domain — purchases are billed to the owner).); DOMAIN_TAKEN (Domain already registered on this platform); UPSTREAM_BUSY (Domain search is temporarily busy; a later identical request is accepted, typically within a minute.); VALIDATION_ERROR (Could not check domain); UPSTREAM_ERROR (Domain check failed); VALIDATION_ERROR (Domain is not available for purchase). error codes: VALIDATION_ERROR, CONFIG_ERROR, PROJECT_NOT_FOUND, DOMAIN_TAKEN, RATE_LIMITED, UPSTREAM_BUSY, UPSTREAM_ERROR, PURCHASE_CONFIRMATION_REQUIRED
|
|
1018
|
+
- `POST /v1/domains/cf-backfill`
|
|
1019
|
+
- Contract: request fields: domain. response fields: domain, nameservers, hostnames_released, order_activating, order_activating=true. rejects with: FORBIDDEN (Admin only.); VALIDATION_ERROR (Provide { domain }.); VALIDATION_ERROR (… is one of the platform's own zones.); NOT_FOUND (Purchased domain not found.); ALREADY_A_CLAIM (… is already set up as a claim in its own zone; there is nothing to convert.); UPSTREAM_ERROR (Conversion of … stopped at …: …. The earlier path is still in place; re-run to continue.); NOT_FOUND (… has no purchase order.). error codes: FORBIDDEN, VALIDATION_ERROR, NOT_FOUND, ALREADY_A_CLAIM, UPSTREAM_ERROR
|
|
1020
|
+
- `POST /v1/domains/cf-prepare-foreign`
|
|
1021
|
+
- Contract: request fields: domain. response fields: domain, zone_id, nameservers, email_note, failures, instructions. rejects with: VALIDATION_ERROR (domain is required.); NOT_FOUND (Domain not found. /v1/domains/add adds it.); NOT_FOUND (Domain not found in your account.); VALIDATION_ERROR (This domain was purchased through us, so /v1/domains/cf-backfill covers it; cf-prepare-foreign is for domains registered elsewhere.); ZONE_SETUP_IN_PROGRESS (The zone for this domain is being set up by another request. Try again in a minute.); NAMESERVERS_STILL_DELEGATED (This domain's nameservers still point at a previous setup here. Change them at the registrar to anything else, then try again.); PREVIOUS_SETUP_ACTIVE (A previous setup of this domain here is still winding down. Try again later.); DNS_LOOKUP_UNAVAILABLE (This domain's nameservers could not be read right now. Try again in a minute.); DOMAIN_TAKEN (This domain is not available.); ZONE_CREATE_FAILED (Could not create the zone for this domain. Operators were alerted.); ZONE_RECORD_FAILED (The zone for … was created but could not be recorded. Call this again.). error codes: VALIDATION_ERROR, NOT_FOUND, ZONE_SETUP_IN_PROGRESS, NAMESERVERS_STILL_DELEGATED, PREVIOUS_SETUP_ACTIVE, DNS_LOOKUP_UNAVAILABLE, DOMAIN_TAKEN, ZONE_CREATE_FAILED, ZONE_RECORD_FAILED
|
|
1022
|
+
- `GET /v1/domains/check`
|
|
1023
|
+
- Contract: response fields (partial): domain, available, price, price_cents, renewal_price_cents. rejects with: VALIDATION_ERROR (Valid domain name required); CONFIG_ERROR (Domain registration not configured); UPSTREAM_BUSY (Domain search is temporarily busy; a later identical request is accepted, typically within a minute.); VALIDATION_ERROR (Could not check domain); UPSTREAM_ERROR (Domain check failed). error codes: VALIDATION_ERROR, CONFIG_ERROR, RATE_LIMITED, UPSTREAM_BUSY, UPSTREAM_ERROR
|
|
1024
|
+
- `POST /v1/domains/checkout`
|
|
1025
|
+
- Contract: request fields: domain, project_id, registrant_name, registrant_organization. response fields: checkout_url, session_id, price_usd, price_cents, renewal_price_cents, reused, reused=true. rejects with: VALIDATION_ERROR (domain and project_id required); CONFIG_ERROR (Checkout is not configured on the platform. Platform support requests are accepted at POST /v1/platform-feedback.); CONFIG_ERROR (Domain registration not configured); PROJECT_NOT_FOUND (Project not found, or you are a collaborator (only the owner can purchase a domain — purchases are billed to the owner).); DOMAIN_PURCHASE_UNAVAILABLE (Domain purchase is temporarily unavailable. Nothing was charged.); ALREADY_OWNED (You already own this domain on this project.); ALREADY_OWNED (You already own this domain on another project. It can be reassigned from the domains page in the dashboard.); DOMAIN_TAKEN (Domain already registered on this platform); DOMAIN_TAKEN (This domain is already being registered.); UPSTREAM_BUSY (Domain search is temporarily busy; a later identical request is accepted, typically within a minute.); VALIDATION_ERROR (Domain is not available for purchase); VALIDATION_ERROR (Domain price is unavailable for purchase). error codes: VALIDATION_ERROR, CONFIG_ERROR, PROJECT_NOT_FOUND, DOMAIN_PURCHASE_UNAVAILABLE, ALREADY_OWNED, DOMAIN_TAKEN, UPSTREAM_BUSY, DOMAIN_AVAILABILITY_CHECK_FAILED, CHECKOUT_FAILED
|
|
1026
|
+
- `GET /v1/domains/checkout/:param`
|
|
1027
|
+
- Contract: rejects with: UNAUTHORIZED (Sign in to read this payment.); VALIDATION_ERROR (session_id is not a checkout id.); CONFIG_ERROR (Checkout is not configured on the platform.); NOT_FOUND (No domain payment with that id in your account.). error codes: UNAUTHORIZED, VALIDATION_ERROR, CONFIG_ERROR, NOT_FOUND, CHECKOUT_STATUS_UNAVAILABLE
|
|
1028
|
+
- `POST /v1/domains/claim`
|
|
1029
|
+
- Contract: request fields: domain. response fields: id, domain, claim_status, nameservers, ns_verified_at, attached_project_id, attached_host, already_claimed, already_claimed=true, instructions, claim_status='pending_ns'. rejects with: VALIDATION_ERROR (domain is required (string).); VALIDATION_ERROR (Invalid domain. A real DNS name like "myapp.com" is accepted.); DOMAIN_TAKEN (This domain is not available to claim.); UPGRADE_REQUIRED (Claiming a domain requires a paid plan.); DOMAIN_TAKEN (This domain is registered to another account.); ALREADY_CLAIMED (This domain was just claimed. GET /v1/domains/owned shows whether it is yours.); CLAIM_IN_PROGRESS (A claim for this domain is in progress. Try again in a moment.); NAMESERVERS_STILL_DELEGATED (This domain's nameservers still point at a previous setup here. Change them at the registrar to anything else, then claim again.); PREVIOUS_SETUP_ACTIVE (A previous setup of this domain here is still winding down. Claim again later.); DNS_LOOKUP_UNAVAILABLE (This domain's nameservers could not be read right now. Claim again in a minute.); ZONE_CREATE_FAILED (Could not create the zone for this domain. Operators were alerted.). error codes: VALIDATION_ERROR, DOMAIN_TAKEN, UPGRADE_REQUIRED, ALREADY_CLAIMED, CLAIM_IN_PROGRESS, NAMESERVERS_STILL_DELEGATED, PREVIOUS_SETUP_ACTIVE, DNS_LOOKUP_UNAVAILABLE, ZONE_CREATE_FAILED
|
|
1030
|
+
- `GET /v1/domains/owned`
|
|
1031
|
+
- Contract: response fields: domains, id, domain, claim_status, claimed_at, ns_verified_at, zone_status, nameservers, email_routing_enabled, attached_project_id, attached_host, attached_at
|
|
1032
|
+
- `POST /v1/domains/scan-orphans`
|
|
1033
|
+
- Contract: request fields: dry_run, assign_user_id, skip_domains. response fields: dry_run, total_zones, orphan_count, orphans, zone_id, domain, status, nameservers, dry_run=true, assigned_to, inserted_count, inserted, dry_run=false. rejects with: FORBIDDEN (Admin only.); VALIDATION_ERROR (assign_user_id is not a valid platform user.). error codes: FORBIDDEN, VALIDATION_ERROR
|
|
1034
|
+
- `GET /v1/domains/search`
|
|
1035
|
+
- Contract: response fields (partial): sort. rejects with: VALIDATION_ERROR (Query parameter "q" is required.); VALIDATION_ERROR (Invalid query: a word (letters, digits, hyphens) or a whole name such as name.com.); VALIDATION_ERROR (max_price is a price in dollars, for example 40.); VALIDATION_ERROR (sort is "price" or "name".); VALIDATION_ERROR (cursor must be the next_cursor of an earlier answer.); CONFIG_ERROR (Domain registration not configured); VALIDATION_ERROR (This cursor has expired; repeat the search from its first page.); UPSTREAM_BUSY (Domain search is temporarily busy; a later identical request is accepted, typically within a minute.). error codes: VALIDATION_ERROR, CONFIG_ERROR, RATE_LIMITED, UPSTREAM_BUSY, UPSTREAM_ERROR
|
|
1036
|
+
- `GET /v1/domains/verify`
|
|
1037
|
+
- Contract: response fields (partial): domain, verified, expected_cname, actual_cname, cname_ok, txt_ok, nameservers, third_party_dns_provider, parent_zone_in_account, dns_records, edge_active, apex_a_records, apex_a_record_conflict, apex_resolves, ssl_status, ssl_certificate_expires, next_step. rejects with: VALIDATION_ERROR (domain query param is required.); NOT_FOUND (Domain not found. POST /v1/domains/add adds it.); NOT_FOUND (Domain not found in your account.); HOSTNAME_TAKEN (This hostname is already attached to another project.); ROUTE_PROJECT_NOT_LIVE (The target project is not live and cannot receive a domain.). error codes: VALIDATION_ERROR, NOT_FOUND, HOSTNAME_TAKEN, ROUTE_PROJECT_NOT_LIVE, ROUTING_UPDATE_FAILED
|
|
1038
|
+
|
|
1039
|
+
### /v1/editor-drive
|
|
1040
|
+
|
|
1041
|
+
- `GET /v1/editor-drive/session/:param`
|
|
1042
|
+
- Contract: response fields (partial): session_id, revision, state, transcript, refused, open_calls. rejects with: VALIDATION_ERROR (project_id is required.); EDITOR_SESSION_NOT_FOUND (This editor conversation was not found.); PROJECT_NOT_FOUND (Project not found.); FORBIDDEN (Editing requires editor access to this project.). error codes: VALIDATION_ERROR, EDITOR_SESSION_NOT_FOUND, PROJECT_NOT_FOUND, FORBIDDEN
|
|
1043
|
+
- `POST /v1/editor-drive/turn`
|
|
1044
|
+
- Contract: response fields (partial): replayed, replayed=true. rejects with: VALIDATION_ERROR (Invalid JSON body.); VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (scope must be "visual" or "build".); VALIDATION_ERROR (Each turn needs session_id (drv_<uuid>), turn_id and the session revision (0 to start).); VALIDATION_ERROR (message must be a non-empty instruction within the size limit.); EDITOR_TURN_INTERRUPTED (The previous step was interrupted and its outcome is unknown, so it is not sent again automatically. Its cost is counted. Continue sends it as a new step.); EDITOR_SESSION_NOT_FOUND (This editor conversation was not found; a new instruction starts a new one.); EDITOR_SESSION_EXPIRED (This editor conversation has expired; a new instruction starts a new one, and edits already saved to your preview are kept.); VALIDATION_ERROR (scope must match the conversation it continues.); EDITOR_TURN_ID_REUSED (This step id was already used for a different request. Nothing was sent; new input takes a new step id.); EDITOR_TURN_RUNNING (This step is still running; it will not be sent twice.); EDITOR_TURN_INTERRUPTED (This step was interrupted and its outcome is unknown, so it is not sent again automatically. Continue sends it as a new step.); EDITOR_TURN_CONFLICT (This conversation moved on (another tab, a repeated request, or a step still running). Nothing was sent; a reloaded conversation shows its current state.); EDITOR_TURN_MISMATCH (The request carries exactly one result for each step the editor asked for, and nothing else.); EDITOR_TURN_MISMATCH (This conversation is waiting for a new instruction.); RATE_LIMITED (The editor assistant is rate limited right now; a later request can succeed.); EDITOR_CONVERSATION_TOO_LONG (This conversation has grown too long. Start a new one; edits already saved to your preview are kept.); EDITOR_TURN_INTERRUPTED (This step was interrupted and its outcome was not recorded, so it is not sent again automatically. Its cost is counted. Continue sends it as a new step.); BUILDER_UNAVAILABLE (Changes cannot be made right now. Nothing was changed; the same request can be sent again in a moment.); EDITOR_TURN_TOO_LONG (This request took more steps than one request takes here. Edits already saved to your preview are kept; ask for the rest as a new, smaller request.); NOT_CONFIGURED (The editor assistant is not available right now.); EDITOR_ASSISTANT_UNAVAILABLE (The editor assistant could not take that request; the same request, or a smaller change, can succeed.); EDITOR_ASSISTANT_INTERRUPTED (The editor assistant was interrupted before its answer was recorded. Edits already saved to your preview are kept, and this step is not sent again automatically. Continue resumes this conversation.); PROJECT_NOT_FOUND (Project not found.); FORBIDDEN (Editing requires editor access to this project.). error codes: VALIDATION_ERROR, EDITOR_TURN_INTERRUPTED, EDITOR_SESSION_NOT_FOUND, EDITOR_SESSION_EXPIRED, EDITOR_TURN_ID_REUSED, EDITOR_TURN_RUNNING, EDITOR_TURN_CONFLICT, EDITOR_TURN_MISMATCH, RATE_LIMITED, EDITOR_CONVERSATION_TOO_LONG, BUILDER_UNAVAILABLE, EDITOR_TURN_TOO_LONG, NOT_CONFIGURED, EDITOR_ASSISTANT_UNAVAILABLE, EDITOR_ASSISTANT_INTERRUPTED, PROJECT_NOT_FOUND, FORBIDDEN
|
|
1045
|
+
|
|
1046
|
+
### /v1/email
|
|
1047
|
+
|
|
1048
|
+
- `GET /v1/email/bounces`
|
|
1049
|
+
- Contract: Runtime method: sw.email.bounces. response fields: bounces, limit. rejects with: VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
1050
|
+
- `GET /v1/email/contacts`
|
|
1051
|
+
- Contract: response fields: contacts. rejects with: VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
1052
|
+
- `POST /v1/email/contacts`
|
|
1053
|
+
- Contract: response fields: contact. rejects with: VALIDATION_ERROR (project_id and email are required.); VALIDATION_ERROR (properties.tags must be an array of non-empty strings.); VALIDATION_ERROR (properties.… is set only by the recipient on their email preferences page.); VALIDATION_ERROR (properties.platform_user_id is reserved for platform-managed identity binding.); PROJECT_NOT_FOUND (Project not found.); VALIDATION_ERROR (Contact upsert failed.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
1054
|
+
- `GET /v1/email/contacts/:param`
|
|
1055
|
+
- Contract: response fields: contact. rejects with: VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.); NOT_FOUND (Contact not found.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, NOT_FOUND
|
|
1056
|
+
- `GET /v1/email/history`
|
|
1057
|
+
- Contract: Runtime method: sw.email.history. response fields: messages. rejects with: VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.); EMAIL_HISTORY_ADMIN_ONLY (Platform user email history is available only through the admin user endpoint.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, EMAIL_HISTORY_ADMIN_ONLY
|
|
1058
|
+
- `GET /v1/email/list`
|
|
1059
|
+
- Contract: response fields: messages, offset. rejects with: VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
1060
|
+
- `POST /v1/email/managed-send`
|
|
1061
|
+
- Contract: rejects with: VALIDATION_ERROR (project_id, to, from, subject, and html or text are required.); INVALID_SENDER_ADDRESS (from must contain exactly one unambiguous email address.); VALIDATION_ERROR (category must be transactional or marketing.); VALIDATION_ERROR (idempotency_key must be a string.); VALIDATION_ERROR (Unknown email preference topic.); EMAIL_TOPIC_REQUIRED (Marketing sends require an email preference topic.); VALIDATION_ERROR (privileged_platform_sender must be a boolean.); PROJECT_NOT_FOUND (Project not found.); PRIVILEGED_SENDER_DENIED (Privileged platform sender access denied.); PRIVILEGED_AUDIT_FAILED (Privileged send was not attempted because its audit record could not be written.). error codes: VALIDATION_ERROR, INVALID_SENDER_ADDRESS, EMAIL_TOPIC_REQUIRED, PROJECT_NOT_FOUND, EMAIL_SEND_FAILED, PRIVILEGED_SENDER_DENIED, PRIVILEGED_AUDIT_FAILED
|
|
1062
|
+
- `POST /v1/email/managed-send/batch`
|
|
1063
|
+
- Contract: rejects with: VALIDATION_ERROR (project_id, from, subject, idempotency_key, and html or text are required.); INVALID_SENDER_ADDRESS (from must contain exactly one unambiguous email address.); VALIDATION_ERROR (Exactly one of recipients or segment is accepted.); VALIDATION_ERROR (category must be transactional or marketing.); VALIDATION_ERROR (Unknown email preference topic.); EMAIL_TOPIC_REQUIRED (Marketing sends require an email preference topic.); VALIDATION_ERROR (privileged_platform_sender must be a boolean.); VALIDATION_ERROR (recipients must contain 1-… non-empty email strings.); VALIDATION_ERROR (segment must contain exactly one of tag or all: true.); PROJECT_NOT_FOUND (Project not found.); SEGMENT_EMPTY (The selected segment has no contacts.); SEGMENT_TOO_LARGE (The selected segment exceeds … contacts; segment.tag selects a smaller set.); PRIVILEGED_SENDER_DENIED (Privileged platform sender access denied.); PRIVILEGED_AUDIT_FAILED (Privileged send was not attempted because its audit record could not be written.). error codes: VALIDATION_ERROR, INVALID_SENDER_ADDRESS, EMAIL_TOPIC_REQUIRED, PROJECT_NOT_FOUND, SEGMENT_EMPTY, SEGMENT_TOO_LARGE, PRIVILEGED_SENDER_DENIED, PRIVILEGED_AUDIT_FAILED
|
|
1064
|
+
- `GET /v1/email/managed-status`
|
|
1065
|
+
- Contract: Runtime method: sw.email.status. rejects with: VALIDATION_ERROR (project_id and id are required.); PROJECT_NOT_FOUND (Project not found.); NOT_FOUND (Message not found.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, NOT_FOUND
|
|
1066
|
+
- `GET /v1/email/preferences`
|
|
1067
|
+
- Contract: rejects with: INVALID_TOKEN (This preferences link is invalid or expired.); NOT_FOUND (Preferences not found.). error codes: INVALID_TOKEN, NOT_FOUND
|
|
1068
|
+
- `POST /v1/email/preferences`
|
|
1069
|
+
- Contract: rejects with: NOT_FOUND (Preferences not found.); INVALID_TOKEN (This preferences link is invalid or expired.). error codes: NOT_FOUND, INVALID_TOKEN
|
|
1070
|
+
- `GET /v1/email/reputation`
|
|
1071
|
+
- Contract: response fields (partial): state, reason, paused_at, resumed_at, window, hours, bounce_rate, complaint_rate, thresholds, min_sent, min_events. rejects with: VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
1072
|
+
- `POST /v1/email/send`
|
|
1073
|
+
- Contract: Runtime method: sw.email.send. request fields: project_id, to, subject, html, text, from, reply_to, category, subtype, topic, template_key, campaign_key, journey_key, step_key, idempotency_key, in_reply_to, references, app_user_id, attachments. category values: transactional | marketing. response fields: id, message_id, status, duplicate, environment, test_inbox, delivered, status='captured', environment='preview', delivered=false, tracking_id, sender, from, mode, note, mode='platform_managed'. rejects with: RATE_LIMITED (Too many email sends (60 per minute); the limit resets within a minute.); VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (to is required.); VALIDATION_ERROR (subject is required.); VALIDATION_ERROR (html or text body is required.); VALIDATION_ERROR (category must be transactional or marketing.); VALIDATION_ERROR (idempotency_key must be a string.); VALIDATION_ERROR (in_reply_to must be a string.); VALIDATION_ERROR (references must be an array of non-empty strings.); VALIDATION_ERROR (app_user_id must be a non-empty string.); VALIDATION_ERROR (Unknown email preference topic.); EMAIL_TOPIC_REQUIRED (Marketing sends require an email preference topic.); VALIDATION_ERROR (reply_to must be one non-empty email address.); PROJECT_NOT_FOUND (Project not found.); VALIDATION_ERROR (Invalid `from` address; accepted forms are "name@domain.com" and "Display Name <name@domain.com>".); RESERVED_SENDER_DOMAIN (Omit `from` to use the built-in sender. To send from your own address, set up a sender domain at https://somewhere.cloud/docs/sw.email.txt#your-own-sender-domain.); SENDER_DOMAIN_NOT_FOUND (Domain … isn't set up for sending on this project. If the domain was bought through us or connected with our nameservers, sending is configured automatically within a minute, after which the same request can succeed. To add a domain with DNS hosted elsewhere, use POST /v1/email/sender-domains.); SENDER_DOMAIN_NOT_VERIFIED (Domain … isn't verified for sending yet. If the domain was bought through us or connected with our nameservers, this finishes automatically within a few minutes, after which the same request can succeed. To verify a domain with DNS hosted elsewhere, use POST /v1/email/sender-domains/<domain>/verify?project_id=<project>.); SENDER_DOMAIN_SES_NOT_VERIFIED (This sending domain isn't verified for sending yet.). error codes: RATE_LIMITED, VALIDATION_ERROR, EMAIL_TOPIC_REQUIRED, PROJECT_NOT_FOUND, RESERVED_SENDER_DOMAIN, SENDER_DOMAIN_NOT_FOUND, SENDER_DOMAIN_NOT_VERIFIED, SENDER_DOMAIN_SES_NOT_VERIFIED, EMAIL_SEND_FAILED, JOB_ENDED, EMAIL_DELIVERY_UNKNOWN
|
|
1074
|
+
- `GET /v1/email/sender-domains`
|
|
1075
|
+
- Contract: response fields: domains. rejects with: VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
1076
|
+
- `POST /v1/email/sender-domains`
|
|
1077
|
+
- Contract: request fields: project_id, domain. rejects with: VALIDATION_ERROR (project_id and domain are required.); PROJECT_NOT_FOUND (Project not found.); UPGRADE_REQUIRED (Registering a sender domain requires a paid plan.); VALIDATION_ERROR (Invalid domain.); RESERVED_SENDER_DOMAIN (Cannot register platform domains as sender domains; sender domains are domains you own.); SENDER_DOMAIN_REGISTRATION_UNCONFIRMED (Sending domain registration outcome could not be confirmed; GET /v1/email/sender-domains shows whether it was registered.); PROJECT_NOT_FOUND (Project is no longer available for a sending domain.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, UPGRADE_REQUIRED, RESERVED_SENDER_DOMAIN, SENDER_DOMAIN_REGISTRATION_UNCONFIRMED, DOMAIN_REGISTER_FAILED
|
|
1078
|
+
- `DELETE /v1/email/sender-domains/:param`
|
|
1079
|
+
- Contract: response fields: deleted, domain, deleted=true. rejects with: VALIDATION_ERROR (project_id query param is required.); PROJECT_NOT_FOUND (Project not found.); NOT_FOUND (Sender domain not found.); SENDER_DOMAIN_REMOVE_FAILED (… could not be removed right now; nothing changed. The same request can succeed shortly.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, NOT_FOUND, SENDER_DOMAIN_REMOVE_FAILED
|
|
1080
|
+
- `POST /v1/email/sender-domains/:param/verify`
|
|
1081
|
+
- Contract: response fields (partial): action_required. rejects with: VALIDATION_ERROR (project_id query param is required.); PROJECT_NOT_FOUND (Project not found.); NOT_FOUND (Sender domain not found.); SENDER_DOMAIN_DNS_CHECK_UNAVAILABLE (The DNS check for … could not complete. Nothing changed; the same request can succeed shortly.); SENDER_DOMAIN_SES_NOT_VERIFIED (To finish verification, remove this sender domain with DELETE /v1/email/sender-domains/<domain>?project_id=<project>, then add it again with POST /v1/email/sender-domains.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, NOT_FOUND, SENDER_DOMAIN_DNS_CHECK_UNAVAILABLE, SENDER_DOMAIN_SES_NOT_VERIFIED, DOMAIN_VERIFY_FAILED
|
|
1082
|
+
- `GET /v1/email/status`
|
|
1083
|
+
- Contract: response fields (partial): tracking_id, message_id, project_id, origin, source, auth_purpose, current_status, retry_deadline, failure_code, event_counts, events, origin='unknown', source='unknown', auth_purpose=null, to, from, subject, event_type, data, created_at. rejects with: VALIDATION_ERROR (id query param is required.); NOT_FOUND (No delivery events for that id.). error codes: VALIDATION_ERROR, NOT_FOUND
|
|
1084
|
+
- `GET /v1/email/suppression`
|
|
1085
|
+
- Contract: Runtime method: sw.email.checkSuppression. response fields: address, suppressed, status, last_at, occurrences. rejects with: VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (address is required.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
1086
|
+
- `GET /v1/email/test-inbox`
|
|
1087
|
+
- Contract: Runtime method: sw.email.inbox. response fields: address, limit. rejects with: VALIDATION_ERROR (project_id and address are required.); PROJECT_NOT_FOUND (Project not found.); VALIDATION_ERROR (address must belong to this project's test inbox: <anything>@….test.somewhere.site, or an address at a reserved domain such as example.com.); VALIDATION_ERROR (environment must be production, preview or all.); VALIDATION_ERROR (preview_session_id selects preview messages; it cannot be combined with environment=….). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
1088
|
+
|
|
1089
|
+
### /v1/entitlements
|
|
1090
|
+
|
|
1091
|
+
- `GET /v1/entitlements/has`
|
|
1092
|
+
- Contract: response fields: feature, has, plan, limit, limit=null when unavailable. rejects with: VALIDATION_ERROR (feature query parameter is required.); NOT_FOUND (User not found in this project.); AUTH_INVALID_CREDS (Invalid session token; a new sign-in issues a valid one.); VALIDATION_ERROR (project_id is required.); NOT_FOUND (Project not found or you do not have access to it.); VALIDATION_ERROR (user_id query parameter is required when calling with a developer or runtime key.). error codes: VALIDATION_ERROR, NOT_FOUND, AUTH_INVALID_CREDS
|
|
1093
|
+
- `GET /v1/entitlements/me`
|
|
1094
|
+
- Contract: rejects with: NOT_FOUND (User not found in this project.); AUTH_INVALID_CREDS (Invalid session token; a new sign-in issues a valid one.); VALIDATION_ERROR (project_id is required.); NOT_FOUND (Project not found or you do not have access to it.); VALIDATION_ERROR (user_id query parameter is required when calling with a developer or runtime key.). error codes: NOT_FOUND, AUTH_INVALID_CREDS, VALIDATION_ERROR
|
|
1095
|
+
- `GET /v1/entitlements/plans`
|
|
1096
|
+
- Contract: Runtime method: sw.billing.plans. response fields: plans. rejects with: AUTH_INVALID_CREDS (Invalid session token; a new sign-in issues a valid one.); VALIDATION_ERROR (project_id is required.); NOT_FOUND (Project not found or you do not have access to it.). error codes: AUTH_INVALID_CREDS, VALIDATION_ERROR, NOT_FOUND
|
|
1097
|
+
- `POST /v1/entitlements/plans`
|
|
1098
|
+
- Contract: Runtime method: sw.billing.definePlans. rejects with: FORBIDDEN (Defining plans requires a developer or runtime key. End-user sessions cannot change the plan catalog.); VALIDATION_ERROR (Request body must be JSON: { plans: [...] }.); VALIDATION_ERROR (plans must be an array of { slug, name, features }.); AUTH_INVALID_CREDS (Invalid session token; a new sign-in issues a valid one.); VALIDATION_ERROR (project_id is required.); NOT_FOUND (Project not found or you do not have access to it.). error codes: FORBIDDEN, VALIDATION_ERROR, AUTH_INVALID_CREDS, NOT_FOUND
|
|
1099
|
+
|
|
1100
|
+
### /v1/env
|
|
1101
|
+
|
|
1102
|
+
- `GET /v1/env`
|
|
1103
|
+
- Contract: response fields (partial): project_id, requires_deploy, keys, key, scope, visibility, provider, purpose, created_at, requires_deploy=false, requires_deploy=true. rejects with: VALIDATION_ERROR (project_id query param is required.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, HOT_CONFIG_UNAVAILABLE
|
|
1104
|
+
- `POST /v1/env`
|
|
1105
|
+
- Contract: request fields: project_id, key, value, scope, public, provider, purpose. response fields (partial): project_id, key, scope, visibility, provider, purpose, requires_deploy, set, requires_deploy=true, set=true, provider=null when unavailable, purpose=null when unavailable, requires_deploy=false. rejects with: VALIDATION_ERROR (public must be a boolean.); VALIDATION_ERROR (project_id is required (string).); VALIDATION_ERROR (key is required (string).); VALIDATION_ERROR (value is required (string).); VALIDATION_ERROR (scope must be a string.); VALIDATION_ERROR (scope must be one of: 'all', 'dev', 'prod'.); VALIDATION_ERROR (key max 128 characters.); VALIDATION_ERROR ("…" is not a valid environment variable name. Names use letters, digits and underscores, starting with a letter or underscore (…) — for example MY_KEY_2.); ENV_VALUE_TOO_LARGE (… is …; the platform allows … of environment values per project (all names and values together), so this value cannot fit. …); ENV_VALUES_TOO_LARGE (Saving … (…) would bring this project's environment values to … combined for the … environment; the platform allows … of environment values per project (all names and values together). Largest: …. … Deleting unused values also frees space.); ENV_SAVE_CONFLICT (Environment value changed while saving; nothing was saved, and the same request can be repeated.); VALIDATION_ERROR (… must be a short single-line string (max … characters).); VALIDATION_ERROR (… cannot contain a secret value.); PROJECT_NOT_FOUND (Project not found.); PROJECT_EDITOR_REQUIRED (Editor access is required to ….); ENV_VALUES_TOO_LARGE (Saving … would bring this project's environment values to … combined for the … environment; the platform allows …. Largest: …. …); ENV_SCOPE_CONFLICT ("…" already exists with scope '…'. Saving it with scope '…' would replace that value, not add a second one — each name holds a single value. A distinct name per environment (for example …_TEST with scope 'dev' and … with scope 'prod') keeps both; deleting "…" first moves it intentionally.). error codes: VALIDATION_ERROR, ENV_VALUE_TOO_LARGE, ENV_VALUES_TOO_LARGE, ENV_SAVE_CONFLICT, PROJECT_NOT_FOUND, PROJECT_EDITOR_REQUIRED, HOT_CONFIG_UNAVAILABLE, ENV_SCOPE_CONFLICT
|
|
1106
|
+
- `DELETE /v1/env/:param/:param`
|
|
1107
|
+
- Contract: response fields: project_id, key, deleted, requires_deploy, deleted=true, requires_deploy=false, requires_deploy=true. rejects with: NOT_FOUND (Environment variable not found.); PROJECT_NOT_FOUND (Project not found.); PROJECT_EDITOR_REQUIRED (Editor access is required to ….). error codes: NOT_FOUND, PROJECT_NOT_FOUND, PROJECT_EDITOR_REQUIRED, HOT_CONFIG_UNAVAILABLE
|
|
1108
|
+
|
|
1109
|
+
### /v1/error-words
|
|
1110
|
+
|
|
1111
|
+
- `GET /v1/error-words`
|
|
1112
|
+
- Contract: response fields: instructions, start_url, connector, claude_url, chatgpt_url, claude_directory_url, first_command_permission, everything_you_get
|
|
1113
|
+
|
|
1114
|
+
### /v1/errors
|
|
1115
|
+
|
|
1116
|
+
- `GET /v1/errors/recent`
|
|
1117
|
+
- Contract: response fields: errors. rejects with: PROJECT_NOT_FOUND (Project not found.); PROJECT_REQUIRED (Name a project: add ?project_id=<id>. Errors are read one project at a time.). error codes: PROJECT_NOT_FOUND, PROJECT_REQUIRED
|
|
1118
|
+
- `GET /v1/errors/stats`
|
|
1119
|
+
- Contract: response fields: project_id, period. rejects with: PROJECT_NOT_FOUND (Project not found.); PROJECT_REQUIRED (Name a project: add ?project_id=<id>. Errors are read one project at a time.). error codes: PROJECT_NOT_FOUND, PROJECT_REQUIRED
|
|
1120
|
+
|
|
1121
|
+
### /v1/events
|
|
1122
|
+
|
|
1123
|
+
- `GET /v1/events/subscribe`
|
|
1124
|
+
- Contract: rejects with: VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (channel must match [a-zA-Z0-9][a-zA-Z0-9_-:.]{0,127}.); VALIDATION_ERROR (Expected WebSocket upgrade header.); PROJECT_NOT_FOUND (Project not found.); CHANNEL_FORBIDDEN (You are not authorized for this channel.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, CHANNEL_FORBIDDEN
|
|
1125
|
+
- `GET /v1/events/subscribe-user`
|
|
1126
|
+
- Contract: rejects with: UNSUPPORTED_FEATURE (subscribe-user requires a developer smt_ key.); FORBIDDEN (Cannot subscribe to another user's channel.); VALIDATION_ERROR (Expected WebSocket upgrade header.). error codes: UNSUPPORTED_FEATURE, FORBIDDEN, VALIDATION_ERROR
|
|
1127
|
+
|
|
1128
|
+
### /v1/feedback
|
|
1129
|
+
|
|
1130
|
+
- `ALL /v1/feedback`
|
|
1131
|
+
|
|
1132
|
+
### /v1/forwarding
|
|
1133
|
+
|
|
1134
|
+
- `ALL /v1/forwarding/*`
|
|
1135
|
+
- Contract: rejects with: GONE (Forwarding confirmation for the old inbox has ended; forwarding is set on the mailbox.). error codes: GONE
|
|
1136
|
+
|
|
1137
|
+
### /v1/fs
|
|
1138
|
+
|
|
1139
|
+
- `ALL /v1/fs`
|
|
1140
|
+
- Contract: rejects with: VALIDATION_ERROR (Project and path are required. …). error codes: VALIDATION_ERROR
|
|
1141
|
+
- `ALL /v1/fs/:param`
|
|
1142
|
+
- Contract: rejects with: VALIDATION_ERROR (Project and path are required. …). error codes: VALIDATION_ERROR
|
|
1143
|
+
- `GET /v1/fs/:param`
|
|
1144
|
+
- Contract: rejects with: VALIDATION_ERROR (Token is required.); SIGNATURE_INVALID (Signed URL is invalid or expired.); SIGNATURE_INVALID (Token is not a signed download URL.); SIGNATURE_INVALID (Signed URL has incomplete draft authority.); SIGNED_URL_STALE (This signed URL points to a draft that is no longer current.); SIGNED_URL_STALE (This signed URL points to a file that was deleted.); NOT_FOUND (File not found.); SIGNED_URL_STALE (This signed URL points to an older file version.); SIGNED_URL_STALE (This signed URL points to an older file revision.); SIGNED_URL_REVOKED (The person who shared this link can no longer read the file.); VALIDATION_ERROR (Range requests are served from the stored file; a ?w= variant is fetched without a Range header.); NOT_FOUND (File blob not found.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, SIGNATURE_INVALID, SIGNED_URL_STALE, NOT_FOUND, SIGNED_URL_REVOKED, PROJECT_NOT_FOUND
|
|
1145
|
+
- `PUT /v1/fs/:param`
|
|
1146
|
+
- Contract: response fields: path, size_bytes, content_type, version, content_revision, owner_subject_type, owner_subject_id, env, ctx, nonce, succeeded, projectId, err. rejects with: VALIDATION_ERROR (Missing upload token.); VALIDATION_ERROR (Content-Type mismatch — token requires ….); PROJECT_NOT_FOUND (Project not found.); FORBIDDEN (Invalid or expired upload token.); FORBIDDEN (Upload URL has incomplete draft authority.); PAYLOAD_TOO_LARGE (Body exceeds … bytes.); UPLOAD_URL_STALE (This upload link belongs to a file collection on the live app; a new link request issues a current one.); VALIDATION_ERROR (Path is a directory; cannot overwrite with file content.); FORBIDDEN (You do not have access to this file.); UPLOAD_URL_USED (This upload URL has already been used; a new upload URL is required.); STORAGE_METADATA_SYNC_FAILED (Upload publication could not be confirmed; reading the file shows whether this upload was saved.); UPLOAD_OWNER_DELETED (This upload was issued to an account that has since been deleted. Nothing was stored.); UPLOAD_URL_STALE (This upload URL points to a draft that is no longer current.). error codes: VALIDATION_ERROR, FORBIDDEN, PAYLOAD_TOO_LARGE, UPLOAD_URL_STALE, UPLOAD_URL_USED, STORAGE_METADATA_SYNC_FAILED, UPLOAD_OWNER_DELETED, PROJECT_NOT_FOUND
|
|
1147
|
+
- `DELETE /v1/fs/:param/*`
|
|
1148
|
+
- Contract: response fields: deleted, type, path, type='file', type='directory'. rejects with: VALIDATION_ERROR (Cannot delete root directory.); VALIDATION_ERROR (invalid path); NOT_FOUND (Path not found.); FORBIDDEN (You do not have access to this file.); JOB_ENDED (This job has ended, so the file was not deleted.); FORBIDDEN (You do not have access to this directory.); JOB_ENDED (This job has ended, so the directory was not deleted.); VALIDATION_ERROR (Invalid URL path encoding.); PROJECT_NOT_FOUND (Project not found.); VALIDATION_ERROR (Project and path are required. …). error codes: VALIDATION_ERROR, NOT_FOUND, FORBIDDEN, JOB_ENDED, PROJECT_NOT_FOUND
|
|
1149
|
+
- `GET /v1/fs/:param/*`
|
|
1150
|
+
- Contract: response fields: path, content, lines, total_lines, content_type, version, content_revision, content_revision=null when unavailable, type, recursive, depth, entries, name, size_bytes, updated_at, type='directory', recursive=true. rejects with: VALIDATION_ERROR (invalid path); VALIDATION_ERROR (lines must be "START-END" with positive integers (e.g., "50-75").); VALIDATION_ERROR (lines option only works on text files.); VALIDATION_ERROR (Invalid pagination cursor.); VALIDATION_ERROR (Invalid URL path encoding.); PROJECT_NOT_FOUND (Project not found.); NOT_FOUND (No stored file at …. This filesystem is runtime storage (sw.fs). The project's deployed source is read with project_file_read / project_files_list.); VALIDATION_ERROR (Project and path are required. …). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, NOT_FOUND
|
|
1151
|
+
- `PUT /v1/fs/:param/*`
|
|
1152
|
+
- Contract: response fields: path, size_bytes, content_type, version, content_revision. rejects with: VALIDATION_ERROR (Cannot write to root directory.); VALIDATION_ERROR (invalid path); VALIDATION_ERROR (Path is a directory; cannot overwrite with file content.); FORBIDDEN (You do not have access to this file.); FS_VERSION_CONFLICT (If-Match: * failed — … does not exist. Without If-Match, the write creates it.); FS_VERSION_CONFLICT (If-Match version … failed — … does not exist. Without If-Match, the write creates it.); FS_VERSION_CONFLICT (If-Match version … is stale — the current version of … is …. A write whose If-Match is the current version is accepted.); VALIDATION_ERROR (If-Match must be a file version number (as returned by write/stat/versions) or *.); VALIDATION_ERROR (encoding must be "base64" or "utf8".); VALIDATION_ERROR (encoding=base64 requires valid base64 file content.); FS_VERSION_CONFLICT (If-Match version … is stale — … was modified by a concurrent write…. A write whose If-Match is the current version is accepted.); STORAGE_METADATA_SYNC_FAILED (File publication could not be confirmed; reading the file shows whether this write was saved.); VALIDATION_ERROR (Invalid URL path encoding.); PROJECT_NOT_FOUND (Project not found.); VALIDATION_ERROR (Project and path are required. …). error codes: VALIDATION_ERROR, FORBIDDEN, FS_VERSION_CONFLICT, STORAGE_METADATA_SYNC_FAILED, PROJECT_NOT_FOUND
|
|
1153
|
+
- `POST /v1/fs/:param/collections`
|
|
1154
|
+
- Contract: response fields (partial): items, rule, next, has_more, undefined, id, deleted, deleted=true, name. rejects with: FORBIDDEN (File collections are served to the app through its own origin.); FILES_OPERATION_INVALID (Accepted operations are list, get, download, upload, replace, delete, link, and move.); FILE_ACCESS_DENIED (This file collection is not declared for this app.); FILES_CONTRACT_MISMATCH (The app's file collections changed; a reloaded app uses the current ones.); FILES_OPERATION_INVALID (move is available only for files that follow a row.); FILE_CHANGED (This file changed while it was being moved; the same request can be repeated.); RATE_LIMITED (Too many upload requests (120 per minute); the limit resets within a minute.); FILE_TYPE_NOT_ALLOWED (This collection accepts ….); PAYLOAD_TOO_LARGE (This file is larger than the … MB this collection accepts.). error codes: FORBIDDEN, FILES_OPERATION_INVALID, FILE_ACCESS_DENIED, FILES_CONTRACT_MISMATCH, FILE_CHANGED, RATE_LIMITED, FILE_TYPE_NOT_ALLOWED, PAYLOAD_TOO_LARGE
|
|
1155
|
+
- `POST /v1/fs/:param/copy`
|
|
1156
|
+
- Contract: response fields: from, to, content_revision. rejects with: VALIDATION_ERROR (from and to are required (strings).); VALIDATION_ERROR (invalid path); VALIDATION_ERROR (Source and destination are the same path.); NOT_FOUND (Source file … not found.); FORBIDDEN (You do not have access to this file.); VALIDATION_ERROR (Destination … already exists.); NOT_FOUND (Source file not found.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, NOT_FOUND, FORBIDDEN, PROJECT_NOT_FOUND
|
|
1157
|
+
- `POST /v1/fs/:param/diff`
|
|
1158
|
+
- Contract: request fields: path, version. response fields: path, from_version, to_version, changed_lines, diff. rejects with: VALIDATION_ERROR (path is required (string).); VALIDATION_ERROR (version must be an integer.); VALIDATION_ERROR (invalid path); NOT_FOUND (File not found.); VALIDATION_ERROR (Diff only works on text files.); NOT_FOUND (No previous version exists for this file.); NOT_FOUND (Version … not found for ….); NOT_FOUND (File blob missing in storage.); DIFF_TOO_LARGE (Diff is capped at … lines per side.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, NOT_FOUND, DIFF_TOO_LARGE, PROJECT_NOT_FOUND
|
|
1159
|
+
- `POST /v1/fs/:param/glob`
|
|
1160
|
+
- Contract: request fields: pattern, limit. response fields: pattern, total, truncated, matches. rejects with: VALIDATION_ERROR (pattern is required.); VALIDATION_ERROR (pattern is limited to … chars.); VALIDATION_ERROR (invalid glob pattern.); VALIDATION_ERROR (Glob paths are limited to … characters.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
1161
|
+
- `POST /v1/fs/:param/integrity-check`
|
|
1162
|
+
- Contract: request fields: auto_clean, limit, cursor. response fields: scanned, orphan_files, orphan_versions, auto_clean, cleaned, next_cursor. rejects with: PROJECT_NOT_FOUND (Project not found.). error codes: PROJECT_NOT_FOUND
|
|
1163
|
+
- `GET /v1/fs/:param/list-public`
|
|
1164
|
+
- Contract: response fields: files, count, next_cursor. rejects with: PROJECT_NOT_FOUND (Project not found.). error codes: PROJECT_NOT_FOUND
|
|
1165
|
+
- `POST /v1/fs/:param/make-private`
|
|
1166
|
+
- Contract: request fields: path. response fields: path, visibility='private'. rejects with: VALIDATION_ERROR (path is required (string).); VALIDATION_ERROR (invalid path); NOT_FOUND (File not found.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, NOT_FOUND, PROJECT_NOT_FOUND
|
|
1167
|
+
- `POST /v1/fs/:param/move`
|
|
1168
|
+
- Contract: response fields: from, to. rejects with: VALIDATION_ERROR (from and to are required (strings).); VALIDATION_ERROR (invalid path); VALIDATION_ERROR (Cannot move root directory.); VALIDATION_ERROR (Source and destination are the same path.); NOT_FOUND (Source … not found.); FORBIDDEN (You do not have access to this file.); VALIDATION_ERROR (Cannot move a directory into its own subtree.); FORBIDDEN (You do not have access to this directory.); VALIDATION_ERROR (Destination … already exists; { overwrite: true } replaces it.); VALIDATION_ERROR (Destination … is a directory; refusing to overwrite. A directory destination is replaced only after an explicit delete.); JOB_ENDED (This job has ended, so the … was not moved.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, NOT_FOUND, FORBIDDEN, JOB_ENDED, PROJECT_NOT_FOUND
|
|
1169
|
+
- `POST /v1/fs/:param/multipart`
|
|
1170
|
+
- Contract: request fields: size_bytes, part_size, content_type. response fields: upload_id, path, size_bytes, part_size, part_count, parts_url, complete_url, abort_url, expires_at, nonce, projectId. rejects with: VALIDATION_ERROR (size_bytes must be the whole file size in bytes, a positive integer.); VALIDATION_ERROR (content_type mismatch — this upload URL requires ….); PAYLOAD_TOO_LARGE (A file uploads in at most … parts; a larger part_size lowers the part count.); PROJECT_NOT_FOUND (Project not found.); FORBIDDEN (Invalid or expired upload token.); FORBIDDEN (Upload URL has incomplete draft authority.); PAYLOAD_TOO_LARGE (Body exceeds … bytes.); UPLOAD_URL_STALE (This upload link belongs to a file collection on the live app; a new link request issues a current one.); VALIDATION_ERROR (Path is a directory; cannot overwrite with file content.); FORBIDDEN (You do not have access to this file.); UPLOAD_URL_USED (This upload URL has already been used; a new upload URL is required.); UPLOAD_OWNER_DELETED (This upload was issued to an account that has since been deleted. Nothing was stored.); UPLOAD_URL_STALE (This upload URL points to a draft that is no longer current.). error codes: VALIDATION_ERROR, PAYLOAD_TOO_LARGE, FORBIDDEN, UPLOAD_URL_STALE, UPLOAD_URL_USED, UPLOAD_OWNER_DELETED, PROJECT_NOT_FOUND
|
|
1171
|
+
- `POST /v1/fs/:param/owner`
|
|
1172
|
+
- Contract: response fields: path, owner_subject_type, owner_subject_id, owner_subject_type='app_user', owner_subject_type='project_owner'. rejects with: FORBIDDEN (Setting file ownership requires a developer or runtime key.); VALIDATION_ERROR (path is required (string).); VALIDATION_ERROR (owner must be a string or null.); VALIDATION_ERROR (invalid path); FORBIDDEN (File ownership can only be changed from a trusted server context.); NOT_FOUND (File not found.); VALIDATION_ERROR (owner must be an app_user id string, or null to reset.); PROJECT_NOT_FOUND (Project not found.). error codes: FORBIDDEN, VALIDATION_ERROR, NOT_FOUND, PROJECT_NOT_FOUND
|
|
1173
|
+
- `GET /v1/fs/:param/public-url`
|
|
1174
|
+
- Contract: response fields: path, public_url, content_type, size_bytes, visibility, visibility='public'. rejects with: VALIDATION_ERROR (path query param is required.); VALIDATION_ERROR (invalid path); NOT_FOUND (File not found.); FILE_PRIVATE (This file is private. Requesting a public URL no longer makes it public automatically. make_public=true publishes it; a signed URL gives time-limited access without making it world-readable.); FORBIDDEN (Editor access is required to make a private file public.); FORBIDDEN (You do not have access to this file.); NOT_FOUND (Project subdomain missing.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, NOT_FOUND, FILE_PRIVATE, FORBIDDEN, PROJECT_NOT_FOUND
|
|
1175
|
+
- `POST /v1/fs/:param/replace`
|
|
1176
|
+
- Contract: response fields: ok, replacements, path, size_bytes, ok=true. rejects with: VALIDATION_ERROR (path is required (string).); VALIDATION_ERROR (`edits` and top-level find/replace are separate forms; send each find/replace as an item of `edits`.); VALIDATION_ERROR (path, find, and replace are required (strings).); VALIDATION_ERROR (find must be a non-empty string.); VALIDATION_ERROR (invalid path); NOT_FOUND (File not found.); FORBIDDEN (You do not have access to this file.); VALIDATION_ERROR (Replace only works on text files.); NOT_FOUND (File blob not found.); STORAGE_METADATA_SYNC_FAILED (Replacement publication could not be confirmed; reading the file shows whether this replacement was saved.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, NOT_FOUND, FORBIDDEN, STORAGE_METADATA_SYNC_FAILED, PROJECT_NOT_FOUND
|
|
1177
|
+
- `POST /v1/fs/:param/restore`
|
|
1178
|
+
- Contract: response fields: path, restored_version, current_version, content_revision. rejects with: VALIDATION_ERROR (path (string) and version (integer) are required.); VALIDATION_ERROR (invalid path); NOT_FOUND (File not found.); FORBIDDEN (You do not have access to this file.); NOT_FOUND (Version … not found for ….); NOT_FOUND (Archived version not found.); STORAGE_METADATA_SYNC_FAILED (Restore publication could not be confirmed; reading the file shows whether this restore was saved.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, NOT_FOUND, FORBIDDEN, STORAGE_METADATA_SYNC_FAILED, PROJECT_NOT_FOUND
|
|
1179
|
+
- `POST /v1/fs/:param/search`
|
|
1180
|
+
- Contract: request fields: path, query, limit, max_files. response fields: query, mode, total_matches, truncated, results, mode='fts5', path, files_scanned, mode='scan'. rejects with: VALIDATION_ERROR (query is required.); VALIDATION_ERROR (query is limited to 500 chars.); VALIDATION_ERROR (path must be a string.); VALIDATION_ERROR (invalid path); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
1181
|
+
- `POST /v1/fs/:param/sign`
|
|
1182
|
+
- Contract: request fields: path, expires_in, expiresIn, as_user, asUser. response fields: url, token, path, expires_at, expires_in. rejects with: NOT_FOUND (Project not found.); FORBIDDEN (Editor access is required.); VALIDATION_ERROR (path is required (string).); VALIDATION_ERROR (expires_in must be a number.); VALIDATION_ERROR (as_user must be a string.); VALIDATION_ERROR (invalid path); NOT_FOUND (File not found.); FORBIDDEN (This file is owned by a different user.). error codes: NOT_FOUND, FORBIDDEN, VALIDATION_ERROR
|
|
1183
|
+
- `GET /v1/fs/:param/stat/*`
|
|
1184
|
+
- Contract: rejects with: VALIDATION_ERROR (invalid path); PROJECT_NOT_FOUND (Project not found.); NOT_FOUND (No stored file at …. This filesystem is runtime storage (sw.fs). The project's deployed source is read with project_file_read / project_files_list.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, NOT_FOUND
|
|
1185
|
+
- `GET /v1/fs/:param/versions/*`
|
|
1186
|
+
- Contract: response fields: path, current_version, versions, version, size_bytes, content_type, created_at. rejects with: VALIDATION_ERROR (invalid path); NOT_FOUND (File not found.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, NOT_FOUND, PROJECT_NOT_FOUND
|
|
1187
|
+
- `ALL /v1/fs/*`
|
|
1188
|
+
- Contract: rejects with: VALIDATION_ERROR (Project and path are required. …). error codes: VALIDATION_ERROR
|
|
1189
|
+
- `DELETE /v1/fs/multipart/:param`
|
|
1190
|
+
- Contract: response fields: aborted, path, aborted=true. rejects with: UPLOAD_SESSION_NOT_FOUND (This upload session does not exist or has expired; a new upload URL starts a new upload.); UPLOAD_COMPLETING (This upload is already being completed or cancelled by another request; its outcome comes from that request.). error codes: UPLOAD_SESSION_NOT_FOUND, UPLOAD_COMPLETING
|
|
1191
|
+
- `POST /v1/fs/multipart/:param/complete`
|
|
1192
|
+
- Contract: response fields: path, size_bytes, content_type, version, content_revision, owner_subject_type, owner_subject_id, env, ctx, r2Key, slot. rejects with: UPLOAD_INCOMPLETE (Received … of … parts; complete succeeds once the missing parts are uploaded.); FS_VERSION_CONFLICT (The file changed while this upload was in progress; this upload was cancelled, and a new upload can succeed.); UPLOAD_ASSEMBLY_FAILED (The uploaded parts could not be assembled into one file. Nothing was saved; a new upload URL starts a new upload.); UPLOAD_SIZE_MISMATCH (The assembled file is … bytes, not the … bytes declared at start. Nothing was saved; a new upload can succeed.); PROJECT_NOT_FOUND (Project not found.); UPLOAD_SESSION_NOT_FOUND (This upload session does not exist or has expired; a new upload URL starts a new upload.); UPLOAD_COMPLETING (This upload is already being completed or cancelled by another request; its outcome comes from that request.); UPLOAD_URL_STALE (This upload URL points to a draft that is no longer current.); UPLOAD_OWNER_DELETED (This upload was issued to an account that has since been deleted. Nothing was stored.); UPLOAD_URL_STALE (This upload link belongs to a file collection on the live app; a new link request issues a current one.); VALIDATION_ERROR (Path is a directory; cannot overwrite with file content.); FORBIDDEN (You do not have access to this file.); STORAGE_METADATA_SYNC_FAILED (Upload publication could not be confirmed; reading the file shows whether this upload was saved.). error codes: UPLOAD_INCOMPLETE, FS_VERSION_CONFLICT, UPLOAD_ASSEMBLY_FAILED, UPLOAD_SIZE_MISMATCH, UPLOAD_SESSION_NOT_FOUND, UPLOAD_COMPLETING, UPLOAD_URL_STALE, UPLOAD_OWNER_DELETED, VALIDATION_ERROR, FORBIDDEN, STORAGE_METADATA_SYNC_FAILED, PROJECT_NOT_FOUND
|
|
1193
|
+
- `PUT /v1/fs/multipart/:param/parts/:param`
|
|
1194
|
+
- Contract: response fields: part_number, size_bytes, part_count. rejects with: VALIDATION_ERROR (Part number must be between 1 and ….); PART_SIZE_MISMATCH (Part … must be exactly … bytes; this request carries ….); PROJECT_NOT_FOUND (Project not found.); UPLOAD_SESSION_NOT_FOUND (This upload session does not exist or has expired; a new upload URL starts a new upload.); UPLOAD_COMPLETING (This upload is already being completed or cancelled by another request; its outcome comes from that request.); UPLOAD_OWNER_DELETED (This upload was issued to an account that has since been deleted. Nothing was stored.). error codes: VALIDATION_ERROR, PART_SIZE_MISMATCH, UPLOAD_SESSION_NOT_FOUND, UPLOAD_COMPLETING, UPLOAD_OWNER_DELETED, PROJECT_NOT_FOUND
|
|
1195
|
+
- `POST /v1/fs/upload-url`
|
|
1196
|
+
- Contract: request fields: project_id, path, max_size, content_type, expires_in, public, as_user. response fields: url, multipart_url, path, expires_at, max_size, content_type, public, owner_subject_type, owner_subject_id. rejects with: RATE_LIMITED (Too many upload URL requests (120 per minute); the limit resets within a minute.); VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (path is required.); VALIDATION_ERROR (invalid path); PROJECT_NOT_FOUND (Project not found.); IDENTITY_CLAIM_NOT_ALLOWED (Upload ownership is derived by the deployed runtime and cannot be supplied by a caller.); AUTH_REQUIRED (A verified app-user subject is required.). error codes: RATE_LIMITED, VALIDATION_ERROR, PROJECT_NOT_FOUND, IDENTITY_CLAIM_NOT_ALLOWED, AUTH_REQUIRED
|
|
1197
|
+
|
|
1198
|
+
### /v1/fs-signed
|
|
1199
|
+
|
|
1200
|
+
- `GET /v1/fs-signed/:param`
|
|
1201
|
+
- Contract: rejects with: VALIDATION_ERROR (Token is required.); SIGNATURE_INVALID (Signed URL is invalid or expired.); SIGNATURE_INVALID (Token is not a signed download URL.); SIGNATURE_INVALID (Signed URL has incomplete draft authority.); SIGNED_URL_STALE (This signed URL points to a draft that is no longer current.); SIGNED_URL_STALE (This signed URL points to a file that was deleted.); NOT_FOUND (File not found.); SIGNED_URL_STALE (This signed URL points to an older file version.); SIGNED_URL_STALE (This signed URL points to an older file revision.); SIGNED_URL_REVOKED (The person who shared this link can no longer read the file.); VALIDATION_ERROR (Range requests are served from the stored file; a ?w= variant is fetched without a Range header.); NOT_FOUND (File blob not found.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, SIGNATURE_INVALID, SIGNED_URL_STALE, NOT_FOUND, SIGNED_URL_REVOKED, PROJECT_NOT_FOUND
|
|
1202
|
+
- `POST /v1/fs-signed/:param/sign`
|
|
1203
|
+
- Contract: request fields: path, expires_in, expiresIn, as_user, asUser. response fields: url, token, path, expires_at, expires_in. rejects with: NOT_FOUND (Project not found.); FORBIDDEN (Editor access is required.); VALIDATION_ERROR (path is required (string).); VALIDATION_ERROR (expires_in must be a number.); VALIDATION_ERROR (as_user must be a string.); VALIDATION_ERROR (invalid path); NOT_FOUND (File not found.); FORBIDDEN (This file is owned by a different user.). error codes: NOT_FOUND, FORBIDDEN, VALIDATION_ERROR
|
|
1204
|
+
|
|
1205
|
+
### /v1/github
|
|
1206
|
+
|
|
1207
|
+
- `POST /v1/github`
|
|
1208
|
+
- Contract: response fields: pong, pong=true, revoked, revoked=true, skipped, reason, skipped=true, reason='branch deletion', reason='duplicate delivery (already processed)', reason='repository is not connected to a project', accepted. rejects with: UNSUPPORTED_FEATURE (GitHub App webhooks are not configured.); UNAUTHORIZED (Invalid webhook signature.); VALIDATION_ERROR (Body is not valid JSON.); VALIDATION_ERROR (Authorization event identity is invalid.); VALIDATION_ERROR (Push is missing installation or repository identity.). error codes: UNSUPPORTED_FEATURE, UNAUTHORIZED, VALIDATION_ERROR
|
|
1209
|
+
- `POST /v1/github/:param`
|
|
1210
|
+
- Contract: response fields: pong, pong=true, skipped, reason, skipped=true, reason='branch deletion', reason='duplicate delivery (already processed)', accepted, commit, accepted=true. rejects with: UNAUTHORIZED (Invalid webhook signature.); GITHUB_REAUTH_REQUIRED (Automatic publishing is not approved; reconnecting GitHub approves it.); VALIDATION_ERROR (Body is not valid JSON.). error codes: UNAUTHORIZED, GITHUB_REAUTH_REQUIRED, VALIDATION_ERROR
|
|
1211
|
+
- `POST /v1/github/analyze`
|
|
1212
|
+
- Contract: request fields: repo. rejects with: VALIDATION_ERROR (repo required (e.g. "owner/name")); UPSTREAM_ERROR (GitHub repository access could not be confirmed; a later identical request can succeed.); VALIDATION_ERROR (GitHub access required; it comes from a GitHub connection.); VALIDATION_ERROR (repo must be "owner/name"). error codes: VALIDATION_ERROR, UPSTREAM_ERROR
|
|
1213
|
+
- `GET /v1/github/app/install`
|
|
1214
|
+
- Contract: response fields: install_url. rejects with: UNSUPPORTED_FEATURE (GitHub App connect is not configured on this worker.). error codes: UNSUPPORTED_FEATURE
|
|
1215
|
+
- `GET /v1/github/app/installations`
|
|
1216
|
+
- Contract: response fields: app_configured, installations
|
|
1217
|
+
- `GET /v1/github/app/repos`
|
|
1218
|
+
- Contract: rejects with: UNSUPPORTED_FEATURE (GitHub App connect is not configured on this worker.); VALIDATION_ERROR (installation_id is required.); NOT_FOUND (Unknown GitHub App installation.); UPSTREAM_ERROR (Could not list repositories from GitHub.). error codes: UNSUPPORTED_FEATURE, VALIDATION_ERROR, NOT_FOUND, UPSTREAM_ERROR
|
|
1219
|
+
- `POST /v1/github/connect`
|
|
1220
|
+
- Contract: request fields: project_id, repo, branch, root_dir, github_token, installation_id, deploy_head, overwrite. response fields: initial_deploy, status, commit_sha, commit_message, message, status='deploying', project_id, repo, branch, root_dir, webhook_url, webhook_secret, hook_installed, has_token, via_app, manual_setup. rejects with: AUTHORITY_UNAVAILABLE | GITHUB_REAUTH_REQUIRED (Connecting GitHub requires a fresh sign-in.); VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (repo must be "owner/name".); NOT_FOUND (Project not found.); GITHUB_REAUTH_REQUIRED (Automatic publishing needs the project owner's approval, given by reconnecting GitHub.); VALIDATION_ERROR (installation_id must be a positive integer.); VALIDATION_ERROR (Unknown GitHub App installation; reconnecting GitHub registers a current one.); GITHUB_AUTH_REQUIRED (Project editors connect with their own GitHub App installation or their own GitHub token.); GITHUB_REAUTH_REQUIRED (GitHub access to this repository was not granted; a reconnection with your own account and a repository it can access is accepted.); GITHUB_REAUTH_REQUIRED (GitHub repository access could not be verified; public repositories, or repositories reached through a connected installation or token, are accepted.); PROJECT_NOT_FOUND (Project is no longer available for a GitHub connection.); GITHUB_CONNECTION_UNCONFIRMED (GitHub connection outcome could not be confirmed; GET /v1/github/connection shows the existing connection.); GITHUB_CONNECTION_CHANGED (GitHub connection changed before the initial deploy; GET /v1/github/connection shows the current connection.). error codes: AUTHORITY_UNAVAILABLE, GITHUB_REAUTH_REQUIRED, VALIDATION_ERROR, NOT_FOUND, GITHUB_AUTH_REQUIRED, PROJECT_NOT_FOUND, GITHUB_CONNECTION_UNCONFIRMED, GITHUB_CONNECTION_CHANGED, GITHUB_HEAD_FETCH_FAILED. behavior: Use a developer credential to connect a GitHub repository.
|
|
1221
|
+
- `DELETE /v1/github/connection`
|
|
1222
|
+
- Contract: response fields: disconnected, disconnected=true. rejects with: VALIDATION_ERROR (project_id is required.); NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, NOT_FOUND
|
|
1223
|
+
- `GET /v1/github/connection`
|
|
1224
|
+
- Contract: response fields: connected, connected=false, project_id, repo, branch, root_dir, webhook_url, webhook_secret, hook_installed, has_token, via_app, last_event_at, last_commit_sha, last_commit_message, ownership_suspended, last_status, last_error, synced_release_id, connected=true. rejects with: VALIDATION_ERROR (project_id is required.); NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, NOT_FOUND
|
|
1225
|
+
- `GET /v1/github/repos`
|
|
1226
|
+
- Contract: rejects with: VALIDATION_ERROR (installation_id is invalid.); UPSTREAM_ERROR (GitHub repository access could not be confirmed; a later identical request can succeed.); VALIDATION_ERROR (GitHub access required); BAD_GITHUB_TOKEN (GitHub rejected this access token.); UPSTREAM_ERROR (GitHub API error); UPSTREAM_ERROR (Failed to fetch repos). error codes: VALIDATION_ERROR, UPSTREAM_ERROR, BAD_GITHUB_TOKEN
|
|
1227
|
+
- `POST /v1/github/sync`
|
|
1228
|
+
- Contract: request fields: project_id, overwrite. response fields: status, commit_sha, commit_message, overwrite, message, status='deploying'. rejects with: VALIDATION_ERROR (project_id is required.); NOT_FOUND (Project not found.); NOT_FOUND (This project is not connected to GitHub.); FORBIDDEN (Only the person who connected this repository can publish from it; reconnecting GitHub with another account makes that account the publisher.); GITHUB_REAUTH_REQUIRED (Publishing from it requires a current GitHub connection; reconnecting GitHub renews it.). error codes: VALIDATION_ERROR, NOT_FOUND, FORBIDDEN, GITHUB_REAUTH_REQUIRED, GITHUB_HEAD_FETCH_FAILED
|
|
1229
|
+
|
|
1230
|
+
### /v1/github-oauth
|
|
1231
|
+
|
|
1232
|
+
- `POST /v1/github-oauth/anonymous-create`
|
|
1233
|
+
- Contract: response fields: user, email, is_anonymous, expires_at, accessToken, is_anonymous=true. rejects with: RATE_LIMITED (Too many anonymous accounts from this IP; signing in is unaffected, and a later request can succeed.); RATE_LIMITED (Anonymous account creation is temporarily busy; a later request can succeed.). error codes: RATE_LIMITED
|
|
1234
|
+
- `GET /v1/github-oauth/callback`
|
|
1235
|
+
- Contract: rejects with: VALIDATION_ERROR (Missing state parameter.); AUTHORITY_UNAVAILABLE (Sign-in could not be verified; a new sign-in starts a fresh attempt.); AUTH_INVALID_CREDS (Invalid or expired OAuth state; a new sign-in starts a fresh attempt.); VALIDATION_ERROR (Sign-in callback host mismatch.); VALIDATION_ERROR (Missing code parameter.). error codes: VALIDATION_ERROR, AUTHORITY_UNAVAILABLE, AUTH_INVALID_CREDS
|
|
1236
|
+
- `GET /v1/github-oauth/check-username`
|
|
1237
|
+
- Contract: response fields: available, username, available=false, reason='invalid', reason='reserved', reason, available=true
|
|
1238
|
+
- `POST /v1/github-oauth/claim`
|
|
1239
|
+
- `GET /v1/github-oauth/cli`
|
|
1240
|
+
- Contract: rejects with: VALIDATION_ERROR (Unsupported sign-in host.); UNSUPPORTED_FEATURE (Google OAuth is not configured (missing GOOGLE_CLIENT_ID).). error codes: VALIDATION_ERROR, UNSUPPORTED_FEATURE
|
|
1241
|
+
- `GET /v1/github-oauth/connect`
|
|
1242
|
+
- `POST /v1/github-oauth/platform-delete-account`
|
|
1243
|
+
- Contract: request fields: code. response fields: deleted, deleted=true. rejects with: AUTH_INVALID_CREDS (Missing platform auth.); AUTH_INVALID_CREDS (Invalid token.); VALIDATION_ERROR (code is required.); INVALID_CODE (That code is wrong, has expired, or was already used. Ask for a new one.); DELETE_INCOMPLETE (Your projects could not be fully removed, so nothing was deleted; a later identical request can succeed.); DELETE_INCOMPLETE (A custom domain could not be released, so the account was not deleted; a later identical request can succeed.); DELETE_INCOMPLETE (Your subscription could not be cancelled, so the account was not deleted; a later identical request can succeed.). error codes: AUTH_INVALID_CREDS, VALIDATION_ERROR, INVALID_CODE, DELETE_INCOMPLETE
|
|
1244
|
+
- `POST /v1/github-oauth/platform-forgot`
|
|
1245
|
+
- Contract: request fields: email. response fields: sent, message, sent=true, message='If that email is on file, a reset link is on its way.'. rejects with: RATE_LIMITED (Too many reset requests from this IP; a later request can succeed.); VALIDATION_ERROR (email is required.). error codes: RATE_LIMITED, VALIDATION_ERROR
|
|
1246
|
+
- `GET /v1/github-oauth/platform-github`
|
|
1247
|
+
- Contract: rejects with: VALIDATION_ERROR (Unsupported sign-in host.); UNSUPPORTED_FEATURE (GitHub sign-in is not configured on this platform (missing GITHUB_CLIENT_ID secret).). error codes: VALIDATION_ERROR, UNSUPPORTED_FEATURE
|
|
1248
|
+
- `GET /v1/github-oauth/platform-google`
|
|
1249
|
+
- Contract: rejects with: VALIDATION_ERROR (Unsupported sign-in host.); UNSUPPORTED_FEATURE (Google OAuth is not configured on this platform (missing GOOGLE_CLIENT_ID secret).). error codes: VALIDATION_ERROR, UNSUPPORTED_FEATURE
|
|
1250
|
+
- `GET /v1/github-oauth/platform-google/callback`
|
|
1251
|
+
- Contract: rejects with: VALIDATION_ERROR (Missing code or state parameter.); AUTHORITY_UNAVAILABLE (Sign-in could not be verified; a new sign-in starts a fresh attempt.); AUTH_INVALID_CREDS (Invalid or expired OAuth state; a new sign-in starts a fresh attempt.); VALIDATION_ERROR (Sign-in callback host mismatch.). error codes: VALIDATION_ERROR, AUTHORITY_UNAVAILABLE, AUTH_INVALID_CREDS
|
|
1252
|
+
- `GET /v1/github-oauth/platform-google/client-id`
|
|
1253
|
+
- Contract: response fields: client_id. rejects with: UNSUPPORTED_FEATURE (Google sign-in is not configured on this platform (missing GOOGLE_CLIENT_ID).). error codes: UNSUPPORTED_FEATURE
|
|
1254
|
+
- `POST /v1/github-oauth/platform-google/onetap`
|
|
1255
|
+
- Contract: request fields: credential. response fields: user, email, name, is_new_user, name=null when unavailable, second_step_required, methods, expires_in, complete_url, second_step_required=true. rejects with: RATE_LIMITED (Too many sign-in attempts from this IP; a later request can succeed.); UNSUPPORTED_FEATURE (Google sign-in is not configured on this platform (missing GOOGLE_CLIENT_ID).); GOOGLE_CREDENTIAL_INVALID (Sign-in could not be verified; a new sign-in starts a fresh attempt.). error codes: RATE_LIMITED, UNSUPPORTED_FEATURE, GOOGLE_CREDENTIAL_INVALID
|
|
1256
|
+
- `POST /v1/github-oauth/platform-login`
|
|
1257
|
+
- Contract: request fields: email, password, turnstile_token. response fields: user, email, name, second_step_required, methods, expires_in, complete_url, second_step_required=true. rejects with: RATE_LIMITED (Too many login attempts from this IP; a later request can succeed.); VALIDATION_ERROR (email and password are required.); AUTH_INVALID_CREDS (Captcha verification failed; a page refresh issues a new captcha.); VALIDATION_ERROR (turnstile_token is required.); AUTH_INVALID_CREDS (Wrong email or password.). error codes: RATE_LIMITED, VALIDATION_ERROR, AUTH_INVALID_CREDS
|
|
1258
|
+
- `POST /v1/github-oauth/platform-logout`
|
|
1259
|
+
- Contract: request fields: all_devices. response fields: logged_out, logged_out=true
|
|
1260
|
+
- `POST /v1/github-oauth/platform-magic-link`
|
|
1261
|
+
- Contract: request fields: email, turnstile_token, redirect, arrival. response fields: sent, email, sent=true. rejects with: VALIDATION_ERROR (A valid email is required.); AUTH_INVALID_CREDS (Captcha verification failed; a page refresh issues a new captcha.); VALIDATION_ERROR (turnstile_token is required.); RATE_LIMITED (Too many sign-in link requests from this network; a later request can succeed.); RATE_LIMITED (Too many sign-in links requested for this email; the limit resets in …s.); RATE_LIMITED (This fixture project has used its sign-in links for today.). error codes: VALIDATION_ERROR, AUTH_INVALID_CREDS, RATE_LIMITED
|
|
1262
|
+
- `GET /v1/github-oauth/platform-magic-link/consume`
|
|
1263
|
+
- `POST /v1/github-oauth/platform-magic-link/consume`
|
|
1264
|
+
- Contract: rejects with: FORBIDDEN (This sign-in must be confirmed from the sign-in page.); FORBIDDEN (This sign-in could not be verified; the link in the email can be opened again.). error codes: FORBIDDEN
|
|
1265
|
+
- `GET /v1/github-oauth/platform-me`
|
|
1266
|
+
- Contract: response fields: signed_in, undefined, helper, email_signin_handoff, subjectId, user, id, signup_policy_versions, current_policies, email, name, username, created_at, last_login_at, onboarding_complete, email_verified, tech_tier, effective_tier, trial, temporary_expires_at, is_admin, beta_approved, beta_request, beta_requested_at, signup_source, welcome_dismissed_at, onboarding_dismissed_at, auth_methods, password, google, github, stats, api_keys, projects, projects_pending_deletion, welcome_dismissed_at=null when unavailable, onboarding_dismissed_at=null when unavailable. rejects with: AUTH_INVALID_CREDS (Missing platform auth.); AUTH_INVALID_CREDS (Invalid or expired platform token.); AUTH_INVALID_CREDS (User not found.); AUTHORITY_UNAVAILABLE (Your account authority could not be verified; nothing ran, and the same request can be repeated.). error codes: AUTH_INVALID_CREDS, AUTHORITY_UNAVAILABLE
|
|
1267
|
+
- `PATCH /v1/github-oauth/platform-me`
|
|
1268
|
+
- Contract: request fields: name, dismiss_welcome, dismiss_onboarding, ai_tools, pinned_apps. response fields: updated, updated=true. rejects with: AUTH_INVALID_CREDS (Missing platform auth.); AUTH_INVALID_CREDS (Invalid or expired platform token.); VALIDATION_ERROR (ai_tools must be a list of up to … of: ….); VALIDATION_ERROR (pinned_apps must be a list of up to 20 app ids.); VALIDATION_ERROR (No valid fields to update.). error codes: AUTH_INVALID_CREDS, VALIDATION_ERROR
|
|
1269
|
+
- `POST /v1/github-oauth/platform-mint-key`
|
|
1270
|
+
- Contract: request fields: name. response fields: id, prefix, scopes. rejects with: AUTH_INVALID_CREDS (Missing platform auth.); AUTHORITY_UNAVAILABLE (Your account authority could not be verified; nothing was created, and the same request can be repeated.); AUTH_INVALID_CREDS (Invalid or expired platform token.). error codes: AUTH_INVALID_CREDS, AUTHORITY_UNAVAILABLE
|
|
1271
|
+
- `POST /v1/github-oauth/platform-onboarding-complete`
|
|
1272
|
+
- Contract: response fields: onboarding_complete, onboarding_complete=true. rejects with: AUTH_INVALID_CREDS (Missing platform auth.); AUTH_INVALID_CREDS (Invalid or expired platform token.). error codes: AUTH_INVALID_CREDS
|
|
1273
|
+
- `POST /v1/github-oauth/platform-refresh`
|
|
1274
|
+
- Contract: response fields: refreshed, refreshed=true. rejects with: AUTH_INVALID_CREDS (Missing platform refresh cookie.); AUTH_INVALID_CREDS (Refresh token is invalid or expired; a new sign-in is required.); AUTH_INVALID_CREDS (Your session was ended for security; a new sign-in is required.); AUTH_INVALID_CREDS (Refresh token is invalid or revoked; a new sign-in is required.). error codes: AUTH_INVALID_CREDS
|
|
1275
|
+
- `POST /v1/github-oauth/platform-request-delete`
|
|
1276
|
+
- Contract: response fields: code_sent, expires_in_seconds, code_sent=true. rejects with: AUTH_INVALID_CREDS (Missing platform auth.); AUTH_INVALID_CREDS (Invalid token.); AUTH_INVALID_CREDS (User not found.); RATE_LIMITED (This fixture project has used its captured codes for today.); EMAIL_SEND_FAILED (We couldn't send the code just now. Try again in a minute.). error codes: AUTH_INVALID_CREDS, RATE_LIMITED, EMAIL_SEND_FAILED
|
|
1277
|
+
- `POST /v1/github-oauth/platform-resend-verification`
|
|
1278
|
+
- Contract: response fields: sent, already_verified, email, sent=false. rejects with: AUTH_INVALID_CREDS (Missing platform auth.); AUTH_INVALID_CREDS (Invalid or expired platform token.); AUTH_INVALID_CREDS (Account not found.); RATE_LIMITED (Too many verification emails; the limit resets in …s.); FORBIDDEN (Verification requests are made from the dashboard.); AUTHORITY_UNAVAILABLE | AUTH_INVALID_CREDS (Could not verify your session; the same request can be repeated.); AUTHORITY_UNAVAILABLE (Your account authority could not be verified; nothing ran, and the same request can be repeated.). error codes: AUTH_INVALID_CREDS, RATE_LIMITED, FORBIDDEN, AUTHORITY_UNAVAILABLE
|
|
1279
|
+
- `POST /v1/github-oauth/platform-set-password`
|
|
1280
|
+
- Contract: response fields: user, email, name, second_step_required, methods, expires_in, complete_url, second_step_required=true. rejects with: VALIDATION_ERROR (Request body must be valid JSON.); VALIDATION_ERROR (This link is incomplete. Open it again from the email, or ask for a new one on the sign-in page.); VALIDATION_ERROR (Choose a password of at least 8 characters.); AUTH_INVALID_CREDS (This link has expired or was already used. Ask for a new one on the sign-in page under "Forgot your password?".); AUTH_INVALID_CREDS (The account this link was for no longer exists.). error codes: VALIDATION_ERROR, AUTH_INVALID_CREDS
|
|
1281
|
+
- `POST /v1/github-oauth/platform-signup`
|
|
1282
|
+
- Contract: request fields: email, password, name, claim_anonymous. response fields: use_magic_link, signup_url, message, use_magic_link=true, message='A sign-in link is sent to the account email. A password can be set once the email is verified.'. rejects with: CLAIM_SESSION_UNAVAILABLE (Could not verify the guest session. Your work is unchanged, and the same request can be repeated.); ANONYMOUS_CLAIM_REQUIRED (This save link needs the original guest session, which is in the browser where the project was built.); FORBIDDEN (This account claim starts from the dashboard.); AUTHORITY_UNAVAILABLE (Could not verify the guest session; the same request can be repeated.); AUTH_INVALID_CREDS (The original guest session is no longer current.); VALIDATION_ERROR (A valid email is required.); VALIDATION_ERROR (Choose a password of at least 8 characters.); RATE_LIMITED (Too many verification emails; the limit resets in …s.). error codes: CLAIM_SESSION_UNAVAILABLE, ANONYMOUS_CLAIM_REQUIRED, FORBIDDEN, AUTHORITY_UNAVAILABLE, AUTH_INVALID_CREDS, VALIDATION_ERROR, RATE_LIMITED
|
|
1283
|
+
- `GET /v1/github-oauth/platform-turnstile-sitekey`
|
|
1284
|
+
- Contract: response fields: sitekey, enforced. rejects with: CONFIG_ERROR (Turnstile is not configured.). error codes: CONFIG_ERROR
|
|
1285
|
+
- `POST /v1/github-oauth/platform-username`
|
|
1286
|
+
- Contract: request fields: username. response fields: username, profile_url. rejects with: AUTH_INVALID_CREDS (Missing platform auth.); AUTH_INVALID_CREDS (Invalid or expired platform token.); VALIDATION_ERROR (Username must be 3-40 lowercase letters, numbers, and hyphens.); VALIDATION_ERROR (This username is reserved.); VALIDATION_ERROR (Username is already taken.). error codes: AUTH_INVALID_CREDS, VALIDATION_ERROR
|
|
1287
|
+
- `GET /v1/github-oauth/pow/challenge`
|
|
1288
|
+
- `POST /v1/github-oauth/temp-claim`
|
|
1289
|
+
- Contract: rejects with: AUTH_INVALID_CREDS (User not found.); TEMP_CLAIM_REQUIRES_ACCOUNT (Claiming a temporary deploy requires a signed-in full account.); VALIDATION_ERROR (token is required.); VALIDATION_ERROR (Choose new_projects or all_projects for agent_access.); TEMP_AGENT_CONSENT_ORIGIN (Connect the agent from the Somewhere claim page.); AUTH_INVALID_CREDS (Missing platform auth.); AUTHORITY_UNAVAILABLE | AUTH_INVALID_CREDS (Could not verify the current session; a new sign-in is accepted.). error codes: AUTH_INVALID_CREDS, TEMP_CLAIM_REQUIRES_ACCOUNT, VALIDATION_ERROR, TEMP_AGENT_CONSENT_ORIGIN, AUTHORITY_UNAVAILABLE
|
|
1290
|
+
- `POST /v1/github-oauth/temp-create`
|
|
1291
|
+
- `POST /v1/github-oauth/upgrade-anonymous`
|
|
1292
|
+
- Contract: request fields: email, password, name. rejects with: AUTH_INVALID_CREDS (Missing platform auth.); AUTH_INVALID_CREDS (Invalid or expired platform token.); AUTH_INVALID_CREDS (User not found.); VALIDATION_ERROR (Account is already a regular account.); FORBIDDEN (This account claim starts from the dashboard.); AUTHORITY_UNAVAILABLE (Could not verify the guest session; the same request can be repeated.); AUTH_INVALID_CREDS (The original guest session is no longer current.); VALIDATION_ERROR (A valid email is required.); VALIDATION_ERROR (Choose a password of at least 8 characters.); RATE_LIMITED (Too many verification emails; the limit resets in …s.). error codes: AUTH_INVALID_CREDS, VALIDATION_ERROR, FORBIDDEN, AUTHORITY_UNAVAILABLE, RATE_LIMITED
|
|
1293
|
+
|
|
1294
|
+
### /v1/github-webhook
|
|
1295
|
+
|
|
1296
|
+
- `POST /v1/github-webhook`
|
|
1297
|
+
- Contract: response fields: pong, pong=true, revoked, revoked=true, skipped, reason, skipped=true, reason='branch deletion', reason='duplicate delivery (already processed)', reason='repository is not connected to a project', accepted. rejects with: UNSUPPORTED_FEATURE (GitHub App webhooks are not configured.); UNAUTHORIZED (Invalid webhook signature.); VALIDATION_ERROR (Body is not valid JSON.); VALIDATION_ERROR (Authorization event identity is invalid.); VALIDATION_ERROR (Push is missing installation or repository identity.). error codes: UNSUPPORTED_FEATURE, UNAUTHORIZED, VALIDATION_ERROR
|
|
1298
|
+
- `POST /v1/github-webhook/:param`
|
|
1299
|
+
- Contract: response fields: pong, pong=true, skipped, reason, skipped=true, reason='branch deletion', reason='duplicate delivery (already processed)', accepted, commit, accepted=true. rejects with: UNAUTHORIZED (Invalid webhook signature.); GITHUB_REAUTH_REQUIRED (Automatic publishing is not approved; reconnecting GitHub approves it.); VALIDATION_ERROR (Body is not valid JSON.). error codes: UNAUTHORIZED, GITHUB_REAUTH_REQUIRED, VALIDATION_ERROR
|
|
1300
|
+
- `GET /v1/github-webhook/app/install`
|
|
1301
|
+
- Contract: response fields: install_url. rejects with: UNSUPPORTED_FEATURE (GitHub App connect is not configured on this worker.). error codes: UNSUPPORTED_FEATURE
|
|
1302
|
+
- `GET /v1/github-webhook/app/installations`
|
|
1303
|
+
- Contract: response fields: app_configured, installations
|
|
1304
|
+
- `GET /v1/github-webhook/app/repos`
|
|
1305
|
+
- Contract: rejects with: UNSUPPORTED_FEATURE (GitHub App connect is not configured on this worker.); VALIDATION_ERROR (installation_id is required.); NOT_FOUND (Unknown GitHub App installation.); UPSTREAM_ERROR (Could not list repositories from GitHub.). error codes: UNSUPPORTED_FEATURE, VALIDATION_ERROR, NOT_FOUND, UPSTREAM_ERROR
|
|
1306
|
+
- `POST /v1/github-webhook/connect`
|
|
1307
|
+
- Contract: request fields: project_id, repo, branch, root_dir, github_token, installation_id, deploy_head, overwrite. response fields: initial_deploy, status, commit_sha, commit_message, message, status='deploying', project_id, repo, branch, root_dir, webhook_url, webhook_secret, hook_installed, has_token, via_app, manual_setup. rejects with: AUTHORITY_UNAVAILABLE | GITHUB_REAUTH_REQUIRED (Connecting GitHub requires a fresh sign-in.); VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (repo must be "owner/name".); NOT_FOUND (Project not found.); GITHUB_REAUTH_REQUIRED (Automatic publishing needs the project owner's approval, given by reconnecting GitHub.); VALIDATION_ERROR (installation_id must be a positive integer.); VALIDATION_ERROR (Unknown GitHub App installation; reconnecting GitHub registers a current one.); GITHUB_AUTH_REQUIRED (Project editors connect with their own GitHub App installation or their own GitHub token.); GITHUB_REAUTH_REQUIRED (GitHub access to this repository was not granted; a reconnection with your own account and a repository it can access is accepted.); GITHUB_REAUTH_REQUIRED (GitHub repository access could not be verified; public repositories, or repositories reached through a connected installation or token, are accepted.); PROJECT_NOT_FOUND (Project is no longer available for a GitHub connection.); GITHUB_CONNECTION_UNCONFIRMED (GitHub connection outcome could not be confirmed; GET /v1/github/connection shows the existing connection.); GITHUB_CONNECTION_CHANGED (GitHub connection changed before the initial deploy; GET /v1/github/connection shows the current connection.). error codes: AUTHORITY_UNAVAILABLE, GITHUB_REAUTH_REQUIRED, VALIDATION_ERROR, NOT_FOUND, GITHUB_AUTH_REQUIRED, PROJECT_NOT_FOUND, GITHUB_CONNECTION_UNCONFIRMED, GITHUB_CONNECTION_CHANGED, GITHUB_HEAD_FETCH_FAILED. behavior: Use a developer credential to connect a GitHub repository.
|
|
1308
|
+
- `DELETE /v1/github-webhook/connection`
|
|
1309
|
+
- Contract: response fields: disconnected, disconnected=true. rejects with: VALIDATION_ERROR (project_id is required.); NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, NOT_FOUND
|
|
1310
|
+
- `GET /v1/github-webhook/connection`
|
|
1311
|
+
- Contract: response fields: connected, connected=false, project_id, repo, branch, root_dir, webhook_url, webhook_secret, hook_installed, has_token, via_app, last_event_at, last_commit_sha, last_commit_message, ownership_suspended, last_status, last_error, synced_release_id, connected=true. rejects with: VALIDATION_ERROR (project_id is required.); NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, NOT_FOUND
|
|
1312
|
+
- `POST /v1/github-webhook/sync`
|
|
1313
|
+
- Contract: request fields: project_id, overwrite. response fields: status, commit_sha, commit_message, overwrite, message, status='deploying'. rejects with: VALIDATION_ERROR (project_id is required.); NOT_FOUND (Project not found.); NOT_FOUND (This project is not connected to GitHub.); FORBIDDEN (Only the person who connected this repository can publish from it; reconnecting GitHub with another account makes that account the publisher.); GITHUB_REAUTH_REQUIRED (Publishing from it requires a current GitHub connection; reconnecting GitHub renews it.). error codes: VALIDATION_ERROR, NOT_FOUND, FORBIDDEN, GITHUB_REAUTH_REQUIRED, GITHUB_HEAD_FETCH_FAILED
|
|
1314
|
+
|
|
1315
|
+
### /v1/groups
|
|
1316
|
+
|
|
1317
|
+
- `GET /v1/groups`
|
|
1318
|
+
- Contract: response fields: groups
|
|
1319
|
+
- `POST /v1/groups`
|
|
1320
|
+
- Contract: request fields: name, description. response fields (partial): role, project_count, component_count, role='owner'. rejects with: VALIDATION_ERROR (name is required.). error codes: VALIDATION_ERROR
|
|
1321
|
+
- `DELETE /v1/groups/:param`
|
|
1322
|
+
- Contract: response fields: deleted, id, deleted=true. rejects with: FORBIDDEN (You do not have access to this group.). error codes: FORBIDDEN
|
|
1323
|
+
- `GET /v1/groups/:param`
|
|
1324
|
+
- Contract: response fields (partial): role, projects, components, members, design_tokens. rejects with: VALIDATION_ERROR (project container id is required.); FORBIDDEN (You do not have access to this group.). error codes: VALIDATION_ERROR, FORBIDDEN
|
|
1325
|
+
- `POST /v1/groups/:param/components`
|
|
1326
|
+
- Contract: request fields: project_id, component_id. rejects with: VALIDATION_ERROR (project container id is required.); VALIDATION_ERROR (component_id or project_id is required.); FORBIDDEN (You do not have access to this group.); PROJECT_NOT_FOUND (Project not found.); PROJECT_OWNER_REQUIRED (Only the project owner can add a project to a group. Adding it gives every member of the group edit access to the project.); GROUP_CONFLICT (This project is already in another group; a project joins a new group only after it leaves that one.); GROUP_CONFLICT (This component is already in another project; a component joins a new project only after it leaves that one.); PROJECT_OWNER_REQUIRED (Only the project owner can add a project to a group.). error codes: VALIDATION_ERROR, FORBIDDEN, PROJECT_NOT_FOUND, PROJECT_OWNER_REQUIRED, GROUP_CONFLICT
|
|
1327
|
+
- `DELETE /v1/groups/:param/components/:param`
|
|
1328
|
+
- Contract: response fields: removed, group_id, project_container_id, project_id, component_id, removed=true. rejects with: VALIDATION_ERROR (project container and component ids are required.); FORBIDDEN (You do not have access to remove this project from the group.); NOT_IN_GROUP (That project is not in this group.). error codes: VALIDATION_ERROR, FORBIDDEN, NOT_IN_GROUP
|
|
1329
|
+
- `GET /v1/groups/:param/invites`
|
|
1330
|
+
- Contract: response fields: invites. rejects with: FORBIDDEN (You do not have access to this group.). error codes: FORBIDDEN
|
|
1331
|
+
- `DELETE /v1/groups/:param/invites/:param`
|
|
1332
|
+
- Contract: response fields: revoked, revoked=true. rejects with: FORBIDDEN (You do not have access to this group.); NOT_FOUND (No pending invite found for that email in this group.). error codes: FORBIDDEN, NOT_FOUND
|
|
1333
|
+
- `POST /v1/groups/:param/invites/accept`
|
|
1334
|
+
- Contract: request fields: token. response fields: accepted, group_id, project_container_id, accepted=true. rejects with: AUTH_INVALID_CREDS (Authentication required.); VALIDATION_ERROR (token is required.); AUTH_INVALID_CREDS (Account not found.); EMAIL_NOT_VERIFIED (Accepting a group invitation requires a verified email.); INVITE_INVALID (This invitation is invalid.); INVITE_USED (This invitation has already been accepted.); INVITE_EXPIRED (This invitation has expired; the group owner can re-send it.); INVITE_WRONG_ACCOUNT (This invitation was sent to …. Only an account signed in with that email can accept it.); GROUP_NOT_FOUND (This group no longer exists.); INVITE_USED (This invitation was revoked, replaced, or already accepted.). error codes: AUTH_INVALID_CREDS, VALIDATION_ERROR, EMAIL_NOT_VERIFIED, INVITE_INVALID, INVITE_USED, INVITE_EXPIRED, INVITE_WRONG_ACCOUNT, GROUP_NOT_FOUND
|
|
1335
|
+
- `DELETE /v1/groups/:param/members/:param`
|
|
1336
|
+
- Contract: response fields: removed, group_id, user_id, removed=true. rejects with: VALIDATION_ERROR (user_id is required.); FORBIDDEN (You do not have access to this group.); VALIDATION_ERROR (The group owner cannot be removed; ownership ends only when the group is deleted.); NOT_FOUND (No accepted member found for that user in this group.). error codes: VALIDATION_ERROR, FORBIDDEN, NOT_FOUND
|
|
1337
|
+
- `POST /v1/groups/:param/projects`
|
|
1338
|
+
- Contract: request fields: project_id, component_id. rejects with: VALIDATION_ERROR (project container id is required.); VALIDATION_ERROR (component_id or project_id is required.); FORBIDDEN (You do not have access to this group.); PROJECT_NOT_FOUND (Project not found.); PROJECT_OWNER_REQUIRED (Only the project owner can add a project to a group. Adding it gives every member of the group edit access to the project.); GROUP_CONFLICT (This project is already in another group; a project joins a new group only after it leaves that one.); GROUP_CONFLICT (This component is already in another project; a component joins a new project only after it leaves that one.); PROJECT_OWNER_REQUIRED (Only the project owner can add a project to a group.). error codes: VALIDATION_ERROR, FORBIDDEN, PROJECT_NOT_FOUND, PROJECT_OWNER_REQUIRED, GROUP_CONFLICT
|
|
1339
|
+
- `DELETE /v1/groups/:param/projects/:param`
|
|
1340
|
+
- Contract: response fields: removed, group_id, project_container_id, project_id, component_id, removed=true. rejects with: VALIDATION_ERROR (project container and component ids are required.); FORBIDDEN (You do not have access to remove this project from the group.); NOT_IN_GROUP (That project is not in this group.). error codes: VALIDATION_ERROR, FORBIDDEN, NOT_IN_GROUP
|
|
1341
|
+
- `GET /v1/groups/:param/tokens`
|
|
1342
|
+
- Contract: response fields: tokens, updated_at=null when unavailable. rejects with: FORBIDDEN (You do not have access to this group.). error codes: FORBIDDEN
|
|
1343
|
+
- `PUT /v1/groups/:param/tokens`
|
|
1344
|
+
- Contract: request fields: tokens. response fields: tokens. rejects with: FORBIDDEN (You do not have access to this group.); VALIDATION_ERROR (tokens must be a JSON object.); VALIDATION_ERROR (tokens payload is too large (64KB max).). error codes: FORBIDDEN, VALIDATION_ERROR
|
|
1345
|
+
|
|
1346
|
+
### /v1/handoff-requests
|
|
1347
|
+
|
|
1348
|
+
- `POST /v1/handoff-requests`
|
|
1349
|
+
- Contract: response fields (partial): status, kind, project_id, key, status='set', kind='env', url, request, expires_at, status='pending'. rejects with: VALIDATION_ERROR (kind must be 'env' or 'file'.); VALIDATION_ERROR (project_id is required (string).); VALIDATION_ERROR (key must be an environment variable name (…), at most 128 characters.); VALIDATION_ERROR (invalid path); VALIDATION_ERROR (path must name a file, e.g. /brand/logo.png.); VALIDATION_ERROR (accept must be up to … MIME types such as "image/png" or "image/*".); VALIDATION_ERROR (public must be a boolean.); ROUTE_FORBIDDEN (Handoff requests are created with a developer key or connector session.); PROJECT_NOT_FOUND (Project not found.); PROJECT_EDITOR_REQUIRED (Editor access to this project is required.); VALIDATION_ERROR (purpose must be a string.); VALIDATION_ERROR (purpose max … characters.). error codes: VALIDATION_ERROR, ROUTE_FORBIDDEN, PROJECT_NOT_FOUND, PROJECT_EDITOR_REQUIRED, FORBIDDEN
|
|
1350
|
+
- `POST /v1/handoff-requests/env`
|
|
1351
|
+
- Contract: request fields: value, copy_from_project. rejects with: VALIDATION_ERROR (This request is for a file, not a secret.); VALIDATION_ERROR (The value is accepted as application/json.); HANDOFF_COPY_NOT_SUPPORTED (Copying a secret from another project is not supported; the value itself is required.); VALIDATION_ERROR (value is required.); HANDOFF_ORIGIN_REFUSED (This request is completed on the Somewhere dashboard page.); PROJECT_NOT_FOUND (Project not found.); PROJECT_EDITOR_REQUIRED (Editor access to this project is required.). error codes: VALIDATION_ERROR, HANDOFF_COPY_NOT_SUPPORTED, HANDOFF_ORIGIN_REFUSED, PROJECT_NOT_FOUND, PROJECT_EDITOR_REQUIRED
|
|
1352
|
+
- `PUT /v1/handoff-requests/file`
|
|
1353
|
+
- Contract: rejects with: VALIDATION_ERROR (This request is for a secret, not a file.); VALIDATION_ERROR (Content-Type must be the file's MIME type.); UPLOAD_TYPE_NOT_ACCEPTED (This request accepts …; the file is ….); VALIDATION_ERROR (Content-Length is required.); FILE_TOO_LARGE (The file is … bytes; this request accepts up to … bytes.); UPLOAD_UNAVAILABLE (The upload could not be started; the same request can be repeated.); HANDOFF_ORIGIN_REFUSED (This request is completed on the Somewhere dashboard page.); PROJECT_NOT_FOUND (Project not found.); PROJECT_EDITOR_REQUIRED (Editor access to this project is required.). error codes: VALIDATION_ERROR, UPLOAD_TYPE_NOT_ACCEPTED, FILE_TOO_LARGE, UPLOAD_UNAVAILABLE, HANDOFF_ORIGIN_REFUSED, PROJECT_NOT_FOUND, PROJECT_EDITOR_REQUIRED
|
|
1354
|
+
- `GET /v1/handoff-requests/inspect`
|
|
1355
|
+
- Contract: response fields (partial): project, name, subdomain, purpose, requested_by_you, expires_at, current, name=null when unavailable, subdomain=null when unavailable. rejects with: HANDOFF_ORIGIN_REFUSED (This request is completed on the Somewhere dashboard page.); PROJECT_NOT_FOUND (Project not found.); PROJECT_EDITOR_REQUIRED (Editor access to this project is required.). error codes: HANDOFF_ORIGIN_REFUSED, PROJECT_NOT_FOUND, PROJECT_EDITOR_REQUIRED, FORBIDDEN
|
|
1356
|
+
- `GET /v1/handoff-requests/status`
|
|
1357
|
+
- Contract: response fields (partial): status, server_reference, status='set', project_id, expires_at, file, size_bytes, content_type, version, visibility, updated_at, status='uploaded'. rejects with: PROJECT_NOT_FOUND (Project not found.); ROUTE_FORBIDDEN (Handoff requests are created with a developer key or connector session.). error codes: PROJECT_NOT_FOUND, ROUTE_FORBIDDEN, FORBIDDEN
|
|
1358
|
+
|
|
1359
|
+
### /v1/hooks
|
|
1360
|
+
|
|
1361
|
+
- `POST /v1/hooks/machine-event`
|
|
1362
|
+
- Contract: request fields: event, machine_id, timestamp, session, project, project_id, elapsed, summary, status, exitCode, sessions, name. response fields: received, received=true. rejects with: FORBIDDEN (Invalid machine secret); VALIDATION_ERROR (event and machine_id required); NOT_FOUND (Unknown machine). error codes: FORBIDDEN, VALIDATION_ERROR, NOT_FOUND
|
|
1363
|
+
|
|
1364
|
+
### /v1/inbox
|
|
1365
|
+
|
|
1366
|
+
- `ALL /v1/inbox`
|
|
1367
|
+
- Contract: rejects with: GONE (The inbox API was replaced by the mail API: use /v1/mail (and sw.mail in functions).). error codes: GONE
|
|
1368
|
+
- `ALL /v1/inbox/*`
|
|
1369
|
+
- Contract: rejects with: GONE (The inbox API was replaced by the mail API: use /v1/mail (and sw.mail in functions).). error codes: GONE
|
|
1370
|
+
- `POST /v1/inbox/webhook`
|
|
1371
|
+
- Contract: response fields: received, matched, received=true, matched=true, matched=false. rejects with: UPSTREAM_ERROR (Inbox webhook not configured.); FORBIDDEN (Invalid webhook signature.); VALIDATION_ERROR (Invalid JSON.); VALIDATION_ERROR (Missing envelope from/recipient.); VALIDATION_ERROR (Payload missing `raw`: an alias URL with ?raw=false omits it.); UPSTREAM_ERROR (Temporary failure recording this message.). error codes: UPSTREAM_ERROR, FORBIDDEN, VALIDATION_ERROR
|
|
1372
|
+
|
|
1373
|
+
### /v1/jobs
|
|
1374
|
+
|
|
1375
|
+
- `GET /v1/jobs`
|
|
1376
|
+
- Contract: response fields (partial): jobs, status, recovery. rejects with: VALIDATION_ERROR (environment must be production or preview.); PREVIEW_TARGET_NOT_SUPPORTED (This list shows production jobs only; a preview's jobs are read through that preview. Nothing was listed.); PROJECT_NOT_FOUND (Project not found.); IDENTITY_CLAIM_NOT_ALLOWED (Agent end-user identity is derived by the deployed runtime and cannot be supplied by a caller.); AUTH_REQUIRED (This runtime must declare verified app-user or explicit project job authority.); AUTH_REQUIRED (A verified app-user or explicit project job authority is required.); IDENTITY_CLAIM_NOT_ALLOWED (Project job authority cannot impersonate an app user.); VALIDATION_ERROR (Jobs authority is invalid.); AUTH_REQUIRED (A verified app-user subject is required.). error codes: VALIDATION_ERROR, PREVIEW_TARGET_NOT_SUPPORTED, PROJECT_NOT_FOUND, IDENTITY_CLAIM_NOT_ALLOWED, AUTH_REQUIRED
|
|
1377
|
+
- `POST /v1/jobs`
|
|
1378
|
+
- Contract: request fields: project_id, idempotency_key, handler, payload, webhook_url, timeout_seconds, priority, run_at, row, agent, messages, max_turns, max_steps, deployment_version. rejects with: VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (handler is required.); PREVIEW_WEBHOOK_UNSUPPORTED (A job created in a preview cannot have a webhook_url: a preview never calls out with results. Read the job's status instead. Nothing was created.); PREVIEW_ROW_JOB_UNSUPPORTED (A row-bound job cannot be created in a preview. Nothing was created.); PREVIEW_AGENT_UNSUPPORTED (An agent job cannot run in a preview. Nothing was created.); PREVIEW_HANDLER_NOT_PREVIEW_CODE (In a preview a job's handler is a path in this project, such as /api/report; it runs the preview's own code. Nothing was created.); VALIDATION_ERROR (A row-bound job does not accept …: its authority comes from the binding.); ORIGINAL_SESSION_REQUIRED (A row-bound job is created by a signed-in user's own request.); VALIDATION_ERROR (agent.messages must be a non-empty array.); VALIDATION_ERROR (agent.messages must be 128 KB or smaller.); VALIDATION_ERROR (agent.max_steps (or agent.max_turns) must be an integer from 1 to 20.); VALIDATION_ERROR (agent.deployment_version must be a string no longer than 200 characters.); VALIDATION_ERROR (priority must be 'normal' or 'low'.); VALIDATION_ERROR (webhook_url: …); PROJECT_NOT_FOUND (Project not found.); IDENTITY_CLAIM_NOT_ALLOWED (Agent end-user identity is derived by the deployed runtime and cannot be supplied by a caller.); AUTH_REQUIRED (This runtime must declare verified app-user or explicit project job authority.); AUTH_REQUIRED (A verified app-user or explicit project job authority is required.); IDENTITY_CLAIM_NOT_ALLOWED (Project job authority cannot impersonate an app user.); VALIDATION_ERROR (Jobs authority is invalid.); AUTH_REQUIRED (A verified app-user subject is required.). error codes: VALIDATION_ERROR, PREVIEW_WEBHOOK_UNSUPPORTED, PREVIEW_ROW_JOB_UNSUPPORTED, PREVIEW_AGENT_UNSUPPORTED, PREVIEW_HANDLER_NOT_PREVIEW_CODE, ORIGINAL_SESSION_REQUIRED, PROJECT_NOT_FOUND, IDENTITY_CLAIM_NOT_ALLOWED, AUTH_REQUIRED
|
|
1379
|
+
- `GET /v1/jobs/:param`
|
|
1380
|
+
- Contract: response fields (partial): status, recovery. rejects with: IDENTITY_CLAIM_NOT_ALLOWED (Agent end-user identity is derived by the deployed runtime and cannot be supplied by a caller.); AUTH_REQUIRED (This runtime must declare verified app-user or explicit project job authority.); AUTH_REQUIRED (A verified app-user or explicit project job authority is required.); IDENTITY_CLAIM_NOT_ALLOWED (Project job authority cannot impersonate an app user.); VALIDATION_ERROR (Jobs authority is invalid.); AUTH_REQUIRED (A verified app-user subject is required.); JOB_NOT_FOUND (Job not found. Check the job ID.). error codes: IDENTITY_CLAIM_NOT_ALLOWED, AUTH_REQUIRED, VALIDATION_ERROR, JOB_NOT_FOUND
|
|
1381
|
+
- `POST /v1/jobs/:param/cancel`
|
|
1382
|
+
- Contract: response fields: job_id, status, execution_may_be_in_progress, ownership_status, owner_subject_id, status='cancelled'. rejects with: JOB_ALREADY_COMPLETE (Job is already ….); IDENTITY_CLAIM_NOT_ALLOWED (Agent end-user identity is derived by the deployed runtime and cannot be supplied by a caller.); AUTH_REQUIRED (This runtime must declare verified app-user or explicit project job authority.); AUTH_REQUIRED (A verified app-user or explicit project job authority is required.); IDENTITY_CLAIM_NOT_ALLOWED (Project job authority cannot impersonate an app user.); VALIDATION_ERROR (Jobs authority is invalid.); AUTH_REQUIRED (A verified app-user subject is required.); JOB_NOT_FOUND (Job not found. Check the job ID.). error codes: JOB_ALREADY_COMPLETE, IDENTITY_CLAIM_NOT_ALLOWED, AUTH_REQUIRED, VALIDATION_ERROR, JOB_NOT_FOUND
|
|
1383
|
+
- `POST /v1/jobs/:param/progress`
|
|
1384
|
+
- Contract: request fields: progress, message. response fields: job_id, progress. rejects with: VALIDATION_ERROR (progress (0-100) and/or message is required.); IDENTITY_CLAIM_NOT_ALLOWED (Agent end-user identity is derived by the deployed runtime and cannot be supplied by a caller.); AUTH_REQUIRED (This runtime must declare verified app-user or explicit project job authority.); AUTH_REQUIRED (A verified app-user or explicit project job authority is required.); IDENTITY_CLAIM_NOT_ALLOWED (Project job authority cannot impersonate an app user.); VALIDATION_ERROR (Jobs authority is invalid.); AUTH_REQUIRED (A verified app-user subject is required.); JOB_NOT_FOUND (Job not found. Check the job ID.). error codes: VALIDATION_ERROR, IDENTITY_CLAIM_NOT_ALLOWED, AUTH_REQUIRED, JOB_NOT_FOUND
|
|
1385
|
+
- `POST /v1/jobs/fence`
|
|
1386
|
+
- Contract: response fields: running, running=true. rejects with: VALIDATION_ERROR (This check is for a job handler's own runtime.). error codes: VALIDATION_ERROR
|
|
1387
|
+
- `POST /v1/jobs/verify-invocation`
|
|
1388
|
+
- Contract: request fields: project_id, source, invocation_id, target_method, target_path, timestamp, body, body_sha256, signature. response fields: valid, source, invocation_id, project_id, subject_type, subject_id, subject_proof, row_bound, attempt_deadline_at, valid=true, attempt_deadline_at=null when unavailable. rejects with: VALIDATION_ERROR (project_id, source, invocation_id, timestamp, and signature are required.); VALIDATION_ERROR (source must be job, queue, or cron.); PROJECT_NOT_FOUND (Project not found.); AUTHORITY_UNAVAILABLE (The job project could not be verified. This invocation was stopped.); VALIDATION_ERROR (Invocation target is incomplete.); VALIDATION_ERROR (Invocation target is invalid.); VALIDATION_ERROR (Invocation target is required for this signature.); AUTHORITY_UNAVAILABLE (The job status could not be verified. This invocation was stopped.); FORBIDDEN (Invocation is not bound to this project.); FORBIDDEN (This job is no longer running.); FORBIDDEN (This job attempt is no longer running.); FORBIDDEN (Invocation is not bound to this environment.); VALIDATION_ERROR (body or body_sha256 is required.); FORBIDDEN (Body hash mismatch.); AUTHORITY_UNAVAILABLE (The job subject could not be verified. This invocation was stopped.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, AUTHORITY_UNAVAILABLE, FORBIDDEN
|
|
1389
|
+
|
|
1390
|
+
### /v1/journey
|
|
1391
|
+
|
|
1392
|
+
- `GET /v1/journey`
|
|
1393
|
+
- Contract: rejects with: FORBIDDEN (This credential cannot read the journey.). error codes: FORBIDDEN
|
|
1394
|
+
- `POST /v1/journey/track`
|
|
1395
|
+
- Contract: request fields: event, metadata. response fields: recorded. rejects with: AUTH_INVALID_CREDS (Missing platform auth.); AUTH_INVALID_CREDS (Invalid or expired platform token.); VALIDATION_ERROR (Unknown or non-trackable event.). error codes: AUTH_INVALID_CREDS, VALIDATION_ERROR
|
|
1396
|
+
|
|
1397
|
+
### /v1/keys
|
|
1398
|
+
|
|
1399
|
+
- `GET /v1/keys`
|
|
1400
|
+
- Contract: response fields (partial): keys, scopes, created_at, last_used_at. rejects with: SESSION_SCOPE_KEY_MINT_FORBIDDEN (This CLI session is limited to specific projects, so it cannot create, rotate, list or revoke account keys. Account keys are managed from the dashboard or a session approved for all projects.). error codes: SESSION_SCOPE_KEY_MINT_FORBIDDEN
|
|
1401
|
+
- `POST /v1/keys`
|
|
1402
|
+
- Contract: request fields: name, scopes. response fields: id, prefix, scopes, scopes=null when unavailable. rejects with: SESSION_SCOPE_KEY_MINT_FORBIDDEN (This CLI session is limited to specific projects, so it cannot create, rotate, list or revoke account keys. Account keys are managed from the dashboard or a session approved for all projects.). error codes: VALIDATION_ERROR, FORBIDDEN, SESSION_SCOPE_KEY_MINT_FORBIDDEN
|
|
1403
|
+
- `DELETE /v1/keys/:param`
|
|
1404
|
+
- Contract: response fields: revoked, revoked=true. rejects with: NOT_FOUND (Key not found or already revoked.); SESSION_SCOPE_KEY_MINT_FORBIDDEN (This CLI session is limited to specific projects, so it cannot create, rotate, list or revoke account keys. Account keys are managed from the dashboard or a session approved for all projects.); REVOCATION_PENDING (The key is revoked, but the app has not confirmed it yet; the same request is safe to repeat.). error codes: NOT_FOUND, SESSION_SCOPE_KEY_MINT_FORBIDDEN, REVOCATION_PENDING
|
|
1405
|
+
- `POST /v1/keys/:param/regenerate`
|
|
1406
|
+
- Contract: response fields: revoked_key_id, key, reconciled, note, key=null, reconciled=true, note='This key is revoked and the app has confirmed it. A replacement key, if one was created for it, was shown only in that original response and is never shown again; if it was not saved, a new key from POST /v1/keys replaces it.', id, prefix, rotated_from, revocation, revocation='pending', note='This key is shown only once and never again. The old key is revoked, but the app has not confirmed it yet: repeating this request confirms it (no new key is created). A lost key is replaced by a new key created after the revocation is confirmed, with this one revoked.'. rejects with: NOT_FOUND (Key not found.); PROJECT_AGENT_OPERATION_FORBIDDEN (A connected agent key can be disconnected from the dashboard.); KEY_ROTATION_FORBIDDEN (Build keys cannot be rotated. Start a new build to get a new key.); KEY_ROTATION_FORBIDDEN (Refresh the app’s sign-in or reconnect the app to renew this key.); KEY_ROTATION_FORBIDDEN (Refresh the CLI session or sign in again to renew this key.); VALIDATION_ERROR (Cannot regenerate a revoked key; POST /v1/keys creates a new one.); SESSION_SCOPE_KEY_MINT_FORBIDDEN (This CLI session is limited to specific projects, so it cannot create, rotate, list or revoke account keys. Account keys are managed from the dashboard or a session approved for all projects.); REVOCATION_PENDING (The key is revoked, but the app has not confirmed it yet; the same request is safe to repeat.). error codes: NOT_FOUND, PROJECT_AGENT_OPERATION_FORBIDDEN, KEY_ROTATION_FORBIDDEN, VALIDATION_ERROR, FORBIDDEN, SESSION_SCOPE_KEY_MINT_FORBIDDEN, REVOCATION_PENDING
|
|
1407
|
+
- `POST /v1/keys/cli-pair`
|
|
1408
|
+
- Contract: request fields: label, scopes. rejects with: SCOPE_VIOLATION (This connection cannot link the CLI; the CLI signs in with somewhere auth login.); SESSION_SCOPE_KEY_MINT_FORBIDDEN (This CLI session is limited to specific projects, so it cannot create, rotate, list or revoke account keys. Account keys are managed from the dashboard or a session approved for all projects.). error codes: VALIDATION_ERROR, FORBIDDEN, SCOPE_VIOLATION, SESSION_SCOPE_KEY_MINT_FORBIDDEN
|
|
1409
|
+
- `POST /v1/keys/cli-pair/refresh`
|
|
1410
|
+
- Contract: request fields: refresh_token. rejects with: VALIDATION_ERROR (refresh_token is required.); REFRESH_UNAVAILABLE (Session refresh is temporarily unavailable; current credentials stay valid, and the same request can be repeated.); REFRESH_ALREADY_ROTATED (This refresh result is no longer current; the latest credentials, or a new sign-in, are valid.); INVALID_REFRESH_TOKEN (Refresh token is invalid, expired or revoked; a new sign-in is required.). error codes: VALIDATION_ERROR, REFRESH_UNAVAILABLE, REFRESH_ALREADY_ROTATED, INVALID_REFRESH_TOKEN
|
|
1411
|
+
- `GET /v1/keys/sessions`
|
|
1412
|
+
- Contract: response fields: sessions, currentKeyId
|
|
1413
|
+
- `DELETE /v1/keys/sessions/:param`
|
|
1414
|
+
- Contract: response fields: revoked, id, current, revoked=true. rejects with: NOT_FOUND (Session not found.); NOT_FOUND (Session already revoked.); SESSION_SCOPE_ACCOUNT_SESSIONS_FORBIDDEN (This CLI session is limited to specific projects, so it can only see and manage itself. Other devices are managed from the dashboard or a session approved for all projects.). error codes: NOT_FOUND, SESSION_SCOPE_ACCOUNT_SESSIONS_FORBIDDEN
|
|
1415
|
+
- `PATCH /v1/keys/sessions/:param`
|
|
1416
|
+
- Contract: request fields: label. response fields: id, label. rejects with: VALIDATION_ERROR (label must be at most 64 plain characters.); NOT_FOUND (Session not found.); SESSION_SCOPE_ACCOUNT_SESSIONS_FORBIDDEN (This CLI session is limited to specific projects, so it can only see and manage itself. Other devices are managed from the dashboard or a session approved for all projects.). error codes: VALIDATION_ERROR, NOT_FOUND, SESSION_SCOPE_ACCOUNT_SESSIONS_FORBIDDEN
|
|
1417
|
+
- `POST /v1/keys/sessions/revoke-others`
|
|
1418
|
+
- Contract: response fields: revoked, kept=null when unavailable. rejects with: SESSION_SCOPE_ACCOUNT_SESSIONS_FORBIDDEN (This CLI session is limited to specific projects, so it can only see and manage itself. Other devices are managed from the dashboard or a session approved for all projects.). error codes: SESSION_SCOPE_ACCOUNT_SESSIONS_FORBIDDEN
|
|
1419
|
+
|
|
1420
|
+
### /v1/live
|
|
1421
|
+
|
|
1422
|
+
- `POST /v1/live/invalidate`
|
|
1423
|
+
- Contract: response fields: delivery, delivery='not_applicable', candidate_views, delivery='invalidated'. rejects with: VALIDATION_ERROR (A complete live invalidation is required.); RUNTIME_REQUIRED (This live-view operation is available only to the deployed function runtime.); VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (A verified project is required.); RELEASE_CHANGED (This invalidation belongs to a release that is no longer active.); LIVE_VIEW_POLICY_SCOPE_UNSUPPORTED (policy-scoped tables are not subscribable yet.); VALIDATION_ERROR (Live group evidence is malformed.); VALIDATION_ERROR (Live owner evidence is malformed.); LIVE_SUBJECT_INVALID (The invalidation subject does not match the release-pinned scope.); LIVE_DELIVERY_FAILED (The write succeeded, but live invalidation delivery failed; subscribers will repair on their next mandatory refresh.). error codes: VALIDATION_ERROR, RUNTIME_REQUIRED, RELEASE_CHANGED, LIVE_VIEW_POLICY_SCOPE_UNSUPPORTED, LIVE_SUBJECT_INVALID, LIVE_DELIVERY_FAILED
|
|
1424
|
+
- `POST /v1/live/public-invalidate`
|
|
1425
|
+
- Contract: request fields: projectId, table, scope. response fields: delivery, write_committed, coalesced, durable, write_committed=true. rejects with: VALIDATION_ERROR (A declared table name or scope "project" is required.); PUBLIC_RESULT_PURGE_FAILED (The write succeeded. The public read cache could not be scheduled for purge; anonymous readers see the change within … seconds.); RUNTIME_REQUIRED (This live-view operation is available only to the deployed function runtime.); VALIDATION_ERROR (project_id is required.). error codes: VALIDATION_ERROR, PUBLIC_RESULT_PURGE_FAILED, RUNTIME_REQUIRED
|
|
1426
|
+
- `POST /v1/live/register`
|
|
1427
|
+
- Contract: response fields: ticket, expires_at, subscribe_path. rejects with: VALIDATION_ERROR (A complete live registration is required.); RELEASE_CHANGED (This live view belongs to a release that is no longer active.); LIVE_VIEW_NOT_DECLARED (The active release does not declare this exact live view shape.); LIVE_VIEW_POLICY_SCOPE_UNSUPPORTED (policy-scoped tables are not subscribable yet.); LIVE_SUBJECT_INVALID (The live subject does not match the release-pinned scope.); LIVE_ROLE_REQUIRED (Only current holders of an app role that may read this list can follow it.); LIVE_SUBJECT_INVALID (A live list under a group parent names exactly one parent.); LIVE_MEMBERSHIP_REQUIRED (Only current members of the group this parent belongs to can follow its live list.); LIVE_SUBJECT_INVALID (A live group list names exactly one group.); LIVE_MEMBERSHIP_REQUIRED (Only current members of this group can follow its live list.); RUNTIME_REQUIRED (This live-view operation is available only to the deployed function runtime.); VALIDATION_ERROR (project_id is required.). error codes: VALIDATION_ERROR, RELEASE_CHANGED, LIVE_VIEW_NOT_DECLARED, LIVE_VIEW_POLICY_SCOPE_UNSUPPORTED, LIVE_SUBJECT_INVALID, LIVE_ROLE_REQUIRED, LIVE_MEMBERSHIP_REQUIRED, RUNTIME_REQUIRED
|
|
1428
|
+
- `GET /v1/live/subscribe`
|
|
1429
|
+
- Contract: rejects with: VALIDATION_ERROR (Expected WebSocket upgrade header.); LIVE_TICKET_INVALID (Live subscription capability is invalid or expired.); SCOPE_VIOLATION (This live capability belongs to a different project.); RELEASE_CHANGED (This live view belongs to a release that is no longer active.); LIVE_VIEW_NOT_DECLARED (The active release does not declare this live view.); LIVE_VIEW_POLICY_SCOPE_UNSUPPORTED (policy-scoped tables are not subscribable yet.); LIVE_SUBJECT_MISMATCH (This live capability is not bound to the current request subject.); LIVE_MEMBERSHIP_REQUIRED (Only current members of the group this parent belongs to can follow its live list.); LIVE_GROUP_CHANGED (This parent now belongs to a different group; the live view needs a new registration.); LIVE_ROLE_REQUIRED (Only current holders of an app role that may read this list can follow it.); LIVE_MEMBERSHIP_REQUIRED (Only current members of this group can follow its live list.). error codes: VALIDATION_ERROR, LIVE_TICKET_INVALID, SCOPE_VIOLATION, RELEASE_CHANGED, LIVE_VIEW_NOT_DECLARED, LIVE_VIEW_POLICY_SCOPE_UNSUPPORTED, LIVE_SUBJECT_MISMATCH, LIVE_MEMBERSHIP_REQUIRED, LIVE_GROUP_CHANGED, LIVE_ROLE_REQUIRED
|
|
1430
|
+
|
|
1431
|
+
### /v1/logs
|
|
1432
|
+
|
|
1433
|
+
- `GET /v1/logs`
|
|
1434
|
+
- Contract: Runtime method: sw.logs.error. rejects with: AUTH_INVALID_CREDS (Reading logs requires a developer or connector session.); VALIDATION_ERROR (trace_id must be the 32-character id returned in X-Trace-Id.); VALIDATION_ERROR (project_id query param is required.); PROJECT_NOT_FOUND (Project not found.). error codes: AUTH_INVALID_CREDS, VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
1435
|
+
- `POST /v1/logs`
|
|
1436
|
+
- Contract: response fields: logged, queued, stored_directly, quota_used, quota_limit, logged=true. rejects with: VALIDATION_ERROR (Body must be JSON.); VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (message is required.); VALIDATION_ERROR (level must be one of: …); PROJECT_NOT_FOUND (Project not found or not accessible by this token.); LOG_QUOTA_EXCEEDED (Daily log quota reached (…/day). Resets at midnight UTC.); LOG_INGEST_UNAVAILABLE (Log ingestion is saturated; this log was not stored, and a later identical request can succeed. / Log ingestion is unavailable; this log was not stored, and a later identical request can succeed.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, LOG_QUOTA_EXCEEDED, LOG_INGEST_UNAVAILABLE
|
|
1437
|
+
- `GET /v1/logs/endpoints`
|
|
1438
|
+
- Contract: response fields: range, since, total_requests, endpoints. rejects with: VALIDATION_ERROR (project_id query param is required.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
1439
|
+
|
|
1440
|
+
### /v1/mail
|
|
1441
|
+
|
|
1442
|
+
- `GET /v1/mail/addresses`
|
|
1443
|
+
- Contract: response fields: addresses. rejects with: VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.); FORBIDDEN (An app user reads only their own mailbox.); FORBIDDEN (A person mailbox opens only on that person's signed-in mail page.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, FORBIDDEN
|
|
1444
|
+
- `POST /v1/mail/addresses`
|
|
1445
|
+
- Contract: request fields: project_id, address, person. response fields: address, mailbox, sends_as, next, id, null, mailbox='person'. rejects with: PROJECT_NOT_FOUND (Project not found.); VALIDATION_ERROR (project_id is required.); FORBIDDEN (Only the project owner's own account or agent can do this.); FORBIDDEN (Only the project owner can set up an address in their own name.); FORBIDDEN (An app user reads only their own mailbox.); FORBIDDEN (A person mailbox opens only on that person's signed-in mail page.). error codes: PROJECT_NOT_FOUND, VALIDATION_ERROR, FORBIDDEN, DOMAIN_NOT_VERIFIED, ALREADY_EXISTS, NOT_AVAILABLE, ROUTING_SETUP_FAILED
|
|
1446
|
+
- `DELETE /v1/mail/addresses/:param`
|
|
1447
|
+
- Contract: response fields: removed. rejects with: NOT_FOUND (Address not found.); PROJECT_NOT_FOUND (Project not found.); ROUTING_REMOVE_FAILED (The address was not removed because its mail routing could not be removed; a later identical request can succeed.); VALIDATION_ERROR (project_id is required.); FORBIDDEN (An app user reads only their own mailbox.); FORBIDDEN (A person mailbox opens only on that person's signed-in mail page.). error codes: NOT_FOUND, PROJECT_NOT_FOUND, ROUTING_REMOVE_FAILED, VALIDATION_ERROR, FORBIDDEN
|
|
1448
|
+
- `POST /v1/mail/compose`
|
|
1449
|
+
- Contract: response fields: result, email. rejects with: VALIDATION_ERROR (action must be send, draft or discard.); VALIDATION_ERROR (attachments[].content_base64 must be base64.); FORBIDDEN (Posts only from somewhere.cloud.); VALIDATION_ERROR (Send JSON (Content-Type: application/json).); VALIDATION_ERROR (The body must be a JSON object.); UNAUTHORIZED (Sign in on somewhere.cloud to read mail.); NOT_FOUND (Mailbox not found.). error codes: VALIDATION_ERROR, FORBIDDEN, UNAUTHORIZED, NOT_FOUND
|
|
1450
|
+
- `POST /v1/mail/destination`
|
|
1451
|
+
- Contract: request fields: project_id, address. response fields: code_sent_to, next. rejects with: NOT_FOUND (Create an address in your name first (POST /v1/mail/addresses with person: true).); VALIDATION_ERROR (project_id is required.); FORBIDDEN (Only the project owner's own account or agent can do this.); FORBIDDEN (Only the project owner can set up an address in their own name.); VALIDATION_ERROR (Enter one email address.); EMAIL_SEND_FAILED (The code could not be sent to that address.). error codes: NOT_FOUND, VALIDATION_ERROR, FORBIDDEN, EMAIL_SEND_FAILED
|
|
1452
|
+
- `GET /v1/mail/emails`
|
|
1453
|
+
- Contract: response fields: emails, mailbox, mailbox=null. rejects with: VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.); FORBIDDEN (An app user reads only their own mailbox.); FORBIDDEN (A person mailbox opens only on that person's signed-in mail page.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, FORBIDDEN
|
|
1454
|
+
- `GET /v1/mail/emails/:param`
|
|
1455
|
+
- Contract: response fields (partial): email, attachments, n. rejects with: NOT_FOUND (Email not found.); VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.); FORBIDDEN (An app user reads only their own mailbox.); FORBIDDEN (A person mailbox opens only on that person's signed-in mail page.). error codes: NOT_FOUND, VALIDATION_ERROR, PROJECT_NOT_FOUND, FORBIDDEN
|
|
1456
|
+
- `GET /v1/mail/emails/:param/attachments/:param`
|
|
1457
|
+
- Contract: rejects with: NOT_FOUND (Attachment not found.); VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.); FORBIDDEN (An app user reads only their own mailbox.); FORBIDDEN (A person mailbox opens only on that person's signed-in mail page.). error codes: NOT_FOUND, VALIDATION_ERROR, PROJECT_NOT_FOUND, FORBIDDEN
|
|
1458
|
+
- `POST /v1/mail/erase-person`
|
|
1459
|
+
- Contract: request fields: project_id, mailbox, address. response fields: emails_erased, files_erased, files_pending. rejects with: VALIDATION_ERROR (address must be one email address.); VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.); FORBIDDEN (An app user reads only their own mailbox.); FORBIDDEN (A person mailbox opens only on that person's signed-in mail page.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, FORBIDDEN
|
|
1460
|
+
- `GET /v1/mail/erase-receipts`
|
|
1461
|
+
- Contract: response fields: receipts. rejects with: FORBIDDEN (Erase receipts are read by the project's owner and editors.); VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.); FORBIDDEN (An app user reads only their own mailbox.); FORBIDDEN (A person mailbox opens only on that person's signed-in mail page.). error codes: FORBIDDEN, VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
1462
|
+
- `GET /v1/mail/export`
|
|
1463
|
+
- Contract: response fields: emails, next, mailbox, next=null. rejects with: VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.); FORBIDDEN (An app user reads only their own mailbox.); FORBIDDEN (A person mailbox opens only on that person's signed-in mail page.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, FORBIDDEN
|
|
1464
|
+
- `GET /v1/mail/links`
|
|
1465
|
+
- Contract: response fields: links, likely_automated_counted_separately, percent_min_rows, likely_automated_counted_separately=true. rejects with: FORBIDDEN (Only the platform owner's own account or agent can do this.); FORBIDDEN (Tracked links are for the platform owner.). error codes: FORBIDDEN
|
|
1466
|
+
- `POST /v1/mail/links`
|
|
1467
|
+
- Contract: request fields: destination, label. rejects with: VALIDATION_ERROR (label is required, for example the campaign name.); VALIDATION_ERROR (destination must be one https address.); FORBIDDEN (Only the platform owner's own account or agent can do this.); FORBIDDEN (Tracked links are for the platform owner.). error codes: VALIDATION_ERROR, FORBIDDEN
|
|
1468
|
+
- `GET /v1/mail/mailboxes`
|
|
1469
|
+
- Contract: response fields: mailboxes. rejects with: UNAUTHORIZED (Sign in on somewhere.cloud to read mail.). error codes: UNAUTHORIZED
|
|
1470
|
+
- `GET /v1/mail/mailboxes/:param/conversations`
|
|
1471
|
+
- Contract: response fields (partial): search, emails, archived, answered, answers_email_id, search=true, answers_email_id=null when unavailable, conversations, count, has_attachments, has_draft, unread, unread_count, last_activity_at, search=false. rejects with: VALIDATION_ERROR (cursor is not one this list gave.); UNAUTHORIZED (Sign in on somewhere.cloud to read mail.); NOT_FOUND (Mailbox not found.). error codes: VALIDATION_ERROR, UNAUTHORIZED, NOT_FOUND
|
|
1472
|
+
- `GET /v1/mail/mailboxes/:param/conversations/:param`
|
|
1473
|
+
- Contract: response fields: mailbox_id, conversation, answered, reply_from, messages. rejects with: NOT_FOUND (Conversation not found.); UNAUTHORIZED (Sign in on somewhere.cloud to read mail.); NOT_FOUND (Mailbox not found.). error codes: NOT_FOUND, UNAUTHORIZED
|
|
1474
|
+
- `POST /v1/mail/mailboxes/:param/conversations/:param/state`
|
|
1475
|
+
- Contract: response fields: conversation, unread_count, mailbox_unread, mailbox_unread_conversations. rejects with: VALIDATION_ERROR (Give read and/or archived (true or false).); VALIDATION_ERROR (read and archived are true or false.); NOT_FOUND (Conversation not found.); FORBIDDEN (Posts only from somewhere.cloud.); VALIDATION_ERROR (Send JSON (Content-Type: application/json).); VALIDATION_ERROR (The body must be a JSON object.); UNAUTHORIZED (Sign in on somewhere.cloud to read mail.); NOT_FOUND (Mailbox not found.). error codes: VALIDATION_ERROR, NOT_FOUND, FORBIDDEN, UNAUTHORIZED
|
|
1476
|
+
- `POST /v1/mail/mailboxes/:param/emails/:param/state`
|
|
1477
|
+
- Contract: response fields: email_id, unread, mailbox_unread, mailbox_unread_conversations. rejects with: VALIDATION_ERROR (read is true or false.); NOT_FOUND (Email not found.); VALIDATION_ERROR (Only received mail is read or unread.); FORBIDDEN (Posts only from somewhere.cloud.); VALIDATION_ERROR (Send JSON (Content-Type: application/json).); VALIDATION_ERROR (The body must be a JSON object.); UNAUTHORIZED (Sign in on somewhere.cloud to read mail.); NOT_FOUND (Mailbox not found.). error codes: VALIDATION_ERROR, NOT_FOUND, FORBIDDEN, UNAUTHORIZED
|
|
1478
|
+
- `POST /v1/mail/mailboxes/:param/forwarding`
|
|
1479
|
+
- Contract: response fields: address, state, to, note. rejects with: VALIDATION_ERROR (Give address and on (true or false).); FORBIDDEN (Posts only from somewhere.cloud.); VALIDATION_ERROR (Send JSON (Content-Type: application/json).); VALIDATION_ERROR (The body must be a JSON object.); UNAUTHORIZED (Sign in on somewhere.cloud to read mail.); NOT_FOUND (Mailbox not found.). error codes: VALIDATION_ERROR, FORBIDDEN, UNAUTHORIZED, NOT_FOUND, FORWARDING_SETUP_FAILED
|
|
1480
|
+
- `POST /v1/mail/mailboxes/:param/signature`
|
|
1481
|
+
- Contract: response fields: address. rejects with: VALIDATION_ERROR (A signature is at most … characters.); FORBIDDEN (You can set a signature only for an address you may send from.); FORBIDDEN (Posts only from somewhere.cloud.); VALIDATION_ERROR (Send JSON (Content-Type: application/json).); VALIDATION_ERROR (The body must be a JSON object.); UNAUTHORIZED (Sign in on somewhere.cloud to read mail.); NOT_FOUND (Mailbox not found.). error codes: VALIDATION_ERROR, FORBIDDEN, UNAUTHORIZED, NOT_FOUND
|
|
1482
|
+
- `GET /v1/mail/mailboxes/:param/templates`
|
|
1483
|
+
- Contract: response fields: mailbox_id, templates. rejects with: UNAUTHORIZED (Sign in on somewhere.cloud to read mail.); NOT_FOUND (Mailbox not found.). error codes: UNAUTHORIZED, NOT_FOUND
|
|
1484
|
+
- `GET /v1/mail/mailboxes/:param/templates/:param`
|
|
1485
|
+
- Contract: response fields: key, name, you_approve, versions, approvals. rejects with: NOT_FOUND (Template not found.). error codes: NOT_FOUND
|
|
1486
|
+
- `POST /v1/mail/mailboxes/:param/templates/:param/versions`
|
|
1487
|
+
- Contract: response fields: version. rejects with: VALIDATION_ERROR (subject is required, up to 300 characters.); VALIDATION_ERROR (html is required, up to … characters.); VALIDATION_ERROR (A template sent in a person's name cannot fill a link or image address from a slot.); FORBIDDEN (Posts only from somewhere.cloud.); VALIDATION_ERROR (Send JSON (Content-Type: application/json).); VALIDATION_ERROR (The body must be a JSON object.); NOT_FOUND (Template not found.). error codes: VALIDATION_ERROR, FORBIDDEN, NOT_FOUND
|
|
1488
|
+
- `POST /v1/mail/mailboxes/:param/templates/:param/versions/:param/approve`
|
|
1489
|
+
- Contract: response fields: version, approval. rejects with: VALIDATION_ERROR (fingerprint (of the exact version you saw) is required.); VERSION_CHANGED (That version changed or was stopped; reload it.); FORBIDDEN (Posts only from somewhere.cloud.); VALIDATION_ERROR (Send JSON (Content-Type: application/json).); VALIDATION_ERROR (The body must be a JSON object.); NOT_FOUND (Template not found.). error codes: VALIDATION_ERROR, VERSION_CHANGED, FORBIDDEN, NOT_FOUND
|
|
1490
|
+
- `POST /v1/mail/mailboxes/:param/templates/:param/versions/:param/preview`
|
|
1491
|
+
- Contract: response fields: version_id, fingerprint, from, subject, vars, html, text. rejects with: NOT_FOUND (Template version not found.); FORBIDDEN (Posts only from somewhere.cloud.); VALIDATION_ERROR (Send JSON (Content-Type: application/json).); VALIDATION_ERROR (The body must be a JSON object.); NOT_FOUND (Template not found.). error codes: NOT_FOUND, FORBIDDEN, VALIDATION_ERROR
|
|
1492
|
+
- `POST /v1/mail/mailboxes/:param/templates/:param/versions/:param/stop`
|
|
1493
|
+
- Contract: response fields: stopped, sending. rejects with: FORBIDDEN (Posts only from somewhere.cloud.); VALIDATION_ERROR (Send JSON (Content-Type: application/json).); VALIDATION_ERROR (The body must be a JSON object.); NOT_FOUND (Template not found.). error codes: FORBIDDEN, VALIDATION_ERROR, NOT_FOUND
|
|
1494
|
+
- `GET /v1/mail/screen`
|
|
1495
|
+
- `POST /v1/mail/screen/address`
|
|
1496
|
+
- Contract: rejects with: FORBIDDEN (Same-origin form posts only.); AUTH_REQUIRED (Sign in to Somewhere in this browser.); NOT_FOUND (Project not found.). error codes: FORBIDDEN, AUTH_REQUIRED, NOT_FOUND, VALIDATION_ERROR, DOMAIN_NOT_VERIFIED, ALREADY_EXISTS, NOT_AVAILABLE, ROUTING_SETUP_FAILED
|
|
1497
|
+
- `POST /v1/mail/screen/address/remove`
|
|
1498
|
+
- Contract: rejects with: NOT_FOUND (Address not found.); ROUTING_REMOVE_FAILED (The address was not removed; try again.); FORBIDDEN (Same-origin form posts only.); AUTH_REQUIRED (Sign in to Somewhere in this browser.); NOT_FOUND (Mailbox not found.). error codes: NOT_FOUND, ROUTING_REMOVE_FAILED, FORBIDDEN, AUTH_REQUIRED
|
|
1499
|
+
- `POST /v1/mail/screen/always-confirm`
|
|
1500
|
+
- Contract: rejects with: FORBIDDEN (Same-origin form posts only.); AUTH_REQUIRED (Sign in to Somewhere in this browser.); NOT_FOUND (Mailbox not found.). error codes: FORBIDDEN, AUTH_REQUIRED, NOT_FOUND
|
|
1501
|
+
- `POST /v1/mail/screen/approve`
|
|
1502
|
+
- Contract: rejects with: VERSION_CHANGED (That version changed or was revoked; reload the page.); FORBIDDEN (Same-origin form posts only.); AUTH_REQUIRED (Sign in to Somewhere in this browser.); NOT_FOUND (Version not found.). error codes: VERSION_CHANGED, FORBIDDEN, AUTH_REQUIRED, NOT_FOUND
|
|
1503
|
+
- `POST /v1/mail/screen/confirm`
|
|
1504
|
+
- Contract: rejects with: NOT_FOUND (Draft not found.); NEEDS_PERSON_APPROVAL (Only the person this address signs as can send it.); FORBIDDEN (Same-origin form posts only.); AUTH_REQUIRED (Sign in to Somewhere in this browser.); NOT_FOUND (Mailbox not found.). error codes: NOT_FOUND, NEEDS_PERSON_APPROVAL, FORBIDDEN, AUTH_REQUIRED
|
|
1505
|
+
- `POST /v1/mail/screen/destination`
|
|
1506
|
+
- Contract: rejects with: FORBIDDEN (Same-origin form posts only.); AUTH_REQUIRED (Sign in to Somewhere in this browser.); NOT_FOUND (Mailbox not found.); VALIDATION_ERROR (Enter one email address.); EMAIL_SEND_FAILED (The code could not be sent to that address.). error codes: FORBIDDEN, AUTH_REQUIRED, NOT_FOUND, VALIDATION_ERROR, EMAIL_SEND_FAILED
|
|
1507
|
+
- `POST /v1/mail/screen/destination/confirm`
|
|
1508
|
+
- Contract: rejects with: CODE_INVALID (That code is wrong or expired; send a new one.); FORBIDDEN (Same-origin form posts only.); AUTH_REQUIRED (Sign in to Somewhere in this browser.); NOT_FOUND (Mailbox not found.). error codes: CODE_INVALID, FORBIDDEN, AUTH_REQUIRED, NOT_FOUND
|
|
1509
|
+
- `GET /v1/mail/screen/fonts/:param`
|
|
1510
|
+
- `GET /v1/mail/screen/m/:param`
|
|
1511
|
+
- Contract: rejects with: NOT_FOUND (Mailbox not found.). error codes: NOT_FOUND
|
|
1512
|
+
- `GET /v1/mail/screen/m/:param/c/:param`
|
|
1513
|
+
- Contract: rejects with: NOT_FOUND (Conversation not found.); NOT_FOUND (Mailbox not found.). error codes: NOT_FOUND
|
|
1514
|
+
- `GET /v1/mail/screen/m/:param/e/:param/a/:param`
|
|
1515
|
+
- Contract: rejects with: NOT_FOUND (Attachment not found.); NOT_FOUND (Mailbox not found.). error codes: NOT_FOUND
|
|
1516
|
+
- `GET /v1/mail/screen/m/:param/e/:param/headers`
|
|
1517
|
+
- Contract: rejects with: NOT_FOUND (No stored headers for this email (kept for mail from 2026-11-20 on).); NOT_FOUND (Mailbox not found.). error codes: NOT_FOUND
|
|
1518
|
+
- `POST /v1/mail/screen/m/:param/forwarding`
|
|
1519
|
+
- Contract: rejects with: FORBIDDEN (Same-origin form posts only.); NOT_FOUND (Mailbox not found.). error codes: FORBIDDEN, NOT_FOUND, FORWARDING_SETUP_FAILED
|
|
1520
|
+
- `GET /v1/mail/screen/m/:param/write`
|
|
1521
|
+
- Contract: rejects with: NOT_FOUND (Mailbox not found.). error codes: NOT_FOUND
|
|
1522
|
+
- `POST /v1/mail/screen/m/:param/write`
|
|
1523
|
+
- Contract: rejects with: FORBIDDEN (Same-origin form posts only.); VALIDATION_ERROR (action must be send, draft or discard.); NOT_FOUND (Mailbox not found.). error codes: FORBIDDEN, VALIDATION_ERROR, NOT_FOUND
|
|
1524
|
+
- `POST /v1/mail/screen/revoke`
|
|
1525
|
+
- Contract: rejects with: FORBIDDEN (Same-origin form posts only.); AUTH_REQUIRED (Sign in to Somewhere in this browser.); NOT_FOUND (Version not found.). error codes: FORBIDDEN, AUTH_REQUIRED, NOT_FOUND
|
|
1526
|
+
- `GET /v1/mail/search`
|
|
1527
|
+
- Contract: response fields: results, answered, answered=true. rejects with: VALIDATION_ERROR (Give at least one of q, from, subject, after, before or has_attachment.); VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.); FORBIDDEN (An app user reads only their own mailbox.); FORBIDDEN (A person mailbox opens only on that person's signed-in mail page.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, FORBIDDEN
|
|
1528
|
+
- `POST /v1/mail/send`
|
|
1529
|
+
- Contract: response fields (partial): email_id, status, skipped, duplicate, email_id=null, status='skipped', skipped='replied', duplicate=false. rejects with: NOT_FOUND (from is not an address of this project.); VALIDATION_ERROR (to must be 1-10 email addresses.); VALIDATION_ERROR (once must be a step name: letters, digits, _ . : - (up to 60).); VALIDATION_ERROR (once sends to one person: give exactly one address in to.); VALIDATION_ERROR (unless_replied must be true or false.); SENDER_DOMAIN_NOT_VERIFIED (… must be verified for sending on this project.); NEEDS_PERSON_APPROVAL (Mail from a person address is a template that person approves: template_key, subject and html or text are required.); VALIDATION_ERROR (A template sent in a person's name cannot fill a link or image address from a slot.); NEEDS_PERSON_APPROVAL (No approved version of this template exists yet; a draft waits for the person to approve it.); VALIDATION_ERROR (vars.… must be plain text up to 60 characters, with no links or line breaks.); NOT_FOUND (reply_to_email_id is not an email in this mailbox.); VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.); FORBIDDEN (An app user reads only their own mailbox.); FORBIDDEN (A person mailbox opens only on that person's signed-in mail page.). error codes: NOT_FOUND, VALIDATION_ERROR, PERSON_ERASED, SENDER_DOMAIN_NOT_VERIFIED, NEEDS_PERSON_APPROVAL, PROJECT_NOT_FOUND, FORBIDDEN, DELIVERY_UNKNOWN
|
|
1530
|
+
|
|
1531
|
+
### /v1/managed-exit
|
|
1532
|
+
|
|
1533
|
+
- `GET /v1/managed-exit/review`
|
|
1534
|
+
- Contract: response fields: project_id, project_name, plan_digest, base_release_id, warning, requested_at, expires_at, expired, used, approved_at, note, stage, stage_note, reserved_release_id, consumed_at, approve_endpoint, undefined, note='This GET is review-only. It does not approve the transition or change the project.'. rejects with: MANAGED_EXIT_APPROVAL_INVALID (Invalid managed exit review link.). error codes: MANAGED_EXIT_APPROVAL_INVALID
|
|
1535
|
+
- `POST /v1/managed-exit/review/:param/managed-exit/approve`
|
|
1536
|
+
- Contract: request fields: token. response fields: status, project_id, db_write_mode, transition, warning, next_step, status='authorized', db_write_mode='managed', transition='pending_export_release', next_step='Nothing has changed yet. The transition completes when a release that marks every managed table exported() in db/schema.ts is deployed.'. rejects with: MANAGED_EXIT_APPROVAL_INVALID (A valid managed exit review token is required.); PROJECT_NOT_FOUND (Project not found.); UNSUPPORTED_FEATURE (Managed database exit requires a developer credential for the project owner.). error codes: MANAGED_EXIT_APPROVAL_INVALID, PROJECT_NOT_FOUND, UNSUPPORTED_FEATURE
|
|
1537
|
+
- `POST /v1/managed-exit/review/:param/managed-exit/request`
|
|
1538
|
+
- Contract: response fields: status, expires_in_seconds, plan_digest, base_release_id, base_version, warning. rejects with: PROJECT_NOT_FOUND (Project not found.); EMAIL_VERIFICATION_REQUIRED (A current verified owner email is required.); RATE_LIMITED (Too many managed exit requests: the limit is 3 per 10 minutes, and retry_after_ms gives the remaining wait.); EMAIL_SEND_FAILED (Delivery could not be confirmed, so the approval link may or may not have reached the verified owner inbox. A new request sends another link. / The approval email could not be sent. Nothing was sent; the same request can be repeated.); UNSUPPORTED_FEATURE (Managed database exit requires a developer credential for the project owner.). error codes: PROJECT_NOT_FOUND, EMAIL_VERIFICATION_REQUIRED, RATE_LIMITED, EMAIL_DELIVERY_UNKNOWN, EMAIL_SEND_FAILED, UNSUPPORTED_FEATURE
|
|
1539
|
+
|
|
1540
|
+
### /v1/migration-requests
|
|
1541
|
+
|
|
1542
|
+
- `GET /v1/migration-requests`
|
|
1543
|
+
- Contract: response fields: requests
|
|
1544
|
+
- `POST /v1/migration-requests`
|
|
1545
|
+
- Contract: response fields: request, replayed, replayed=true
|
|
1546
|
+
- `GET /v1/migration-requests/:param`
|
|
1547
|
+
- `PATCH /v1/migration-requests/:param`
|
|
1548
|
+
- Contract: response fields: request
|
|
1549
|
+
- `POST /v1/migration-requests/:param/cancel`
|
|
1550
|
+
- Contract: response fields: request
|
|
1551
|
+
- `POST /v1/migration-requests/:param/submit`
|
|
1552
|
+
|
|
1553
|
+
### /v1/notifications
|
|
1554
|
+
|
|
1555
|
+
- `GET /v1/notifications`
|
|
1556
|
+
- `POST /v1/notifications/:param/dismiss`
|
|
1557
|
+
- Contract: response fields: dismissed, dismissed=true. rejects with: NOT_FOUND (Notification not found). error codes: NOT_FOUND
|
|
1558
|
+
- `POST /v1/notifications/:param/read`
|
|
1559
|
+
- Contract: response fields: ok, ok=true. rejects with: NOT_FOUND (Notification not found). error codes: NOT_FOUND
|
|
1560
|
+
- `GET /v1/notifications/feed`
|
|
1561
|
+
- Contract: rejects with: VALIDATION_ERROR (Unknown notification filter); VALIDATION_ERROR (Notification limit must be a positive number). error codes: VALIDATION_ERROR
|
|
1562
|
+
- `POST /v1/notifications/feed/dismiss`
|
|
1563
|
+
- Contract: request fields: id. response fields: dismissed, dismissed=true. rejects with: VALIDATION_ERROR (Notification id is required); NOT_FOUND (Notification not found). error codes: VALIDATION_ERROR, NOT_FOUND
|
|
1564
|
+
- `POST /v1/notifications/feed/read`
|
|
1565
|
+
- Contract: request fields: id. response fields: read, read=true. rejects with: VALIDATION_ERROR (Notification id is required); NOT_FOUND (Notification not found). error codes: VALIDATION_ERROR, NOT_FOUND
|
|
1566
|
+
- `GET /v1/notifications/inbox-pull`
|
|
1567
|
+
- Contract: response fields: notifications, id, project_id, type, message, action_url, priority, created_at
|
|
1568
|
+
- `GET /v1/notifications/prefs`
|
|
1569
|
+
- `PUT /v1/notifications/prefs`
|
|
1570
|
+
- Contract: response fields: ok, ok=true
|
|
1571
|
+
- `POST /v1/notifications/read-all`
|
|
1572
|
+
- Contract: response fields: ok, ok=true
|
|
1573
|
+
|
|
1574
|
+
### /v1/outbox
|
|
1575
|
+
|
|
1576
|
+
- `GET /v1/outbox`
|
|
1577
|
+
- Contract: response fields: messages, count, limit, offset, has_more, next_offset
|
|
1578
|
+
|
|
1579
|
+
### /v1/payments
|
|
1580
|
+
|
|
1581
|
+
- `POST /v1/payments/cancel-subscription`
|
|
1582
|
+
- Contract: Runtime method: sw.payments.cancelSubscription. rejects with: VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (subscription_id is required.); PROJECT_NOT_FOUND (Project not found.); OWNER_NOT_ONBOARDED (Project owner has not connected a payment account yet.); BILLING_UNAVAILABLE (Payments not configured.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, OWNER_NOT_ONBOARDED, BILLING_UNAVAILABLE, SUBSCRIPTION_NOT_FOUND, PAYMENTS_CANCEL_OUTCOME_UNKNOWN, PAYMENTS_CANCEL_FAILED
|
|
1583
|
+
- `POST /v1/payments/capture`
|
|
1584
|
+
- Contract: response fields: booking_id, quote_id, payment_intent_id, status, captured_cents, stripe_mode. rejects with: VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (booking_id or payment_intent_id is required.); VALIDATION_ERROR (amount must be a positive integer cents value.); PROJECT_NOT_FOUND (Project not found.); PAYMENT_NOT_FOUND (No quote-backed booking payment found for this project.); VALIDATION_ERROR (Only manual-capture quote bookings can be captured.); PAYMENT_STATE_CONFLICT (Booking authorization is not capturable.); VALIDATION_ERROR (Manual-capture quote bookings require a positive deposit.); VALIDATION_ERROR (amount cannot exceed the authorized deposit.); VALIDATION_ERROR (booking environment does not match requested env.); PAYMENT_STATE_CONFLICT (Booking authorization is no longer capturable.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, PAYMENT_NOT_FOUND, PAYMENT_STATE_CONFLICT, PAYMENTS_CAPTURE_FAILED
|
|
1585
|
+
- `POST /v1/payments/checkout`
|
|
1586
|
+
- Contract: response fields: session_id, url, amount_total_cents, platform_fee_cents, fee_percent, stripe_mode, is_stand_in, checkout_intent_id, quote_id, booking_id, capture_method, payment_intent_id, quote_id=null when unavailable, booking_id=null when unavailable. rejects with: RATE_LIMITED (Too many checkout attempts: the limit is 60 per minute and resets within a minute.); PREVIEW_PAYMENT_SHARED_RECORD_REFUSED (A preview checkout runs in test mode and can't use a quote, booking or calendar hold: those are shared with the live app. It accepts line items or a plan.); VALIDATION_ERROR (env must be 'dev' or 'prod'.); VALIDATION_ERROR (mode must be 'payment' or 'subscription'.); IDENTITY_CLAIM_NOT_ALLOWED (App-user checkout identity cannot be supplied in metadata. It is taken from the signed-in app-user request that starts the checkout.); VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (quote_id checkouts do not accept line_items; the stored quote lineItems feed Stripe.); VALIDATION_ERROR (quote_id checkouts are one-time payment checkouts.); PROJECT_NOT_FOUND (Project not found.); VALIDATION_ERROR (plan may only contain letters, numbers, _, -, ., or : and must be <= 64 chars.); VALIDATION_ERROR (line_items (non-empty array) or a catalog plan name is required.); VALIDATION_ERROR (line_items max 100.); VALIDATION_ERROR (success_url and cancel_url are required.); VALIDATION_ERROR (line_item.quantity must be a positive integer <= 999999.); VALIDATION_ERROR (line_item.currency must be a 3-letter ISO code.); VALIDATION_ERROR (line_item.name max 250 chars.); VALIDATION_ERROR (… …); QUOTE_INVALID (Stored quote could not be used for checkout.); QUOTE_NOT_FOUND (Quote not found for this project.); VALIDATION_ERROR (booking_id does not match quote_id.); QUOTE_ALREADY_USED (Quote has already started checkout.); QUOTE_EXPIRED (Quote has expired. Checkout needs a new, unexpired quote.); VALIDATION_ERROR (Subscription checkout requires recurring Stripe price IDs, or in test mode a catalog plan with price_cents and interval (sw.billing.definePlans()).); OWNER_NOT_ONBOARDED (Project owner has not connected a payment account yet. Live checkouts start after the owner completes payments_onboard.); BILLING_UNAVAILABLE (Payments not configured.); VALIDATION_ERROR (Live checkouts need a published Stripe price.); VALIDATION_ERROR (Price "…" is not recurring and cannot be used for a subscription checkout.); VALIDATION_ERROR (Price "…" not found on the connected account.); VALIDATION_ERROR (Each line_item needs either `price` OR `{amount, currency, name}`.); QUOTE_DRIFT (Stored quote line items do not match the checkout total.); CALENDAR_HOLD_NOT_ACTIVE (Calendar hold is not active.); CALENDAR_HOLD_TTL_TOO_SHORT (Calendar hold must have at least 31 minutes remaining before checkout. The hold was released; checkout accepts a new hold whose ttl leaves at least 31 minutes.); CHECKOUT_STATE_SYNC_FAILED (Stripe checkout session was created (id …) but the platform could not record it. Payment can still be completed at …; reconciliation is by quote_id=….); CALENDAR_CHECKOUT_SYNC_FAILED (Checkout was created but the calendar hold could not be safely linked. The hold was released; a new checkout request starts a fresh checkout.); CHECKOUT_STATE_SYNC_FAILED (Stripe checkout session was created (id …) but the platform could not record it. Payment can still be completed at …; reconciliation is by checkout_intent_id=….); CALENDAR_ERROR (Calendar operation failed.). error codes: RATE_LIMITED, PREVIEW_PAYMENT_SHARED_RECORD_REFUSED, VALIDATION_ERROR, IDENTITY_CLAIM_NOT_ALLOWED, PROJECT_NOT_FOUND, QUOTE_INVALID, QUOTE_NOT_FOUND, QUOTE_ALREADY_USED, QUOTE_EXPIRED, OWNER_NOT_ONBOARDED, BILLING_UNAVAILABLE, QUOTE_DRIFT, CALENDAR_HOLD_TTL_TOO_SHORT, CHECKOUT_STATE_SYNC_FAILED, CALENDAR_CHECKOUT_SYNC_FAILED, CALENDAR_ERROR, PAYMENTS_CHECKOUT_FAILED, CALENDAR_HOLD_NOT_ACTIVE
|
|
1587
|
+
- `POST /v1/payments/current-user/cancel`
|
|
1588
|
+
- Contract: response fields: subscription_id, status, cancel_at_period_end, canceled_at, current_period_end, stripe_mode, cancellation, access_sync, canceled_at=null, cancellation='already_canceled', access_sync='not_needed'. rejects with: VALIDATION_ERROR (The request body must be a JSON object.); VALIDATION_ERROR (immediately must be true or false.); NO_SUBSCRIPTION (This user has no … plan subscription in this project.); IDENTITY_CLAIM_NOT_ALLOWED (The signed-in user subscription is derived by the deployed runtime. A developer cancels by subscription id with POST /v1/payments/cancel-subscription.); VALIDATION_ERROR (env must be 'dev' or 'prod'.); VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.); AUTH_REQUIRED (This requires a signed-in user.); IDENTITY_CLAIM_NOT_ALLOWED (A runtime request acts only for its own signed-in user.). error codes: VALIDATION_ERROR, NO_SUBSCRIPTION, IDENTITY_CLAIM_NOT_ALLOWED, PROJECT_NOT_FOUND, AUTH_REQUIRED, PAYMENTS_CANCEL_OUTCOME_UNKNOWN, PAYMENTS_CANCEL_FAILED
|
|
1589
|
+
- `GET /v1/payments/current-user/subscription`
|
|
1590
|
+
- Contract: response fields: subscription_id, plan, status, access, cancel_at_period_end, current_period_end, stripe_mode. rejects with: IDENTITY_CLAIM_NOT_ALLOWED (The signed-in user subscription is derived by the deployed runtime. A developer cancels by subscription id with POST /v1/payments/cancel-subscription.); VALIDATION_ERROR (env must be 'dev' or 'prod'.); VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.); AUTH_REQUIRED (This requires a signed-in user.); IDENTITY_CLAIM_NOT_ALLOWED (A runtime request acts only for its own signed-in user.); NO_SUBSCRIPTION (This user has no … plan subscription in this project.). error codes: IDENTITY_CLAIM_NOT_ALLOWED, VALIDATION_ERROR, PROJECT_NOT_FOUND, AUTH_REQUIRED, NO_SUBSCRIPTION
|
|
1591
|
+
- `GET /v1/payments/dashboard-link`
|
|
1592
|
+
- Contract: Runtime method: sw.payments.dashboardLink. response fields: url. rejects with: NOT_FOUND (This account has not onboarded for live payments; payments_onboard starts onboarding.). error codes: NOT_FOUND, PAYMENTS_DASHBOARD_LINK_FAILED, BILLING_UNAVAILABLE
|
|
1593
|
+
- `GET /v1/payments/events`
|
|
1594
|
+
- Contract: Runtime method: sw.payments.events. response fields: events. rejects with: PROJECT_NOT_FOUND (Project not found.). error codes: PROJECT_NOT_FOUND
|
|
1595
|
+
- `POST /v1/payments/onboard`
|
|
1596
|
+
- Contract: Runtime method: sw.payments.onboard. request fields: return_url, refresh_url, mode, env. mode values: test | live. env values: dev | prod. response fields: account_id, test_account_id, onboarding_url, expires_at, mode, test_only, charges_enabled, checkout_ready, platform_fee_percent, platform_fee_note, mode='test', test_only=true, onboarding_url=null when unavailable, mode='live', test_only=false. rejects with: VALIDATION_ERROR (mode must be 'test' or 'live'.). error codes: VALIDATION_ERROR, PAYMENTS_ONBOARD_FAILED, BILLING_UNAVAILABLE, PAYMENTS_ENROLLMENT_PENDING, AUTHORITY_UNAVAILABLE
|
|
1597
|
+
- `POST /v1/payments/portal`
|
|
1598
|
+
- Contract: Runtime method: sw.payments.portal. response fields: url, stripe_mode. rejects with: VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (customer_id or app_user_id is required.); VALIDATION_ERROR (return_url is required.); PROJECT_NOT_FOUND (Project not found.); VALIDATION_ERROR (return_url …); OWNER_NOT_ONBOARDED (Project owner has not connected a payment account yet.); BILLING_UNAVAILABLE (Payments not configured.); VALIDATION_ERROR (app_user_id is not an app user in this project.); VALIDATION_ERROR (customer_id does not match app_user_id for this project.); NO_SUBSCRIPTION (This user has no test billing customer yet; one is created by their first completed test checkout, and the billing portal opens only for a billing customer.); NO_SUBSCRIPTION (This user has no billing customer yet; one is created by their first completed checkout, and the billing portal opens only for a billing customer.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, OWNER_NOT_ONBOARDED, BILLING_UNAVAILABLE, TEST_PORTAL_UNAVAILABLE, NO_SUBSCRIPTION, CUSTOMER_NOT_FOUND, PAYMENTS_PORTAL_FAILED
|
|
1599
|
+
- `POST /v1/payments/quote`
|
|
1600
|
+
- Contract: response fields (partial): quote_id, booking_id, expires_at. rejects with: RATE_LIMITED (Too many quote attempts: the limit is 120 per minute and resets within a minute.); VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (resource is required.); VALIDATION_ERROR (range is required.); IDENTITY_CLAIM_NOT_ALLOWED (Quote booking identity requires a signed-in app user and cannot be supplied by a caller.); IDENTITY_CLAIM_NOT_ALLOWED (Quote booking identity must match the signed-in app user.); PROJECT_NOT_FOUND (Project not found.); VALIDATION_ERROR (booking.app_user_id is not an app user in this project.); VALIDATION_ERROR (Invalid quote input.); VALIDATION_ERROR (tax.customer_details is required when resource.tax.stripe is true.); OWNER_NOT_ONBOARDED (Project owner has not connected a payment account yet.); BILLING_UNAVAILABLE (Payments not configured.); VALIDATION_ERROR (booking.id may only contain letters, numbers, _, -, ., or : and must be <= 128 chars.); VALIDATION_ERROR (booking.metadata is too large.). error codes: RATE_LIMITED, VALIDATION_ERROR, IDENTITY_CLAIM_NOT_ALLOWED, PROJECT_NOT_FOUND, OWNER_NOT_ONBOARDED, BILLING_UNAVAILABLE, PAYMENTS_QUOTE_TAX_FAILED
|
|
1601
|
+
- `GET /v1/payments/refund`
|
|
1602
|
+
- Contract: response fields: refund, refunds. rejects with: VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (id, payment_intent_id, or charge_id is required.); PROJECT_NOT_FOUND (Project not found.); REFUND_NOT_FOUND (Refund not found for this project.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, REFUND_NOT_FOUND
|
|
1603
|
+
- `POST /v1/payments/refund`
|
|
1604
|
+
- Contract: Runtime method: sw.payments.refund. response fields (partial): duplicate, duplicate=true. rejects with: VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (payment_intent_id or charge_id is required.); VALIDATION_ERROR (amount must be a positive integer cents value.); VALIDATION_ERROR (idempotency_key must be a string of at most 200 characters.); PROJECT_NOT_FOUND (Project not found.); PAYMENT_ACCOUNT_UNKNOWN (Refunds need the payment_intent_id of the payment so its original payment account can be confirmed.); JOB_ENDED (This job has ended, so the refund was not started.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, PAYMENT_ACCOUNT_UNKNOWN, JOB_ENDED, PAYMENTS_REFUND_FAILED, PAYMENT_NOT_FOUND, PAYMENTS_REFUND_INDETERMINATE, PAYMENTS_REFUND_UNAVAILABLE
|
|
1605
|
+
- `POST /v1/payments/release`
|
|
1606
|
+
- Contract: response fields: booking_id, quote_id, payment_intent_id, status, stripe_mode. rejects with: VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (booking_id or payment_intent_id is required.); PROJECT_NOT_FOUND (Project not found.); PAYMENT_NOT_FOUND (No quote-backed booking payment found for this project.); VALIDATION_ERROR (Only manual-capture quote bookings can be released.); PAYMENT_STATE_CONFLICT (Booking authorization is not releasable.); VALIDATION_ERROR (booking environment does not match requested env.); PAYMENT_STATE_CONFLICT (Booking authorization is no longer releasable.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, PAYMENT_NOT_FOUND, PAYMENT_STATE_CONFLICT, PAYMENTS_RELEASE_FAILED
|
|
1607
|
+
- `GET /v1/payments/status`
|
|
1608
|
+
- Contract: Runtime method: sw.payments.status. response fields: connected, onboarded, charges_enabled, payouts_enabled, readiness, connected=false, onboarded=false, charges_enabled=false, payouts_enabled=false, account_id, test_account_id, details_submitted, country, default_currency
|
|
1609
|
+
- `GET /v1/payments/transactions`
|
|
1610
|
+
- Contract: Runtime method: sw.payments.transactions. response fields: transactions, has_more, next_cursor, stripe_mode, partial. rejects with: VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.); OWNER_NOT_ONBOARDED (The project owner must connect a payment account to list live transactions.); BILLING_UNAVAILABLE (Payments not configured.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, OWNER_NOT_ONBOARDED, BILLING_UNAVAILABLE, PAYMENTS_TRANSACTIONS_FAILED
|
|
1611
|
+
- `POST /v1/payments/webhook`
|
|
1612
|
+
- Contract: response fields: received, dropped, received=true, dropped='project_deleted', duplicate, duplicate=true. rejects with: VALIDATION_ERROR (Missing stripe-signature header.); VALIDATION_ERROR (Invalid webhook signature.); VALIDATION_ERROR (Webhook event is outside its destination's scope.); WEBHOOK_RECEIPT_WRITE_FAILED (The event was not durably recorded; a redelivery of the same event is accepted.); IDEMPOTENCY_CHECK_FAILED (Event idempotency could not be verified; a redelivery of the same event is accepted.); WEBHOOK_MARK_PROCESSED_FAILED (Processing was not durably recorded; a redelivery of the same event is accepted.). error codes: VALIDATION_ERROR, WEBHOOK_RECEIPT_WRITE_FAILED, IDEMPOTENCY_CHECK_FAILED, WEBHOOK_MARK_PROCESSED_FAILED, WEBHOOK_HANDLER_FAILED, CALENDAR_SLOT_LOST_AFTER_PAYMENT, BILLING_UNAVAILABLE
|
|
1613
|
+
|
|
1614
|
+
### /v1/postgres
|
|
1615
|
+
|
|
1616
|
+
- `POST /v1/postgres/attach`
|
|
1617
|
+
- Contract: request fields: project_id, provider_project_id, database, role, branch_id, pooled. response fields: attached, provider_project_id, branch_id, database, role, host, function_placement, requires_redeploy, note, attached=true, requires_redeploy=true. rejects with: VALIDATION_ERROR (provider_project_id is required (string).); POSTGRES_NOT_CONNECTED (No database provider account is connected; POST /v1/postgres/connect connects one.); VALIDATION_ERROR (… must be a string when supplied.); POSTGRES_ATTACH_SUPERSEDED (This project changed while the database was being attached, so the attachment was not applied. Nothing was overwritten.); VALIDATION_ERROR (project_id is required (string).); PROJECT_NOT_FOUND (Project not found.); PROJECT_OWNER_REQUIRED | PROJECT_EDITOR_REQUIRED (… access is required to ….); POSTGRES_BRANCH_NOT_FOUND (This database has no branch with id …, but a branch with that name has branch_id …. / This database has no branch with id ….…); POSTGRES_BRANCH_AMBIGUOUS (This database has … branches and none is marked default; branch_id selects one. / This database has too many branches to pick a default from; branch_id selects one.); POSTGRES_DATABASE_NOT_FOUND (That branch has no database named …. …); POSTGRES_DATABASE_AMBIGUOUS (That branch has no databases. / That branch has … databases (…); database selects one.); POSTGRES_ROLE_NOT_FOUND (That branch has no role named …. …); POSTGRES_ROLE_AMBIGUOUS (That branch has no roles. / That branch has … roles (…); role selects one.); POSTGRES_CONNECTION_URI_INCOMPLETE (The provider returned connection details without a usable password for that role. A role whose password the provider returns, or a role newly created in the provider account, is accepted. The platform will not reset the role password, because that would break anything else already using it.); POSTGRES_PROVIDER_UNAUTHORIZED (The stored database credential was refused when trying to …. The key is invalid or has no access to this database.); POSTGRES_PROVIDER_ERROR (The database provider could not … (status …).). error codes: VALIDATION_ERROR, POSTGRES_NOT_CONNECTED, POSTGRES_ATTACH_SUPERSEDED, PROJECT_NOT_FOUND, PROJECT_OWNER_REQUIRED, PROJECT_EDITOR_REQUIRED, POSTGRES_BRANCH_NOT_FOUND, POSTGRES_BRANCH_AMBIGUOUS, POSTGRES_DATABASE_NOT_FOUND, POSTGRES_DATABASE_AMBIGUOUS, POSTGRES_ROLE_NOT_FOUND, POSTGRES_ROLE_AMBIGUOUS, POSTGRES_CONNECTION_URI_INCOMPLETE, POSTGRES_PROVIDER_UNAUTHORIZED, POSTGRES_PROVIDER_ERROR, PROVIDER_UNAUTHORIZED
|
|
1618
|
+
- `POST /v1/postgres/connect`
|
|
1619
|
+
- Contract: request fields: project_id, api_key, provider_project_id. response fields: connected, connected=true. rejects with: VALIDATION_ERROR (api_key is required (string).); VALIDATION_ERROR (api_key max 4096 characters.); VALIDATION_ERROR (provider_project_id must be a string when supplied.); POSTGRES_PROVIDER_UNREACHABLE (The database provider could not be reached to verify the key. Nothing was stored.); POSTGRES_KEY_SCOPE_UNKNOWN (That key could not list databases in the account. A key scoped to a single database is checked against that database when provider_project_id is supplied. Nothing was stored.); PROJECT_OWNER_CHANGED (Project ownership changed before the database key was saved. Open the project again.); POSTGRES_CREDENTIAL_SETUP_PENDING (Credential setup or a preview operation is in progress. The provider key changes only after it is finished or reconciled; GET /v1/postgres/status and GET /v1/postgres/preview report its state.); VALIDATION_ERROR (project_id is required (string).); PROJECT_NOT_FOUND (Project not found.); PROJECT_OWNER_REQUIRED | PROJECT_EDITOR_REQUIRED (… access is required to ….); POSTGRES_PROVIDER_UNAUTHORIZED (The stored database credential was refused when trying to …. The key is invalid or has no access to this database.); POSTGRES_PROVIDER_ERROR (The database provider could not … (status …).). error codes: VALIDATION_ERROR, POSTGRES_PROVIDER_UNREACHABLE, POSTGRES_KEY_SCOPE_UNKNOWN, PROJECT_OWNER_CHANGED, POSTGRES_CREDENTIAL_SETUP_PENDING, PROJECT_NOT_FOUND, PROJECT_OWNER_REQUIRED, PROJECT_EDITOR_REQUIRED, POSTGRES_PROVIDER_UNAUTHORIZED, POSTGRES_PROVIDER_ERROR, PROVIDER_UNAUTHORIZED
|
|
1620
|
+
- `POST /v1/postgres/copy`
|
|
1621
|
+
- Contract: request fields: project_id, plan. rejects with: VALIDATION_ERROR (project_id is required (string).); PROJECT_NOT_FOUND (Project not found.); PROJECT_OWNER_REQUIRED | PROJECT_EDITOR_REQUIRED (… access is required to ….); POSTGRES_COPY_DESTINATION_UNREACHABLE (The attached database could not be reached or refused the request. Nothing was written.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, PROJECT_OWNER_REQUIRED, PROJECT_EDITOR_REQUIRED, POSTGRES_SQL_FAILED, POSTGRES_COPY_DESTINATION_UNREACHABLE
|
|
1622
|
+
- `POST /v1/postgres/copy/prepare`
|
|
1623
|
+
- Contract: request fields: project_id, schema. rejects with: VALIDATION_ERROR (project_id is required (string).); PROJECT_NOT_FOUND (Project not found.); PROJECT_OWNER_REQUIRED | PROJECT_EDITOR_REQUIRED (… access is required to ….); POSTGRES_COPY_DESTINATION_UNREACHABLE (The attached database could not be reached or refused the request. Nothing was written.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, PROJECT_OWNER_REQUIRED, PROJECT_EDITOR_REQUIRED, POSTGRES_SQL_FAILED, POSTGRES_COPY_DESTINATION_UNREACHABLE
|
|
1624
|
+
- `GET /v1/postgres/copy/status`
|
|
1625
|
+
- Contract: rejects with: VALIDATION_ERROR (project_id is required (string).); PROJECT_NOT_FOUND (Project not found.); PROJECT_OWNER_REQUIRED | PROJECT_EDITOR_REQUIRED (… access is required to ….); POSTGRES_COPY_DESTINATION_UNREACHABLE (The attached database could not be reached or refused the request. Nothing was written.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, PROJECT_OWNER_REQUIRED, PROJECT_EDITOR_REQUIRED, POSTGRES_SQL_FAILED, POSTGRES_COPY_DESTINATION_UNREACHABLE
|
|
1626
|
+
- `POST /v1/postgres/create`
|
|
1627
|
+
- Contract: request fields: project_id, name, region, pooled. response fields: created, attached, provider_project_id, region, host, function_placement, requires_redeploy, note, created=true, attached=true, requires_redeploy=true. rejects with: POSTGRES_NOT_CONNECTED (No database provider account is connected; POST /v1/postgres/connect connects one.); POSTGRES_ALREADY_ATTACHED (This project already has a database attached. A create runs only after POST /v1/postgres/disconnect removes it.); POSTGRES_CREATE_IN_PROGRESS (A create for this project is unresolved…: a database… may have been created.… A create that is still running finishes on its own. An interrupted create may have left a database in the provider account: POST /v1/postgres/attach attaches an existing one, and POST /v1/postgres/disconnect clears this state. It will not be retried or cleared automatically.); POSTGRES_CREATE_UNCERTAIN (A previous create did not return a readable result, so a database may already exist for this project…. The provider account shows whether it exists; POST /v1/postgres/attach attaches it and POST /v1/postgres/disconnect clears this state. It will not be retried automatically.); POSTGRES_CREATE_UNCERTAIN (The create request did not return a readable result, so a database may or may not have been created. The provider account shows whether it exists; this will not be retried automatically.); POSTGRES_CREATE_UNCERTAIN (The database was created but the response did not include the details needed to attach it…. It is in the provider account, and POST /v1/postgres/attach attaches it.); POSTGRES_CREATE_UNCERTAIN (The database was created (provider project …) but could not be recorded against this project. POST /v1/postgres/attach attaches it; it will not be created again.); VALIDATION_ERROR (project_id is required (string).); PROJECT_NOT_FOUND (Project not found.); PROJECT_OWNER_REQUIRED | PROJECT_EDITOR_REQUIRED (… access is required to ….); POSTGRES_PROVIDER_UNAUTHORIZED (The stored database credential was refused when trying to …. The key is invalid or has no access to this database.); POSTGRES_PROVIDER_ERROR (The database provider could not … (status …).). error codes: POSTGRES_NOT_CONNECTED, POSTGRES_ALREADY_ATTACHED, POSTGRES_CREATE_IN_PROGRESS, POSTGRES_CREATE_UNCERTAIN, POSTGRES_CREATE_SUPERSEDED, VALIDATION_ERROR, PROJECT_NOT_FOUND, PROJECT_OWNER_REQUIRED, PROJECT_EDITOR_REQUIRED, POSTGRES_PROVIDER_UNAUTHORIZED, POSTGRES_PROVIDER_ERROR, PROVIDER_UNAUTHORIZED
|
|
1628
|
+
- `POST /v1/postgres/credentials/recover`
|
|
1629
|
+
- Contract: request fields: project_id, action. action values: finalize | abandon. response fields (partial): abandoned, role, abandoned=true, verified_now, runtime_grants_schema, requires_redeploy, note, verified_now=true, runtime_grants_schema='public', requires_redeploy=true. rejects with: VALIDATION_ERROR (action must be finalize or abandon.); POSTGRES_CREDENTIAL_SETUP_NOT_PENDING (No credential setup is pending.); POSTGRES_ATTACH_SUPERSEDED (The credential setup changed; GET /v1/postgres/status returns the current state, and the request can be repeated against it.); VALIDATION_ERROR (project_id is required (string).); PROJECT_NOT_FOUND (Project not found.); PROJECT_OWNER_REQUIRED | PROJECT_EDITOR_REQUIRED (… access is required to ….). error codes: VALIDATION_ERROR, POSTGRES_CREDENTIAL_SETUP_NOT_PENDING, POSTGRES_ATTACH_SUPERSEDED, PROJECT_NOT_FOUND, PROJECT_OWNER_REQUIRED, PROJECT_EDITOR_REQUIRED
|
|
1630
|
+
- `POST /v1/postgres/credentials/separate`
|
|
1631
|
+
- Contract: request fields: project_id. response fields (partial): verified_now, requires_redeploy, note, verified_now=true, requires_redeploy=true, privileges, runtime_grants_schema, runtime_grants_schema='public'. rejects with: POSTGRES_CREDENTIAL_SETUP_PENDING (Credential setup for role … is unresolved. POST /v1/postgres/credentials/recover finalizes it (action finalize) or abandons it (action abandon, once the role is removed). No second login will be created.); POSTGRES_NOT_ATTACHED (No database is attached; POST /v1/postgres/attach or POST /v1/postgres/create attaches one.); POSTGRES_NOT_CONNECTED (Separating credentials needs the database provider connection, which is missing or incomplete; POST /v1/postgres/connect reconnects it.); POSTGRES_ATTACH_SUPERSEDED (The attachment or credential setup changed; GET /v1/postgres/status returns the current state, and the request can be repeated against it.); POSTGRES_ATTACH_SUPERSEDED (Credential setup for role … could not be recorded; the pending setup is reported by GET /v1/postgres/status.); VALIDATION_ERROR (project_id is required (string).); PROJECT_NOT_FOUND (Project not found.); PROJECT_OWNER_REQUIRED | PROJECT_EDITOR_REQUIRED (… access is required to ….); POSTGRES_CONNECTION_URI_INCOMPLETE (The provider returned connection details without a usable password for that role. A role whose password the provider returns, or a role newly created in the provider account, is accepted. The platform will not reset the role password, because that would break anything else already using it.); POSTGRES_PROVIDER_UNAUTHORIZED (The stored database credential was refused when trying to …. The key is invalid or has no access to this database.); POSTGRES_PROVIDER_ERROR (The database provider could not … (status …).). error codes: POSTGRES_CREDENTIAL_SETUP_PENDING, POSTGRES_NOT_ATTACHED, POSTGRES_NOT_CONNECTED, POSTGRES_ATTACH_SUPERSEDED, VALIDATION_ERROR, PROJECT_NOT_FOUND, PROJECT_OWNER_REQUIRED, PROJECT_EDITOR_REQUIRED, POSTGRES_CONNECTION_URI_INCOMPLETE, POSTGRES_PROVIDER_UNAUTHORIZED, POSTGRES_PROVIDER_ERROR, PROVIDER_UNAUTHORIZED
|
|
1632
|
+
- `POST /v1/postgres/credentials/verify`
|
|
1633
|
+
- Contract: request fields: project_id. response fields (partial): verified_now, automatic_grants_schema, verified_now=true, automatic_grants_schema='public'. rejects with: VALIDATION_ERROR (project_id is required (string).); PROJECT_NOT_FOUND (Project not found.); PROJECT_OWNER_REQUIRED | PROJECT_EDITOR_REQUIRED (… access is required to ….). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, PROJECT_OWNER_REQUIRED, PROJECT_EDITOR_REQUIRED
|
|
1634
|
+
- `POST /v1/postgres/disconnect`
|
|
1635
|
+
- Contract: request fields: project_id, forget_key. response fields: disconnected, detached, cleared_pending_create, key_removed, database_deleted, disconnected=true, database_deleted=false. rejects with: POSTGRES_NOT_CONNECTED (No database is connected to this project.); POSTGRES_ATTACH_SUPERSEDED (This project changed while it was being disconnected. Nothing was removed; GET /v1/postgres/status returns the current state, and the request can be repeated.); VALIDATION_ERROR (project_id is required (string).); PROJECT_NOT_FOUND (Project not found.); PROJECT_OWNER_REQUIRED | PROJECT_EDITOR_REQUIRED (… access is required to ….). error codes: POSTGRES_NOT_CONNECTED, POSTGRES_ATTACH_SUPERSEDED, VALIDATION_ERROR, PROJECT_NOT_FOUND, PROJECT_OWNER_REQUIRED, PROJECT_EDITOR_REQUIRED
|
|
1636
|
+
- `POST /v1/postgres/migrations/apply`
|
|
1637
|
+
- Contract: request fields: project_id, target, name, sql. response fields: target, migration. rejects with: VALIDATION_ERROR (target must be production or preview.); VALIDATION_ERROR (project_id is required (string).); PROJECT_NOT_FOUND (Project not found.); PROJECT_OWNER_REQUIRED | PROJECT_EDITOR_REQUIRED (… access is required to ….). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, PROJECT_OWNER_REQUIRED, PROJECT_EDITOR_REQUIRED
|
|
1638
|
+
- `GET /v1/postgres/migrations/status`
|
|
1639
|
+
- Contract: response fields: target. rejects with: VALIDATION_ERROR (target must be production or preview.); VALIDATION_ERROR (project_id is required (string).); PROJECT_NOT_FOUND (Project not found.); PROJECT_OWNER_REQUIRED | PROJECT_EDITOR_REQUIRED (… access is required to ….). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, PROJECT_OWNER_REQUIRED, PROJECT_EDITOR_REQUIRED
|
|
1640
|
+
- `GET /v1/postgres/preview`
|
|
1641
|
+
- Contract: rejects with: VALIDATION_ERROR (project_id is required (string).); PROJECT_NOT_FOUND (Project not found.); PROJECT_OWNER_REQUIRED | PROJECT_EDITOR_REQUIRED (… access is required to ….). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, PROJECT_OWNER_REQUIRED, PROJECT_EDITOR_REQUIRED
|
|
1642
|
+
- `POST /v1/postgres/preview`
|
|
1643
|
+
- Contract: request fields: project_id, action. rejects with: VALIDATION_ERROR (action must be create, reset or delete.); VALIDATION_ERROR (project_id is required (string).); PROJECT_NOT_FOUND (Project not found.); PROJECT_OWNER_REQUIRED | PROJECT_EDITOR_REQUIRED (… access is required to ….). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, PROJECT_OWNER_REQUIRED, PROJECT_EDITOR_REQUIRED
|
|
1644
|
+
- `GET /v1/postgres/status`
|
|
1645
|
+
- Contract: response fields (partial): connected, attached, auth_kind, function_placement, preference, provenance, best_effort, connected=false, attached=false, auth_kind=null, best_effort=true, status, provider, provider_project_id, branch_id, database, role, host, last_error, attached_at, updated_at, credentials, verified_now, automatic_grants_schema, connected=true, verified_now=false. rejects with: VALIDATION_ERROR (project_id is required (string).); PROJECT_NOT_FOUND (Project not found.); PROJECT_OWNER_REQUIRED | PROJECT_EDITOR_REQUIRED (… access is required to ….). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, PROJECT_OWNER_REQUIRED, PROJECT_EDITOR_REQUIRED
|
|
1646
|
+
|
|
1647
|
+
### /v1/preview
|
|
1648
|
+
|
|
1649
|
+
- `POST /v1/preview/:param/preview/checks`
|
|
1650
|
+
- Contract: response fields: run_id, read. rejects with: VALIDATION_ERROR (replay is a list of at most 40 { method, path, body?, public? } with paths on the app (starting with /). Nothing ran.). error codes: VALIDATION_ERROR
|
|
1651
|
+
- `GET /v1/preview/:param/preview/checks/:param`
|
|
1652
|
+
- Contract: response fields (partial): run_id. rejects with: PROJECT_NOT_FOUND (Project not found.); NOT_FOUND (No such check run.). error codes: PROJECT_NOT_FOUND, NOT_FOUND
|
|
1653
|
+
- `POST /v1/preview/:param/preview/mint`
|
|
1654
|
+
- Contract: request fields: preview_session_id, preview_id, draft_id, candidate_release_id. response fields: preview_url. rejects with: VALIDATION_ERROR (Canonical preview fields and their aliases must match when both are sent.); VALIDATION_ERROR (preview_session_id and preview_id are required.); DRAFT_NOT_FOUND (Preview not found.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, DRAFT_NOT_FOUND, PROJECT_NOT_FOUND
|
|
1655
|
+
- `POST /v1/preview/:param/preview/revoke`
|
|
1656
|
+
- Contract: request fields: preview_session_id, draft_id. response fields: revoked. rejects with: VALIDATION_ERROR (preview_session_id and its draft_id alias must match when both are sent.); VALIDATION_ERROR (preview_session_id is required.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
1657
|
+
- `POST /v1/preview/:param/preview/run-job`
|
|
1658
|
+
- `POST /v1/preview/:param/preview/tool-credential`
|
|
1659
|
+
- Contract: request fields: preview_session_id, draft_id. response fields: credential, preview_session_id, preview_id, note, note='Acts only on this preview\'. rejects with: VALIDATION_ERROR (preview_session_id and its draft_id alias must match when both are sent.); VALIDATION_ERROR (preview_session_id is required.); DRAFT_NOT_FOUND (Preview not found, or it is no longer open. Open one with `somewhere preview`.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, DRAFT_NOT_FOUND, PROJECT_NOT_FOUND
|
|
1660
|
+
|
|
1661
|
+
### /v1/preview-tools
|
|
1662
|
+
|
|
1663
|
+
- `POST /v1/preview-tools/browser-session`
|
|
1664
|
+
- Contract: response fields: preview_session_id, preview_id, session_id, origin, cookie, value. rejects with: PREVIEW_ADDRESS_UNAVAILABLE (This project has no preview address.); DRAFT_VERSION_MISMATCH (The preview was saved again or closed just now. Nothing was created; run the tests again.). error codes: PREVIEW_ADDRESS_UNAVAILABLE, DRAFT_VERSION_MISMATCH
|
|
1665
|
+
- `DELETE /v1/preview-tools/browser-session/:param`
|
|
1666
|
+
- Contract: response fields: preview_session_id, ended
|
|
1667
|
+
- `GET /v1/preview-tools/jobs/:param`
|
|
1668
|
+
- Contract: response fields: job_id, environment, preview_session_id, preview_id, status, handler, result, error_code, timeout_seconds, attempts_allowed, created_at, started_at, completed_at, environment='preview'. rejects with: JOB_NOT_FOUND (No job with this id in this preview.). error codes: JOB_NOT_FOUND
|
|
1669
|
+
- `GET /v1/preview-tools/mail`
|
|
1670
|
+
- Contract: response fields: preview_session_id, messages
|
|
1671
|
+
- `POST /v1/preview-tools/run-job`
|
|
1672
|
+
- Contract: rejects with: VALIDATION_ERROR (The request body must be JSON.); VALIDATION_ERROR (The request body must be a JSON object.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
1673
|
+
- `DELETE /v1/preview-tools/signups/:param`
|
|
1674
|
+
- Contract: response fields: preview_session_id, deleted, deleted=true. rejects with: LAST_OWNER (Nothing was deleted: this account is the only owner of …. A group always keeps an owner. Make another member an owner, or delete the group, then delete the account again.). error codes: USER_NOT_FOUND, VALIDATION_ERROR, LAST_OWNER
|
|
1675
|
+
- `POST /v1/preview-tools/signups/delete`
|
|
1676
|
+
- Contract: request fields: ids, delete_groups_only_they_belong_to. response fields: preview_session_id, results, groups_deleted. rejects with: VALIDATION_ERROR (Send ids: an array of 1 to 50 exact preview account ids (they start with pvu_). Accounts are never removed by email.); VALIDATION_ERROR (delete_groups_only_they_belong_to must be true or false.). error codes: VALIDATION_ERROR
|
|
1677
|
+
- `GET /v1/preview-tools/target`
|
|
1678
|
+
- Contract: response fields: project_id, preview_session_id, preview_id, origin, contract_digest. rejects with: PREVIEW_ADDRESS_UNAVAILABLE (This project has no preview address.); DRAFT_VERSION_MISMATCH (This preview has no saved version to test. Save it with `somewhere preview` first.). error codes: PREVIEW_ADDRESS_UNAVAILABLE, DRAFT_VERSION_MISMATCH
|
|
1679
|
+
- `GET /v1/preview-tools/users`
|
|
1680
|
+
- Contract: response fields: preview_session_id, users
|
|
1681
|
+
- `POST /v1/preview-tools/users`
|
|
1682
|
+
- Contract: response fields: preview_session_id, user, password. rejects with: VALIDATION_ERROR (The request body must be JSON.); VALIDATION_ERROR (The request body must be a JSON object.). error codes: VALIDATION_ERROR
|
|
1683
|
+
- `DELETE /v1/preview-tools/users/:param`
|
|
1684
|
+
- Contract: response fields: preview_session_id, deleted, deleted=true. rejects with: USER_NOT_FOUND (No user with that id or email in this preview.); LAST_OWNER (Nothing was deleted: this account is the only owner of …. A group always keeps an owner. Make another member an owner, or delete the group, then delete the account again.). error codes: USER_NOT_FOUND, VALIDATION_ERROR, LAST_OWNER
|
|
1685
|
+
- `GET /v1/preview-tools/whoami`
|
|
1686
|
+
- Contract: response fields: project_id, preview_session_id, preview_id
|
|
1687
|
+
|
|
1688
|
+
### /v1/pricing
|
|
1689
|
+
|
|
1690
|
+
- `GET /v1/pricing`
|
|
1691
|
+
- Contract: response fields: tiers, id, name, price_usd_monthly, trial_days, tagline, features, cta, available, limits, stripe_price_id, trial_days=null when unavailable, cta=null when unavailable
|
|
1692
|
+
|
|
1693
|
+
### /v1/privacy-pages
|
|
1694
|
+
|
|
1695
|
+
- `GET /v1/privacy-pages/:param`
|
|
1696
|
+
- Contract: rejects with: PRIVACY_PAGE_NOT_FOUND (This app has not published a privacy page.). error codes: PRIVACY_PAGE_NOT_FOUND
|
|
1697
|
+
|
|
1698
|
+
### /v1/project-context
|
|
1699
|
+
|
|
1700
|
+
- `GET /v1/project-context/:param`
|
|
1701
|
+
- Contract: rejects with: ROUTE_FORBIDDEN (Project context is read and written by project editors, not by deployed app code or app users.); PROJECT_NOT_FOUND (Project not found.); PROJECT_EDITOR_REQUIRED (Editor access to this project is required.). error codes: ROUTE_FORBIDDEN, PROJECT_NOT_FOUND, PROJECT_EDITOR_REQUIRED
|
|
1702
|
+
- `PUT /v1/project-context/:param`
|
|
1703
|
+
- Contract: rejects with: VALIDATION_ERROR (instructions and/or design_principles is required (a string, or null to clear).); ROUTE_FORBIDDEN (Project context is read and written by project editors, not by deployed app code or app users.); PROJECT_NOT_FOUND (Project not found.); PROJECT_EDITOR_REQUIRED (Editor access to this project is required.); VALIDATION_ERROR (… must be a string or null.); PROJECT_CONTEXT_TOO_LONG (… is … characters; the limit is ….). error codes: VALIDATION_ERROR, ROUTE_FORBIDDEN, PROJECT_NOT_FOUND, PROJECT_EDITOR_REQUIRED, PROJECT_CONTEXT_TOO_LONG
|
|
1704
|
+
- `DELETE /v1/project-context/:param/notes/:param`
|
|
1705
|
+
- Contract: rejects with: VALIDATION_ERROR (topic must match ….); ROUTE_FORBIDDEN (Project context is read and written by project editors, not by deployed app code or app users.); PROJECT_NOT_FOUND (Project not found.); PROJECT_EDITOR_REQUIRED (Editor access to this project is required.). error codes: VALIDATION_ERROR, ROUTE_FORBIDDEN, PROJECT_NOT_FOUND, PROJECT_EDITOR_REQUIRED
|
|
1706
|
+
- `PUT /v1/project-context/:param/notes/:param`
|
|
1707
|
+
- Contract: request fields: body. rejects with: VALIDATION_ERROR (topic must match …, e.g. "brand-voice".); VALIDATION_ERROR (body is required; DELETE on the note removes it.); PROJECT_CONTEXT_NOTES_FULL (A project keeps up to … notes; a new topic is accepted after one is deleted, and existing topics stay updatable.); ROUTE_FORBIDDEN (Project context is read and written by project editors, not by deployed app code or app users.); PROJECT_NOT_FOUND (Project not found.); PROJECT_EDITOR_REQUIRED (Editor access to this project is required.); VALIDATION_ERROR (… must be a string or null.); PROJECT_CONTEXT_TOO_LONG (… is … characters; the limit is ….). error codes: VALIDATION_ERROR, PROJECT_CONTEXT_NOTES_FULL, ROUTE_FORBIDDEN, PROJECT_NOT_FOUND, PROJECT_EDITOR_REQUIRED, PROJECT_CONTEXT_TOO_LONG
|
|
1708
|
+
|
|
1709
|
+
### /v1/project-docs
|
|
1710
|
+
|
|
1711
|
+
- `GET /v1/project-docs`
|
|
1712
|
+
- Contract: rejects with: VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.); DOCS_QUERY_FILTER_REQUIRED (This filter keeps too much of the docs artifact to answer: reading it would exceed … (…) at …. An exact path, symbol, or METHOD + route filter retains less.); DOCS_QUERY_FILTER_REQUIRED (This docs artifact is larger than the unbounded-read limit. artifact_bytes and max_unfiltered_bytes give the exact sizes. An exact path, symbol, or METHOD + route filter is accepted: a filtered read streams the artifact instead of holding it, so its total size does not apply — a filtered read is bounded by how much the filter retains, in filtered_read_bounds.); DOCS_SIDECAR_NOT_FOUND (No deployed docs sidecar is stored for this project yet. / No deployed docs sidecar is stored for version ….); DOCS_QUERY_NOT_FOUND (No entry in the deployed docs sidecar matched the requested filter.); VALIDATION_ERROR (version must be a positive integer.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, DOCS_QUERY_FILTER_REQUIRED, DOCS_SIDECAR_NOT_FOUND, DOCS_QUERY_NOT_FOUND
|
|
1713
|
+
|
|
1714
|
+
### /v1/project/grep
|
|
1715
|
+
|
|
1716
|
+
- `POST /v1/project/grep`
|
|
1717
|
+
- Contract: response fields (partial): scope, scope_predicate, source_authority, projects_scanned, projects_searched, projects_skipped, projects_skipped_by_reason, scope='live', source_authority='Release-pinned projects use their immutable release snapshot; other projects use prod-slot authored files and the prod function script. Compiled bundles and file_tree are excluded.', project_id, env, matches, truncated, files_searched. rejects with: VALIDATION_ERROR (Request body must be a JSON object.); VALIDATION_ERROR (scope must be "live" when provided.); VALIDATION_ERROR (project_id is required unless scope is "live".); VALIDATION_ERROR (env must be "dev" or "prod".); VALIDATION_ERROR (glob must be a string (e.g. "api/**" or "*.ts").); VALIDATION_ERROR (glob is not a valid path pattern.); VALIDATION_ERROR (scope "live" searches production authored source only.); FORBIDDEN (Platform admin privileges are required for a live-fleet source census.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, FORBIDDEN, PROJECT_NOT_FOUND, SOURCE_READ_FAILED
|
|
1718
|
+
|
|
1719
|
+
### /v1/projects
|
|
1720
|
+
|
|
1721
|
+
- `GET /v1/projects`
|
|
1722
|
+
- Contract: response fields: projects, deployed_count, tier. error codes: VALIDATION_ERROR
|
|
1723
|
+
- `POST /v1/projects`
|
|
1724
|
+
- Contract: request fields: name, description, subdomain, cli_version. response fields (partial): name, slug, url, baseSlug, subdomain, id, status, description, cli_version, name_reuse_notice, status='draft'. rejects with: INVALID_API_KEY (The agent connection could not be verified.); VALIDATION_ERROR (name is required (string).); VALIDATION_ERROR (description must be a string.); VALIDATION_ERROR (subdomain must be a string.); VALIDATION_ERROR (cli_version must be a version such as 0.38.15.); VALIDATION_ERROR (Subdomain must be … characters or fewer.); VALIDATION_ERROR (Could not derive a valid slug from the project name; a slug uses lowercase letters, digits, and hyphens.); VALIDATION_ERROR (Invalid isolated preflight project slug.); VALIDATION_ERROR (… ("…" was derived from the project name; a longer name or an explicit subdomain gives a different slug.)); PROJECT_NAME_UNAVAILABLE (Could not allocate a project hostname. Retry the request.); CLAIM_AGENT_PROJECT_CREATION_REFUSED (This connection can create up to … projects. Ask the owner to sign you in if you need to create more.); CONNECT_CODE_PROJECT_CREATION_REFUSED (An active connect-code connection can create … projects total. Ask the owner for a new code to create more.). error codes: INVALID_API_KEY, VALIDATION_ERROR, PROJECT_NAME_UNAVAILABLE, SUBDOMAIN_TAKEN, CLAIM_AGENT_PROJECT_CREATION_REFUSED, CONNECT_CODE_PROJECT_CREATION_REFUSED
|
|
1725
|
+
- `DELETE /v1/projects/:param`
|
|
1726
|
+
- Contract: request fields: code, purge. response fields: deleted, already_deleting, note, deleted=true, already_deleting=true, note='This project was already deleted. Its remaining domains are now released.', domains_removed, domains_detached, sending_domains_removed, purged, cleanup, permanent_deletion_at. rejects with: VALIDATION_ERROR (code must be the confirmation code string from the first delete call. Nothing was deleted.); VALIDATION_ERROR (Unknown field …. Send {} to get a confirmation code, then { "code": "<code>" } to confirm. Nothing was deleted.); PROJECT_NOT_FOUND (Project not found.); INVALID_CODE (Invalid, expired, or already-used confirmation code.); DELETE_INCOMPLETE (This project is deleted, but its app has not confirmed that data access stopped. Repeating the delete takes a new confirmation code.… / This project is deleted.…); PROJECT_ALREADY_DELETING (This project is already being deleted. Nothing changed; its original deletion schedule still applies.); DELETE_INCOMPLETE (The project could not be taken offline completely. Repeating the delete takes a new confirmation code.… / The app is deleted and offline.…). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, INVALID_CODE, DELETE_INCOMPLETE, PROJECT_ALREADY_DELETING
|
|
1727
|
+
- `GET /v1/projects/:param`
|
|
1728
|
+
- Contract: response fields (partial): id, name, description, subdomain, slug, status, hasActiveRelease, publishedBefore, ownerTemporaryExpiresAt, lastDeployAt, activeReleaseCreatedAt, abilities, isOwner, access, ownerTemporaryExpiresAt=null when unavailable. rejects with: PROJECT_NOT_FOUND (Project not found.). error codes: PROJECT_NOT_FOUND
|
|
1729
|
+
- `PATCH /v1/projects/:param`
|
|
1730
|
+
- Contract: response fields (partial): updated, analytics_consent, edge_cache_disabled, userId, updated=true. rejects with: VALIDATION_ERROR (analytics_consent requires mode off, required or auto, and a policy_version of 1–64 letters, numbers, dots, underscores or hyphens.); VALIDATION_ERROR (auth_welcome_email must be true or false. Omitting it keeps the current setting.); VALIDATION_ERROR (auth_hosted_signup was removed along with the hosted sign-up page. Apps create accounts from their own server with POST /v1/auth/signup; a request without this field is accepted.); VALIDATION_ERROR (… was removed along with auth.md. Agents sign in through MCP sign-in or CLI pairing; a request without this field is accepted.); VALIDATION_ERROR (CORS modes are not configurable; allowed_origins (exact trusted origins) controls CORS.); PROJECT_NOT_FOUND (Project not found.); DATABASE_BINDING_CHANGE_UNSUPPORTED (Database bindings cannot be changed through project settings. A settings update without database_id is accepted.); VALIDATION_ERROR (Nothing to update.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, DATABASE_BINDING_CHANGE_UNSUPPORTED
|
|
1731
|
+
- `GET /v1/projects/:param/allowed-origins`
|
|
1732
|
+
- Contract: response fields (partial): project_id. rejects with: PROJECT_NOT_FOUND (Project not found.). error codes: PROJECT_NOT_FOUND
|
|
1733
|
+
- `PUT /v1/projects/:param/allowed-origins`
|
|
1734
|
+
- Contract: request fields: allowed_origins. response fields (partial): updated, project_id, updated=true. rejects with: VALIDATION_ERROR (CORS modes are not configurable; allowed_origins (exact trusted origins) controls CORS.); VALIDATION_ERROR (allowed_origins is required: an array of exact origins ([] clears the allowlist).). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
1735
|
+
- `GET /v1/projects/:param/analytics/pageviews`
|
|
1736
|
+
- `GET /v1/projects/:param/appearance`
|
|
1737
|
+
- Contract: response fields: share, checked_at. rejects with: PROJECT_NOT_FOUND (Project not found.). error codes: PROJECT_NOT_FOUND
|
|
1738
|
+
- `POST /v1/projects/:param/archive`
|
|
1739
|
+
- Contract: response fields: status, status='archived'. rejects with: PROJECT_NOT_FOUND (Project not found.); PROJECT_CHANGED (The project changed. Reload it and try again.); LIFECYCLE_PUBLICATION_PENDING (The project is …, but its app has not confirmed this yet. Repeating the same request is safe.). error codes: PROJECT_NOT_FOUND, PROJECT_CHANGED, LIFECYCLE_PUBLICATION_PENDING
|
|
1740
|
+
- `GET /v1/projects/:param/collaborators`
|
|
1741
|
+
- Contract: response fields: collaborators, pending_invites, group_members, groups_awaiting_owner_approval, revoked. rejects with: PROJECT_NOT_FOUND (Project not found.). error codes: PROJECT_NOT_FOUND
|
|
1742
|
+
- `POST /v1/projects/:param/collaborators`
|
|
1743
|
+
- Contract: request fields: email. response fields: invited, email, invited=true. rejects with: VALIDATION_ERROR (email is required); PROJECT_NOT_FOUND (Project not found.); VALIDATION_ERROR (You already have access to this project.); VALIDATION_ERROR (… is already a collaborator on this project.); PROJECT_OWNER_REQUIRED (The project owner removed this person from the project. Only the owner can invite them again.); RATE_LIMITED (Too many invitations. Try again later.); INVITATION_RATE_LIMIT_UNAVAILABLE (Invitation sending is temporarily unavailable.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, PROJECT_OWNER_REQUIRED, RATE_LIMITED, INVITATION_RATE_LIMIT_UNAVAILABLE
|
|
1744
|
+
- `DELETE /v1/projects/:param/collaborators/:param`
|
|
1745
|
+
- Contract: response fields: removed, revoked, remaining_access, via_groups, removed=true, revoked=false, user_id, cancelled_invitations, access_note, user_id=null, remaining_access='none', access_note='No account uses this email yet, so its pending invitations were cancelled. Nothing blocks a new invitation to this email later.', revoked=true. rejects with: PROJECT_NOT_FOUND (Project not found.); NOT_FOUND (No collaborator or pending invite found for that email.); GROUP_ACCESS_REMAINS (That person is not a direct collaborator; they have access through a group this project belongs to. Only the project owner can remove their access to this project.); NOT_FOUND (That user is not a collaborator on this project.); TARGET_CHANGED (That account was just merged into another account. Nothing was changed; the same removal request can be repeated.); CANNOT_REVOKE_OWNER (The project owner always keeps access; a project transfer changes the owner.); NOT_FOUND (No such person.); PROJECT_OWNER_REQUIRED (Only the project owner can remove a person from the project. Nothing was changed.). error codes: PROJECT_NOT_FOUND, NOT_FOUND, GROUP_ACCESS_REMAINS, TARGET_CHANGED, CANNOT_REVOKE_OWNER, PROJECT_OWNER_REQUIRED
|
|
1746
|
+
- `POST /v1/projects/:param/collaborators/accept`
|
|
1747
|
+
- Contract: request fields: token. response fields: accepted, project_id, accepted=true. rejects with: AUTH_INVALID_CREDS (Authentication required.); VALIDATION_ERROR (This invitation link is incomplete. Open it again from the email.); AUTH_INVALID_CREDS (Account not found.); EMAIL_NOT_VERIFIED (Confirm your email address first, then open the invitation again.); INVITE_INVALID (This invitation link is not valid. Ask the person who invited you to send a new one.); INVITE_USED (This invitation has already been accepted.); INVITE_EXPIRED (This invitation has expired. Ask the person who invited you to send a new one.); INVITE_WRONG_ACCOUNT (This invitation was sent to …. It is accepted only by an account signed in with that email.); PROJECT_NOT_FOUND (This app no longer exists.); ACCESS_REVOKED (The project owner removed your access to this project. Only a new invitation from the project owner can restore it.); INVITE_USED (This invitation was revoked, replaced, or already accepted.). error codes: AUTH_INVALID_CREDS, VALIDATION_ERROR, EMAIL_NOT_VERIFIED, INVITE_INVALID, INVITE_USED, INVITE_EXPIRED, INVITE_WRONG_ACCOUNT, PROJECT_NOT_FOUND, ACCESS_REVOKED
|
|
1748
|
+
- `POST /v1/projects/:param/collaborators/decline`
|
|
1749
|
+
- Contract: request fields: token. response fields: declined, project_id, declined=true. rejects with: INVITE_USED (This invitation has already been accepted. Leaving the app is done from the app itself.); AUTH_INVALID_CREDS (Authentication required.); VALIDATION_ERROR (This invitation link is incomplete. Open it again from the email.); AUTH_INVALID_CREDS (Account not found.); EMAIL_NOT_VERIFIED (Confirm your email address first, then open the invitation again.); INVITE_INVALID (This invitation link is not valid. Ask the person who invited you to send a new one.); INVITE_WRONG_ACCOUNT (This invitation was sent to …. Only an account signed in with that email can open it.). error codes: INVITE_USED, AUTH_INVALID_CREDS, VALIDATION_ERROR, EMAIL_NOT_VERIFIED, INVITE_INVALID, INVITE_WRONG_ACCOUNT
|
|
1750
|
+
- `GET /v1/projects/:param/collaborators/invite`
|
|
1751
|
+
- Contract: response fields: app_name, invited_by, invited_email, role, expires_at, state. rejects with: AUTH_INVALID_CREDS (Authentication required.); VALIDATION_ERROR (This invitation link is incomplete. Open it again from the email.); AUTH_INVALID_CREDS (Account not found.); EMAIL_NOT_VERIFIED (Confirm your email address first, then open the invitation again.); INVITE_INVALID (This invitation link is not valid. Ask the person who invited you to send a new one.); INVITE_WRONG_ACCOUNT (This invitation was sent to …. Only an account signed in with that email can open it.). error codes: AUTH_INVALID_CREDS, VALIDATION_ERROR, EMAIL_NOT_VERIFIED, INVITE_INVALID, INVITE_WRONG_ACCOUNT
|
|
1752
|
+
- `GET /v1/projects/:param/comments`
|
|
1753
|
+
- Contract: response fields: project_id, comments. rejects with: PROJECT_NOT_FOUND (Project not found.); VALIDATION_ERROR (status must be open, resolved, or all.). error codes: PROJECT_NOT_FOUND, VALIDATION_ERROR
|
|
1754
|
+
- `POST /v1/projects/:param/comments`
|
|
1755
|
+
- Contract: request fields: css_selector, body, snippet, source_file, source_line, version. response fields: comment. rejects with: VALIDATION_ERROR (css_selector and body are required.); VALIDATION_ERROR (body is capped at 2000 characters.); PROJECT_NOT_FOUND (Project not found.); FORBIDDEN (Editor access is required.); RELEASE_SOURCE_UNAVAILABLE (Release inspection source is temporarily unavailable.); ACTIVE_RELEASE_MISSING (This project has no source available for inspection.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, FORBIDDEN, RELEASE_SOURCE_UNAVAILABLE, ACTIVE_RELEASE_MISSING
|
|
1756
|
+
- `DELETE /v1/projects/:param/comments/:param`
|
|
1757
|
+
- Contract: response fields: deleted. rejects with: PROJECT_NOT_FOUND (Project not found.); FORBIDDEN (Editor access is required.); COMMENT_NOT_FOUND (Comment not found.); FORBIDDEN (Only the comment author or the project owner can delete.). error codes: PROJECT_NOT_FOUND, FORBIDDEN, COMMENT_NOT_FOUND
|
|
1758
|
+
- `PATCH /v1/projects/:param/comments/:param`
|
|
1759
|
+
- Contract: request fields: body, resolved. response fields: comment. rejects with: VALIDATION_ERROR (Invalid JSON body.); PROJECT_NOT_FOUND (Project not found.); FORBIDDEN (Editor access is required.); COMMENT_NOT_FOUND (Comment not found.); VALIDATION_ERROR (body is capped at 2000 characters.); FORBIDDEN (Only the comment author can edit the body.); VALIDATION_ERROR (No updatable fields supplied.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, FORBIDDEN, COMMENT_NOT_FOUND
|
|
1760
|
+
- `GET /v1/projects/:param/communications/messages`
|
|
1761
|
+
- Contract: rejects with: PROJECT_NOT_FOUND (Project not found.); VALIDATION_ERROR (cursor is invalid.); VALIDATION_ERROR (status is invalid.). error codes: PROJECT_NOT_FOUND, VALIDATION_ERROR
|
|
1762
|
+
- `GET /v1/projects/:param/communications/messages/:param`
|
|
1763
|
+
- Contract: rejects with: PROJECT_NOT_FOUND (Project not found.); NOT_FOUND (Message not found.). error codes: PROJECT_NOT_FOUND, NOT_FOUND
|
|
1764
|
+
- `GET /v1/projects/:param/db-health`
|
|
1765
|
+
- Contract: response fields: events_last_hour, events_last_15m. rejects with: PROJECT_NOT_FOUND (Project not found.). error codes: PROJECT_NOT_FOUND
|
|
1766
|
+
- `GET /v1/projects/:param/deploys`
|
|
1767
|
+
- Contract: response fields: deploys, active_release_id, candidate_release_id, live_release, current_candidate, prod_updated_at, dev_updated_at, prod_file_count, dev_file_count, prod_has_functions, dev_has_functions, in_sync, dev_ahead, restore_locked, tier, retention, recent_versions, daily_versions_days, restore_window_hours, upgrade_url, restore_locked=false, active_release_id=null when unavailable, candidate_release_id=null when unavailable, live_release=null when unavailable, current_candidate=null when unavailable, prod_updated_at=null when unavailable, dev_updated_at=null when unavailable, prod_file_count=null when unavailable, dev_file_count=null when unavailable. rejects with: PROJECT_NOT_FOUND (Project not found.); RELEASE_STATE_UNAVAILABLE (The live release state could not be selected.). error codes: PROJECT_NOT_FOUND, RELEASE_STATE_UNAVAILABLE
|
|
1768
|
+
- `GET /v1/projects/:param/diff`
|
|
1769
|
+
- Contract: response fields: from, added, removed, changed, functions_changed, functions_changed=false, to, functions, preview_byte_limit, previews_truncated_after. rejects with: PROJECT_NOT_FOUND (Project not found.); VALIDATION_ERROR (from and to (positive integers) are required.); NOT_FOUND (Version v… content is not available (pruned or never existed).). error codes: PROJECT_NOT_FOUND, VALIDATION_ERROR, RELEASE_SOURCE_TAMPERED, NOT_FOUND
|
|
1770
|
+
- `POST /v1/projects/:param/ensure-db`
|
|
1771
|
+
- Contract: response fields: database_id, is_new. rejects with: PROJECT_NOT_FOUND (Project not found.). error codes: PROJECT_NOT_FOUND, DB_ENSURE_FAILED
|
|
1772
|
+
- `GET /v1/projects/:param/feedback`
|
|
1773
|
+
- Contract: response fields: feedback, id, message, page_url, resolved, created_at, user_email, user_name. rejects with: PROJECT_NOT_FOUND (Project not found.). error codes: PROJECT_NOT_FOUND
|
|
1774
|
+
- `POST /v1/projects/:param/feedback`
|
|
1775
|
+
- `PATCH /v1/projects/:param/feedback/:param`
|
|
1776
|
+
- Contract: request fields: resolved, reply. response fields: updated, updated=true. rejects with: PROJECT_NOT_FOUND (Project not found.); VALIDATION_ERROR (Nothing to update.); NOT_FOUND (Feedback not found.). error codes: PROJECT_NOT_FOUND, VALIDATION_ERROR, NOT_FOUND
|
|
1777
|
+
- `PATCH /v1/projects/:param/hostname`
|
|
1778
|
+
- Contract: request fields: subdomain. response fields: id, subdomain. rejects with: PROJECT_NOT_FOUND (Project not found.); TEMP_ACCOUNT_RESTRICTED (Claim this project before changing its address.); VALIDATION_ERROR (Enter up to … letters, numbers or hyphens, with a letter or number at both ends.); VALIDATION_ERROR (Invalid project subdomain.); PROJECT_CHANGED (The project changed. Reload it and try again.). error codes: PROJECT_NOT_FOUND, TEMP_ACCOUNT_RESTRICTED, VALIDATION_ERROR, SUBDOMAIN_TAKEN, PROJECT_CHANGED
|
|
1779
|
+
- `GET /v1/projects/:param/moderation-events`
|
|
1780
|
+
- Contract: response fields: events, next_cursor, id. rejects with: AUTH_INVALID_CREDS (Authentication required.); PROJECT_NOT_FOUND (Project not found.); VALIDATION_ERROR (limit must be an integer from 1 to ….); VALIDATION_ERROR (Invalid moderation event cursor.). error codes: AUTH_INVALID_CREDS, PROJECT_NOT_FOUND, VALIDATION_ERROR
|
|
1781
|
+
- `GET /v1/projects/:param/notices`
|
|
1782
|
+
- Contract: response fields: project_id, count, notices, newly_delivered_notice_ids. rejects with: PROJECT_NOT_FOUND (Project not found.); VALIDATION_ERROR (delivery must be "mcp" when provided.). error codes: PROJECT_NOT_FOUND, VALIDATION_ERROR
|
|
1783
|
+
- `POST /v1/projects/:param/notices/:param/acknowledge`
|
|
1784
|
+
- Contract: request fields: action, snooze_hours. response fields (partial): project_id, notice_id. rejects with: PROJECT_NOT_FOUND (Project not found.); VALIDATION_ERROR (action must be "read" or "snooze".); VALIDATION_ERROR (snooze_hours must be a whole number from 1 to 720.); NOTICE_NOT_FOUND (This notice is no longer active for the project.). error codes: PROJECT_NOT_FOUND, VALIDATION_ERROR, NOTICE_NOT_FOUND
|
|
1785
|
+
- `GET /v1/projects/:param/overview`
|
|
1786
|
+
- Contract: response fields (partial): project, id, name, status, hasActiveRelease, publishedBefore, ownerTemporaryExpiresAt, lastDeployAt, activeReleaseCreatedAt, is_owner, abilities, live_version, version, published_at, last_change, at, signups_7d, visits, errors_24h, top_codes, count, ownerTemporaryExpiresAt=null when unavailable. rejects with: PROJECT_NOT_FOUND (Project not found.). error codes: PROJECT_NOT_FOUND
|
|
1787
|
+
- `POST /v1/projects/:param/preview/checks`
|
|
1788
|
+
- Contract: response fields: run_id, read. rejects with: VALIDATION_ERROR (replay is a list of at most 40 { method, path, body?, public? } with paths on the app (starting with /). Nothing ran.). error codes: VALIDATION_ERROR
|
|
1789
|
+
- `GET /v1/projects/:param/preview/checks/:param`
|
|
1790
|
+
- Contract: response fields (partial): run_id. rejects with: PROJECT_NOT_FOUND (Project not found.); NOT_FOUND (No such check run.). error codes: PROJECT_NOT_FOUND, NOT_FOUND
|
|
1791
|
+
- `POST /v1/projects/:param/preview/mint`
|
|
1792
|
+
- Contract: request fields: preview_session_id, preview_id, draft_id, candidate_release_id. response fields: preview_url. rejects with: VALIDATION_ERROR (Canonical preview fields and their aliases must match when both are sent.); VALIDATION_ERROR (preview_session_id and preview_id are required.); DRAFT_NOT_FOUND (Preview not found.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, DRAFT_NOT_FOUND, PROJECT_NOT_FOUND
|
|
1793
|
+
- `POST /v1/projects/:param/preview/revoke`
|
|
1794
|
+
- Contract: request fields: preview_session_id, draft_id. response fields: revoked. rejects with: VALIDATION_ERROR (preview_session_id and its draft_id alias must match when both are sent.); VALIDATION_ERROR (preview_session_id is required.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
1795
|
+
- `POST /v1/projects/:param/preview/run-job`
|
|
1796
|
+
- `POST /v1/projects/:param/preview/tool-credential`
|
|
1797
|
+
- Contract: request fields: preview_session_id, draft_id. response fields: credential, preview_session_id, preview_id, note, note='Acts only on this preview\'. rejects with: VALIDATION_ERROR (preview_session_id and its draft_id alias must match when both are sent.); VALIDATION_ERROR (preview_session_id is required.); DRAFT_NOT_FOUND (Preview not found, or it is no longer open. Open one with `somewhere preview`.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, DRAFT_NOT_FOUND, PROJECT_NOT_FOUND
|
|
1798
|
+
- `GET /v1/projects/:param/privacy`
|
|
1799
|
+
- Contract: response fields: release_id, privacy_facts, privacy_lines, platform_facts, privacy_page_draft, owner_must_fill, privacy_page. rejects with: PROJECT_NOT_FOUND (Project not found.). error codes: PROJECT_NOT_FOUND
|
|
1800
|
+
- `DELETE /v1/projects/:param/privacy/page`
|
|
1801
|
+
- Contract: response fields: published, url, markdown, facts, my_data_url, published=false. rejects with: PROJECT_NOT_FOUND (Project not found.). error codes: PROJECT_NOT_FOUND
|
|
1802
|
+
- `PUT /v1/projects/:param/privacy/page`
|
|
1803
|
+
- Contract: response fields: published, url, markdown, published=true, owner, contact, published_at. rejects with: PROJECT_NOT_FOUND (Project not found.). error codes: PROJECT_NOT_FOUND, INVALID_PRIVACY_PAGE
|
|
1804
|
+
- `GET /v1/projects/:param/pulse`
|
|
1805
|
+
- Contract: response fields: db_rows, auth_users, requests_24h, emails_30d, has_database, has_functions. rejects with: PROJECT_NOT_FOUND (Project not found.). error codes: PROJECT_NOT_FOUND
|
|
1806
|
+
- `POST /v1/projects/:param/request-delete`
|
|
1807
|
+
- Contract: response fields: link_sent, expires_in_seconds, link_sent=true. rejects with: PROJECT_NOT_FOUND (Project not found.); AUTH_INVALID_CREDS (User not found.); EMAIL_DELIVERY_UNKNOWN (Email delivery could not be confirmed.). error codes: PROJECT_NOT_FOUND, AUTH_INVALID_CREDS, EMAIL_DELIVERY_UNKNOWN
|
|
1808
|
+
- `GET /v1/projects/:param/seo`
|
|
1809
|
+
- Contract: rejects with: PROJECT_NOT_FOUND (Project not found.). error codes: PROJECT_NOT_FOUND
|
|
1810
|
+
- `GET /v1/projects/:param/status`
|
|
1811
|
+
- Contract: response fields: frontend, auth, domain. rejects with: PROJECT_NOT_FOUND (Project not found.). error codes: PROJECT_NOT_FOUND
|
|
1812
|
+
- `POST /v1/projects/:param/tags`
|
|
1813
|
+
- Contract: request fields: tag, tags. response fields: id, tags. rejects with: PROJECT_NOT_FOUND (Project not found.). error codes: PROJECT_NOT_FOUND, VALIDATION_ERROR
|
|
1814
|
+
- `PUT /v1/projects/:param/tags`
|
|
1815
|
+
- Contract: request fields: tags. response fields: id, tags. rejects with: PROJECT_NOT_FOUND (Project not found.). error codes: PROJECT_NOT_FOUND, VALIDATION_ERROR
|
|
1816
|
+
- `DELETE /v1/projects/:param/tags/:param`
|
|
1817
|
+
- Contract: response fields: id, tags. rejects with: PROJECT_NOT_FOUND (Project not found.). error codes: PROJECT_NOT_FOUND, VALIDATION_ERROR
|
|
1818
|
+
- `POST /v1/projects/:param/transfer`
|
|
1819
|
+
- Contract: request fields: to_email. response fields: transferred, pending, to, project, expires_at, note, transferred=false, pending=true. rejects with: VALIDATION_ERROR (Enter the email address of the person to hand this app to (to_email).); PROJECT_NOT_FOUND (Project not found.); VALIDATION_ERROR (Cannot transfer to yourself); TRANSFER_RECIPIENT_UNVERIFIED (The recipient must verify their email address before receiving a project transfer.); RATE_LIMITED (Too many invitations. Try again later.); INVITATION_RATE_LIMIT_UNAVAILABLE (Invitation sending is temporarily unavailable.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, TRANSFER_RECIPIENT_UNVERIFIED, RATE_LIMITED, INVITATION_RATE_LIMIT_UNAVAILABLE
|
|
1820
|
+
- `POST /v1/projects/:param/transfer/accept`
|
|
1821
|
+
- Contract: request fields: token. response fields: accepted, transferred, project_id, accepted=true, transferred=true. rejects with: AUTH_INVALID_CREDS (Authentication required.); VALIDATION_ERROR (token is required); AUTH_INVALID_CREDS (Account not found.); EMAIL_NOT_VERIFIED (Accepting this transfer needs a verified email on this account.); TRANSFER_EXPIRED (This transfer has expired; a new transfer from the owner replaces it.); TRANSFER_WRONG_ACCOUNT (This transfer is accepted only by an account signed in with the verified email address that received it.); TRANSFER_SLUG_CONFLICT (The recipient already has a project with this slug. The project was not transferred.); TRANSFER_STALE (This request is no longer needed: the app has already moved or been removed. Nothing is waiting for you. Your apps are at https://somewhere.cloud/app.); TRANSFER_COMPLETE (This transfer is already complete: the app is yours. Nothing else is needed. Your apps are at https://somewhere.cloud/app.); TRANSFER_INVALID (This request was replaced or cancelled. Nothing is waiting for you. Your apps are at https://somewhere.cloud/app.). error codes: AUTH_INVALID_CREDS, VALIDATION_ERROR, EMAIL_NOT_VERIFIED, TRANSFER_EXPIRED, TRANSFER_WRONG_ACCOUNT, TRANSFER_SLUG_CONFLICT, TRANSFER_STALE, TRANSFER_COMPLETE, TRANSFER_INVALID
|
|
1822
|
+
- `POST /v1/projects/:param/unarchive`
|
|
1823
|
+
- Contract: response fields: status, status='draft'. rejects with: PROJECT_NOT_FOUND (Project not found.); VALIDATION_ERROR (Project is not archived.). error codes: PROJECT_NOT_FOUND, VALIDATION_ERROR
|
|
1824
|
+
- `POST /v1/projects/:param/undeploy`
|
|
1825
|
+
- Contract: response fields: status, slug, subdomain, status='draft'. rejects with: PROJECT_NOT_FOUND (Project not found.); VALIDATION_ERROR (Project is …, not deployed. Nothing to undeploy.); LIFECYCLE_PUBLICATION_PENDING (The project is …, but its app has not confirmed this yet. Repeating the same request is safe.). error codes: PROJECT_NOT_FOUND, VALIDATION_ERROR, LIFECYCLE_PUBLICATION_PENDING
|
|
1826
|
+
- `GET /v1/projects/:param/urls`
|
|
1827
|
+
- Contract: response fields: active_release_id, candidate_release_id, live_release, current_candidate, prod, prod_fallback, prod_version, prod_updated_at, prod_file_count, prod_has_functions, has_custom_domain, has_promoted, dev, in_sync, dev_updated_at, dev_file_count, dev_has_functions, dev_ahead, active_release_id=null when unavailable, candidate_release_id=null when unavailable, live_release=null when unavailable, current_candidate=null when unavailable, prod_version=null when unavailable, prod_file_count=null when unavailable, dev_file_count=null when unavailable. rejects with: PROJECT_NOT_FOUND (Project not found.); RELEASE_STATE_UNAVAILABLE (The live release state could not be selected.). error codes: PROJECT_NOT_FOUND, RELEASE_STATE_UNAVAILABLE
|
|
1828
|
+
- `GET /v1/projects/activity`
|
|
1829
|
+
- Contract: response fields: events. rejects with: AUTH_INVALID_CREDS (Authentication required.). error codes: AUTH_INVALID_CREDS
|
|
1830
|
+
- `GET /v1/projects/check`
|
|
1831
|
+
- Contract: response fields: available, reason, subdomain, available=false, reason='invalid', reason='blocked', reason='reserved', reason='taken', available=true. rejects with: VALIDATION_ERROR (subdomain query param is required.). error codes: VALIDATION_ERROR
|
|
1832
|
+
- `GET /v1/projects/notices`
|
|
1833
|
+
- Contract: response fields: count, notices, newly_delivered_notice_ids
|
|
1834
|
+
- `GET /v1/projects/verify`
|
|
1835
|
+
|
|
1836
|
+
### /v1/promote
|
|
1837
|
+
|
|
1838
|
+
- `POST /v1/promote`
|
|
1839
|
+
- Contract: request fields: project_id, message, preview_session_id, preview_id, draft_id, candidate_release_id, base_live_version, force, source, replace_functions. rejects with: VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.); FORBIDDEN (Promoting requires editor access to this project.); DRAFT_IDENTITY_REQUIRED (Promotion requires the exact preview_session_id and preview_id that were reviewed.); DRAFT_VERSION_MISMATCH (This preview can no longer be promoted — it was already promoted, closed, or replaced by a newer one. This request changed nothing; the live version is listed in the project's deploy history. `somewhere preview list` shows the open previews and the promote command for each.); PROMOTION_CONFLICT (Production changed after this preview session started, so this preview can no longer be promoted. Production was not changed. Next: bring your source up to date (`somewhere pull`), start a fresh preview (`somewhere preview`), and promote that one; close this one with `somewhere preview close`.); DRAFT_VERSION_MISMATCH (The exact preview source snapshot is missing or failed integrity verification. Production was not changed.); DRAFT_VERSION_MISMATCH (The exact preview files are missing or failed integrity verification. Production was not changed.); PROMOTE_FAILED (Could not read the functions currently in production, so production was not changed; the same promote request can be repeated.); PROMOTION_CONFLICT (Production changed while this preview was being promoted. …; the preview remains available for review.…); PROMOTE_RESULT_UNCONFIRMED (This promotion is not confirmed as the current live publication (the project may have been archived, unpublished or rolled back since it ran). The project status and live version record what is live now; the same exact preview promotion can be repeated once that state is known.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, FORBIDDEN, DRAFT_IDENTITY_REQUIRED, DRAFT_VERSION_MISMATCH, PROMOTION_CONFLICT, PROMOTE_FAILED, PROMOTE_RESULT_UNCONFIRMED, RELEASE_SOURCE_TAMPERED, PROMOTE_POSTVERIFY_UNAVAILABLE, RELEASE_COORDINATOR_RUNTIME_NOT_READY
|
|
1840
|
+
- `POST /v1/promote/preview-link`
|
|
1841
|
+
- Contract: request fields: project_id, version, ttl_hours. response fields: url, token, version, subdomain, expires_at, ttl_hours. rejects with: VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (version (positive integer) is required.); PROJECT_NOT_FOUND (Project not found.); NOT_FOUND (Version v… is not available for this project.); NOT_FOUND (Version v… files were pruned and are no longer accessible.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, NOT_FOUND
|
|
1842
|
+
- `POST /v1/promote/restore`
|
|
1843
|
+
- Contract: request fields: project_id, version. response fields: restored_at, version, files_restored, message, files_restored=null. rejects with: VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (version (positive integer) is required.); PROJECT_NOT_FOUND (Project not found.); FORBIDDEN (Restoring a version requires editor access to this project.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, FORBIDDEN, RESTORE_LOCKED, ROLLBACK_UNAVAILABLE, ROLLBACK_POSTVERIFY_UNAVAILABLE
|
|
1844
|
+
- `POST /v1/promote/rollback`
|
|
1845
|
+
- Contract: request fields: project_id, with_schema, preview, expected_target_version. response fields: preview, applied, version, target_version, current_version, files_restored, activation_safe, activation_refusals, database_notice, message, preview=true, applied=false, files_restored=null, restored_at, active_release_id, from_release_id, edge_identity_check, from_release_id=null when unavailable. rejects with: VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.); FORBIDDEN (Rolling back requires editor access to this project.); VALIDATION_ERROR (No previous version available — rollback only works after at least two deploys.); ROLLBACK_TARGET_CHANGED (The previous version changed since you reviewed it — you reviewed rolling back to version …, but the current rollback target is version …. Nothing was changed. A new preview returns the current target to confirm.); VALIDATION_ERROR (No previous version is available within this project’s rollback history.); ROLLBACK_UNAVAILABLE (… is no longer restorable. …); NOT_FOUND (… is not available for this project.); ROLLBACK_TARGET_CHANGED (The live version changed before rollback could begin. Nothing was changed; a new preview returns the current target to confirm.); ROLLBACK_CONFLICT (Another change was in progress, so the rollback was not applied — nothing changed. The same request can be repeated.); ROLLBACK_UNAVAILABLE (… can no longer be restored. Your current production version is unchanged — a deploy of the wanted source puts it in production.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, FORBIDDEN, ROLLBACK_UNAVAILABLE, ROLLBACK_TARGET_CHANGED, NOT_FOUND, ROLLBACK_CONFLICT, ROLLBACK_SCHEMA_RECOVERY_REQUIRED, RELEASE_CONTRACT_MISMATCH, PRIOR_RELEASE_PRUNED, TARGET_SCRIPT_PRUNED, TARGET_NOT_FOUND, ROLLBACK_POSTVERIFY_UNAVAILABLE
|
|
1846
|
+
|
|
1847
|
+
### /v1/push
|
|
1848
|
+
|
|
1849
|
+
- `GET /v1/push/deliveries`
|
|
1850
|
+
- Contract: Runtime method: sw.push.deliveries. response fields: deliveries. rejects with: VALIDATION_ERROR (project_id is required.); FORBIDDEN (Sending push and reading push history need server authority: sw.push from a deployed function, or a developer key.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, FORBIDDEN, PROJECT_NOT_FOUND
|
|
1851
|
+
- `POST /v1/push/send`
|
|
1852
|
+
- Contract: Runtime method: sw.push.send. response fields: sent, failed, gone, captured, recipients, devices. rejects with: VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (payload is required.); VALIDATION_ERROR (A send needs a target: user_id, endpoint, subscription_id, audience: 'developer', or audience: 'all' to broadcast. / A send accepts one target: user_id, endpoint, subscription_id or audience.); VALIDATION_ERROR (… must be a non-empty string.); VALIDATION_ERROR (audience is 'developer' (your own devices) or 'all' (every device in the project).); PUSH_PAYLOAD_TOO_LARGE (payload is … bytes; the limit is …. A payload carrying an id or URL fits, with the rest fetched by the app.); RATE_LIMITED (Too many push sends (10/min/project). The limit resets within a minute.); PUSH_DEVICE_REREGISTER_REQUIRED (Device … has no verified current device owner, so it receives no sends. A new registration of the same subscription by a signed-in user (enablePush() from somewhere:push) or developer credential restores sends.); RECIPIENT_CAP_EXCEEDED (Push fan-out is capped at … recipients per call; this send would reach more. A send filtered by user_id or endpoint, or a broadcast split into smaller sends, stays under the cap.); FORBIDDEN (Sending push and reading push history need server authority: sw.push from a deployed function, or a developer key.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, PUSH_PAYLOAD_TOO_LARGE, RATE_LIMITED, PUSH_DEVICE_REREGISTER_REQUIRED, RECIPIENT_CAP_EXCEEDED, FORBIDDEN, PROJECT_NOT_FOUND
|
|
1853
|
+
- `POST /v1/push/subscribe`
|
|
1854
|
+
- Contract: response fields: id, owner, created, user_id, platform, auth, platform_owner_revision, created=true, reassigned, created=false. rejects with: VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (The request accepts subscription or test: true, not both.); PUSH_SUBSCRIPTION_CONFLICT (The device changed while it was being registered. The same request can be repeated.); RATE_LIMITED (Too many push subscription changes. The limit resets after the Retry-After interval.); IDENTITY_CLAIM_NOT_ALLOWED (user_id cannot be supplied here. An app user's device is always registered to the signed-in user of the session that subscribes it.); SCOPE_VIOLATION (Only a signed-in app user can register a push device.); AUTH_REQUIRED (sw.push.subscribe and sw.push.unsubscribe register the signed-in user's device, so they need a request from a signed-in user.); PROJECT_NOT_FOUND (Project not found.); IDENTITY_CLAIM_NOT_ALLOWED (A developer credential registers your own device, which has no app-user id. App users register their own devices from a signed-in session (enablePush() from somewhere:push, or sw.push.subscribe in a function).). error codes: VALIDATION_ERROR, PUSH_SUBSCRIPTION_CONFLICT, RATE_LIMITED, IDENTITY_CLAIM_NOT_ALLOWED, SCOPE_VIOLATION, AUTH_REQUIRED, PROJECT_NOT_FOUND
|
|
1855
|
+
- `GET /v1/push/subscriptions`
|
|
1856
|
+
- Contract: Runtime method: sw.push.subscriptions. response fields: subscriptions. rejects with: VALIDATION_ERROR (project_id is required.); FORBIDDEN (Sending push and reading push history need server authority: sw.push from a deployed function, or a developer key.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, FORBIDDEN, PROJECT_NOT_FOUND
|
|
1857
|
+
- `POST /v1/push/unsubscribe`
|
|
1858
|
+
- Contract: response fields: deleted. rejects with: VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (endpoint is required (or test: true for the test inbox device).); RATE_LIMITED (Too many push subscription changes. The limit resets after the Retry-After interval.); IDENTITY_CLAIM_NOT_ALLOWED (user_id cannot be supplied here. An app user's device is always registered to the signed-in user of the session that subscribes it.); SCOPE_VIOLATION (Only a signed-in app user can register a push device.); AUTH_REQUIRED (sw.push.subscribe and sw.push.unsubscribe register the signed-in user's device, so they need a request from a signed-in user.); PROJECT_NOT_FOUND (Project not found.); IDENTITY_CLAIM_NOT_ALLOWED (A developer credential registers your own device, which has no app-user id. App users register their own devices from a signed-in session (enablePush() from somewhere:push, or sw.push.subscribe in a function).). error codes: VALIDATION_ERROR, RATE_LIMITED, IDENTITY_CLAIM_NOT_ALLOWED, SCOPE_VIOLATION, AUTH_REQUIRED, PROJECT_NOT_FOUND
|
|
1859
|
+
- `GET /v1/push/vapid-public-key`
|
|
1860
|
+
- Contract: Runtime method: sw.push.vapidPublicKey. response fields: vapid_public_key. rejects with: VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.); FORBIDDEN (Editor access is required to initialize push signing keys.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, FORBIDDEN
|
|
1861
|
+
|
|
1862
|
+
### /v1/queue
|
|
1863
|
+
|
|
1864
|
+
- `POST /v1/queue`
|
|
1865
|
+
- Contract: Runtime method: sw.queue.push. request fields: project_id, handler, payload, delay_seconds, idempotency_key, queue_name. response fields: message_id, status, status='queued'. rejects with: VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (handler is required.); PAYLOAD_TOO_LARGE (Queue payload is … bytes; max allowed is … bytes (64 KB). Larger payloads fit when stored in sw.fs and passed as a path.); QUEUE_DELAY_OUT_OF_RANGE (delay_seconds must be a whole number from 0 to …. A job with run_at starts later.); PROJECT_NOT_FOUND (Project not found.); JOB_ENDED (The job sending this message has ended, so the message was not queued.); QUEUE_DELIVERY_UNKNOWN (This earlier request has no confirmed delivery receipt. The handler may already have received it; a send with a new key is a new message.); QUEUE_SEND_FAILED (Could not confirm queue admission. A repeat with the same idempotency key is safe.); QUEUE_SEND_FAILED (Could not confirm the message was queued. The request can be repeated; without an idempotency key a repeat can queue a second copy.). error codes: VALIDATION_ERROR, PAYLOAD_TOO_LARGE, QUEUE_DELAY_OUT_OF_RANGE, PROJECT_NOT_FOUND, JOB_ENDED, QUEUE_DELIVERY_UNKNOWN, QUEUE_SEND_FAILED
|
|
1866
|
+
- `GET /v1/queue/dead-letters`
|
|
1867
|
+
- Contract: response fields: dead_letters. rejects with: PROJECT_NOT_FOUND (Project not found.). error codes: PROJECT_NOT_FOUND
|
|
1868
|
+
|
|
1869
|
+
### /v1/rate-limit
|
|
1870
|
+
|
|
1871
|
+
- `POST /v1/rate-limit/check`
|
|
1872
|
+
- Contract: request fields: project_id, key, max, window_seconds, algorithm. response fields: allowed, remaining, reset, limit, window_seconds. rejects with: VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (key is required (non-empty string).); VALIDATION_ERROR (key must be … characters or fewer.); VALIDATION_ERROR (max must be a positive integer up to ….); VALIDATION_ERROR (window_seconds must be between … and ….); VALIDATION_ERROR (algorithm must be 'fixed' or 'sliding'.); PROJECT_NOT_FOUND (Project not found.); PROJECT_MISMATCH (A preview counts rate limits for its own app only.); RATE_LIMIT_UNAVAILABLE (The rate limit could not be checked. The action was not admitted; the counter may have advanced.); RATE_LIMIT_KEY_CARDINALITY_EXCEEDED | RATE_LIMIT_CAPACITY_EXCEEDED (Rate limit storage capacity exceeded; use bounded keys and consistent windows.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, PROJECT_MISMATCH, RATE_LIMIT_UNAVAILABLE, RATE_LIMIT_KEY_CARDINALITY_EXCEEDED, RATE_LIMIT_CAPACITY_EXCEEDED, RATE_LIMIT_RETRY
|
|
1873
|
+
|
|
1874
|
+
### /v1/render
|
|
1875
|
+
|
|
1876
|
+
- `POST /v1/render/pdf`
|
|
1877
|
+
- Contract: response fields: storage_path, size_bytes, content_type, content_type='application/pdf'. rejects with: VALIDATION_ERROR (format must be A4, A3, Letter, Legal, or Tabloid.); VALIDATION_ERROR (project_id is required when storage is set.); PROJECT_NOT_FOUND (Project not found.); JOB_ENDED (This job has ended, so the request was not run.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, JOB_ENDED
|
|
1878
|
+
- `POST /v1/render/screenshot`
|
|
1879
|
+
- Contract: response fields: storage_path, size_bytes, content_type. rejects with: VALIDATION_ERROR (format must be png, jpeg, or webp.); VALIDATION_ERROR (project_id is required when storage is set.); PROJECT_NOT_FOUND (Project not found.); VALIDATION_ERROR (local_storage/cookies/headers require url mode (sessions belong to an origin; html mode has none).); VALIDATION_ERROR (project_id is required when seeding a session — it scopes the allowed origins.); JOB_ENDED (This job has ended, so the request was not run.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, FORBIDDEN, JOB_ENDED
|
|
1880
|
+
|
|
1881
|
+
### /v1/rooms
|
|
1882
|
+
|
|
1883
|
+
- `POST /v1/rooms/act`
|
|
1884
|
+
- Contract: rejects with: RUNTIME_REQUIRED (Rooms are reached from the app's own deployed code.); ROOMS_DRAFT_UNAVAILABLE (Rooms are not available in drafts. They run on the live app.); VALIDATION_ERROR (A JSON object body is required.); VALIDATION_ERROR (id must be a … key of "…".); AUTH_REQUIRED (The signed-in session could not be verified.); AUTH_REQUIRED (The visitor session could not be verified.); ROOM_NO_CALLER (sw.rooms acts as the person whose request is being handled; with no caller (a job or schedule) use sw.rooms.server.); ROOM_UNAVAILABLE (The room did not answer.). error codes: ROOM_UNAVAILABLE, ROOM_NOT_ALLOWED, ROOM_BUSY, ROOM_LIMIT, REFEREE_UNAVAILABLE, ROOM_DELETING, VALIDATION_ERROR, RUNTIME_REQUIRED, ROOMS_DRAFT_UNAVAILABLE, AUTH_REQUIRED, ROOM_NO_CALLER
|
|
1885
|
+
- `GET /v1/rooms/connect`
|
|
1886
|
+
- Contract: rejects with: VALIDATION_ERROR (Expected WebSocket upgrade header.); ROOM_TICKET_INVALID (This room ticket is invalid or expired.); ROOM_NOT_ALLOWED (This ticket belongs to a different app.); ROOM_APP_UPDATED (The app was updated; join again.); ROOM_SUBJECT_MISMATCH (This ticket is not bound to the current session.); RUNTIME_REQUIRED (Rooms are reached from the app's own deployed code.); ROOMS_DRAFT_UNAVAILABLE (Rooms are not available in drafts. They run on the live app.); VALIDATION_ERROR (id must be a … key of "…".). error codes: VALIDATION_ERROR, ROOM_TICKET_INVALID, ROOM_NOT_ALLOWED, ROOM_APP_UPDATED, ROOM_SUBJECT_MISMATCH, RUNTIME_REQUIRED, ROOMS_DRAFT_UNAVAILABLE
|
|
1887
|
+
- `POST /v1/rooms/get`
|
|
1888
|
+
- Contract: rejects with: RUNTIME_REQUIRED (Rooms are reached from the app's own deployed code.); ROOMS_DRAFT_UNAVAILABLE (Rooms are not available in drafts. They run on the live app.); VALIDATION_ERROR (A JSON object body is required.); VALIDATION_ERROR (id must be a … key of "…".); AUTH_REQUIRED (The signed-in session could not be verified.); AUTH_REQUIRED (The visitor session could not be verified.); ROOM_NO_CALLER (sw.rooms acts as the person whose request is being handled; with no caller (a job or schedule) use sw.rooms.server.); ROOM_UNAVAILABLE (The room did not answer.). error codes: ROOM_UNAVAILABLE, ROOM_NOT_ALLOWED, ROOM_BUSY, ROOM_LIMIT, REFEREE_UNAVAILABLE, ROOM_DELETING, VALIDATION_ERROR, RUNTIME_REQUIRED, ROOMS_DRAFT_UNAVAILABLE, AUTH_REQUIRED, ROOM_NO_CALLER
|
|
1889
|
+
- `POST /v1/rooms/send`
|
|
1890
|
+
- Contract: rejects with: RUNTIME_REQUIRED (Rooms are reached from the app's own deployed code.); ROOMS_DRAFT_UNAVAILABLE (Rooms are not available in drafts. They run on the live app.); VALIDATION_ERROR (A JSON object body is required.); VALIDATION_ERROR (id must be a … key of "…".); AUTH_REQUIRED (The signed-in session could not be verified.); AUTH_REQUIRED (The visitor session could not be verified.); ROOM_NO_CALLER (sw.rooms acts as the person whose request is being handled; with no caller (a job or schedule) use sw.rooms.server.); ROOM_UNAVAILABLE (The room did not answer.). error codes: ROOM_UNAVAILABLE, ROOM_NOT_ALLOWED, ROOM_BUSY, ROOM_LIMIT, REFEREE_UNAVAILABLE, ROOM_DELETING, VALIDATION_ERROR, RUNTIME_REQUIRED, ROOMS_DRAFT_UNAVAILABLE, AUTH_REQUIRED, ROOM_NO_CALLER
|
|
1891
|
+
- `POST /v1/rooms/server/act`
|
|
1892
|
+
- Contract: rejects with: VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (sw.rooms.server calls carry X-Somewhere-Rooms-Authority: server.); VALIDATION_ERROR (A JSON object body is required.); RUNTIME_REQUIRED (Rooms are reached from the app's own deployed code.); ROOMS_DRAFT_UNAVAILABLE (Rooms are not available in drafts. They run on the live app.); VALIDATION_ERROR (id must be a … key of "…".); ROOM_UNAVAILABLE (The room did not answer.). error codes: ROOM_UNAVAILABLE, ROOM_NOT_ALLOWED, ROOM_BUSY, ROOM_LIMIT, REFEREE_UNAVAILABLE, ROOM_DELETING, VALIDATION_ERROR, RUNTIME_REQUIRED, ROOMS_DRAFT_UNAVAILABLE
|
|
1893
|
+
- `POST /v1/rooms/server/get`
|
|
1894
|
+
- Contract: rejects with: VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (sw.rooms.server calls carry X-Somewhere-Rooms-Authority: server.); VALIDATION_ERROR (A JSON object body is required.); RUNTIME_REQUIRED (Rooms are reached from the app's own deployed code.); ROOMS_DRAFT_UNAVAILABLE (Rooms are not available in drafts. They run on the live app.); VALIDATION_ERROR (id must be a … key of "…".); ROOM_UNAVAILABLE (The room did not answer.). error codes: ROOM_UNAVAILABLE, ROOM_NOT_ALLOWED, ROOM_BUSY, ROOM_LIMIT, REFEREE_UNAVAILABLE, ROOM_DELETING, VALIDATION_ERROR, RUNTIME_REQUIRED, ROOMS_DRAFT_UNAVAILABLE
|
|
1895
|
+
- `POST /v1/rooms/server/send`
|
|
1896
|
+
- Contract: rejects with: VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (sw.rooms.server calls carry X-Somewhere-Rooms-Authority: server.); VALIDATION_ERROR (A JSON object body is required.); RUNTIME_REQUIRED (Rooms are reached from the app's own deployed code.); ROOMS_DRAFT_UNAVAILABLE (Rooms are not available in drafts. They run on the live app.); VALIDATION_ERROR (id must be a … key of "…".); ROOM_UNAVAILABLE (The room did not answer.). error codes: ROOM_UNAVAILABLE, ROOM_NOT_ALLOWED, ROOM_BUSY, ROOM_LIMIT, REFEREE_UNAVAILABLE, ROOM_DELETING, VALIDATION_ERROR, RUNTIME_REQUIRED, ROOMS_DRAFT_UNAVAILABLE
|
|
1897
|
+
- `POST /v1/rooms/server/set`
|
|
1898
|
+
- Contract: rejects with: VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (sw.rooms.server calls carry X-Somewhere-Rooms-Authority: server.); VALIDATION_ERROR (A JSON object body is required.); RUNTIME_REQUIRED (Rooms are reached from the app's own deployed code.); ROOMS_DRAFT_UNAVAILABLE (Rooms are not available in drafts. They run on the live app.); VALIDATION_ERROR (id must be a … key of "…".); ROOM_UNAVAILABLE (The room did not answer.). error codes: ROOM_UNAVAILABLE, ROOM_NOT_ALLOWED, ROOM_BUSY, ROOM_LIMIT, REFEREE_UNAVAILABLE, ROOM_DELETING, VALIDATION_ERROR, RUNTIME_REQUIRED, ROOMS_DRAFT_UNAVAILABLE
|
|
1899
|
+
- `POST /v1/rooms/set`
|
|
1900
|
+
- Contract: rejects with: RUNTIME_REQUIRED (Rooms are reached from the app's own deployed code.); ROOMS_DRAFT_UNAVAILABLE (Rooms are not available in drafts. They run on the live app.); VALIDATION_ERROR (A JSON object body is required.); VALIDATION_ERROR (id must be a … key of "…".); AUTH_REQUIRED (The signed-in session could not be verified.); AUTH_REQUIRED (The visitor session could not be verified.); ROOM_NO_CALLER (sw.rooms acts as the person whose request is being handled; with no caller (a job or schedule) use sw.rooms.server.); ROOM_UNAVAILABLE (The room did not answer.). error codes: ROOM_UNAVAILABLE, ROOM_NOT_ALLOWED, ROOM_BUSY, ROOM_LIMIT, REFEREE_UNAVAILABLE, ROOM_DELETING, VALIDATION_ERROR, RUNTIME_REQUIRED, ROOMS_DRAFT_UNAVAILABLE, AUTH_REQUIRED, ROOM_NO_CALLER
|
|
1901
|
+
- `POST /v1/rooms/ticket`
|
|
1902
|
+
- Contract: rejects with: ROOM_LIMIT (Limit: room tickets per minute for this app.); AUTH_REQUIRED (Rooms require a signed-in or visitor session.); RUNTIME_REQUIRED (Rooms are reached from the app's own deployed code.); ROOMS_DRAFT_UNAVAILABLE (Rooms are not available in drafts. They run on the live app.); VALIDATION_ERROR (A JSON object body is required.); VALIDATION_ERROR (id must be a … key of "…".); AUTH_REQUIRED (The signed-in session could not be verified.); AUTH_REQUIRED (The visitor session could not be verified.); ROOM_NO_CALLER (sw.rooms acts as the person whose request is being handled; with no caller (a job or schedule) use sw.rooms.server.). error codes: ROOM_LIMIT, AUTH_REQUIRED, RUNTIME_REQUIRED, ROOMS_DRAFT_UNAVAILABLE, VALIDATION_ERROR, ROOM_NO_CALLER
|
|
1903
|
+
- `POST /v1/rooms/verify-event`
|
|
1904
|
+
- Contract: response fields: valid, valid=false. rejects with: RUNTIME_REQUIRED (Rooms are reached from the app's own deployed code.); ROOMS_DRAFT_UNAVAILABLE (Rooms are not available in drafts. They run on the live app.); VALIDATION_ERROR (A JSON object body is required.); VALIDATION_ERROR (id must be a … key of "…".). error codes: RUNTIME_REQUIRED, ROOMS_DRAFT_UNAVAILABLE, VALIDATION_ERROR
|
|
1905
|
+
|
|
1906
|
+
### /v1/search
|
|
1907
|
+
|
|
1908
|
+
- `GET /v1/search/index`
|
|
1909
|
+
- Contract: response fields: indexes, name, item_count, created_at. rejects with: VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
1910
|
+
- `POST /v1/search/index`
|
|
1911
|
+
- Contract: request fields: project_id, name. response fields: name, item_count, created_at. rejects with: VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (name is required.); VALIDATION_ERROR (name must be 1-64 chars, letters/numbers/underscore/hyphen only.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
1912
|
+
- `DELETE /v1/search/index/:param`
|
|
1913
|
+
- Contract: response fields: name, deleted=true. rejects with: VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.); NOT_FOUND (Search index not found.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, NOT_FOUND
|
|
1914
|
+
- `POST /v1/search/managed/add`
|
|
1915
|
+
- Contract: request fields: project_id, path. rejects with: VALIDATION_ERROR (project_id and path are required.); PROJECT_NOT_FOUND (Project not found.); AUTH_REQUIRED (Managed search requires a verified app user.); AUTH_INVALID_CREDS (The acting subject does not match the managed-search subject.); AUTH_INVALID_CREDS (This app user is no longer available.); SEARCH_FAILED (Managed search could not complete; a later identical request can succeed.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, AUTH_REQUIRED, AUTH_INVALID_CREDS, SEARCH_FAILED
|
|
1916
|
+
- `POST /v1/search/managed/query`
|
|
1917
|
+
- Contract: request fields: project_id, query. rejects with: VALIDATION_ERROR (project_id and query are required.); PROJECT_NOT_FOUND (Project not found.); AUTH_REQUIRED (Managed search requires a verified app user.); AUTH_INVALID_CREDS (The acting subject does not match the managed-search subject.); AUTH_INVALID_CREDS (This app user is no longer available.); SEARCH_FAILED (Managed search could not complete; a later identical request can succeed.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, AUTH_REQUIRED, AUTH_INVALID_CREDS, SEARCH_FAILED
|
|
1918
|
+
- `POST /v1/search/query`
|
|
1919
|
+
- Contract: request fields: project_id, index, query, limit, offset, mode, filter. response fields: results, page, limit, total, has_more, mode, status, message, has_more=false, status='preparing', message='Search index is being prepared.'. rejects with: VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (index is required.); VALIDATION_ERROR (query must be a string.); VALIDATION_ERROR (query cannot exceed … chars.); SEARCH_MODE_INVALID (mode must be one of: …. Default is hybrid (lexical + semantic).); PROJECT_NOT_FOUND (Project not found.); FORBIDDEN (Editor access is required for semantic search.). error codes: VALIDATION_ERROR, SEARCH_FILTER_UNSUPPORTED, SEARCH_MODE_INVALID, PROJECT_NOT_FOUND, FORBIDDEN
|
|
1920
|
+
- `POST /v1/search/remove`
|
|
1921
|
+
- Contract: request fields: project_id, index, ids. response fields: index, item_count. rejects with: VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (index is required.); VALIDATION_ERROR (ids must be a non-empty array.); VALIDATION_ERROR (cannot remove more than … items per request.); VALIDATION_ERROR (every id must be a string.); PROJECT_NOT_FOUND (Project not found.); NOT_FOUND (Search index not found.); SEARCH_REMOVE_UNCONFIRMED (The removal could not be confirmed: some or all of these items may already be removed. Which of these ids still exist is not known from this response; a repeated remove also deletes any of them added since.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, NOT_FOUND, SEARCH_REMOVE_UNCONFIRMED
|
|
1922
|
+
- `POST /v1/search/upsert`
|
|
1923
|
+
- Contract: request fields: project_id, index, items, id, content, metadata. response fields: index, upserted, item_count. rejects with: VALIDATION_ERROR (X-Sw-Job-Fence must be a job id.); VALIDATION_ERROR (X-Sw-Job-Fence and X-Somewhere-Job-Invocation must name the same job.); VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (index is required.); VALIDATION_ERROR (items must be a non-empty array.); VALIDATION_ERROR (items cannot exceed … per request.); VALIDATION_ERROR (every item needs an id (string) and content (string).); VALIDATION_ERROR (content cannot exceed … chars per item.); PROJECT_NOT_FOUND (Project not found.); VALIDATION_ERROR (index must be 1-64 chars, letters/numbers/underscore/hyphen only.); RATE_LIMITED (Search updates are arriving too quickly; the same batch is accepted after retry_after_ms.); SEARCH_QUOTA_EXCEEDED (This project has reached its … search-item limit.); JOB_NOT_ACTIVE (This job was cancelled or has finished, so its search items were not written.); SEARCH_UPSERT_UNCONFIRMED (The upsert could not be confirmed: some or all of these items may have been written. A repeated upsert of the same ids replaces any that were written.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, RATE_LIMITED, SEARCH_QUOTA_EXCEEDED, JOB_NOT_ACTIVE, SEARCH_UPSERT_UNCONFIRMED
|
|
1924
|
+
|
|
1925
|
+
### /v1/security
|
|
1926
|
+
|
|
1927
|
+
- `GET /v1/security/findings`
|
|
1928
|
+
- Contract: response fields: summary, projects, filters, severity, publish_visibility. rejects with: VALIDATION_ERROR (severity must be 'critical', 'high', 'medium', or 'low'.); VALIDATION_ERROR (publish_visibility must be 'public' or 'private'.). error codes: VALIDATION_ERROR
|
|
1929
|
+
- `POST /v1/security/review`
|
|
1930
|
+
- Contract: request fields: project_id, focus, release_id. response fields: status, verdict_reasons, findings, finding_count, review_scope, model, tier_unlocks_deep_review, project_id, review_run_id, version, release_id, release_seq, source_authority, files_shown, files_total, usage, status='clear', review_scope='customer_functions', model=null, usage=null, status='indeterminate'. rejects with: VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (release_id must be a non-empty string when provided.); PROJECT_NOT_FOUND (Project not found or you do not have access.); RELEASE_SOURCE_UNAVAILABLE (The project has no deployed version available for review.); REVIEW_SOURCE_UNAVAILABLE (Security review could not verify your project’s deployed code, so no review was run (a platform issue, not a problem with your project). This has been flagged for our team; a later identical request can succeed.); REVIEW_SOURCE_UNAVAILABLE (Security review could not confirm your project’s deployed code, so no review was run (a platform issue, not a problem with your project). This has been flagged for our team; a request after the next deploy can succeed.); CONFIG_ERROR (Security review is unavailable due to a platform configuration issue (not a problem with your project). The team has been alerted.); UPSTREAM_DOWN (Security review is temporarily unavailable; a later identical request can succeed.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, RELEASE_SOURCE_UNAVAILABLE, REVIEW_SOURCE_UNAVAILABLE, CONFIG_ERROR, UPSTREAM_DOWN
|
|
1931
|
+
- `GET /v1/security/reviews`
|
|
1932
|
+
- Contract: rejects with: VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (limit must be an integer from 1 to 50.); VALIDATION_ERROR (Invalid review cursor.); PROJECT_NOT_FOUND (Project not found or you do not have access.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
1933
|
+
- `GET /v1/security/reviews/:param`
|
|
1934
|
+
- Contract: rejects with: VALIDATION_ERROR (project_id and a valid review run ID are required.); PROJECT_NOT_FOUND (Project not found or you do not have access.); REVIEW_NOT_FOUND (Review not found for this project.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, REVIEW_NOT_FOUND
|
|
1935
|
+
- `GET /v1/security/sitekey`
|
|
1936
|
+
- Contract: response fields: sitekey. rejects with: CONFIG_ERROR (Turnstile is not configured on this platform.). error codes: CONFIG_ERROR
|
|
1937
|
+
- `POST /v1/security/verify`
|
|
1938
|
+
- Contract: request fields: token, remote_ip, secret. response fields: success, challenge_ts, hostname, error_codes. rejects with: VALIDATION_ERROR (token is required.); CONFIG_ERROR (Turnstile is not configured on this platform.). error codes: VALIDATION_ERROR, CONFIG_ERROR
|
|
1939
|
+
|
|
1940
|
+
### /v1/smoke
|
|
1941
|
+
|
|
1942
|
+
- `GET /v1/smoke/:param`
|
|
1943
|
+
- Contract: response fields (partial): latest, details, details_json, history. rejects with: PROJECT_NOT_FOUND (Project not found.). error codes: PROJECT_NOT_FOUND
|
|
1944
|
+
- `GET /v1/smoke/:param/config`
|
|
1945
|
+
- Contract: response fields: project_id, enabled, test_auth_flow, test_user_email, canary_enabled, alert_cooldown_seconds, last_alert_at, extra_checks, test_user_email=null when unavailable, last_alert_at=null when unavailable. rejects with: PROJECT_NOT_FOUND (Project not found.). error codes: PROJECT_NOT_FOUND
|
|
1946
|
+
- `PATCH /v1/smoke/:param/config`
|
|
1947
|
+
- Contract: response fields: updated, updated=true. rejects with: PROJECT_NOT_FOUND (Project not found.); VALIDATION_ERROR (No app user with email "…" exists in this project. The test user has to be an existing app user; sw.auth signup or auth_signup creates one.); VALIDATION_ERROR (The app user "…" is banned, and a banned user cannot be the test user.); VALIDATION_ERROR (extra_checks must be an array.). error codes: PROJECT_NOT_FOUND, VALIDATION_ERROR
|
|
1948
|
+
- `POST /v1/smoke/:param/run`
|
|
1949
|
+
- Contract: response fields (partial): run, skipped, reason, run=null, details, details_json, id, status, note, status='running', note='Run is still executing; GET /v1/smoke/{project_id} returns the result once it finishes.'. rejects with: PROJECT_NOT_FOUND (Project not found.); SMOKE_CHECKS_DISABLED (Site checks are disabled for this project. They run again once enabled: true is set in project settings (PATCH /v1/smoke/{project_id}/config).); NO_TARGETS (No reachable targets for this project (no subdomain or claimed domains).). error codes: PROJECT_NOT_FOUND, SMOKE_CHECKS_DISABLED, NO_TARGETS
|
|
1950
|
+
|
|
1951
|
+
### /v1/status
|
|
1952
|
+
|
|
1953
|
+
- `GET /v1/status`
|
|
1954
|
+
- Contract: rejects with: STATUS_UNAVAILABLE (Status could not be loaded right now. Try again in a minute.). error codes: STATUS_UNAVAILABLE
|
|
1955
|
+
|
|
1956
|
+
### /v1/stock
|
|
1957
|
+
|
|
1958
|
+
- `GET /v1/stock/photos`
|
|
1959
|
+
- Contract: response fields: photos, page, per_page, total, has_more. rejects with: UPSTREAM_NOT_CONFIGURED (Stock photos are not configured on this platform.); VALIDATION_ERROR (project_id is required.); FORBIDDEN (project_id does not match the app-user JWT.); PROJECT_NOT_FOUND (Project not found.); RATE_LIMITED (Too many stock photo requests (30 per minute). The limit resets within a minute.); VALIDATION_ERROR (query is required.); VALIDATION_ERROR (query max 200 chars.); VALIDATION_ERROR (orientation must be landscape, portrait, or square.); VALIDATION_ERROR (size must be large, medium, or small.); UPSTREAM_ERROR (Stock photo provider unreachable.); RATE_LIMITED (Stock photo rate limit exceeded; a later request can succeed.); UPSTREAM_ERROR (Stock photo provider returned ….); UPSTREAM_ERROR (Invalid response from stock photo provider.). error codes: UPSTREAM_NOT_CONFIGURED, VALIDATION_ERROR, FORBIDDEN, PROJECT_NOT_FOUND, RATE_LIMITED, UPSTREAM_ERROR
|
|
1960
|
+
|
|
1961
|
+
### /v1/tasks
|
|
1962
|
+
|
|
1963
|
+
- `GET /v1/tasks`
|
|
1964
|
+
- Contract: Runtime method: sw.tasks.comment. Runtime method: sw.tasks.delete. Runtime method: sw.tasks.update. Runtime method: sw.tasks.get. Runtime method: sw.tasks.list. rejects with: VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found or not accessible.); VALIDATION_ERROR (label must name a task label.); VALIDATION_ERROR (waiting_on filtering requires view=board.); VALIDATION_ERROR (status must be one of: ….); VALIDATION_ERROR (sort must be one of: priority, updated, created.); VALIDATION_ERROR (Label filtering is unavailable in the closure review queue. Remove label or list project tasks without review_for_closure.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, INTERNAL_ERROR, TABLE_NOT_FOUND, INVALID_CURSOR, CURSOR_STALE
|
|
1965
|
+
- `POST /v1/tasks`
|
|
1966
|
+
- Contract: Runtime method: sw.tasks.create. rejects with: VALIDATION_ERROR (JSON body required.); VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (title is required.); PROJECT_NOT_FOUND (Project not found or not accessible.); FORBIDDEN (Editor access is required.); VALIDATION_ERROR (Unknown template "…". Available: ….); VALIDATION_ERROR (status must be one of: ….); VALIDATION_ERROR (priority must be one of: ….); TASK_COMPLETION_BLOCKED (Cannot create a completed task that requires deployment without verified deployment evidence. A task created as active is closable once a successful deployment version is linked; project_deploys lists the versions that succeeded.); VALIDATION_ERROR (waiting_on must be human, product_decision, external, or null.); VALIDATION_ERROR (status_note must be text or null.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, FORBIDDEN, TASK_COMPLETION_BLOCKED, DIRECTION_PROTECTED, INTERNAL_ERROR, TASK_CREATE_OUTCOME_UNKNOWN, NOT_FOUND, TABLE_NOT_FOUND, SYNTAX_ERROR
|
|
1967
|
+
- `DELETE /v1/tasks/:param`
|
|
1968
|
+
- Contract: response fields: id, deleted, already_deleted, deleted_at, purge_at, deleted=true, already_deleted=true, reason, restore, arguments, task_id. rejects with: VALIDATION_ERROR (The request body must be a JSON object.); VALIDATION_ERROR (reason is required: say why this task should never have existed. To keep it as history, archive or supersede it instead.); VALIDATION_ERROR (reason must be at most … characters.); VALIDATION_ERROR (Delete takes the full task ID, not a prefix.… Nothing was deleted.); NOT_FOUND (Task not found.); TASK_IS_GUIDANCE (Task is referenced as guidance by ….); TASK_IS_DIRECTION_REPLACEMENT (Change the direction replacement link before deleting this record.); DIRECTION_BULK_DELETE_FORBIDDEN (Direction records cannot be bulk deleted.); TASK_IS_GUIDANCE (Task is referenced as live guidance.); VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found or not accessible.). error codes: VALIDATION_ERROR, NOT_FOUND, TASK_IS_GUIDANCE, DIRECTION_BULK_DELETE_FORBIDDEN, DIRECTION_DELETE_FORBIDDEN, TASK_IS_DIRECTION_REPLACEMENT, TASK_DELETE_FAILED, PROJECT_NOT_FOUND, TABLE_NOT_FOUND, SYNTAX_ERROR
|
|
1969
|
+
- `GET /v1/tasks/:param`
|
|
1970
|
+
- Contract: rejects with: VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found or not accessible.); NOT_FOUND (Task not found.); INTERNAL_ERROR (Task get failed.); AMBIGUOUS_TASK_ID (Task reference "…" matches multiple tasks: …. A longer prefix or the full id identifies one task.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, NOT_FOUND, INTERNAL_ERROR, AMBIGUOUS_TASK_ID, TABLE_NOT_FOUND, INVALID_CURSOR, CURSOR_STALE
|
|
1971
|
+
- `PATCH /v1/tasks/:param`
|
|
1972
|
+
- Contract: response fields (partial): decision. rejects with: VALIDATION_ERROR (JSON body required.); VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found or not accessible.); FORBIDDEN (Editor access is required.); NOT_FOUND (Task not found.); VALIDATION_ERROR (A record cannot replace itself.); VALIDATION_ERROR (parent_id must be a task id, an empty string, or null.); PARENT_TASK_NOT_FOUND (parent_id must name a task in the same project.); VALIDATION_ERROR (A task cannot be its own parent.); RELATIONSHIP_CYCLE (This parent_id would create a child_of cycle.); VALIDATION_ERROR (deployment_version (the platform reads the version tag from the deploy) and shipped_in (a freeform caller-set tag) are mutually exclusive; this request had both.); VALIDATION_ERROR (deployment_version must be a positive deployment version number.); VALIDATION_ERROR (deployment_project_id must be a project ID, subdomain, or slug.); PROJECT_NOT_FOUND (Deployment project not found or not accessible.); DEPLOYMENT_NOT_FOUND (No successful production deployment with that version exists for this project. Its deploy list (project_deploys) shows the versions that succeeded.); VALIDATION_ERROR (status must be one of: ….); VALIDATION_ERROR (priority must be one of: ….); VALIDATION_ERROR (waiting_on must be human, product_decision, external, or null.); VALIDATION_ERROR (health must be one of: … (or null to clear).); TASK_ATTACHMENTS_LIMIT (A task may have at most … attachments.); PARENT_TASK_INVALID (parent_id must name an acyclic task in the same project.); AMBIGUOUS_TASK_ID (Task reference "…" matches multiple tasks: …. A longer prefix or the full id identifies one task.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, FORBIDDEN, NOT_FOUND, PARENT_TASK_NOT_FOUND, RELATIONSHIP_CYCLE, DIRECTION_PROTECTED, DEPLOYMENT_NOT_FOUND, TASK_ATTACHMENTS_LIMIT, TASK_COMPLETION_BLOCKED, PARENT_TASK_INVALID, INTERNAL_ERROR, AMBIGUOUS_TASK_ID, TASK_DEPENDENCY_OPEN, TASK_CREATE_OUTCOME_UNKNOWN, TABLE_NOT_FOUND, SYNTAX_ERROR
|
|
1973
|
+
- `POST /v1/tasks/:param/answer`
|
|
1974
|
+
- Contract: rejects with: VALIDATION_ERROR (JSON body required.); VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (answer must be "done", "cannot" or "not_needed".); VALIDATION_ERROR (note must be text.); VALIDATION_ERROR (That note is too long. A note holds … characters at most; nothing was saved.); PROJECT_NOT_FOUND (Project not found or not accessible.); FORBIDDEN (Editor access is required.); NOT_FOUND (Task not found.); TASK_NOT_WAITING (This task is not waiting for a person, so there is nothing to answer. Nothing was changed.); TASK_ANSWER_CONFLICT (This item changed while you were answering. Nothing was saved; look at it again.); AMBIGUOUS_TASK_ID (Task reference "…" matches multiple tasks: …. A longer prefix or the full id identifies one task.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, FORBIDDEN, NOT_FOUND, TASK_NOT_WAITING, TASK_ANSWER_CONFLICT, INTERNAL_ERROR, AMBIGUOUS_TASK_ID, TABLE_NOT_FOUND, SYNTAX_ERROR
|
|
1975
|
+
- `POST /v1/tasks/:param/comments`
|
|
1976
|
+
- Contract: response fields (partial): id, task_id, author, body, created_at, edited_at, databaseId, project_id, edited_at=null. rejects with: VALIDATION_ERROR (JSON body required.); VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (body is required.); PROJECT_NOT_FOUND (Project not found or not accessible.); FORBIDDEN (Editor access is required.); NOT_FOUND (Task not found.); AMBIGUOUS_TASK_ID (Task reference "…" matches multiple tasks: …. A longer prefix or the full id identifies one task.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, FORBIDDEN, NOT_FOUND, INTERNAL_ERROR, AMBIGUOUS_TASK_ID, TABLE_NOT_FOUND, SYNTAX_ERROR
|
|
1977
|
+
- `DELETE /v1/tasks/:param/comments/:param`
|
|
1978
|
+
- Contract: response fields: id, task_id, deleted, deleted=true. rejects with: FORBIDDEN (Only the comment author or the project owner can delete.); VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found or not accessible.); FORBIDDEN (Editor access is required.); NOT_FOUND (Task not found.); NOT_FOUND (Comment not found.); AMBIGUOUS_TASK_ID (Task reference "…" matches multiple tasks: …. A longer prefix or the full id identifies one task.). error codes: FORBIDDEN, INTERNAL_ERROR, VALIDATION_ERROR, PROJECT_NOT_FOUND, NOT_FOUND, AMBIGUOUS_TASK_ID, SYNTAX_ERROR, TABLE_NOT_FOUND
|
|
1979
|
+
- `PATCH /v1/tasks/:param/comments/:param`
|
|
1980
|
+
- Contract: response fields: id, task_id, author, actor, body, created_at, edited_at. rejects with: VALIDATION_ERROR (JSON body required.); VALIDATION_ERROR (body is required.); VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found or not accessible.); FORBIDDEN (Editor access is required.); NOT_FOUND (Task not found.); NOT_FOUND (Comment not found.); AMBIGUOUS_TASK_ID (Task reference "…" matches multiple tasks: …. A longer prefix or the full id identifies one task.). error codes: VALIDATION_ERROR, INTERNAL_ERROR, PROJECT_NOT_FOUND, FORBIDDEN, NOT_FOUND, AMBIGUOUS_TASK_ID, SYNTAX_ERROR, TABLE_NOT_FOUND
|
|
1981
|
+
- `POST /v1/tasks/:param/link-deployment`
|
|
1982
|
+
- Contract: response fields (partial): task_id, deployment_project_id, deployment_version, shipped_in, linked, verified, databaseId, projectId, linked=false, verified=true, promoted_at, is_live, linked=true. rejects with: VALIDATION_ERROR (JSON body required.); VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (deployment_project_id must be a project ID, subdomain, or slug.); VALIDATION_ERROR (version must be a positive deployment version.); PROJECT_NOT_FOUND (Project not found or not accessible.); FORBIDDEN (Editor access is required.); PROJECT_NOT_FOUND (Deployment project not found or not accessible.); DEPLOYMENT_NOT_FOUND (No successful production deployment with that version exists for this project. project_deploys lists the versions that succeeded.); NOT_FOUND (Task not found.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, FORBIDDEN, DEPLOYMENT_NOT_FOUND, NOT_FOUND, TASK_DEPLOYMENT_LINK_FAILED, TABLE_NOT_FOUND, SYNTAX_ERROR
|
|
1983
|
+
- `POST /v1/tasks/:param/relationships`
|
|
1984
|
+
- Contract: response fields: relationship, created, relationship=null when unavailable. rejects with: VALIDATION_ERROR (JSON body required.); VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (task_id is required.); VALIDATION_ERROR (type must be one of: ….); PROJECT_NOT_FOUND (Project not found or not accessible.); FORBIDDEN (Editor access is required.); NOT_FOUND (Source task not found in this project.); RELATED_TASK_NOT_FOUND (Related task not found in this project. Cross-project relationships are not allowed.); VALIDATION_ERROR (A task cannot relate to itself.); RELATIONSHIP_CYCLE (Adding … would create a cycle.); RELATED_TASK_NOT_FOUND (One of the tasks was removed before the relationship could be stored, so it was not stored. The same request is safe to repeat while both tasks exist.); AMBIGUOUS_TASK_ID (Task reference "…" matches multiple tasks: …. A longer prefix or the full id identifies one task.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, FORBIDDEN, NOT_FOUND, RELATED_TASK_NOT_FOUND, RELATIONSHIP_CYCLE, TASK_RELATIONSHIP_WRITE_FAILED, AMBIGUOUS_TASK_ID, TABLE_NOT_FOUND, SYNTAX_ERROR
|
|
1985
|
+
- `DELETE /v1/tasks/:param/relationships/:param`
|
|
1986
|
+
- Contract: response fields: id, deleted, deleted=true. rejects with: VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found or not accessible.); FORBIDDEN (Editor access is required.); NOT_FOUND (Task not found.); NOT_FOUND (Relationship not found on this task.); LEGACY_RELATIONSHIP (This child_of edge is maintained by parent_id; setting parent_id to null with tasks_update removes it.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, FORBIDDEN, NOT_FOUND, LEGACY_RELATIONSHIP, TASK_RELATIONSHIP_DELETE_FAILED, TABLE_NOT_FOUND, SYNTAX_ERROR
|
|
1987
|
+
- `POST /v1/tasks/:param/resolve-reports`
|
|
1988
|
+
- Contract: response fields: parent_id, closed, failed, notified. rejects with: NOT_CONFIGURED (The atomic task spine is not configured on this environment.); FORBIDDEN (Admin credential required to resolve linked feedback.); VALIDATION_ERROR (message must be 16000 characters or fewer.); VALIDATION_ERROR (These report ids are not open children of …: ….). error codes: NOT_CONFIGURED, FORBIDDEN, VALIDATION_ERROR, CUSTOMER_TICKET_NOT_BULK_CLOSABLE, UPDATE_FAILED
|
|
1989
|
+
- `POST /v1/tasks/:param/restore`
|
|
1990
|
+
- Contract: response fields: id, restored, deleted, by, reason, relinked, not_restored, restored=true. rejects with: VALIDATION_ERROR (reason must be at most … characters.); NOT_FOUND (No deleted task with that id. Deleted tasks can be restored for 30 days.); VALIDATION_ERROR (Restore takes the full task ID, not a prefix.… Nothing was restored.); TASK_PURGED (This task was deleted more than 30 days ago and is gone for good.); TASK_NOT_DELETED (Task … is not deleted.); TASK_RESTORE_REPLACEMENT (…; replacement ids: …); TASK_PURGED (This deletion was purged before restore; nothing was restored.); VALIDATION_ERROR (The request body must be a JSON object.); VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found or not accessible.). error codes: VALIDATION_ERROR, NOT_FOUND, TASK_PURGED, TASK_NOT_DELETED, TASK_RESTORE_REPLACEMENT, TASK_RESTORE_FAILED, PROJECT_NOT_FOUND, TABLE_NOT_FOUND, SYNTAX_ERROR, TASK_DELETE_FORBIDDEN
|
|
1991
|
+
- `POST /v1/tasks/bulk-delete`
|
|
1992
|
+
- Contract: response fields: results, id, deleted, already_deleted, deleted_at, purge_at, deleted=true, already_deleted=true, reason, restore, arguments, task_id. rejects with: VALIDATION_ERROR (task_ids must contain 1 to 200 task IDs.); VALIDATION_ERROR (The request body must be a JSON object.); VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found or not accessible.); VALIDATION_ERROR (reason is required: say why this task should never have existed. To keep it as history, archive or supersede it instead.); VALIDATION_ERROR (reason must be at most … characters.); VALIDATION_ERROR (Delete takes the full task ID, not a prefix.… Nothing was deleted.); NOT_FOUND (Task not found.); TASK_IS_GUIDANCE (Task is referenced as guidance by ….); TASK_IS_DIRECTION_REPLACEMENT (Change the direction replacement link before deleting this record.); DIRECTION_BULK_DELETE_FORBIDDEN (Direction records cannot be bulk deleted.); TASK_IS_GUIDANCE (Task is referenced as live guidance.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, NOT_FOUND, TASK_IS_GUIDANCE, DIRECTION_BULK_DELETE_FORBIDDEN, DIRECTION_DELETE_FORBIDDEN, TASK_IS_DIRECTION_REPLACEMENT, TASK_DELETE_FAILED, TABLE_NOT_FOUND, SYNTAX_ERROR
|
|
1993
|
+
- `POST /v1/tasks/bulk-update`
|
|
1994
|
+
- Contract: response fields: updated, failed, results. rejects with: VALIDATION_ERROR (JSON body required.); VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (task_ids must be a non-empty array.); VALIDATION_ERROR (task_ids is capped at 100 per call; a larger set is accepted as several calls of up to 100.); VALIDATION_ERROR (updates object is required.); PROJECT_NOT_FOUND (Project not found or not accessible.); FORBIDDEN (Editor access is required.); VALIDATION_ERROR (status must be one of: ….); VALIDATION_ERROR (priority must be one of: ….); VALIDATION_ERROR (updates must contain at least one of: status, priority, assignee, labels, area, parent_id.); VALIDATION_ERROR (parent_id must be a task id, an empty string, or null.); PARENT_TASK_NOT_FOUND (parent_id must name a task in the same project.); AMBIGUOUS_TASK_ID (Task reference "…" matches multiple tasks: …. A longer prefix or the full id identifies one task.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, FORBIDDEN, PARENT_TASK_NOT_FOUND, AMBIGUOUS_TASK_ID, NOT_FOUND, DIRECTION_PROTECTED, RELATIONSHIP_CYCLE, TASK_DEPENDENCY_OPEN, TASK_COMPLETION_BLOCKED, TABLE_NOT_FOUND, SYNTAX_ERROR
|
|
1995
|
+
- `GET /v1/tasks/deleted`
|
|
1996
|
+
- Contract: rejects with: VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found or not accessible.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, TABLE_NOT_FOUND
|
|
1997
|
+
- `GET /v1/tasks/direction-audit`
|
|
1998
|
+
- Contract: response fields: ok, checked_at, violations, ok=true. rejects with: VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found or not accessible.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, TABLE_NOT_FOUND
|
|
1999
|
+
- `GET /v1/tasks/overview`
|
|
2000
|
+
- Contract: Runtime method: sw.tasks.overview.
|
|
2001
|
+
- `POST /v1/tasks/reconcile`
|
|
2002
|
+
- Contract: response fields: applied, mutation_count, scope, active_tasks_scanned, context_tasks_scanned, max_tasks, summary, applied=false. rejects with: VALIDATION_ERROR (JSON body required.); VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found or not accessible.); FORBIDDEN (Editor access is required to run board reconciliation.); RATE_LIMITED (Reconcile Board is limited to 12 proposal passes per hour.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, FORBIDDEN, RATE_LIMITED, TASK_RECONCILE_INVALID_OUTPUT, TASK_RECONCILE_EMPTY_OUTPUT, TASK_RECONCILE_NO_ACTIONABLE_OUTPUT, TASK_RECONCILE_CLASSIFIER_FAILED, TABLE_NOT_FOUND
|
|
2003
|
+
- `GET /v1/tasks/settings`
|
|
2004
|
+
- Contract: response fields: project_id, notify_email, webhook_url, webhook_configured, notify_email=null when unavailable, webhook_url=null when unavailable. rejects with: VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found or not accessible.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
2005
|
+
- `PATCH /v1/tasks/settings`
|
|
2006
|
+
- Contract: response fields: project_id, notify_email, webhook_url, webhook_configured, webhook_secret. rejects with: VALIDATION_ERROR (JSON body required.); VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found or not accessible.); FORBIDDEN (Editor access is required.); VALIDATION_ERROR (webhook_url must be an http(s) URL.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, FORBIDDEN
|
|
2007
|
+
- `GET /v1/tasks/summary`
|
|
2008
|
+
- Contract: rejects with: VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found or not accessible.); INTERNAL_ERROR (Task summary failed.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, INTERNAL_ERROR, TABLE_NOT_FOUND
|
|
2009
|
+
- `GET /v1/tasks/templates`
|
|
2010
|
+
- Contract: response fields: templates
|
|
2011
|
+
|
|
2012
|
+
### /v1/templates
|
|
2013
|
+
|
|
2014
|
+
- `GET /v1/templates`
|
|
2015
|
+
- Contract: response fields: templates
|
|
2016
|
+
- `GET /v1/templates/:param`
|
|
2017
|
+
- Contract: response fields (partial): files, functions. rejects with: TEMPLATE_NOT_FOUND (No template is named …. GET /v1/templates lists them: ….). error codes: TEMPLATE_NOT_FOUND
|
|
2018
|
+
- `POST /v1/templates/:param/fill`
|
|
2019
|
+
- Contract: request fields: words. response fields (partial): files, functions. rejects with: TEMPLATE_NOT_FOUND (No template is named …. GET /v1/templates lists them: ….). error codes: VALIDATION_ERROR, TEMPLATE_NOT_FOUND
|
|
2020
|
+
|
|
2021
|
+
### /v1/traces
|
|
2022
|
+
|
|
2023
|
+
- `GET /v1/traces`
|
|
2024
|
+
- Contract: response fields: project_id, traces, trace_id, name, started_at, duration_ms, operation_count, error_count, status, kept_for, name=null when unavailable. rejects with: AUTH_INVALID_CREDS (Reading traces requires a developer or connector session.); VALIDATION_ERROR (project_id query param is required.); PROJECT_NOT_FOUND (Project not found.); VALIDATION_ERROR (since must be a time in epoch milliseconds (a whole number, e.g. 1792416425000).); VALIDATION_ERROR (slow_ms must be a whole number of milliseconds (0 to 9999999).). error codes: AUTH_INVALID_CREDS, VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
2025
|
+
- `POST /v1/traces`
|
|
2026
|
+
- Contract: response fields: received, recorded, rejected, truncated, sampled_out, sample_rate. rejects with: AUTH_INVALID_CREDS (Recording traces requires a developer or runtime credential.); VALIDATION_ERROR (Body must be JSON.); VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.); VALIDATION_ERROR (spans must be an array.). error codes: AUTH_INVALID_CREDS, VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
2027
|
+
- `GET /v1/traces/:param`
|
|
2028
|
+
- Contract: response fields (partial): trace_id, found, project_id, started_at, total_duration_ms, operation_count, truncated, slowest_operation, duration_ms, span_id, failed_operations, error_code, found=true, reason, spans, waterfall, found=false, reason='No stored operations for this id. Either the request was not sampled (the X-Trace-Sampling response header states this), the spans are still being recorded after the response, or the retention window has elapsed.'. rejects with: AUTH_INVALID_CREDS (Reading traces requires a developer or connector session.); VALIDATION_ERROR (trace_id must be a 32-character trace id, as returned in the X-Trace-Id response header.); PROJECT_NOT_FOUND (Project not found.). error codes: AUTH_INVALID_CREDS, VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
2029
|
+
|
|
2030
|
+
### /v1/usage
|
|
2031
|
+
|
|
2032
|
+
- `GET /v1/usage`
|
|
2033
|
+
- Contract: response fields: period, totals, rooms. rejects with: PROJECT_NOT_FOUND (Project not found.). error codes: PROJECT_NOT_FOUND
|
|
2034
|
+
- `GET /v1/usage/summary`
|
|
2035
|
+
- Contract: response fields: tier, account_plan, limits, view, project_count, project_count_scope, metric_definitions, deploys, ai_calls, pagination, next_cursor, project_count_scope='owned_projects_excluding_deleting', deploys='From this change onward, new release-based production publications count once on successful completion; previews, dry runs, unchanged deploys, rollbacks and retries do not count. Historical counters retain their original meaning.', ai_calls='Project AI calls. Advisor calls are accounted separately and are not included.'. rejects with: INVALID_USAGE_VIEW (view accepts account or projects; pagination requires view=projects.); INVALID_USAGE_PAGINATION (limit must be an integer from 1 to 100.); INVALID_USAGE_PAGINATION (cursor must be a cursor returned by this endpoint.). error codes: INVALID_USAGE_VIEW, INVALID_USAGE_PAGINATION
|
|
2036
|
+
|
|
2037
|
+
### /v1/web
|
|
2038
|
+
|
|
2039
|
+
- `POST /v1/web/ingest`
|
|
2040
|
+
- Contract: request fields: project_id, idempotency_key, url, max_pages, path_prefix. rejects with: UPSTREAM_NOT_CONFIGURED (Web ingest is not configured on this platform.); VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (url is required.); VALIDATION_ERROR (url must be … characters or fewer.); VALIDATION_ERROR (url must be a valid http(s) URL.); VALIDATION_ERROR (url must use http or https.); VALIDATION_ERROR (url must be a publicly reachable http(s) URL (…).); PROJECT_NOT_FOUND (Project not found.). error codes: UPSTREAM_NOT_CONFIGURED, VALIDATION_ERROR, PROJECT_NOT_FOUND, SAFE_FETCH_BAD_URL
|
|
2041
|
+
- `POST /v1/web/scrape`
|
|
2042
|
+
- Contract: Runtime method: sw.web.scrape. request fields: project_id, url, formats, only_main, wait_for, storage, extract. rejects with: UPSTREAM_NOT_CONFIGURED (Web scraping is not configured on this platform.); VALIDATION_ERROR (extract must be a JSON Schema object.); VALIDATION_ERROR (extract schema must be …KB or smaller.); VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (url is required.); VALIDATION_ERROR (url must be … characters or fewer.); VALIDATION_ERROR (url must be a valid http(s) URL.); VALIDATION_ERROR (url must use http or https.); VALIDATION_ERROR (url must be a publicly reachable http(s) URL (…).); VALIDATION_ERROR (formats must be a non-empty array of: markdown, html, rawHtml, links, screenshot.); PROJECT_NOT_FOUND (Project not found.); RATE_LIMITED (Too many screenshot scrapes (30/min/project); the limit resets within a minute. / Too many web scrape requests (120/min/project); the limit resets within a minute.); UPSTREAM_ERROR (Structured extraction result exceeded the …KB limit.); RATE_LIMITED (Web scrape provider is temporarily unavailable after one server-side retry; a later identical request can succeed.); RATE_LIMITED (Web scrape rate limit exceeded; a later identical request can succeed.); UPSTREAM_QUOTA (Web scrape quota exceeded for this platform.); UPSTREAM_ERROR (Invalid response from web scrape provider.); UPSTREAM_ERROR (Web scrape provider returned ….). error codes: UPSTREAM_NOT_CONFIGURED, VALIDATION_ERROR, PROJECT_NOT_FOUND, RATE_LIMITED, UPSTREAM_ERROR, UPSTREAM_QUOTA, SAFE_FETCH_BAD_URL
|
|
2043
|
+
- `POST /v1/web/search`
|
|
2044
|
+
- Contract: Runtime method: sw.web.search. request fields: project_id, query, count, country, freshness, safesearch. response fields: query, results, count. rejects with: UPSTREAM_NOT_CONFIGURED (Web search is not configured on this platform.); VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (query is required.); VALIDATION_ERROR (query must be … characters or fewer.); VALIDATION_ERROR (country must be a 2-letter code.); VALIDATION_ERROR (freshness must be one of: pd, pw, pm, py.); VALIDATION_ERROR (safesearch must be one of: off, moderate, strict.); PROJECT_NOT_FOUND (Project not found.); RATE_LIMITED (Too many web search requests (60/min/project); the limit resets within a minute.); UPSTREAM_ERROR (Web search provider unreachable.); RATE_LIMITED (Web search rate limit exceeded; a later identical request can succeed.); UPSTREAM_QUOTA (Web search quota exceeded for this platform.); UPSTREAM_ERROR (Web search provider returned ….); UPSTREAM_ERROR (Invalid response from web search provider.). error codes: UPSTREAM_NOT_CONFIGURED, VALIDATION_ERROR, PROJECT_NOT_FOUND, RATE_LIMITED, UPSTREAM_ERROR, UPSTREAM_QUOTA
|
|
2045
|
+
|
|
2046
|
+
### /v1/webhooks
|
|
2047
|
+
|
|
2048
|
+
- `GET /v1/webhooks`
|
|
2049
|
+
- Contract: response fields: available_events, subscriptions, event, url, enabled, created_at, updated_at. rejects with: VALIDATION_ERROR (project_id query param is required.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
2050
|
+
- `DELETE /v1/webhooks/:param`
|
|
2051
|
+
- Contract: response fields: event, deleted=true. rejects with: VALIDATION_ERROR (Unknown event "…".); VALIDATION_ERROR (project_id query param is required.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
2052
|
+
- `PUT /v1/webhooks/:param`
|
|
2053
|
+
- Contract: request fields: project_id, url, enabled, secret. response fields: event, enabled. rejects with: VALIDATION_ERROR (Unknown event "…". Valid: ….); VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (url must be an http(s) URL.); PROJECT_NOT_FOUND (Project not found.); PROJECT_OWNER_CHANGED (Project ownership changed before the webhook was saved. Open the project again.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, PROJECT_OWNER_CHANGED
|
|
2054
|
+
- `POST /v1/webhooks/:param/test`
|
|
2055
|
+
- Contract: request fields: project_id. response fields: event, subscribers_reached. rejects with: VALIDATION_ERROR (Unknown event "…". Valid: ….); VALIDATION_ERROR (project_id is required.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
2056
|
+
- `GET /v1/webhooks/deliveries`
|
|
2057
|
+
- Contract: response fields: deliveries. rejects with: VALIDATION_ERROR (project_id query param is required.); PROJECT_NOT_FOUND (Project not found.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND
|
|
2058
|
+
- `POST /v1/webhooks/deliveries/:param/redrive`
|
|
2059
|
+
- Contract: request fields: project_id, retarget. response fields: redrive. rejects with: VALIDATION_ERROR (project_id is required.); VALIDATION_ERROR (retarget must be true or false.); PROJECT_NOT_FOUND (Project not found.); FORBIDDEN (Only the project owner can move a delivery to a new webhook URL.); NOT_FOUND (Webhook delivery not found.); CONFLICT (This older delivery has no retained request body and cannot be redriven exactly.); CONFLICT (This payment callback cannot be sent or moved by the current project owner.); CONFLICT (This payment callback was recorded for a webhook URL the project no longer uses; it is not sent to another URL unless the project owner redrives it with retarget: true. / This payment callback was recorded as signed and the project webhook secret was removed; it is not sent unsigned.); CONFLICT (The project is being deleted; this delivery is not sent.); CONFLICT (Only payment callback deliveries can be moved to a new webhook URL.); CONFLICT (The delivery or the project webhook changed while moving it, so it was not moved. GET /v1/webhooks/deliveries returns its current status; the redrive request can be repeated.); CONFLICT (This payment callback was recorded as signed and the project webhook has no secret; it is not sent unsigned.); CONFLICT (The project has no webhook URL configured.); VALIDATION_ERROR (The current project webhook URL cannot receive callbacks.); CONFLICT (This webhook delivery already has an attempt in flight.). error codes: VALIDATION_ERROR, PROJECT_NOT_FOUND, FORBIDDEN, NOT_FOUND, CONFLICT, DESTINATION_CHANGED, OWNER_CHANGED, OWNER_UNKNOWN
|
|
2060
|
+
- `POST /v1/webhooks/email-delivery`
|
|
2061
|
+
- Contract: response fields: received, configured, received=true, configured=false, matched, matched=false, event_type, matched=true. rejects with: FORBIDDEN (Invalid webhook signature.); VALIDATION_ERROR (Invalid JSON.); VALIDATION_ERROR (data.email_id missing.). error codes: FORBIDDEN, VALIDATION_ERROR
|
|
2062
|
+
- `POST /v1/webhooks/ses`
|
|
2063
|
+
- Contract: response fields: confirmed, confirmed=true, received, received=true, suppressed. rejects with: VALIDATION_ERROR (Body is not valid JSON.); INVALID_SIGNATURE (Webhook signature verification failed.); INVALID_SIGNATURE (Webhook topic not recognized.); VALIDATION_ERROR (Confirmation URL not allowed.); UPSTREAM_ERROR (Subscription confirmation failed.); VALIDATION_ERROR (Unsupported message type.). error codes: VALIDATION_ERROR, INVALID_SIGNATURE, UPSTREAM_ERROR, EMAIL_RECIPIENT_SUPPRESSED
|
|
2064
|
+
|
|
2065
|
+
## Discovery coverage
|
|
2066
|
+
|
|
2067
|
+
This generated topic was built from 300 runtime methods and 733 customer-facing REST routes discovered from the source tree.
|