@wspc/cli 0.0.14 → 0.0.16

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/spec/openapi.json CHANGED
@@ -1162,7 +1162,7 @@
1162
1162
  "expected_version": {
1163
1163
  "type": "integer",
1164
1164
  "minimum": 0,
1165
- "description": "Optional optimistic lock. Omit to let the server use the current version; pass only to fail the call if someone else has mutated the event since you last read. On mismatch the server returns 409 `VERSION_CONFLICT` with `extra.expected_version` and `extra.actual_version`."
1165
+ "description": "Optional optimistic lock. Omit to let the server use the current version; pass only to fail the call if someone else has mutated the event since you last read. On mismatch the server returns 409 `VERSION_CONFLICT` and includes the current and sent versions in the message."
1166
1166
  },
1167
1167
  "title": {
1168
1168
  "type": "string",
@@ -1371,7 +1371,8 @@
1371
1371
  "identity_verification",
1372
1372
  "dkim",
1373
1373
  "mail_from",
1374
- "receiving_mx"
1374
+ "receiving_mx",
1375
+ "dmarc"
1375
1376
  ],
1376
1377
  "description": "Why this DNS record is required, when the provider returns a purpose hint."
1377
1378
  },
@@ -1464,15 +1465,6 @@
1464
1465
  "not_found"
1465
1466
  ]
1466
1467
  },
1467
- "GetAttachmentQuery": {
1468
- "type": "object",
1469
- "properties": {
1470
- "include_deleted": {
1471
- "type": "string",
1472
- "description": "When `true`, allow downloading an attachment whose parent email is soft-deleted. Defaults to `false`."
1473
- }
1474
- }
1475
- },
1476
1468
  "EmailDomainParam": {
1477
1469
  "type": "object",
1478
1470
  "properties": {
@@ -1485,6 +1477,15 @@
1485
1477
  "domain"
1486
1478
  ]
1487
1479
  },
1480
+ "GetAttachmentQuery": {
1481
+ "type": "object",
1482
+ "properties": {
1483
+ "include_deleted": {
1484
+ "type": "string",
1485
+ "description": "When `true`, allow downloading an attachment whose parent email is soft-deleted. Defaults to `false`."
1486
+ }
1487
+ }
1488
+ },
1488
1489
  "GetEmailQuery": {
1489
1490
  "type": "object",
1490
1491
  "properties": {
@@ -1586,7 +1587,8 @@
1586
1587
  "identity_verification",
1587
1588
  "dkim",
1588
1589
  "mail_from",
1589
- "receiving_mx"
1590
+ "receiving_mx",
1591
+ "dmarc"
1590
1592
  ],
1591
1593
  "description": "Why this DNS record is required, when the provider returns a purpose hint."
1592
1594
  },
@@ -3359,20 +3361,17 @@
3359
3361
  }
3360
3362
  ],
3361
3363
  "summary": "Accept an invite and switch into the inviting organization",
3362
- "description": "Switches the caller's org to the invite's org and records the previous org. The caller loses access to data scoped to their previous org.",
3363
- "x-codeSamples": [
3364
+ "parameters": [
3364
3365
  {
3365
- "lang": "shell",
3366
- "label": "curl",
3367
- "source": "curl -X POST ${EXAMPLE_API_BASE_URL}/auth/invites/inv_01KT43YKZ8CX14WS6ENXQ8397E/accept \\\n -H \"Authorization: Bearer $WSPC_API_KEY\""
3366
+ "name": "x-consistency-bookmark",
3367
+ "in": "header",
3368
+ "required": false,
3369
+ "description": "Optional opaque consistency bookmark returned by a previous auth response. Send it back unchanged to continue read-after-write consistency.",
3370
+ "schema": {
3371
+ "type": "string"
3372
+ },
3373
+ "example": "opaque-consistency-bookmark"
3368
3374
  },
3369
- {
3370
- "lang": "bash",
3371
- "label": "wspc CLI",
3372
- "source": "wspc invite accept inv_01KT43YKZ8CX14WS6ENXQ8397E"
3373
- }
3374
- ],
3375
- "parameters": [
3376
3375
  {
3377
3376
  "schema": {
3378
3377
  "type": "string",
@@ -3384,9 +3383,30 @@
3384
3383
  "in": "path"
3385
3384
  }
3386
3385
  ],
3386
+ "description": "Switches the caller's org to the invite's org and records the previous org. The caller loses access to data scoped to their previous org.",
3387
+ "x-codeSamples": [
3388
+ {
3389
+ "lang": "shell",
3390
+ "label": "curl",
3391
+ "source": "curl -X POST ${EXAMPLE_API_BASE_URL}/auth/invites/inv_01KT43YKZ8CX14WS6ENXQ8397E/accept \\\n -H \"Authorization: Bearer $WSPC_API_KEY\""
3392
+ },
3393
+ {
3394
+ "lang": "bash",
3395
+ "label": "wspc CLI",
3396
+ "source": "wspc invite accept inv_01KT43YKZ8CX14WS6ENXQ8397E"
3397
+ }
3398
+ ],
3387
3399
  "responses": {
3388
3400
  "200": {
3389
3401
  "description": "The organization the caller now belongs to.",
3402
+ "headers": {
3403
+ "x-consistency-bookmark": {
3404
+ "description": "Opaque consistency bookmark for the latest auth database position observed by this request. Store and send it on the next auth request to continue read-after-write consistency.",
3405
+ "schema": {
3406
+ "type": "string"
3407
+ }
3408
+ }
3409
+ },
3390
3410
  "content": {
3391
3411
  "application/json": {
3392
3412
  "schema": {
@@ -3733,6 +3753,18 @@
3733
3753
  }
3734
3754
  ],
3735
3755
  "summary": "Create a new API key (full value returned once)",
3756
+ "parameters": [
3757
+ {
3758
+ "name": "x-consistency-bookmark",
3759
+ "in": "header",
3760
+ "required": false,
3761
+ "description": "Optional opaque consistency bookmark returned by a previous auth response. Send it back unchanged to continue read-after-write consistency.",
3762
+ "schema": {
3763
+ "type": "string"
3764
+ },
3765
+ "example": "opaque-consistency-bookmark"
3766
+ }
3767
+ ],
3736
3768
  "description": "### Overview\nCreates and provisions a new long-lived API key for the authenticated user. The complete plaintext API key value (`api_key`) is returned **only once** in this endpoint's response and cannot be retrieved again.\n\n### When to Use\n- Use this endpoint when a user requests a new API key (e.g., `wspc keys create --label \"My Agent\"`) to isolate access for specific environments, applications, or developers.\n\n### Constraints\n- Requires a valid Bearer token in the `Authorization` header.\n- **Key Limit**: A user is limited to a maximum of 25 active API keys. Requesting a new key beyond this limit will result in a `KEY_LIMIT_EXCEEDED` error.\n- **Label Validation**: The `label` parameter must be between 1 and 60 characters after trimming whitespace. Failing to provide a valid label results in an `INVALID_LABEL` error.\n\n### Troubleshooting\n- **401 Unauthorized**: The Bearer token is missing or invalid.\n- **400 Bad Request**: The `label` parameter is empty, too long, or missing.\n- **400 Bad Request (Limit Exceeded)**: The user has hit the maximum limit of 25 active keys. An existing active key must be revoked before creating a new one.",
3737
3769
  "x-cli": {
3738
3770
  "command": "keys create",
@@ -3776,6 +3808,14 @@
3776
3808
  "responses": {
3777
3809
  "200": {
3778
3810
  "description": "New key created. Store `api_key` securely — the full value is not available after this response.",
3811
+ "headers": {
3812
+ "x-consistency-bookmark": {
3813
+ "description": "Opaque consistency bookmark for the latest auth database position observed by this request. Store and send it on the next auth request to continue read-after-write consistency.",
3814
+ "schema": {
3815
+ "type": "string"
3816
+ }
3817
+ }
3818
+ },
3779
3819
  "content": {
3780
3820
  "application/json": {
3781
3821
  "schema": {
@@ -4120,6 +4160,18 @@
4120
4160
  }
4121
4161
  ],
4122
4162
  "summary": "List active API keys",
4163
+ "parameters": [
4164
+ {
4165
+ "name": "x-consistency-bookmark",
4166
+ "in": "header",
4167
+ "required": false,
4168
+ "description": "Optional opaque consistency bookmark returned by a previous auth response. Send it back unchanged to continue read-after-write consistency.",
4169
+ "schema": {
4170
+ "type": "string"
4171
+ },
4172
+ "example": "opaque-consistency-bookmark"
4173
+ }
4174
+ ],
4123
4175
  "description": "### Overview\nReturns a list of all active (non-revoked) API keys belonging to the authenticated user. It also includes the `current_key_id` identifying the specific key used to authenticate the current request.\n\n### When to Use\n- Use this endpoint to view active API keys (e.g., when running `wspc keys list` or displaying API key management screens in user profiles).\n- Use the `current_key_id` to identify which key is making the current call, facilitating self-rotation or auditing.\n\n### Constraints\n- Requires a valid Bearer token in the `Authorization` header.\n- Only active keys are returned; keys that have been revoked are filtered out and excluded from the response.\n- The full secret key is never returned; only the last 4 characters (`key_last4`) are provided for identification.\n\n### Troubleshooting\n- **401 Unauthorized**: The provided Bearer token is missing, expired, or invalid. Ensure you are passing a valid, active API key.",
4124
4176
  "x-cli": {
4125
4177
  "command": "keys ls",
@@ -4156,6 +4208,14 @@
4156
4208
  "responses": {
4157
4209
  "200": {
4158
4210
  "description": "List of active API keys and the id of the key used for this request.",
4211
+ "headers": {
4212
+ "x-consistency-bookmark": {
4213
+ "description": "Opaque consistency bookmark for the latest auth database position observed by this request. Store and send it on the next auth request to continue read-after-write consistency.",
4214
+ "schema": {
4215
+ "type": "string"
4216
+ }
4217
+ }
4218
+ },
4159
4219
  "content": {
4160
4220
  "application/json": {
4161
4221
  "schema": {
@@ -4518,6 +4578,18 @@
4518
4578
  }
4519
4579
  ],
4520
4580
  "summary": "Invite an email to join the caller's organization",
4581
+ "parameters": [
4582
+ {
4583
+ "name": "x-consistency-bookmark",
4584
+ "in": "header",
4585
+ "required": false,
4586
+ "description": "Optional opaque consistency bookmark returned by a previous auth response. Send it back unchanged to continue read-after-write consistency.",
4587
+ "schema": {
4588
+ "type": "string"
4589
+ },
4590
+ "example": "opaque-consistency-bookmark"
4591
+ }
4592
+ ],
4521
4593
  "description": "Creates a pending invite for `email` and sends an invite email. Idempotent for an existing pending invite. The invitee accepts after signing in with the invited email.",
4522
4594
  "x-codeSamples": [
4523
4595
  {
@@ -4543,6 +4615,14 @@
4543
4615
  "responses": {
4544
4616
  "201": {
4545
4617
  "description": "The created (or existing pending) invite.",
4618
+ "headers": {
4619
+ "x-consistency-bookmark": {
4620
+ "description": "Opaque consistency bookmark for the latest auth database position observed by this request. Store and send it on the next auth request to continue read-after-write consistency.",
4621
+ "schema": {
4622
+ "type": "string"
4623
+ }
4624
+ }
4625
+ },
4546
4626
  "content": {
4547
4627
  "application/json": {
4548
4628
  "schema": {
@@ -4904,6 +4984,18 @@
4904
4984
  }
4905
4985
  ],
4906
4986
  "summary": "List invites issued by the caller's organization",
4987
+ "parameters": [
4988
+ {
4989
+ "name": "x-consistency-bookmark",
4990
+ "in": "header",
4991
+ "required": false,
4992
+ "description": "Optional opaque consistency bookmark returned by a previous auth response. Send it back unchanged to continue read-after-write consistency.",
4993
+ "schema": {
4994
+ "type": "string"
4995
+ },
4996
+ "example": "opaque-consistency-bookmark"
4997
+ }
4998
+ ],
4907
4999
  "description": "Retrieves a list of all active pending or expired organization invites issued by the caller's organization.",
4908
5000
  "x-codeSamples": [
4909
5001
  {
@@ -4920,6 +5012,14 @@
4920
5012
  "responses": {
4921
5013
  "200": {
4922
5014
  "description": "Invites for this org.",
5015
+ "headers": {
5016
+ "x-consistency-bookmark": {
5017
+ "description": "Opaque consistency bookmark for the latest auth database position observed by this request. Store and send it on the next auth request to continue read-after-write consistency.",
5018
+ "schema": {
5019
+ "type": "string"
5020
+ }
5021
+ }
5022
+ },
4923
5023
  "content": {
4924
5024
  "application/json": {
4925
5025
  "schema": {
@@ -5505,6 +5605,18 @@
5505
5605
  }
5506
5606
  ],
5507
5607
  "summary": "Get the authenticated user's organization",
5608
+ "parameters": [
5609
+ {
5610
+ "name": "x-consistency-bookmark",
5611
+ "in": "header",
5612
+ "required": false,
5613
+ "description": "Optional opaque consistency bookmark returned by a previous auth response. Send it back unchanged to continue read-after-write consistency.",
5614
+ "schema": {
5615
+ "type": "string"
5616
+ },
5617
+ "example": "opaque-consistency-bookmark"
5618
+ }
5619
+ ],
5508
5620
  "description": "### Overview\nReturns the metadata of the organization owned by the authenticated user. In the current version, this represents the user's personal organization space containing all their projects and tokens.\n\n### When to Use\n- Use this endpoint to retrieve the organization ID and name for display or context setup (e.g., when running `wspc org show` or rendering user dashboards).\n- Use this to verify that the API token / credentials are linked to a valid organization.\n\n### Constraints\n- Requires a valid Bearer token (API Key or Session Token) in the `Authorization` header.\n- In the current API version (v1), every user is automatically provisioned a single personal organization. Selecting or switching organizations is not supported.\n\n### Troubleshooting\n- **401 Unauthorized**: The provided Bearer token is missing, expired, or invalid. Verify your `Authorization` header format (`Bearer <token>`).\n- **403 Forbidden**: The token does not have access to read organization metadata.\n- **404 Not Found**: The organization associated with this token could not be found or has been deactivated.",
5509
5621
  "x-codeSamples": [
5510
5622
  {
@@ -5521,6 +5633,14 @@
5521
5633
  "responses": {
5522
5634
  "200": {
5523
5635
  "description": "The authenticated user's organization.",
5636
+ "headers": {
5637
+ "x-consistency-bookmark": {
5638
+ "description": "Opaque consistency bookmark for the latest auth database position observed by this request. Store and send it on the next auth request to continue read-after-write consistency.",
5639
+ "schema": {
5640
+ "type": "string"
5641
+ }
5642
+ }
5643
+ },
5524
5644
  "content": {
5525
5645
  "application/json": {
5526
5646
  "schema": {
@@ -5887,6 +6007,18 @@
5887
6007
  }
5888
6008
  ],
5889
6009
  "summary": "Update the authenticated user's organization",
6010
+ "parameters": [
6011
+ {
6012
+ "name": "x-consistency-bookmark",
6013
+ "in": "header",
6014
+ "required": false,
6015
+ "description": "Optional opaque consistency bookmark returned by a previous auth response. Send it back unchanged to continue read-after-write consistency.",
6016
+ "schema": {
6017
+ "type": "string"
6018
+ },
6019
+ "example": "opaque-consistency-bookmark"
6020
+ }
6021
+ ],
5890
6022
  "description": "### Overview\nUpdates the metadata (currently, the name) of the organization associated with the authenticated user.\n\n### Constraints\n- Requires a valid Bearer token.\n- The organization name cannot be empty or purely whitespace.\n- Maximum length is capped by `MAX_ORG_NAME_LEN`.",
5891
6023
  "x-codeSamples": [
5892
6024
  {
@@ -5912,6 +6044,14 @@
5912
6044
  "responses": {
5913
6045
  "200": {
5914
6046
  "description": "The updated organization metadata.",
6047
+ "headers": {
6048
+ "x-consistency-bookmark": {
6049
+ "description": "Opaque consistency bookmark for the latest auth database position observed by this request. Store and send it on the next auth request to continue read-after-write consistency.",
6050
+ "schema": {
6051
+ "type": "string"
6052
+ }
6053
+ }
6054
+ },
5915
6055
  "content": {
5916
6056
  "application/json": {
5917
6057
  "schema": {
@@ -6264,20 +6404,17 @@
6264
6404
  }
6265
6405
  ],
6266
6406
  "summary": "Get a single invite addressed to the caller",
6267
- "description": "Retrieves the metadata of a specific organization invite addressed to the caller by its ID.",
6268
- "x-codeSamples": [
6407
+ "parameters": [
6269
6408
  {
6270
- "lang": "shell",
6271
- "label": "curl",
6272
- "source": "curl ${EXAMPLE_API_BASE_URL}/auth/invites/inv_01KT43YKZ8CX14WS6ENXQ8397E \\\n -H \"Authorization: Bearer $WSPC_API_KEY\""
6409
+ "name": "x-consistency-bookmark",
6410
+ "in": "header",
6411
+ "required": false,
6412
+ "description": "Optional opaque consistency bookmark returned by a previous auth response. Send it back unchanged to continue read-after-write consistency.",
6413
+ "schema": {
6414
+ "type": "string"
6415
+ },
6416
+ "example": "opaque-consistency-bookmark"
6273
6417
  },
6274
- {
6275
- "lang": "bash",
6276
- "label": "wspc CLI",
6277
- "source": "wspc invite show inv_01KT43YKZ8CX14WS6ENXQ8397E"
6278
- }
6279
- ],
6280
- "parameters": [
6281
6418
  {
6282
6419
  "schema": {
6283
6420
  "type": "string",
@@ -6289,9 +6426,30 @@
6289
6426
  "in": "path"
6290
6427
  }
6291
6428
  ],
6429
+ "description": "Retrieves the metadata of a specific organization invite addressed to the caller by its ID.",
6430
+ "x-codeSamples": [
6431
+ {
6432
+ "lang": "shell",
6433
+ "label": "curl",
6434
+ "source": "curl ${EXAMPLE_API_BASE_URL}/auth/invites/inv_01KT43YKZ8CX14WS6ENXQ8397E \\\n -H \"Authorization: Bearer $WSPC_API_KEY\""
6435
+ },
6436
+ {
6437
+ "lang": "bash",
6438
+ "label": "wspc CLI",
6439
+ "source": "wspc invite show inv_01KT43YKZ8CX14WS6ENXQ8397E"
6440
+ }
6441
+ ],
6292
6442
  "responses": {
6293
6443
  "200": {
6294
6444
  "description": "The invite.",
6445
+ "headers": {
6446
+ "x-consistency-bookmark": {
6447
+ "description": "Opaque consistency bookmark for the latest auth database position observed by this request. Store and send it on the next auth request to continue read-after-write consistency.",
6448
+ "schema": {
6449
+ "type": "string"
6450
+ }
6451
+ }
6452
+ },
6295
6453
  "content": {
6296
6454
  "application/json": {
6297
6455
  "schema": {
@@ -6658,6 +6816,18 @@
6658
6816
  }
6659
6817
  ],
6660
6818
  "summary": "Fetch the user identified by the bearer token",
6819
+ "parameters": [
6820
+ {
6821
+ "name": "x-consistency-bookmark",
6822
+ "in": "header",
6823
+ "required": false,
6824
+ "description": "Optional opaque consistency bookmark returned by a previous auth response. Send it back unchanged to continue read-after-write consistency.",
6825
+ "schema": {
6826
+ "type": "string"
6827
+ },
6828
+ "example": "opaque-consistency-bookmark"
6829
+ }
6830
+ ],
6661
6831
  "description": "### Overview\nRetrieves the stable identity profile (user ID, email, and optional display name) of the user associated with the active Bearer token. Works for both long-lived `wspc_*` API keys and OAuth access tokens.\n\n### When to Use\n- Use this endpoint (e.g., in `wspc verify` or `wspc whoami`) to confirm that the active environment's API key or OAuth access token remains valid.\n- Use it in UIs to display the logged-in user's profile details and retrieve the stable `user_id`.\n\n### Constraints\n- Requires a valid Bearer token (either a long-lived `wspc_*` API key or a temporary OAuth access token) in the `Authorization` header.\n- **Response Fields**: The `api_key_id` field is only returned if authenticated via a WSPC API key (prefixed with `wspc_`). OAuth access tokens will omit `api_key_id`. `display_name` is omitted if not configured.\n\n### Troubleshooting\n- **401 Unauthorized**: The Bearer token is missing, malformed, or has been revoked. Ensure the `Authorization` header matches the `Bearer <token>` format.",
6662
6832
  "x-codeSamples": [
6663
6833
  {
@@ -6674,6 +6844,14 @@
6674
6844
  "responses": {
6675
6845
  "200": {
6676
6846
  "description": "The bearer token is valid. The response carries the stable `user_id`, the user's email, and — for `wspc_*` API keys only — the `api_key_id` that authenticated the call.",
6847
+ "headers": {
6848
+ "x-consistency-bookmark": {
6849
+ "description": "Opaque consistency bookmark for the latest auth database position observed by this request. Store and send it on the next auth request to continue read-after-write consistency.",
6850
+ "schema": {
6851
+ "type": "string"
6852
+ }
6853
+ }
6854
+ },
6677
6855
  "content": {
6678
6856
  "application/json": {
6679
6857
  "schema": {
@@ -7056,6 +7234,18 @@
7056
7234
  }
7057
7235
  ],
7058
7236
  "summary": "List invites addressed to the authenticated user's email",
7237
+ "parameters": [
7238
+ {
7239
+ "name": "x-consistency-bookmark",
7240
+ "in": "header",
7241
+ "required": false,
7242
+ "description": "Optional opaque consistency bookmark returned by a previous auth response. Send it back unchanged to continue read-after-write consistency.",
7243
+ "schema": {
7244
+ "type": "string"
7245
+ },
7246
+ "example": "opaque-consistency-bookmark"
7247
+ }
7248
+ ],
7059
7249
  "description": "Retrieves all pending or expired organization invites addressed to the caller's verified email address.",
7060
7250
  "x-codeSamples": [
7061
7251
  {
@@ -7072,6 +7262,14 @@
7072
7262
  "responses": {
7073
7263
  "200": {
7074
7264
  "description": "Invites addressed to the caller.",
7265
+ "headers": {
7266
+ "x-consistency-bookmark": {
7267
+ "description": "Opaque consistency bookmark for the latest auth database position observed by this request. Store and send it on the next auth request to continue read-after-write consistency.",
7268
+ "schema": {
7269
+ "type": "string"
7270
+ }
7271
+ }
7272
+ },
7075
7273
  "content": {
7076
7274
  "application/json": {
7077
7275
  "schema": {
@@ -7435,20 +7633,17 @@
7435
7633
  }
7436
7634
  ],
7437
7635
  "summary": "List members of the authenticated user's organization",
7438
- "description": "### Overview\nRetrieves a paginated list of all members belonging to the authenticated user's organization, including their basic profile information, emails, and roles.\n\n### When to Use\n- Use this endpoint to list members in command-line tools (e.g., `wspc org members ls`) or to display a team directory in a user dashboard.\n- Use this to paginate through large lists of organization members using cursor-based pagination.\n\n### Constraints\n- Requires a valid Bearer token in the `Authorization` header.\n- In the current version (v1), organizations are single-user only, meaning this endpoint will always return exactly one member (the caller).\n- **Pagination**: Supports cursor-based pagination. The `limit` query parameter must be a positive integer, defaulting to 50 and capped at a maximum of 100. Pass `cursor` from the previous response's `next_cursor` to fetch subsequent pages.\n\n### Troubleshooting\n- **401 Unauthorized**: The Bearer token is invalid or has expired.\n- **400 Bad Request**: The query parameters `limit` or `cursor` are malformed. Ensure `limit` is an integer between 1 and 100.\n- **404 Not Found**: The organization associated with this user was not found.",
7439
- "x-codeSamples": [
7636
+ "parameters": [
7440
7637
  {
7441
- "lang": "shell",
7442
- "label": "curl",
7443
- "source": "curl https://api.wspc.ai/auth/me/org/members \\\n -H \"Authorization: Bearer $WSPC_API_KEY\""
7638
+ "name": "x-consistency-bookmark",
7639
+ "in": "header",
7640
+ "required": false,
7641
+ "description": "Optional opaque consistency bookmark returned by a previous auth response. Send it back unchanged to continue read-after-write consistency.",
7642
+ "schema": {
7643
+ "type": "string"
7644
+ },
7645
+ "example": "opaque-consistency-bookmark"
7444
7646
  },
7445
- {
7446
- "lang": "bash",
7447
- "label": "wspc CLI",
7448
- "source": "wspc org members ls"
7449
- }
7450
- ],
7451
- "parameters": [
7452
7647
  {
7453
7648
  "schema": {
7454
7649
  "type": "string",
@@ -7470,9 +7665,30 @@
7470
7665
  "in": "query"
7471
7666
  }
7472
7667
  ],
7668
+ "description": "### Overview\nRetrieves a paginated list of all members belonging to the authenticated user's organization, including their basic profile information, emails, and roles.\n\n### When to Use\n- Use this endpoint to list members in command-line tools (e.g., `wspc org members ls`) or to display a team directory in a user dashboard.\n- Use this to paginate through large lists of organization members using cursor-based pagination.\n\n### Constraints\n- Requires a valid Bearer token in the `Authorization` header.\n- In the current version (v1), organizations are single-user only, meaning this endpoint will always return exactly one member (the caller).\n- **Pagination**: Supports cursor-based pagination. The `limit` query parameter must be a positive integer, defaulting to 50 and capped at a maximum of 100. Pass `cursor` from the previous response's `next_cursor` to fetch subsequent pages.\n\n### Troubleshooting\n- **401 Unauthorized**: The Bearer token is invalid or has expired.\n- **400 Bad Request**: The query parameters `limit` or `cursor` are malformed. Ensure `limit` is an integer between 1 and 100.\n- **404 Not Found**: The organization associated with this user was not found.",
7669
+ "x-codeSamples": [
7670
+ {
7671
+ "lang": "shell",
7672
+ "label": "curl",
7673
+ "source": "curl https://api.wspc.ai/auth/me/org/members \\\n -H \"Authorization: Bearer $WSPC_API_KEY\""
7674
+ },
7675
+ {
7676
+ "lang": "bash",
7677
+ "label": "wspc CLI",
7678
+ "source": "wspc org members ls"
7679
+ }
7680
+ ],
7473
7681
  "responses": {
7474
7682
  "200": {
7475
7683
  "description": "List of organization members and optional cursor for next page.",
7684
+ "headers": {
7685
+ "x-consistency-bookmark": {
7686
+ "description": "Opaque consistency bookmark for the latest auth database position observed by this request. Store and send it on the next auth request to continue read-after-write consistency.",
7687
+ "schema": {
7688
+ "type": "string"
7689
+ }
7690
+ }
7691
+ },
7476
7692
  "content": {
7477
7693
  "application/json": {
7478
7694
  "schema": {
@@ -8795,20 +9011,17 @@
8795
9011
  }
8796
9012
  ],
8797
9013
  "summary": "Reject an invite",
8798
- "description": "Rejects an organization invite addressed to the caller. The invite will be marked as rejected.",
8799
- "x-codeSamples": [
9014
+ "parameters": [
8800
9015
  {
8801
- "lang": "shell",
8802
- "label": "curl",
8803
- "source": "curl -X POST ${EXAMPLE_API_BASE_URL}/auth/invites/inv_01KT43YKZ8CX14WS6ENXQ8397E/reject \\\n -H \"Authorization: Bearer $WSPC_API_KEY\""
9016
+ "name": "x-consistency-bookmark",
9017
+ "in": "header",
9018
+ "required": false,
9019
+ "description": "Optional opaque consistency bookmark returned by a previous auth response. Send it back unchanged to continue read-after-write consistency.",
9020
+ "schema": {
9021
+ "type": "string"
9022
+ },
9023
+ "example": "opaque-consistency-bookmark"
8804
9024
  },
8805
- {
8806
- "lang": "bash",
8807
- "label": "wspc CLI",
8808
- "source": "wspc invite reject inv_01KT43YKZ8CX14WS6ENXQ8397E"
8809
- }
8810
- ],
8811
- "parameters": [
8812
9025
  {
8813
9026
  "schema": {
8814
9027
  "type": "string",
@@ -8820,14 +9033,35 @@
8820
9033
  "in": "path"
8821
9034
  }
8822
9035
  ],
8823
- "responses": {
8824
- "204": {
8825
- "description": "Invite rejected."
9036
+ "description": "Rejects an organization invite addressed to the caller. The invite will be marked as rejected.",
9037
+ "x-codeSamples": [
9038
+ {
9039
+ "lang": "shell",
9040
+ "label": "curl",
9041
+ "source": "curl -X POST ${EXAMPLE_API_BASE_URL}/auth/invites/inv_01KT43YKZ8CX14WS6ENXQ8397E/reject \\\n -H \"Authorization: Bearer $WSPC_API_KEY\""
8826
9042
  },
8827
- "400": {
8828
- "description": "Request validation failed. The body, query, or path parameters did not match the operation's schema.",
8829
- "content": {
8830
- "application/json": {
9043
+ {
9044
+ "lang": "bash",
9045
+ "label": "wspc CLI",
9046
+ "source": "wspc invite reject inv_01KT43YKZ8CX14WS6ENXQ8397E"
9047
+ }
9048
+ ],
9049
+ "responses": {
9050
+ "204": {
9051
+ "description": "Invite rejected.",
9052
+ "headers": {
9053
+ "x-consistency-bookmark": {
9054
+ "description": "Opaque consistency bookmark for the latest auth database position observed by this request. Store and send it on the next auth request to continue read-after-write consistency.",
9055
+ "schema": {
9056
+ "type": "string"
9057
+ }
9058
+ }
9059
+ }
9060
+ },
9061
+ "400": {
9062
+ "description": "Request validation failed. The body, query, or path parameters did not match the operation's schema.",
9063
+ "content": {
9064
+ "application/json": {
8831
9065
  "schema": {
8832
9066
  "type": "object",
8833
9067
  "properties": {
@@ -9162,15 +9396,17 @@
9162
9396
  }
9163
9397
  ],
9164
9398
  "summary": "Remove a member from the organization",
9165
- "description": "### Overview\nRemoves a member from the authenticated user's organization by their user ID, restoring their original organization ID if applicable.\n\n### Constraints\n- Requires a valid Bearer token.\n- Cannot remove the organization creator/owner.",
9166
- "x-codeSamples": [
9167
- {
9168
- "lang": "shell",
9169
- "label": "curl",
9170
- "source": "curl -X DELETE https://api.wspc.ai/auth/me/org/members/usr_member \\\n -H \"Authorization: Bearer $WSPC_API_KEY\""
9171
- }
9172
- ],
9173
9399
  "parameters": [
9400
+ {
9401
+ "name": "x-consistency-bookmark",
9402
+ "in": "header",
9403
+ "required": false,
9404
+ "description": "Optional opaque consistency bookmark returned by a previous auth response. Send it back unchanged to continue read-after-write consistency.",
9405
+ "schema": {
9406
+ "type": "string"
9407
+ },
9408
+ "example": "opaque-consistency-bookmark"
9409
+ },
9174
9410
  {
9175
9411
  "schema": {
9176
9412
  "type": "string",
@@ -9182,9 +9418,25 @@
9182
9418
  "in": "path"
9183
9419
  }
9184
9420
  ],
9421
+ "description": "### Overview\nRemoves a member from the authenticated user's organization by their user ID, restoring their original organization ID if applicable.\n\n### Constraints\n- Requires a valid Bearer token.\n- Cannot remove the organization creator/owner.",
9422
+ "x-codeSamples": [
9423
+ {
9424
+ "lang": "shell",
9425
+ "label": "curl",
9426
+ "source": "curl -X DELETE https://api.wspc.ai/auth/me/org/members/usr_member \\\n -H \"Authorization: Bearer $WSPC_API_KEY\""
9427
+ }
9428
+ ],
9185
9429
  "responses": {
9186
9430
  "204": {
9187
- "description": "Member removed successfully."
9431
+ "description": "Member removed successfully.",
9432
+ "headers": {
9433
+ "x-consistency-bookmark": {
9434
+ "description": "Opaque consistency bookmark for the latest auth database position observed by this request. Store and send it on the next auth request to continue read-after-write consistency.",
9435
+ "schema": {
9436
+ "type": "string"
9437
+ }
9438
+ }
9439
+ }
9188
9440
  },
9189
9441
  "400": {
9190
9442
  "description": "Request validation failed. The body, query, or path parameters did not match the operation's schema.",
@@ -9521,6 +9773,18 @@
9521
9773
  "excludeActorHeaders": true,
9522
9774
  "security": [],
9523
9775
  "summary": "Request an email magic code",
9776
+ "parameters": [
9777
+ {
9778
+ "name": "x-consistency-bookmark",
9779
+ "in": "header",
9780
+ "required": false,
9781
+ "description": "Optional opaque consistency bookmark returned by a previous auth response. Send it back unchanged to continue read-after-write consistency.",
9782
+ "schema": {
9783
+ "type": "string"
9784
+ },
9785
+ "example": "opaque-consistency-bookmark"
9786
+ }
9787
+ ],
9524
9788
  "description": "### Overview\nInitiates the passwordless email magic-code authentication flow by sending a short, time-limited numeric verification code to the specified email address.\n\n### When to Use\n- Use this endpoint as the first step of the CLI login flow (`wspc login`) or any interactive UI where the user initiates authentication by inputting their email address.\n- Pair this request with `POST /auth/verify-code` once the user retrieves the code from their inbox.\n\n### Constraints\n- Does not require authentication (public endpoint).\n- **Security**: The same HTTP 200 response structure is returned regardless of whether the email address is already registered or not. This is an intentional security design to prevent account-existence disclosure (email harvesting).\n- **Rate Limiting**: This endpoint enforces strict rate limits based on both the requesting IP address and the target email address to prevent abuse. Too many consecutive requests will result in a `RATE_LIMITED` error.\n\n### Troubleshooting\n- **429 Too Many Requests**: The requesting IP or target email has exceeded the allowable request rate. Wait a few minutes before trying again.\n- **400 Bad Request**: The `email` payload is malformed or invalid. Verify that the email matches basic email formats.",
9525
9789
  "x-codeSamples": [
9526
9790
  {
@@ -9554,6 +9818,14 @@
9554
9818
  "responses": {
9555
9819
  "200": {
9556
9820
  "description": "The magic code was generated and an email was dispatched. The same response shape is returned for registered and unregistered addresses to avoid account-existence disclosure.",
9821
+ "headers": {
9822
+ "x-consistency-bookmark": {
9823
+ "description": "Opaque consistency bookmark for the latest auth database position observed by this request. Store and send it on the next auth request to continue read-after-write consistency.",
9824
+ "schema": {
9825
+ "type": "string"
9826
+ }
9827
+ }
9828
+ },
9557
9829
  "content": {
9558
9830
  "application/json": {
9559
9831
  "schema": {
@@ -9909,6 +10181,28 @@
9909
10181
  }
9910
10182
  ],
9911
10183
  "summary": "Soft-revoke an API key",
10184
+ "parameters": [
10185
+ {
10186
+ "name": "x-consistency-bookmark",
10187
+ "in": "header",
10188
+ "required": false,
10189
+ "description": "Optional opaque consistency bookmark returned by a previous auth response. Send it back unchanged to continue read-after-write consistency.",
10190
+ "schema": {
10191
+ "type": "string"
10192
+ },
10193
+ "example": "opaque-consistency-bookmark"
10194
+ },
10195
+ {
10196
+ "schema": {
10197
+ "type": "string",
10198
+ "description": "Id of the API key to revoke, as returned by `GET /auth/keys` (`key_<ULID>`)."
10199
+ },
10200
+ "required": true,
10201
+ "description": "Id of the API key to revoke, as returned by `GET /auth/keys` (`key_<ULID>`).",
10202
+ "name": "id",
10203
+ "in": "path"
10204
+ }
10205
+ ],
9912
10206
  "description": "### Overview\nPermanently revokes an active API key by its unique ID. Once revoked, the key becomes immediately invalid and will be rejected by all services.\n\n### When to Use\n- Use this endpoint to permanently deactivate an API key (e.g., when running `wspc keys revoke <id>`) due to token rotation, key leakage, or decommissioning of a machine/service.\n\n### Constraints\n- Requires a valid Bearer token in the `Authorization` header.\n- Revocation is permanent and cannot be undone.\n- A user can revoke any key they own, including the one they are currently using to make the call. If they revoke the current key, subsequent requests using that key will return `401 Unauthorized`.\n\n### Troubleshooting\n- **401 Unauthorized**: The active token is missing, expired, or invalid.\n- **404 Not Found**: The specified key ID does not exist, belongs to another user, or has already been revoked.\n- **400 Bad Request**: The `id` path parameter format is invalid. It must be in the format `key_<ULID>`.",
9913
10207
  "x-cli": {
9914
10208
  "command": "keys rm",
@@ -9928,21 +10222,17 @@
9928
10222
  "source": "wspc keys rm key_abcd1234efgh5678"
9929
10223
  }
9930
10224
  ],
9931
- "parameters": [
9932
- {
9933
- "schema": {
9934
- "type": "string",
9935
- "description": "Id of the API key to revoke, as returned by `GET /auth/keys` (`key_<ULID>`)."
9936
- },
9937
- "required": true,
9938
- "description": "Id of the API key to revoke, as returned by `GET /auth/keys` (`key_<ULID>`).",
9939
- "name": "id",
9940
- "in": "path"
9941
- }
9942
- ],
9943
10225
  "responses": {
9944
10226
  "200": {
9945
10227
  "description": "Key revoked successfully.",
10228
+ "headers": {
10229
+ "x-consistency-bookmark": {
10230
+ "description": "Opaque consistency bookmark for the latest auth database position observed by this request. Store and send it on the next auth request to continue read-after-write consistency.",
10231
+ "schema": {
10232
+ "type": "string"
10233
+ }
10234
+ }
10235
+ },
9946
10236
  "content": {
9947
10237
  "application/json": {
9948
10238
  "schema": {
@@ -10287,6 +10577,28 @@
10287
10577
  }
10288
10578
  ],
10289
10579
  "summary": "Update an active API key's label",
10580
+ "parameters": [
10581
+ {
10582
+ "name": "x-consistency-bookmark",
10583
+ "in": "header",
10584
+ "required": false,
10585
+ "description": "Optional opaque consistency bookmark returned by a previous auth response. Send it back unchanged to continue read-after-write consistency.",
10586
+ "schema": {
10587
+ "type": "string"
10588
+ },
10589
+ "example": "opaque-consistency-bookmark"
10590
+ },
10591
+ {
10592
+ "schema": {
10593
+ "type": "string",
10594
+ "description": "Id of the API key to update."
10595
+ },
10596
+ "required": true,
10597
+ "description": "Id of the API key to update.",
10598
+ "name": "id",
10599
+ "in": "path"
10600
+ }
10601
+ ],
10290
10602
  "description": "### Overview\nUpdates the human-readable label of an active API key. Only active (non-revoked) keys owned by the authenticated user can be updated.\n\n### Constraints\n- Requires a valid Bearer token in the `Authorization` header.\n- **Label Validation**: The `label` parameter must be between 1 and 60 characters after trimming whitespace. Failing to provide a valid label results in an `INVALID_LABEL` error.",
10291
10603
  "x-cli": {
10292
10604
  "command": "keys edit",
@@ -10306,18 +10618,6 @@
10306
10618
  "source": "wspc keys edit key_01HW3K4N9V5G6Z8C2Q7B1Y0M3F --label \"New Label\""
10307
10619
  }
10308
10620
  ],
10309
- "parameters": [
10310
- {
10311
- "schema": {
10312
- "type": "string",
10313
- "description": "Id of the API key to update."
10314
- },
10315
- "required": true,
10316
- "description": "Id of the API key to update.",
10317
- "name": "id",
10318
- "in": "path"
10319
- }
10320
- ],
10321
10621
  "requestBody": {
10322
10622
  "required": true,
10323
10623
  "content": {
@@ -10331,6 +10631,14 @@
10331
10631
  "responses": {
10332
10632
  "200": {
10333
10633
  "description": "API key label updated successfully.",
10634
+ "headers": {
10635
+ "x-consistency-bookmark": {
10636
+ "description": "Opaque consistency bookmark for the latest auth database position observed by this request. Store and send it on the next auth request to continue read-after-write consistency.",
10637
+ "schema": {
10638
+ "type": "string"
10639
+ }
10640
+ }
10641
+ },
10334
10642
  "content": {
10335
10643
  "application/json": {
10336
10644
  "schema": {
@@ -10893,20 +11201,17 @@
10893
11201
  }
10894
11202
  ],
10895
11203
  "summary": "Revoke a pending invite",
10896
- "description": "Permanently revokes a pending organization invite. The invitee will no longer be able to accept it.",
10897
- "x-codeSamples": [
11204
+ "parameters": [
10898
11205
  {
10899
- "lang": "shell",
10900
- "label": "curl",
10901
- "source": "curl -X DELETE ${EXAMPLE_API_BASE_URL}/auth/me/org/invites/inv_01KT43YKZ8CX14WS6ENXQ8397E \\\n -H \"Authorization: Bearer $WSPC_API_KEY\""
11206
+ "name": "x-consistency-bookmark",
11207
+ "in": "header",
11208
+ "required": false,
11209
+ "description": "Optional opaque consistency bookmark returned by a previous auth response. Send it back unchanged to continue read-after-write consistency.",
11210
+ "schema": {
11211
+ "type": "string"
11212
+ },
11213
+ "example": "opaque-consistency-bookmark"
10902
11214
  },
10903
- {
10904
- "lang": "bash",
10905
- "label": "wspc CLI",
10906
- "source": "wspc org invite revoke inv_01KT43YKZ8CX14WS6ENXQ8397E"
10907
- }
10908
- ],
10909
- "parameters": [
10910
11215
  {
10911
11216
  "schema": {
10912
11217
  "type": "string",
@@ -10918,9 +11223,30 @@
10918
11223
  "in": "path"
10919
11224
  }
10920
11225
  ],
11226
+ "description": "Permanently revokes a pending organization invite. The invitee will no longer be able to accept it.",
11227
+ "x-codeSamples": [
11228
+ {
11229
+ "lang": "shell",
11230
+ "label": "curl",
11231
+ "source": "curl -X DELETE ${EXAMPLE_API_BASE_URL}/auth/me/org/invites/inv_01KT43YKZ8CX14WS6ENXQ8397E \\\n -H \"Authorization: Bearer $WSPC_API_KEY\""
11232
+ },
11233
+ {
11234
+ "lang": "bash",
11235
+ "label": "wspc CLI",
11236
+ "source": "wspc org invite revoke inv_01KT43YKZ8CX14WS6ENXQ8397E"
11237
+ }
11238
+ ],
10921
11239
  "responses": {
10922
11240
  "204": {
10923
- "description": "Invite revoked."
11241
+ "description": "Invite revoked.",
11242
+ "headers": {
11243
+ "x-consistency-bookmark": {
11244
+ "description": "Opaque consistency bookmark for the latest auth database position observed by this request. Store and send it on the next auth request to continue read-after-write consistency.",
11245
+ "schema": {
11246
+ "type": "string"
11247
+ }
11248
+ }
11249
+ }
10924
11250
  },
10925
11251
  "400": {
10926
11252
  "description": "Request validation failed. The body, query, or path parameters did not match the operation's schema.",
@@ -11485,6 +11811,18 @@
11485
11811
  "excludeActorHeaders": true,
11486
11812
  "security": [],
11487
11813
  "summary": "Verify a magic code and issue an API key",
11814
+ "parameters": [
11815
+ {
11816
+ "name": "x-consistency-bookmark",
11817
+ "in": "header",
11818
+ "required": false,
11819
+ "description": "Optional opaque consistency bookmark returned by a previous auth response. Send it back unchanged to continue read-after-write consistency.",
11820
+ "schema": {
11821
+ "type": "string"
11822
+ },
11823
+ "example": "opaque-consistency-bookmark"
11824
+ }
11825
+ ],
11488
11826
  "description": "### Overview\nCompletes the passwordless login flow by verifying the magic code received via email. If the code is correct, it registers a new user (if not already registered) and issues a long-lived WSPC API key.\n\n### When to Use\n- Use this endpoint as the second step of the login flow, exchanging the user-provided code and email address for a valid credential.\n- Store the returned `api_key` securely client-side to authorize subsequent calls to all WSPC services.\n\n### Constraints\n- Does not require authentication (public endpoint).\n- **One-time Use & Expiry**: The verification code is single-use and expires after a short period (typically a few minutes). Re-using a code or attempting to guess code values results in `INVALID_CODE` or `CODE_EXPIRED`.\n- **Account Creation**: If the email address is not linked to an existing account, a new user profile and personal organization are automatically provisioned (`created: true` in response).\n\n### Troubleshooting\n- **400 Bad Request**: The code has expired (`CODE_EXPIRED`), is incorrect (`INVALID_CODE`), or has already been used. Request a fresh code via `POST /auth/request-code`.\n- **429 Too Many Requests**: The rate limit for verification attempts on this email address has been exceeded.",
11489
11827
  "x-codeSamples": [
11490
11828
  {
@@ -11519,6 +11857,14 @@
11519
11857
  "responses": {
11520
11858
  "200": {
11521
11859
  "description": "Code accepted. The response carries a fresh API key for the active environment plus the user's stable id. Persist these client-side.",
11860
+ "headers": {
11861
+ "x-consistency-bookmark": {
11862
+ "description": "Opaque consistency bookmark for the latest auth database position observed by this request. Store and send it on the next auth request to continue read-after-write consistency.",
11863
+ "schema": {
11864
+ "type": "string"
11865
+ }
11866
+ }
11867
+ },
11522
11868
  "content": {
11523
11869
  "application/json": {
11524
11870
  "schema": {
@@ -11921,6 +12267,18 @@
11921
12267
  }
11922
12268
  },
11923
12269
  "summary": "Schedule a calendar event",
12270
+ "parameters": [
12271
+ {
12272
+ "name": "x-consistency-bookmark",
12273
+ "in": "header",
12274
+ "required": false,
12275
+ "description": "Optional opaque consistency bookmark returned by a previous calendar response. Send it back unchanged to continue read-after-write consistency.",
12276
+ "schema": {
12277
+ "type": "string"
12278
+ },
12279
+ "example": "opaque-consistency-bookmark"
12280
+ }
12281
+ ],
11924
12282
  "description": "### Overview\nCreate a new calendar event owned by the authenticated user.\n\n### When to Use\nBook a meeting, lunch, all-day trip, or any time-bound item. Optionally provide `attendees` to automatically dispatch invitation emails containing an `.ics` REQUEST attachment to each participant as a side effect.\n\n### Constraints\n- **Format Integrity**: `start` and `end` must be of the exact same type (both ISO 8601 datetimes with offset, or both ISO date-only for all-day).\n- **Chronological Order**: `end` must be strictly after `start`.\n- **All-Day boundary**: All-day events use RFC 5545 exclusive end (e.g., a one-day event on June 1st is specified as `start=2026-06-01` and `end=2026-06-02`).\n- **Attendee Limit**: Up to 50 unique attendees are supported after case-insensitive email address deduplication.\n\n### Troubleshooting\n- Returns 400 `VALIDATION_ERROR` if `start` and `end` format mismatch, or if `end <= start`.\n- Returns 400 `ATTENDEE_LIMIT_EXCEEDED` if more than 50 unique attendees are supplied.\n- Invitation emails are processed and dispatched asynchronously via Cloudflare `waitUntil`; the analytics counter `event_created` is emitted automatically.",
11925
12283
  "security": [
11926
12284
  {
@@ -11997,6 +12355,14 @@
11997
12355
  "responses": {
11998
12356
  "201": {
11999
12357
  "description": "The event was created. Response carries the full row including server-assigned `id`, `version: 1`, derived `all_day`, and (if applicable) `attendees`. Invitation emails are sent asynchronously via `waitUntil`.",
12358
+ "headers": {
12359
+ "x-consistency-bookmark": {
12360
+ "description": "Opaque consistency bookmark for the latest calendar database position observed by this request. Store and send it on the next calendar request to continue read-after-write consistency.",
12361
+ "schema": {
12362
+ "type": "string"
12363
+ }
12364
+ }
12365
+ },
12000
12366
  "content": {
12001
12367
  "application/json": {
12002
12368
  "schema": {
@@ -12399,25 +12765,17 @@
12399
12765
  }
12400
12766
  },
12401
12767
  "summary": "List calendar events",
12402
- "description": "### Overview\nReturn the authenticated user's events, ordered by `start` ascending, with cursor pagination.\n\n### When to Use\nRender calendar list/grid views, search for specific terms using full-text search, query events within a specific time window, or retrieve historically past events.\n\n### Constraints\n- **Default Visibility**: By default, soft-deleted events and past events (events where `end` is before the current time) are automatically hidden.\n- **Time Bounds Override**: Supplying any explicit time bound query parameter (`start_from`, `start_to`, `end_from`, `end_to`) or passing `include_past=true` overrides and disables the implicit past filter.\n- **Search Scope**: `q` performs a case-insensitive substring search across `title`, `description`, and `location`.\n- **Pagination**: The `limit` query parameter is clamped to `[1, 200]`; cursor pagination is enabled via the opaque `cursor` parameter.\n\n### Troubleshooting\n- Returns 400 `VALIDATION_ERROR` if date query bounds are invalid (e.g. `start_from > start_to` or `end_from > end_to`).",
12403
- "security": [
12404
- {
12405
- "bearerAuth": []
12406
- }
12407
- ],
12408
- "x-codeSamples": [
12768
+ "parameters": [
12409
12769
  {
12410
- "lang": "shell",
12411
- "label": "curl",
12412
- "source": "curl -G https://api.wspc.ai/calendar/events \\\n -H \"Authorization: Bearer $WSPC_API_KEY\" \\\n --data-urlencode \"start_from=2026-06-01T00:00:00+08:00\" \\\n --data-urlencode \"start_to=2026-06-30T23:59:59+08:00\""
12770
+ "name": "x-consistency-bookmark",
12771
+ "in": "header",
12772
+ "required": false,
12773
+ "description": "Optional opaque consistency bookmark returned by a previous calendar response. Send it back unchanged to continue read-after-write consistency.",
12774
+ "schema": {
12775
+ "type": "string"
12776
+ },
12777
+ "example": "opaque-consistency-bookmark"
12413
12778
  },
12414
- {
12415
- "lang": "bash",
12416
- "label": "wspc CLI",
12417
- "source": "wspc event ls --from \"next Monday\" --to \"next Friday\""
12418
- }
12419
- ],
12420
- "parameters": [
12421
12779
  {
12422
12780
  "schema": {
12423
12781
  "type": "string",
@@ -12509,9 +12867,35 @@
12509
12867
  "in": "query"
12510
12868
  }
12511
12869
  ],
12870
+ "description": "### Overview\nReturn the authenticated user's events, ordered by `start` ascending, with cursor pagination.\n\n### When to Use\nRender calendar list/grid views, search for specific terms using full-text search, query events within a specific time window, or retrieve historically past events.\n\n### Constraints\n- **Default Visibility**: By default, soft-deleted events and past events (events where `end` is before the current time) are automatically hidden.\n- **Time Bounds Override**: Supplying any explicit time bound query parameter (`start_from`, `start_to`, `end_from`, `end_to`) or passing `include_past=true` overrides and disables the implicit past filter.\n- **Search Scope**: `q` performs a case-insensitive substring search across `title`, `description`, and `location`.\n- **Pagination**: The `limit` query parameter is clamped to `[1, 200]`; cursor pagination is enabled via the opaque `cursor` parameter.\n\n### Troubleshooting\n- Returns 400 `VALIDATION_ERROR` if date query bounds are invalid (e.g. `start_from > start_to` or `end_from > end_to`).",
12871
+ "security": [
12872
+ {
12873
+ "bearerAuth": []
12874
+ }
12875
+ ],
12876
+ "x-codeSamples": [
12877
+ {
12878
+ "lang": "shell",
12879
+ "label": "curl",
12880
+ "source": "curl -G https://api.wspc.ai/calendar/events \\\n -H \"Authorization: Bearer $WSPC_API_KEY\" \\\n --data-urlencode \"start_from=2026-06-01T00:00:00+08:00\" \\\n --data-urlencode \"start_to=2026-06-30T23:59:59+08:00\""
12881
+ },
12882
+ {
12883
+ "lang": "bash",
12884
+ "label": "wspc CLI",
12885
+ "source": "wspc event ls --from \"next Monday\" --to \"next Friday\""
12886
+ }
12887
+ ],
12512
12888
  "responses": {
12513
12889
  "200": {
12514
12890
  "description": "Events matching the filters. Empty `events` array when nothing matches. `next_cursor` is present iff there is another page.",
12891
+ "headers": {
12892
+ "x-consistency-bookmark": {
12893
+ "description": "Opaque consistency bookmark for the latest calendar database position observed by this request. Store and send it on the next calendar request to continue read-after-write consistency.",
12894
+ "schema": {
12895
+ "type": "string"
12896
+ }
12897
+ }
12898
+ },
12515
12899
  "content": {
12516
12900
  "application/json": {
12517
12901
  "schema": {
@@ -12919,6 +13303,28 @@
12919
13303
  }
12920
13304
  },
12921
13305
  "summary": "Soft-delete a calendar event",
13306
+ "parameters": [
13307
+ {
13308
+ "name": "x-consistency-bookmark",
13309
+ "in": "header",
13310
+ "required": false,
13311
+ "description": "Optional opaque consistency bookmark returned by a previous calendar response. Send it back unchanged to continue read-after-write consistency.",
13312
+ "schema": {
13313
+ "type": "string"
13314
+ },
13315
+ "example": "opaque-consistency-bookmark"
13316
+ },
13317
+ {
13318
+ "schema": {
13319
+ "type": "string",
13320
+ "description": "Event id (`evt_<ULID>` for new rows; legacy UUID ids remain accepted)."
13321
+ },
13322
+ "required": true,
13323
+ "description": "Event id (`evt_<ULID>` for new rows; legacy UUID ids remain accepted).",
13324
+ "name": "id",
13325
+ "in": "path"
13326
+ }
13327
+ ],
12922
13328
  "description": "### Overview\nSoft-delete an existing calendar event, hiding it from default listings.\n\n### When to Use\nRemove an event entirely from the user's historical view and calendar client. If the meeting was cancelled but should remain in history (notifying participants of cancellation), use `PATCH /calendar/events/{id}` with `status: cancelled` instead.\n\n### Constraints\n- **Optimistic Locking**: Supports optional optimistic locking via `expected_version` in the request body.\n- **Side Effects**: When soft-deleting an event with attendees, all participants will asynchronously receive a cancellation email containing an `.ics` CANCEL attachment via Cloudflare `waitUntil`.\n- **Recovery**: The record is preserved in the database as a soft-deleted row and can be brought back using `POST /calendar/events/{id}/restore`.\n\n### Troubleshooting\n- Returns 404 `NOT_FOUND` if the event does not exist, or has already been soft-deleted.\n- Returns 409 `VERSION_CONFLICT` if `expected_version` does not match the database value.",
12923
13329
  "security": [
12924
13330
  {
@@ -12937,18 +13343,6 @@
12937
13343
  "source": "wspc event rm evt_01HW3K4N9V5G6Z8C2Q7B1Y0M3F"
12938
13344
  }
12939
13345
  ],
12940
- "parameters": [
12941
- {
12942
- "schema": {
12943
- "type": "string",
12944
- "description": "Event id (`evt_<ULID>` for new rows; legacy UUID ids remain accepted)."
12945
- },
12946
- "required": true,
12947
- "description": "Event id (`evt_<ULID>` for new rows; legacy UUID ids remain accepted).",
12948
- "name": "id",
12949
- "in": "path"
12950
- }
12951
- ],
12952
13346
  "requestBody": {
12953
13347
  "content": {
12954
13348
  "application/json": {
@@ -12973,6 +13367,14 @@
12973
13367
  "responses": {
12974
13368
  "200": {
12975
13369
  "description": "The event was soft-deleted. Response carries `id`, `deleted_at`, and the post-delete `version`. Cancellation emails are sent asynchronously.",
13370
+ "headers": {
13371
+ "x-consistency-bookmark": {
13372
+ "description": "Opaque consistency bookmark for the latest calendar database position observed by this request. Store and send it on the next calendar request to continue read-after-write consistency.",
13373
+ "schema": {
13374
+ "type": "string"
13375
+ }
13376
+ }
13377
+ },
12976
13378
  "content": {
12977
13379
  "application/json": {
12978
13380
  "schema": {
@@ -13344,25 +13746,17 @@
13344
13746
  }
13345
13747
  },
13346
13748
  "summary": "Get a calendar event by id",
13347
- "description": "### Overview\nFetch a single calendar event by its unique ID, returning the complete record including all attendees.\n\n### When to Use\nDisplay a detailed view of an event, or read the latest database state (capturing `version`) prior to executing an optimistic-locked PATCH update.\n\n### Constraints\n- **Deleted Events**: Soft-deleted events return 404 `NOT_FOUND` by default. You must explicitly pass `include_deleted=true` in the query parameters to retrieve a soft-deleted row.\n- **ICS Format**: To download the RFC 5545 iCalendar text representation of this event, use `GET /calendar/events/{id}.ics` instead.\n\n### Troubleshooting\n- Returns 404 `NOT_FOUND` if the event does not exist, is soft-deleted (without `include_deleted=true`), or is owned by another user.",
13348
- "security": [
13349
- {
13350
- "bearerAuth": []
13351
- }
13352
- ],
13353
- "x-codeSamples": [
13749
+ "parameters": [
13354
13750
  {
13355
- "lang": "shell",
13356
- "label": "curl",
13357
- "source": "curl https://api.wspc.ai/calendar/events/evt_01HW3K4N9V5G6Z8C2Q7B1Y0M3F \\\n -H \"Authorization: Bearer $WSPC_API_KEY\""
13751
+ "name": "x-consistency-bookmark",
13752
+ "in": "header",
13753
+ "required": false,
13754
+ "description": "Optional opaque consistency bookmark returned by a previous calendar response. Send it back unchanged to continue read-after-write consistency.",
13755
+ "schema": {
13756
+ "type": "string"
13757
+ },
13758
+ "example": "opaque-consistency-bookmark"
13358
13759
  },
13359
- {
13360
- "lang": "bash",
13361
- "label": "wspc CLI",
13362
- "source": "wspc event show evt_01HW3K4N9V5G6Z8C2Q7B1Y0M3F"
13363
- }
13364
- ],
13365
- "parameters": [
13366
13760
  {
13367
13761
  "schema": {
13368
13762
  "type": "string",
@@ -13384,9 +13778,35 @@
13384
13778
  "in": "query"
13385
13779
  }
13386
13780
  ],
13781
+ "description": "### Overview\nFetch a single calendar event by its unique ID, returning the complete record including all attendees.\n\n### When to Use\nDisplay a detailed view of an event, or read the latest database state (capturing `version`) prior to executing an optimistic-locked PATCH update.\n\n### Constraints\n- **Deleted Events**: Soft-deleted events return 404 `NOT_FOUND` by default. You must explicitly pass `include_deleted=true` in the query parameters to retrieve a soft-deleted row.\n- **ICS Format**: To download the RFC 5545 iCalendar text representation of this event, use `GET /calendar/events/{id}.ics` instead.\n\n### Troubleshooting\n- Returns 404 `NOT_FOUND` if the event does not exist, is soft-deleted (without `include_deleted=true`), or is owned by another user.",
13782
+ "security": [
13783
+ {
13784
+ "bearerAuth": []
13785
+ }
13786
+ ],
13787
+ "x-codeSamples": [
13788
+ {
13789
+ "lang": "shell",
13790
+ "label": "curl",
13791
+ "source": "curl https://api.wspc.ai/calendar/events/evt_01HW3K4N9V5G6Z8C2Q7B1Y0M3F \\\n -H \"Authorization: Bearer $WSPC_API_KEY\""
13792
+ },
13793
+ {
13794
+ "lang": "bash",
13795
+ "label": "wspc CLI",
13796
+ "source": "wspc event show evt_01HW3K4N9V5G6Z8C2Q7B1Y0M3F"
13797
+ }
13798
+ ],
13387
13799
  "responses": {
13388
13800
  "200": {
13389
13801
  "description": "The requested event. Includes `deleted_at` only when fetched with `include_deleted=true` on a soft-deleted row.",
13802
+ "headers": {
13803
+ "x-consistency-bookmark": {
13804
+ "description": "Opaque consistency bookmark for the latest calendar database position observed by this request. Store and send it on the next calendar request to continue read-after-write consistency.",
13805
+ "schema": {
13806
+ "type": "string"
13807
+ }
13808
+ }
13809
+ },
13390
13810
  "content": {
13391
13811
  "application/json": {
13392
13812
  "schema": {
@@ -13794,6 +14214,28 @@
13794
14214
  }
13795
14215
  },
13796
14216
  "summary": "Update a calendar event",
14217
+ "parameters": [
14218
+ {
14219
+ "name": "x-consistency-bookmark",
14220
+ "in": "header",
14221
+ "required": false,
14222
+ "description": "Optional opaque consistency bookmark returned by a previous calendar response. Send it back unchanged to continue read-after-write consistency.",
14223
+ "schema": {
14224
+ "type": "string"
14225
+ },
14226
+ "example": "opaque-consistency-bookmark"
14227
+ },
14228
+ {
14229
+ "schema": {
14230
+ "type": "string",
14231
+ "description": "Event id (`evt_<ULID>` for new rows; legacy UUID ids remain accepted)."
14232
+ },
14233
+ "required": true,
14234
+ "description": "Event id (`evt_<ULID>` for new rows; legacy UUID ids remain accepted).",
14235
+ "name": "id",
14236
+ "in": "path"
14237
+ }
14238
+ ],
13797
14239
  "description": "### Overview\nPartially update fields of an existing calendar event. All properties in the request body are optional.\n\n### When to Use\nReschedule an event, update its location or notes, cancel the meeting (retaining the record but notifying participants), or replace/update the attendee list.\n\n### Constraints\n- **Optimistic Locking**: Pass `expected_version` to fail with `VERSION_CONFLICT` if another mutation occurred concurrently since you last read. Omit to let the server force the update.\n- **Field Clearing**: Pass an empty string `\"\"` for `description`, `location`, or `url` to clear those fields in the database.\n- **Attendee replacement**: Providing the `attendees` property fully REPLACES the existing participant list. The server automatically diffs participants and asynchronously sends invitations (for newly added), updates (for kept), or cancellations (for removed) via Cloudflare `waitUntil`.\n- **Validation Rules**: Mismatched start/end formats or chronological order violations will fail the request.\n- **Attendee Limit**: A maximum of 50 unique attendees is allowed.\n\n### Troubleshooting\n- Returns 404 `NOT_FOUND` if the event does not exist or is soft-deleted.\n- Returns 409 `VERSION_CONFLICT` if `expected_version` is provided but stale.\n- Returns 400 `VALIDATION_ERROR` if `start` and `end` kinds do not match, or if `end <= start`.\n- Returns 400 `ATTENDEE_LIMIT_EXCEEDED` if unique attendees exceed 50.",
13798
14240
  "security": [
13799
14241
  {
@@ -13812,18 +14254,6 @@
13812
14254
  "source": "wspc event set evt_01HW3K4N9V5G6Z8C2Q7B1Y0M3F \\\n --start \"tomorrow 1pm\" --end \"tomorrow 2pm\""
13813
14255
  }
13814
14256
  ],
13815
- "parameters": [
13816
- {
13817
- "schema": {
13818
- "type": "string",
13819
- "description": "Event id (`evt_<ULID>` for new rows; legacy UUID ids remain accepted)."
13820
- },
13821
- "required": true,
13822
- "description": "Event id (`evt_<ULID>` for new rows; legacy UUID ids remain accepted).",
13823
- "name": "id",
13824
- "in": "path"
13825
- }
13826
- ],
13827
14257
  "requestBody": {
13828
14258
  "content": {
13829
14259
  "application/json": {
@@ -13872,6 +14302,14 @@
13872
14302
  "responses": {
13873
14303
  "200": {
13874
14304
  "description": "The updated event with `version` incremented. Attendee diff emails are sent asynchronously.",
14305
+ "headers": {
14306
+ "x-consistency-bookmark": {
14307
+ "description": "Opaque consistency bookmark for the latest calendar database position observed by this request. Store and send it on the next calendar request to continue read-after-write consistency.",
14308
+ "schema": {
14309
+ "type": "string"
14310
+ }
14311
+ }
14312
+ },
13875
14313
  "content": {
13876
14314
  "application/json": {
13877
14315
  "schema": {
@@ -14250,6 +14688,28 @@
14250
14688
  }
14251
14689
  },
14252
14690
  "summary": "Download event as `.ics`",
14691
+ "parameters": [
14692
+ {
14693
+ "name": "x-consistency-bookmark",
14694
+ "in": "header",
14695
+ "required": false,
14696
+ "description": "Optional opaque consistency bookmark returned by a previous calendar response. Send it back unchanged to continue read-after-write consistency.",
14697
+ "schema": {
14698
+ "type": "string"
14699
+ },
14700
+ "example": "opaque-consistency-bookmark"
14701
+ },
14702
+ {
14703
+ "schema": {
14704
+ "type": "string",
14705
+ "description": "`<event_id>.ics`. The `.ics` suffix is required so the router matches this endpoint ahead of the JSON detail route."
14706
+ },
14707
+ "required": true,
14708
+ "description": "`<event_id>.ics`. The `.ics` suffix is required so the router matches this endpoint ahead of the JSON detail route.",
14709
+ "name": "filename",
14710
+ "in": "path"
14711
+ }
14712
+ ],
14253
14713
  "description": "### Overview\nReturn a single event rendered as an RFC 5545 `.ics` file suitable for import into major calendar clients.\n\n### When to Use\nExpose a 'Save to my calendar' link in email notifications, show a download button in a UI, or programmatically forward raw iCalendar text to third parties.\n\n### Constraints\n- **Router Match**: The path parameter `filename` must be exactly `<event_id>.ics`. The `.ics` suffix is strictly required for the router to match this endpoint ahead of the JSON detail endpoint.\n- **Response Payload**: The response is plain text containing the iCalendar specification, NOT JSON. The `Content-Type` is set to `text/calendar; charset=utf-8` with `Content-Disposition: inline; filename=\"<event_id>.ics\"`.\n- **Authentication**: Standard authentication is required (Bearer API key or OAuth access token), as this endpoint is secure.\n\n### Troubleshooting\n- Returns 404 `NOT_FOUND` if the event does not exist, is soft-deleted, or is owned by another user.",
14254
14714
  "security": [
14255
14715
  {
@@ -14268,21 +14728,17 @@
14268
14728
  "source": "wspc event ics evt_01HW3K4N9V5G6Z8C2Q7B1Y0M3F > event.ics"
14269
14729
  }
14270
14730
  ],
14271
- "parameters": [
14272
- {
14273
- "schema": {
14274
- "type": "string",
14275
- "description": "`<event_id>.ics`. The `.ics` suffix is required so the router matches this endpoint ahead of the JSON detail route."
14276
- },
14277
- "required": true,
14278
- "description": "`<event_id>.ics`. The `.ics` suffix is required so the router matches this endpoint ahead of the JSON detail route.",
14279
- "name": "filename",
14280
- "in": "path"
14281
- }
14282
- ],
14283
14731
  "responses": {
14284
14732
  "200": {
14285
14733
  "description": "RFC 5545 iCalendar payload as plain text. Content-Type `text/calendar; charset=utf-8`. Body begins with `BEGIN:VCALENDAR` and contains a single `VEVENT` for this event.",
14734
+ "headers": {
14735
+ "x-consistency-bookmark": {
14736
+ "description": "Opaque consistency bookmark for the latest calendar database position observed by this request. Store and send it on the next calendar request to continue read-after-write consistency.",
14737
+ "schema": {
14738
+ "type": "string"
14739
+ }
14740
+ }
14741
+ },
14286
14742
  "content": {
14287
14743
  "text/calendar": {
14288
14744
  "schema": {
@@ -14628,6 +15084,28 @@
14628
15084
  "hidden": true
14629
15085
  },
14630
15086
  "summary": "Restore a soft-deleted event",
15087
+ "parameters": [
15088
+ {
15089
+ "name": "x-consistency-bookmark",
15090
+ "in": "header",
15091
+ "required": false,
15092
+ "description": "Optional opaque consistency bookmark returned by a previous calendar response. Send it back unchanged to continue read-after-write consistency.",
15093
+ "schema": {
15094
+ "type": "string"
15095
+ },
15096
+ "example": "opaque-consistency-bookmark"
15097
+ },
15098
+ {
15099
+ "schema": {
15100
+ "type": "string",
15101
+ "description": "Event id (`evt_<ULID>` for new rows; legacy UUID ids remain accepted)."
15102
+ },
15103
+ "required": true,
15104
+ "description": "Event id (`evt_<ULID>` for new rows; legacy UUID ids remain accepted).",
15105
+ "name": "id",
15106
+ "in": "path"
15107
+ }
15108
+ ],
14631
15109
  "description": "### Overview\nRestore a previously soft-deleted calendar event, making it active and visible in default list queries.\n\n### When to Use\nRecover an event that was accidentally soft-deleted.\n\n### Constraints\n- **Optimistic Locking**: Supports optional optimistic locking via `expected_version` in the request body.\n- **Side Effects**: When restoring an event with attendees, all participants will asynchronously receive a new invitation email containing an `.ics` REQUEST attachment via Cloudflare `waitUntil`.\n- **State Integrity**: You cannot restore a live (non-deleted) event. Restoring a live event is treated as an error.\n\n### Troubleshooting\n- Returns 404 `NOT_FOUND` if the event does not exist, or is NOT currently soft-deleted.\n- Returns 409 `VERSION_CONFLICT` if `expected_version` does not match the database value.",
14632
15110
  "security": [
14633
15111
  {
@@ -14641,18 +15119,6 @@
14641
15119
  "source": "curl -X POST https://api.wspc.ai/calendar/events/evt_01HW3K4N9V5G6Z8C2Q7B1Y0M3F/restore \\\n -H \"Authorization: Bearer $WSPC_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{}'"
14642
15120
  }
14643
15121
  ],
14644
- "parameters": [
14645
- {
14646
- "schema": {
14647
- "type": "string",
14648
- "description": "Event id (`evt_<ULID>` for new rows; legacy UUID ids remain accepted)."
14649
- },
14650
- "required": true,
14651
- "description": "Event id (`evt_<ULID>` for new rows; legacy UUID ids remain accepted).",
14652
- "name": "id",
14653
- "in": "path"
14654
- }
14655
- ],
14656
15122
  "requestBody": {
14657
15123
  "content": {
14658
15124
  "application/json": {
@@ -14677,6 +15143,14 @@
14677
15143
  "responses": {
14678
15144
  "200": {
14679
15145
  "description": "The restored event with `version` incremented and `deleted_at` cleared. Re-invitation emails are sent asynchronously to attendees.",
15146
+ "headers": {
15147
+ "x-consistency-bookmark": {
15148
+ "description": "Opaque consistency bookmark for the latest calendar database position observed by this request. Store and send it on the next calendar request to continue read-after-write consistency.",
15149
+ "schema": {
15150
+ "type": "string"
15151
+ }
15152
+ }
15153
+ },
14680
15154
  "content": {
14681
15155
  "application/json": {
14682
15156
  "schema": {
@@ -15043,12 +15517,24 @@
15043
15517
  "EmailAliases"
15044
15518
  ],
15045
15519
  "summary": "Create a receiving alias",
15046
- "description": "### Overview\nReserves and provisions a new passwordless/disposable receiving email alias address under the configured WSPC domain or a fully verified organization custom domain. All inbound emails received on this alias will be forwarded into the caller's inbox.\n\n### When to Use\n- Use this endpoint to spin up a fresh, dedicated email address (e.g., `alice-shop@wspc.app`) for specific websites, newsletters, or contexts to prevent spam or categorize incoming mail.\n\n### Constraints\n- Requires a valid Bearer token in the `Authorization` header.\n- **Alias Formatting**: The local part must be between 5 and 32 characters, start with an alphanumeric character, and only contain letters, numbers, dots, underscores, and hyphens.\n- **Custom Domains**: If the address uses a non-platform host, that domain must be registered to the caller's organization and have `status = verified`, `sending_status = verified`, and `receiving_status = verified`.\n- **Limit Check**: Each user is allowed a maximum of 10 active email aliases. Soft-deleted aliases do not count against this quota limit.\n\n### Troubleshooting\n- **401 Unauthorized**: Bearer token is missing, invalid, or expired.\n- **400 Bad Request / INVALID_CHARSET / RESERVED**: The alias local part contains invalid characters, is too short/long, or matches a reserved keyword.\n- **400 Bad Request / DOMAIN_NOT_FOUND**: The custom domain is not registered to the caller's organization.\n- **400 Bad Request / UNVERIFIED_DOMAIN**: The custom domain exists but is not verified yet.\n- **400 Bad Request / CUSTOM_DOMAIN_NOT_READY**: The custom domain exists but has not completed sending or receiving verification.\n- **409 Conflict / ALIAS_CONFLICT**: An alias with the exact requested email address already exists globally (whether active or soft-deleted by any user).\n- **429 Too Many Requests / ALIAS_LIMIT_EXCEEDED**: The user has reached the active alias cap limit of 10. A previously deleted alias must be cleaned up or wait for quota availability.",
15520
+ "description": "### Overview\nReserves and provisions a new passwordless/disposable receiving email alias address under the configured WSPC domain or a fully verified organization custom domain. All inbound emails received on this alias will be forwarded into the caller's inbox.\n\n### When to Use\n- Use this endpoint to spin up a fresh, dedicated email address (e.g., `alice-shop@wspc.app`) for specific websites, newsletters, or contexts to prevent spam or categorize incoming mail.\n\n### Constraints\n- Requires a valid Bearer token in the `Authorization` header.\n- **Alias Formatting**: The local part must be between 5 and 32 characters, start with an alphanumeric character, and only contain letters, numbers, dots, underscores, and hyphens.\n- **Custom Domains**: If the address uses a non-platform host, that domain must be registered to the caller's organization and have `status = verified`, `sending_status = verified`, and `receiving_status = verified`.\n- **Limit Check**: Each user is allowed a maximum of 10 active email aliases. Soft-deleted aliases do not count against this quota limit.\n\n### Troubleshooting\n- **401 Unauthorized**: Bearer token is missing, invalid, or expired.\n- **400 Bad Request / INVALID_CHARSET / RESERVED**: The alias local part contains invalid characters, is too short/long, or matches a reserved keyword.\n- **400 Bad Request / ALIAS_DOMAIN_NOT_FOUND**: The custom domain is not registered to the caller's organization.\n- **400 Bad Request / UNVERIFIED_DOMAIN**: The custom domain exists but is not verified yet.\n- **400 Bad Request / ALIAS_DOMAIN_NOT_READY**: The custom domain exists but has not completed sending or receiving verification.\n- **409 Conflict / ALIAS_CONFLICT**: An alias with the exact requested email address already exists globally (whether active or soft-deleted by any user).\n- **429 Too Many Requests / ALIAS_LIMIT_EXCEEDED**: The user has reached the active alias cap limit of 10. A previously deleted alias must be cleaned up or wait for quota availability.",
15047
15521
  "security": [
15048
15522
  {
15049
15523
  "bearerAuth": []
15050
15524
  }
15051
15525
  ],
15526
+ "parameters": [
15527
+ {
15528
+ "name": "x-consistency-bookmark",
15529
+ "in": "header",
15530
+ "required": false,
15531
+ "description": "Optional opaque consistency bookmark returned by a previous email response. Send it back unchanged to continue read-after-write consistency for email D1 data.",
15532
+ "schema": {
15533
+ "type": "string"
15534
+ },
15535
+ "example": "opaque-consistency-bookmark"
15536
+ }
15537
+ ],
15052
15538
  "x-cli": {
15053
15539
  "command": "alias add",
15054
15540
  "positional": [
@@ -15109,6 +15595,14 @@
15109
15595
  "responses": {
15110
15596
  "201": {
15111
15597
  "description": "Alias created. The requested address is live immediately.",
15598
+ "headers": {
15599
+ "x-consistency-bookmark": {
15600
+ "description": "Opaque consistency bookmark for the latest email database position observed by this request. Store and send it on the next email request to continue read-after-write consistency.",
15601
+ "schema": {
15602
+ "type": "string"
15603
+ }
15604
+ }
15605
+ },
15112
15606
  "content": {
15113
15607
  "application/json": {
15114
15608
  "schema": {
@@ -15129,7 +15623,7 @@
15129
15623
  }
15130
15624
  },
15131
15625
  "400": {
15132
- "description": "Invalid alias email address, local part, reserved local part, missing custom domain, unverified custom domain, or custom domain that is not ready for both sending and receiving.",
15626
+ "description": "Invalid alias email address, local part, reserved local part, missing custom domain (`ALIAS_DOMAIN_NOT_FOUND`), unverified custom domain, or custom domain that is not ready for both sending and receiving (`ALIAS_DOMAIN_NOT_READY`).",
15133
15627
  "content": {
15134
15628
  "application/json": {
15135
15629
  "schema": {
@@ -15334,6 +15828,28 @@
15334
15828
  "bearerAuth": []
15335
15829
  }
15336
15830
  ],
15831
+ "parameters": [
15832
+ {
15833
+ "name": "x-consistency-bookmark",
15834
+ "in": "header",
15835
+ "required": false,
15836
+ "description": "Optional opaque consistency bookmark returned by a previous email response. Send it back unchanged to continue read-after-write consistency for email D1 data.",
15837
+ "schema": {
15838
+ "type": "string"
15839
+ },
15840
+ "example": "opaque-consistency-bookmark"
15841
+ },
15842
+ {
15843
+ "schema": {
15844
+ "type": "string",
15845
+ "description": "When `true`, include soft-deleted aliases (with `deleted_at` set) alongside active ones. Defaults to `false`."
15846
+ },
15847
+ "required": false,
15848
+ "description": "When `true`, include soft-deleted aliases (with `deleted_at` set) alongside active ones. Defaults to `false`.",
15849
+ "name": "include_deleted",
15850
+ "in": "query"
15851
+ }
15852
+ ],
15337
15853
  "x-cli": {
15338
15854
  "command": "alias ls",
15339
15855
  "display": {
@@ -15364,21 +15880,17 @@
15364
15880
  "source": "wspc email alias ls"
15365
15881
  }
15366
15882
  ],
15367
- "parameters": [
15368
- {
15369
- "schema": {
15370
- "type": "string",
15371
- "description": "When `true`, include soft-deleted aliases (with `deleted_at` set) alongside active ones. Defaults to `false`."
15372
- },
15373
- "required": false,
15374
- "description": "When `true`, include soft-deleted aliases (with `deleted_at` set) alongside active ones. Defaults to `false`.",
15375
- "name": "include_deleted",
15376
- "in": "query"
15377
- }
15378
- ],
15379
15883
  "responses": {
15380
15884
  "200": {
15381
15885
  "description": "Aliases owned by the caller, including soft-deleted entries when requested.",
15886
+ "headers": {
15887
+ "x-consistency-bookmark": {
15888
+ "description": "Opaque consistency bookmark for the latest email database position observed by this request. Store and send it on the next email request to continue read-after-write consistency.",
15889
+ "schema": {
15890
+ "type": "string"
15891
+ }
15892
+ }
15893
+ },
15382
15894
  "content": {
15383
15895
  "application/json": {
15384
15896
  "schema": {
@@ -15594,12 +16106,24 @@
15594
16106
  "EmailDomains"
15595
16107
  ],
15596
16108
  "summary": "Register a custom email domain",
15597
- "description": "### Overview\nRegisters a new organization-owned custom email domain with the upstream provider and caches the returned DNS verification records in D1.\n\n### When to Use\n- Use this endpoint when onboarding a new custom email domain such as `mail.example.com`.\n- The response contains the DNS records the organization must publish before the domain can be verified.\n- This route registers the domain and returns DNS records. Custom-domain aliases require `status`, `sending_status`, and `receiving_status` to all be `verified`.\n\n### Constraints\n- Requires a valid Bearer token in the `Authorization` header.\n- Domain ownership is globally unique across the platform. Once any organization has reserved a domain, another org cannot register it.\n- This route requires custom domain provider credentials in production because it performs a live provider registration call.\n\n### Troubleshooting\n- **400 Bad Request / DOMAIN_INVALID / DOMAIN_RESERVED**: The hostname is malformed or belongs to the platform (`wspc.app`, `wspc.ai`, or their subdomains).\n- **409 Conflict / DOMAIN_CONFLICT**: The domain is already registered by some organization.\n- **502 Bad Gateway / DOMAIN_PROVIDER_ERROR**: The upstream provider request failed, timed out, or returned an unexpected shape.",
16109
+ "description": "### Overview\nRegisters a new organization-owned custom email domain with the upstream provider and caches the returned DNS verification records in D1.\n\n### When to Use\n- Use this endpoint when onboarding a new custom email domain such as `mail.example.com`.\n- The response contains the DNS records the organization must publish before the domain can be verified.\n- This route registers the domain and returns DNS records. Custom-domain aliases require `status`, `sending_status`, and `receiving_status` to all be `verified`.\n\n### Constraints\n- Requires a valid Bearer token in the `Authorization` header.\n- Domain ownership is globally unique across the platform. Once any organization has reserved a domain, another org cannot register it.\n- This route requires custom domain provider credentials in production because it performs a live provider registration call.\n\n### Troubleshooting\n- **400 Bad Request / DOMAIN_INVALID / DOMAIN_RESERVED**: The hostname is malformed or belongs to the platform (`wspc.app` or its subdomains).\n- **409 Conflict / DOMAIN_CONFLICT**: The domain is already registered by some organization.\n- **502 Bad Gateway / DOMAIN_PROVIDER_ERROR**: The upstream provider request failed, timed out, or returned an unexpected shape.",
15598
16110
  "security": [
15599
16111
  {
15600
16112
  "bearerAuth": []
15601
16113
  }
15602
16114
  ],
16115
+ "parameters": [
16116
+ {
16117
+ "name": "x-consistency-bookmark",
16118
+ "in": "header",
16119
+ "required": false,
16120
+ "description": "Optional opaque consistency bookmark returned by a previous email response. Send it back unchanged to continue read-after-write consistency for email D1 data.",
16121
+ "schema": {
16122
+ "type": "string"
16123
+ },
16124
+ "example": "opaque-consistency-bookmark"
16125
+ }
16126
+ ],
15603
16127
  "x-cli": {
15604
16128
  "command": "domain add",
15605
16129
  "positional": [
@@ -15648,6 +16172,14 @@
15648
16172
  "responses": {
15649
16173
  "201": {
15650
16174
  "description": "Custom domain registered and DNS verification records returned. Custom-domain aliases require full domain readiness before use.",
16175
+ "headers": {
16176
+ "x-consistency-bookmark": {
16177
+ "description": "Opaque consistency bookmark for the latest email database position observed by this request. Store and send it on the next email request to continue read-after-write consistency.",
16178
+ "schema": {
16179
+ "type": "string"
16180
+ }
16181
+ }
16182
+ },
15651
16183
  "content": {
15652
16184
  "application/json": {
15653
16185
  "schema": {
@@ -15944,6 +16476,18 @@
15944
16476
  "bearerAuth": []
15945
16477
  }
15946
16478
  ],
16479
+ "parameters": [
16480
+ {
16481
+ "name": "x-consistency-bookmark",
16482
+ "in": "header",
16483
+ "required": false,
16484
+ "description": "Optional opaque consistency bookmark returned by a previous email response. Send it back unchanged to continue read-after-write consistency for email D1 data.",
16485
+ "schema": {
16486
+ "type": "string"
16487
+ },
16488
+ "example": "opaque-consistency-bookmark"
16489
+ }
16490
+ ],
15947
16491
  "x-cli": {
15948
16492
  "command": "domain ls",
15949
16493
  "display": {
@@ -15978,6 +16522,14 @@
15978
16522
  "responses": {
15979
16523
  "200": {
15980
16524
  "description": "Custom domains cached for the caller organization, including ownership, sending readiness, and receiving readiness state.",
16525
+ "headers": {
16526
+ "x-consistency-bookmark": {
16527
+ "description": "Opaque consistency bookmark for the latest email database position observed by this request. Store and send it on the next email request to continue read-after-write consistency.",
16528
+ "schema": {
16529
+ "type": "string"
16530
+ }
16531
+ }
16532
+ },
15981
16533
  "content": {
15982
16534
  "application/json": {
15983
16535
  "schema": {
@@ -16715,70 +17267,83 @@
16715
17267
  }
16716
17268
  }
16717
17269
  },
16718
- "/email/messages/{id}/attachments/{idx}": {
16719
- "get": {
16720
- "operationId": "email_attachment_get",
17270
+ "/email/domains/{domain}": {
17271
+ "delete": {
17272
+ "operationId": "email_domain_delete",
16721
17273
  "tags": [
16722
- "Emails"
17274
+ "EmailDomains"
16723
17275
  ],
16724
- "summary": "Download an attachment by index",
16725
- "description": "### Overview\nStreams the raw decoded bytes of a parsed attachment belonging to an inbound email. The response body is binary data instead of JSON.\n\n### When to Use\n- Use this endpoint when a user clicks to download a file attachment (such as an invoice PDF or image) or when an automated agent needs to process a file payload.\n\n### Constraints\n- Requires a valid Bearer token in the `Authorization` header.\n- **Response Headers**: The server sets the HTTP `Content-Type` matching the attachment's parsed MIME format and provides a `Content-Disposition: attachment; filename=\"<filename>\"` header.\n- **Soft-Deleted Parents**: Downloading files from soft-deleted emails is blocked with a 404 error, unless the query parameter `include_deleted=true` is provided.\n- **Path Parameter**: The `{idx}` must be a valid 0-based integer index pointing to the attachment list metadata.\n\n### Troubleshooting\n- **401 Unauthorized**: Invalid Bearer token.\n- **404 Not Found / EMAIL_NOT_FOUND**: The specified email ID does not exist or belongs to another user.\n- **404 Not Found / ATTACHMENT_NOT_FOUND**: The index `{idx}` is out of range for the email's attachment array.",
17276
+ "summary": "Delete a custom email domain",
17277
+ "description": "### Overview\nDeletes one active custom email domain for the caller organization. The worker first confirms no active aliases use the domain, deletes the upstream provider resource, then soft-deletes the cached D1 row.\n\n### When to Use\n- Use this when an organization no longer wants WSPC to manage a custom email domain.\n- Delete is only allowed when no active aliases use the domain.\n- Deleted domains are hidden from active list/get/verify/delete surfaces and cannot be self-restored in this version.\n\n### Constraints\n- Requires a valid Bearer token in the `Authorization` header.\n- This route requires custom domain provider credentials in production because it performs a live provider delete call.\n- Provider identifiers and provider raw errors are never returned to the client.\n\n### Troubleshooting\n- **400 Bad Request / DOMAIN_INVALID / DOMAIN_RESERVED**: The path hostname is malformed or reserved.\n- **404 Not Found / DOMAIN_NOT_FOUND**: The domain does not exist, belongs to another organization, or was already deleted.\n- **409 Conflict / DOMAIN_IN_USE**: Active aliases still use this domain.\n- **502 Bad Gateway / DOMAIN_PROVIDER_ERROR**: Provider delete failed, timed out, or credentials are missing.",
16726
17278
  "security": [
16727
17279
  {
16728
17280
  "bearerAuth": []
16729
17281
  }
16730
17282
  ],
16731
17283
  "x-cli": {
16732
- "command": "_handwritten",
16733
- "hidden": true
17284
+ "command": "domain rm",
17285
+ "positional": [
17286
+ "domain"
17287
+ ]
16734
17288
  },
16735
17289
  "x-codeSamples": [
16736
17290
  {
16737
17291
  "lang": "shell",
16738
17292
  "label": "curl",
16739
- "source": "curl https://api.wspc.ai/email/messages/eml_01HW3K4N9V5G6Z8C2Q7B1Y0M3F/attachments/0 \\\n -H \"Authorization: Bearer $WSPC_API_KEY\" \\\n -o invoice.pdf"
17293
+ "source": "curl -X DELETE https://api.wspc.ai/email/domains/mail.example.com \\\n -H \"Authorization: Bearer $WSPC_API_KEY\""
16740
17294
  },
16741
17295
  {
16742
17296
  "lang": "bash",
16743
17297
  "label": "wspc CLI",
16744
- "source": "wspc email attachment eml_01HW3K4N9V5G6Z8C2Q7B1Y0M3F 0 --output invoice.pdf"
17298
+ "source": "wspc domain rm mail.example.com"
16745
17299
  }
16746
17300
  ],
16747
17301
  "parameters": [
16748
17302
  {
16749
17303
  "schema": {
16750
- "type": "string"
17304
+ "type": "string",
17305
+ "description": "Custom domain hostname path parameter. URL-encode if your client requires it."
16751
17306
  },
16752
17307
  "required": true,
16753
- "name": "id",
16754
- "in": "path"
16755
- },
16756
- {
16757
- "schema": {
16758
- "type": "string"
16759
- },
16760
- "required": true,
16761
- "name": "idx",
17308
+ "description": "Custom domain hostname path parameter. URL-encode if your client requires it.",
17309
+ "name": "domain",
16762
17310
  "in": "path"
16763
- },
16764
- {
16765
- "schema": {
16766
- "type": "string",
16767
- "description": "When `true`, allow downloading an attachment whose parent email is soft-deleted. Defaults to `false`."
16768
- },
16769
- "required": false,
16770
- "description": "When `true`, allow downloading an attachment whose parent email is soft-deleted. Defaults to `false`.",
16771
- "name": "include_deleted",
16772
- "in": "query"
16773
17311
  }
16774
17312
  ],
16775
17313
  "responses": {
16776
- "200": {
16777
- "description": "Raw attachment bytes. `Content-Type` matches the attachment's parsed MIME (often `application/pdf`, `image/jpeg`, `text/calendar`, or `application/octet-stream` when unknown). `Content-Disposition: attachment; filename=\"<filename>\"`.",
17314
+ "204": {
17315
+ "description": "Custom domain deleted."
17316
+ },
17317
+ "400": {
17318
+ "description": "Malformed or platform-reserved domain hostname.",
16778
17319
  "content": {
16779
- "application/octet-stream": {
17320
+ "application/json": {
16780
17321
  "schema": {
16781
- "type": "string"
17322
+ "type": "object",
17323
+ "properties": {
17324
+ "error": {
17325
+ "type": "object",
17326
+ "properties": {
17327
+ "code": {
17328
+ "type": "string"
17329
+ },
17330
+ "message": {
17331
+ "type": "string"
17332
+ },
17333
+ "extra": {
17334
+ "type": "object",
17335
+ "additionalProperties": {}
17336
+ }
17337
+ },
17338
+ "required": [
17339
+ "code",
17340
+ "message"
17341
+ ]
17342
+ }
17343
+ },
17344
+ "required": [
17345
+ "error"
17346
+ ]
16782
17347
  }
16783
17348
  }
16784
17349
  }
@@ -16829,7 +17394,41 @@
16829
17394
  }
16830
17395
  },
16831
17396
  "404": {
16832
- "description": "Either the parent email is unknown / soft-deleted (`EMAIL_NOT_FOUND`) or `idx` is out of range (`ATTACHMENT_NOT_FOUND`).",
17397
+ "description": "The domain was not found for the caller organization.",
17398
+ "content": {
17399
+ "application/json": {
17400
+ "schema": {
17401
+ "type": "object",
17402
+ "properties": {
17403
+ "error": {
17404
+ "type": "object",
17405
+ "properties": {
17406
+ "code": {
17407
+ "type": "string"
17408
+ },
17409
+ "message": {
17410
+ "type": "string"
17411
+ },
17412
+ "extra": {
17413
+ "type": "object",
17414
+ "additionalProperties": {}
17415
+ }
17416
+ },
17417
+ "required": [
17418
+ "code",
17419
+ "message"
17420
+ ]
17421
+ }
17422
+ },
17423
+ "required": [
17424
+ "error"
17425
+ ]
17426
+ }
17427
+ }
17428
+ }
17429
+ },
17430
+ "409": {
17431
+ "description": "Active aliases still use this domain.",
16833
17432
  "content": {
16834
17433
  "application/json": {
16835
17434
  "schema": {
@@ -16955,11 +17554,43 @@
16955
17554
  }
16956
17555
  }
16957
17556
  }
17557
+ },
17558
+ "502": {
17559
+ "description": "The upstream provider delete failed or provider credentials are missing.",
17560
+ "content": {
17561
+ "application/json": {
17562
+ "schema": {
17563
+ "type": "object",
17564
+ "properties": {
17565
+ "error": {
17566
+ "type": "object",
17567
+ "properties": {
17568
+ "code": {
17569
+ "type": "string"
17570
+ },
17571
+ "message": {
17572
+ "type": "string"
17573
+ },
17574
+ "extra": {
17575
+ "type": "object",
17576
+ "additionalProperties": {}
17577
+ }
17578
+ },
17579
+ "required": [
17580
+ "code",
17581
+ "message"
17582
+ ]
17583
+ }
17584
+ },
17585
+ "required": [
17586
+ "error"
17587
+ ]
17588
+ }
17589
+ }
17590
+ }
16958
17591
  }
16959
17592
  }
16960
- }
16961
- },
16962
- "/email/domains/{domain}": {
17593
+ },
16963
17594
  "get": {
16964
17595
  "operationId": "email_domain_get",
16965
17596
  "tags": [
@@ -17135,7 +17766,269 @@
17135
17766
  }
17136
17767
  },
17137
17768
  "404": {
17138
- "description": "The domain was not found for the caller organization.",
17769
+ "description": "The domain was not found for the caller organization.",
17770
+ "content": {
17771
+ "application/json": {
17772
+ "schema": {
17773
+ "type": "object",
17774
+ "properties": {
17775
+ "error": {
17776
+ "type": "object",
17777
+ "properties": {
17778
+ "code": {
17779
+ "type": "string"
17780
+ },
17781
+ "message": {
17782
+ "type": "string"
17783
+ },
17784
+ "extra": {
17785
+ "type": "object",
17786
+ "additionalProperties": {}
17787
+ }
17788
+ },
17789
+ "required": [
17790
+ "code",
17791
+ "message"
17792
+ ]
17793
+ }
17794
+ },
17795
+ "required": [
17796
+ "error"
17797
+ ]
17798
+ }
17799
+ }
17800
+ }
17801
+ },
17802
+ "429": {
17803
+ "description": "Rate limit exceeded. Retry after the duration in `error.extra.retry_after_seconds`. `limit_kind` identifies which bucket was exhausted.",
17804
+ "content": {
17805
+ "application/json": {
17806
+ "schema": {
17807
+ "type": "object",
17808
+ "properties": {
17809
+ "error": {
17810
+ "type": "object",
17811
+ "properties": {
17812
+ "code": {
17813
+ "type": "string"
17814
+ },
17815
+ "message": {
17816
+ "type": "string"
17817
+ },
17818
+ "extra": {
17819
+ "type": "object",
17820
+ "additionalProperties": {}
17821
+ }
17822
+ },
17823
+ "required": [
17824
+ "code",
17825
+ "message"
17826
+ ]
17827
+ }
17828
+ },
17829
+ "required": [
17830
+ "error"
17831
+ ]
17832
+ },
17833
+ "examples": {
17834
+ "rateLimited": {
17835
+ "summary": "Per-key rate limit hit",
17836
+ "value": {
17837
+ "error": {
17838
+ "code": "RATE_LIMITED",
17839
+ "message": "rate limit exceeded",
17840
+ "extra": {
17841
+ "retry_after_seconds": 60,
17842
+ "limit_kind": "authenticated_per_key"
17843
+ }
17844
+ }
17845
+ }
17846
+ }
17847
+ }
17848
+ }
17849
+ }
17850
+ },
17851
+ "500": {
17852
+ "description": "Unhandled server error. The request was well-formed but the service failed unexpectedly. Safe to retry idempotent operations.",
17853
+ "content": {
17854
+ "application/json": {
17855
+ "schema": {
17856
+ "type": "object",
17857
+ "properties": {
17858
+ "error": {
17859
+ "type": "object",
17860
+ "properties": {
17861
+ "code": {
17862
+ "type": "string"
17863
+ },
17864
+ "message": {
17865
+ "type": "string"
17866
+ },
17867
+ "extra": {
17868
+ "type": "object",
17869
+ "additionalProperties": {}
17870
+ }
17871
+ },
17872
+ "required": [
17873
+ "code",
17874
+ "message"
17875
+ ]
17876
+ }
17877
+ },
17878
+ "required": [
17879
+ "error"
17880
+ ]
17881
+ },
17882
+ "examples": {
17883
+ "internalError": {
17884
+ "summary": "Unhandled exception",
17885
+ "value": {
17886
+ "error": {
17887
+ "code": "INTERNAL_ERROR",
17888
+ "message": "internal error"
17889
+ }
17890
+ }
17891
+ }
17892
+ }
17893
+ }
17894
+ }
17895
+ }
17896
+ }
17897
+ }
17898
+ },
17899
+ "/email/messages/{id}/attachments/{idx}": {
17900
+ "get": {
17901
+ "operationId": "email_attachment_get",
17902
+ "tags": [
17903
+ "Emails"
17904
+ ],
17905
+ "summary": "Download an attachment by index",
17906
+ "description": "### Overview\nStreams the raw decoded bytes of a parsed attachment belonging to an inbound email. The response body is binary data instead of JSON.\n\n### When to Use\n- Use this endpoint when a user clicks to download a file attachment (such as an invoice PDF or image) or when an automated agent needs to process a file payload.\n\n### Constraints\n- Requires a valid Bearer token in the `Authorization` header.\n- **Response Headers**: The server sets the HTTP `Content-Type` matching the attachment's parsed MIME format and provides a `Content-Disposition: attachment; filename=\"<filename>\"` header.\n- **Soft-Deleted Parents**: Downloading files from soft-deleted emails is blocked with a 404 error, unless the query parameter `include_deleted=true` is provided.\n- **Path Parameter**: The `{idx}` must be a valid 0-based integer index pointing to the attachment list metadata.\n\n### Troubleshooting\n- **401 Unauthorized**: Invalid Bearer token.\n- **404 Not Found / EMAIL_NOT_FOUND**: The specified email ID does not exist or belongs to another user.\n- **404 Not Found / ATTACHMENT_NOT_FOUND**: The index `{idx}` is out of range for the email's attachment array.",
17907
+ "security": [
17908
+ {
17909
+ "bearerAuth": []
17910
+ }
17911
+ ],
17912
+ "parameters": [
17913
+ {
17914
+ "name": "x-consistency-bookmark",
17915
+ "in": "header",
17916
+ "required": false,
17917
+ "description": "Optional opaque consistency bookmark returned by a previous email response. Send it back unchanged to continue read-after-write consistency for email D1 data.",
17918
+ "schema": {
17919
+ "type": "string"
17920
+ },
17921
+ "example": "opaque-consistency-bookmark"
17922
+ },
17923
+ {
17924
+ "schema": {
17925
+ "type": "string"
17926
+ },
17927
+ "required": true,
17928
+ "name": "id",
17929
+ "in": "path"
17930
+ },
17931
+ {
17932
+ "schema": {
17933
+ "type": "string"
17934
+ },
17935
+ "required": true,
17936
+ "name": "idx",
17937
+ "in": "path"
17938
+ },
17939
+ {
17940
+ "schema": {
17941
+ "type": "string",
17942
+ "description": "When `true`, allow downloading an attachment whose parent email is soft-deleted. Defaults to `false`."
17943
+ },
17944
+ "required": false,
17945
+ "description": "When `true`, allow downloading an attachment whose parent email is soft-deleted. Defaults to `false`.",
17946
+ "name": "include_deleted",
17947
+ "in": "query"
17948
+ }
17949
+ ],
17950
+ "x-cli": {
17951
+ "command": "_handwritten",
17952
+ "hidden": true
17953
+ },
17954
+ "x-codeSamples": [
17955
+ {
17956
+ "lang": "shell",
17957
+ "label": "curl",
17958
+ "source": "curl https://api.wspc.ai/email/messages/eml_01HW3K4N9V5G6Z8C2Q7B1Y0M3F/attachments/0 \\\n -H \"Authorization: Bearer $WSPC_API_KEY\" \\\n -o invoice.pdf"
17959
+ },
17960
+ {
17961
+ "lang": "bash",
17962
+ "label": "wspc CLI",
17963
+ "source": "wspc email attachment eml_01HW3K4N9V5G6Z8C2Q7B1Y0M3F 0 --output invoice.pdf"
17964
+ }
17965
+ ],
17966
+ "responses": {
17967
+ "200": {
17968
+ "description": "Raw attachment bytes. `Content-Type` matches the attachment's parsed MIME (often `application/pdf`, `image/jpeg`, `text/calendar`, or `application/octet-stream` when unknown). `Content-Disposition: attachment; filename=\"<filename>\"`.",
17969
+ "headers": {
17970
+ "x-consistency-bookmark": {
17971
+ "description": "Opaque consistency bookmark for the latest email database position observed by this request. Store and send it on the next email request to continue read-after-write consistency.",
17972
+ "schema": {
17973
+ "type": "string"
17974
+ }
17975
+ }
17976
+ },
17977
+ "content": {
17978
+ "application/octet-stream": {
17979
+ "schema": {
17980
+ "type": "string"
17981
+ }
17982
+ }
17983
+ }
17984
+ },
17985
+ "401": {
17986
+ "description": "Authentication is required but missing or invalid. The Bearer token (API key or OAuth access token) was absent, malformed, or rejected.",
17987
+ "content": {
17988
+ "application/json": {
17989
+ "schema": {
17990
+ "type": "object",
17991
+ "properties": {
17992
+ "error": {
17993
+ "type": "object",
17994
+ "properties": {
17995
+ "code": {
17996
+ "type": "string"
17997
+ },
17998
+ "message": {
17999
+ "type": "string"
18000
+ },
18001
+ "extra": {
18002
+ "type": "object",
18003
+ "additionalProperties": {}
18004
+ }
18005
+ },
18006
+ "required": [
18007
+ "code",
18008
+ "message"
18009
+ ]
18010
+ }
18011
+ },
18012
+ "required": [
18013
+ "error"
18014
+ ]
18015
+ },
18016
+ "examples": {
18017
+ "authRequired": {
18018
+ "summary": "Missing Authorization header",
18019
+ "value": {
18020
+ "error": {
18021
+ "code": "AUTH_REQUIRED",
18022
+ "message": "missing bearer token"
18023
+ }
18024
+ }
18025
+ }
18026
+ }
18027
+ }
18028
+ }
18029
+ },
18030
+ "404": {
18031
+ "description": "Either the parent email is unknown / soft-deleted (`EMAIL_NOT_FOUND`) or `idx` is out of range (`ATTACHMENT_NOT_FOUND`).",
17139
18032
  "content": {
17140
18033
  "application/json": {
17141
18034
  "schema": {
@@ -17278,6 +18171,46 @@
17278
18171
  "bearerAuth": []
17279
18172
  }
17280
18173
  ],
18174
+ "parameters": [
18175
+ {
18176
+ "name": "x-consistency-bookmark",
18177
+ "in": "header",
18178
+ "required": false,
18179
+ "description": "Optional opaque consistency bookmark returned by a previous email response. Send it back unchanged to continue read-after-write consistency for email D1 data.",
18180
+ "schema": {
18181
+ "type": "string"
18182
+ },
18183
+ "example": "opaque-consistency-bookmark"
18184
+ },
18185
+ {
18186
+ "schema": {
18187
+ "type": "string"
18188
+ },
18189
+ "required": true,
18190
+ "name": "id",
18191
+ "in": "path"
18192
+ },
18193
+ {
18194
+ "schema": {
18195
+ "type": "string",
18196
+ "description": "When `true`, fetch the HTML body from R2 and include it as `html_body` in the response. Costs an extra R2 read; omit if you only need text."
18197
+ },
18198
+ "required": false,
18199
+ "description": "When `true`, fetch the HTML body from R2 and include it as `html_body` in the response. Costs an extra R2 read; omit if you only need text.",
18200
+ "name": "include_html",
18201
+ "in": "query"
18202
+ },
18203
+ {
18204
+ "schema": {
18205
+ "type": "string",
18206
+ "description": "When `true`, allow fetching a soft-deleted email. Defaults to `false` (returns 404 for soft-deleted rows)."
18207
+ },
18208
+ "required": false,
18209
+ "description": "When `true`, allow fetching a soft-deleted email. Defaults to `false` (returns 404 for soft-deleted rows).",
18210
+ "name": "include_deleted",
18211
+ "in": "query"
18212
+ }
18213
+ ],
17281
18214
  "x-cli": {
17282
18215
  "command": "email show",
17283
18216
  "positional": [
@@ -17310,39 +18243,17 @@
17310
18243
  "source": "wspc email show eml_01HW3K4N9V5G6Z8C2Q7B1Y0M3F"
17311
18244
  }
17312
18245
  ],
17313
- "parameters": [
17314
- {
17315
- "schema": {
17316
- "type": "string"
17317
- },
17318
- "required": true,
17319
- "name": "id",
17320
- "in": "path"
17321
- },
17322
- {
17323
- "schema": {
17324
- "type": "string",
17325
- "description": "When `true`, fetch the HTML body from R2 and include it as `html_body` in the response. Costs an extra R2 read; omit if you only need text."
17326
- },
17327
- "required": false,
17328
- "description": "When `true`, fetch the HTML body from R2 and include it as `html_body` in the response. Costs an extra R2 read; omit if you only need text.",
17329
- "name": "include_html",
17330
- "in": "query"
17331
- },
17332
- {
17333
- "schema": {
17334
- "type": "string",
17335
- "description": "When `true`, allow fetching a soft-deleted email. Defaults to `false` (returns 404 for soft-deleted rows)."
17336
- },
17337
- "required": false,
17338
- "description": "When `true`, allow fetching a soft-deleted email. Defaults to `false` (returns 404 for soft-deleted rows).",
17339
- "name": "include_deleted",
17340
- "in": "query"
17341
- }
17342
- ],
17343
18246
  "responses": {
17344
18247
  "200": {
17345
18248
  "description": "The email row, attachment metadata, and (when requested) the HTML body.",
18249
+ "headers": {
18250
+ "x-consistency-bookmark": {
18251
+ "description": "Opaque consistency bookmark for the latest email database position observed by this request. Store and send it on the next email request to continue read-after-write consistency.",
18252
+ "schema": {
18253
+ "type": "string"
18254
+ }
18255
+ }
18256
+ },
17346
18257
  "content": {
17347
18258
  "application/json": {
17348
18259
  "schema": {
@@ -17790,40 +18701,17 @@
17790
18701
  "bearerAuth": []
17791
18702
  }
17792
18703
  ],
17793
- "x-cli": {
17794
- "command": "email ls",
17795
- "display": {
17796
- "shape": "list",
17797
- "columns": [
17798
- "id",
17799
- "from_addr",
17800
- "subject",
17801
- "is_read",
17802
- "received_at"
17803
- ],
17804
- "format": {
17805
- "id": "id-short",
17806
- "from_addr": "truncate",
17807
- "subject": "truncate",
17808
- "is_read": "bool-badge",
17809
- "received_at": "relative-time"
17810
- },
17811
- "emptyMessage": "no emails"
17812
- }
17813
- },
17814
- "x-codeSamples": [
18704
+ "parameters": [
17815
18705
  {
17816
- "lang": "shell",
17817
- "label": "curl",
17818
- "source": "curl -G https://api.wspc.ai/email/messages \\\n -H \"Authorization: Bearer $WSPC_API_KEY\" \\\n --data-urlencode \"limit=20\" --data-urlencode \"unread_only=true\""
18706
+ "name": "x-consistency-bookmark",
18707
+ "in": "header",
18708
+ "required": false,
18709
+ "description": "Optional opaque consistency bookmark returned by a previous email response. Send it back unchanged to continue read-after-write consistency for email D1 data.",
18710
+ "schema": {
18711
+ "type": "string"
18712
+ },
18713
+ "example": "opaque-consistency-bookmark"
17819
18714
  },
17820
- {
17821
- "lang": "bash",
17822
- "label": "wspc CLI",
17823
- "source": "wspc email ls --unread --limit 20"
17824
- }
17825
- ],
17826
- "parameters": [
17827
18715
  {
17828
18716
  "schema": {
17829
18717
  "type": "string",
@@ -17886,9 +18774,50 @@
17886
18774
  "in": "query"
17887
18775
  }
17888
18776
  ],
18777
+ "x-cli": {
18778
+ "command": "email ls",
18779
+ "display": {
18780
+ "shape": "list",
18781
+ "columns": [
18782
+ "id",
18783
+ "from_addr",
18784
+ "subject",
18785
+ "is_read",
18786
+ "received_at"
18787
+ ],
18788
+ "format": {
18789
+ "id": "id-short",
18790
+ "from_addr": "truncate",
18791
+ "subject": "truncate",
18792
+ "is_read": "bool-badge",
18793
+ "received_at": "relative-time"
18794
+ },
18795
+ "emptyMessage": "no emails"
18796
+ }
18797
+ },
18798
+ "x-codeSamples": [
18799
+ {
18800
+ "lang": "shell",
18801
+ "label": "curl",
18802
+ "source": "curl -G https://api.wspc.ai/email/messages \\\n -H \"Authorization: Bearer $WSPC_API_KEY\" \\\n --data-urlencode \"limit=20\" --data-urlencode \"unread_only=true\""
18803
+ },
18804
+ {
18805
+ "lang": "bash",
18806
+ "label": "wspc CLI",
18807
+ "source": "wspc email ls --unread --limit 20"
18808
+ }
18809
+ ],
17889
18810
  "responses": {
17890
18811
  "200": {
17891
18812
  "description": "A page of inbound emails. `next_cursor` is present iff there is another page; pass it back as `cursor` to continue.",
18813
+ "headers": {
18814
+ "x-consistency-bookmark": {
18815
+ "description": "Opaque consistency bookmark for the latest email database position observed by this request. Store and send it on the next email request to continue read-after-write consistency.",
18816
+ "schema": {
18817
+ "type": "string"
18818
+ }
18819
+ }
18820
+ },
17892
18821
  "content": {
17893
18822
  "application/json": {
17894
18823
  "schema": {
@@ -19270,6 +20199,18 @@
19270
20199
  "bearerAuth": []
19271
20200
  }
19272
20201
  ],
20202
+ "parameters": [
20203
+ {
20204
+ "name": "x-consistency-bookmark",
20205
+ "in": "header",
20206
+ "required": false,
20207
+ "description": "Optional opaque consistency bookmark returned by a previous email response. Send it back unchanged to continue read-after-write consistency for email D1 data.",
20208
+ "schema": {
20209
+ "type": "string"
20210
+ },
20211
+ "example": "opaque-consistency-bookmark"
20212
+ }
20213
+ ],
19273
20214
  "x-cli": {
19274
20215
  "command": "_handwritten",
19275
20216
  "hidden": true
@@ -19335,6 +20276,14 @@
19335
20276
  "responses": {
19336
20277
  "200": {
19337
20278
  "description": "The send was accepted. Response `email.id` uses `out_<ULID>` for new outbound rows; legacy UUID ids remain accepted. Inspect `idempotent_replay`: `false` means the provider was invoked on this request, `true` means an earlier identical send was replayed.",
20279
+ "headers": {
20280
+ "x-consistency-bookmark": {
20281
+ "description": "Opaque consistency bookmark for the latest email database position observed by this request. Store and send it on the next email request to continue read-after-write consistency.",
20282
+ "schema": {
20283
+ "type": "string"
20284
+ }
20285
+ }
20286
+ },
19338
20287
  "content": {
19339
20288
  "application/json": {
19340
20289
  "schema": {
@@ -20056,6 +21005,28 @@
20056
21005
  "bearerAuth": []
20057
21006
  }
20058
21007
  ],
21008
+ "parameters": [
21009
+ {
21010
+ "name": "x-consistency-bookmark",
21011
+ "in": "header",
21012
+ "required": false,
21013
+ "schema": {
21014
+ "type": "string"
21015
+ },
21016
+ "description": "Optional opaque consistency bookmark returned by a previous push response. Send it back unchanged to continue read-after-write consistency.",
21017
+ "example": "opaque-consistency-bookmark"
21018
+ },
21019
+ {
21020
+ "schema": {
21021
+ "type": "string",
21022
+ "description": "Transport name to delete (e.g. `telegram`). Only transports the caller has previously registered exist; unknown values return 400 `UNKNOWN_TRANSPORT`."
21023
+ },
21024
+ "required": true,
21025
+ "description": "Transport name to delete (e.g. `telegram`). Only transports the caller has previously registered exist; unknown values return 400 `UNKNOWN_TRANSPORT`.",
21026
+ "name": "transport",
21027
+ "in": "path"
21028
+ }
21029
+ ],
20059
21030
  "x-codeSamples": [
20060
21031
  {
20061
21032
  "lang": "shell",
@@ -20074,21 +21045,17 @@
20074
21045
  "transport"
20075
21046
  ]
20076
21047
  },
20077
- "parameters": [
20078
- {
20079
- "schema": {
20080
- "type": "string",
20081
- "description": "Transport name to delete (e.g. `telegram`). Only transports the caller has previously registered exist; unknown values return 400 `UNKNOWN_TRANSPORT`."
20082
- },
20083
- "required": true,
20084
- "description": "Transport name to delete (e.g. `telegram`). Only transports the caller has previously registered exist; unknown values return 400 `UNKNOWN_TRANSPORT`.",
20085
- "name": "transport",
20086
- "in": "path"
20087
- }
20088
- ],
20089
21048
  "responses": {
20090
21049
  "204": {
20091
- "description": "Config deleted (or no config existed — the call is idempotent)."
21050
+ "description": "Config deleted (or no config existed — the call is idempotent).",
21051
+ "headers": {
21052
+ "x-consistency-bookmark": {
21053
+ "description": "Opaque consistency bookmark for the latest push database position observed by this request. Store and send it on the next push request to continue read-after-write consistency.",
21054
+ "schema": {
21055
+ "type": "string"
21056
+ }
21057
+ }
21058
+ }
20092
21059
  },
20093
21060
  "400": {
20094
21061
  "description": "`transport` is not a value wspc supports.",
@@ -20324,6 +21291,18 @@
20324
21291
  "bearerAuth": []
20325
21292
  }
20326
21293
  ],
21294
+ "parameters": [
21295
+ {
21296
+ "name": "x-consistency-bookmark",
21297
+ "in": "header",
21298
+ "required": false,
21299
+ "schema": {
21300
+ "type": "string"
21301
+ },
21302
+ "description": "Optional opaque consistency bookmark returned by a previous push response. Send it back unchanged to continue read-after-write consistency.",
21303
+ "example": "opaque-consistency-bookmark"
21304
+ }
21305
+ ],
20327
21306
  "x-codeSamples": [
20328
21307
  {
20329
21308
  "lang": "shell",
@@ -20376,6 +21355,14 @@
20376
21355
  "responses": {
20377
21356
  "201": {
20378
21357
  "description": "Config stored. The transport is now eligible to receive product notifications for this user.",
21358
+ "headers": {
21359
+ "x-consistency-bookmark": {
21360
+ "description": "Opaque consistency bookmark for the latest push database position observed by this request. Store and send it on the next push request to continue read-after-write consistency.",
21361
+ "schema": {
21362
+ "type": "string"
21363
+ }
21364
+ }
21365
+ },
20379
21366
  "content": {
20380
21367
  "application/json": {
20381
21368
  "schema": {
@@ -20635,6 +21622,18 @@
20635
21622
  "bearerAuth": []
20636
21623
  }
20637
21624
  ],
21625
+ "parameters": [
21626
+ {
21627
+ "name": "x-consistency-bookmark",
21628
+ "in": "header",
21629
+ "required": false,
21630
+ "schema": {
21631
+ "type": "string"
21632
+ },
21633
+ "description": "Optional opaque consistency bookmark returned by a previous push response. Send it back unchanged to continue read-after-write consistency.",
21634
+ "example": "opaque-consistency-bookmark"
21635
+ }
21636
+ ],
20638
21637
  "x-codeSamples": [
20639
21638
  {
20640
21639
  "lang": "shell",
@@ -20685,6 +21684,14 @@
20685
21684
  "responses": {
20686
21685
  "200": {
20687
21686
  "description": "All push transports registered for the authenticated user.",
21687
+ "headers": {
21688
+ "x-consistency-bookmark": {
21689
+ "description": "Opaque consistency bookmark for the latest push database position observed by this request. Store and send it on the next push request to continue read-after-write consistency.",
21690
+ "schema": {
21691
+ "type": "string"
21692
+ }
21693
+ }
21694
+ },
20688
21695
  "content": {
20689
21696
  "application/json": {
20690
21697
  "schema": {
@@ -20920,6 +21927,18 @@
20920
21927
  "bearerAuth": []
20921
21928
  }
20922
21929
  ],
21930
+ "parameters": [
21931
+ {
21932
+ "name": "x-consistency-bookmark",
21933
+ "in": "header",
21934
+ "required": false,
21935
+ "schema": {
21936
+ "type": "string"
21937
+ },
21938
+ "description": "Optional opaque consistency bookmark returned by a previous push response. Send it back unchanged to continue read-after-write consistency.",
21939
+ "example": "opaque-consistency-bookmark"
21940
+ }
21941
+ ],
20923
21942
  "x-codeSamples": [
20924
21943
  {
20925
21944
  "lang": "shell",
@@ -20972,6 +21991,14 @@
20972
21991
  "responses": {
20973
21992
  "200": {
20974
21993
  "description": "Test attempted. Inspect `ok` to discriminate success from a transport-layer failure (network, upstream 4xx/5xx).",
21994
+ "headers": {
21995
+ "x-consistency-bookmark": {
21996
+ "description": "Opaque consistency bookmark for the latest push database position observed by this request. Store and send it on the next push request to continue read-after-write consistency.",
21997
+ "schema": {
21998
+ "type": "string"
21999
+ }
22000
+ }
22001
+ },
20975
22002
  "content": {
20976
22003
  "application/json": {
20977
22004
  "schema": {
@@ -21257,22 +22284,20 @@
21257
22284
  "description": "### 🎯 Overview & Purpose\nAttach a free-text comment to a todo. Use this to record progress updates, notes, or remarks as a task moves along.\n\n### 💡 Key Features & Constraints\n* **Free text**: Comments are plain text up to 10000 characters; there is no separate \"progress\" vs \"remark\" type.\n* **Authorship**: The author is recorded as the calling user (`user_id`).\n\n### ⚠️ Common Errors & Troubleshooting\n* **`NOT_FOUND` (HTTP 404)**: Thrown if the target todo does not exist or is soft-deleted.\n* **`VALIDATION_ERROR` (HTTP 400)**: Thrown if content is empty or exceeds 10000 characters.",
21258
22285
  "security": [
21259
22286
  {
21260
- "bearerAuth": []
21261
- }
21262
- ],
21263
- "x-codeSamples": [
21264
- {
21265
- "lang": "shell",
21266
- "label": "curl",
21267
- "source": "curl -X POST https://api.wspc.ai/todo/items/tod_01HW3K/comments -H \"Authorization: Bearer $WSPC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"content\":\"Looks good\"}'"
21268
- },
21269
- {
21270
- "lang": "bash",
21271
- "label": "wspc CLI",
21272
- "source": "wspc todo comment add tod_01HW3K \"Looks good\""
22287
+ "bearerAuth": []
21273
22288
  }
21274
22289
  ],
21275
22290
  "parameters": [
22291
+ {
22292
+ "name": "x-consistency-bookmark",
22293
+ "in": "header",
22294
+ "required": false,
22295
+ "description": "Optional opaque consistency bookmark returned by a previous todo response. Send it back unchanged to continue read-after-write consistency.",
22296
+ "schema": {
22297
+ "type": "string"
22298
+ },
22299
+ "example": "opaque-consistency-bookmark"
22300
+ },
21276
22301
  {
21277
22302
  "schema": {
21278
22303
  "type": "string",
@@ -21285,6 +22310,18 @@
21285
22310
  "in": "path"
21286
22311
  }
21287
22312
  ],
22313
+ "x-codeSamples": [
22314
+ {
22315
+ "lang": "shell",
22316
+ "label": "curl",
22317
+ "source": "curl -X POST https://api.wspc.ai/todo/items/tod_01HW3K/comments -H \"Authorization: Bearer $WSPC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"content\":\"Looks good\"}'"
22318
+ },
22319
+ {
22320
+ "lang": "bash",
22321
+ "label": "wspc CLI",
22322
+ "source": "wspc todo comment add tod_01HW3K \"Looks good\""
22323
+ }
22324
+ ],
21288
22325
  "requestBody": {
21289
22326
  "content": {
21290
22327
  "application/json": {
@@ -21305,6 +22342,14 @@
21305
22342
  "responses": {
21306
22343
  "201": {
21307
22344
  "description": "Created",
22345
+ "headers": {
22346
+ "x-consistency-bookmark": {
22347
+ "description": "Opaque consistency bookmark for the latest todo database position observed by this request. Store and send it on the next todo request to continue read-after-write consistency.",
22348
+ "schema": {
22349
+ "type": "string"
22350
+ }
22351
+ }
22352
+ },
21308
22353
  "content": {
21309
22354
  "application/json": {
21310
22355
  "schema": {
@@ -21684,19 +22729,17 @@
21684
22729
  "bearerAuth": []
21685
22730
  }
21686
22731
  ],
21687
- "x-codeSamples": [
22732
+ "parameters": [
21688
22733
  {
21689
- "lang": "shell",
21690
- "label": "curl",
21691
- "source": "curl https://api.wspc.ai/todo/items/tod_01HW3K/comments -H \"Authorization: Bearer $WSPC_API_KEY\""
22734
+ "name": "x-consistency-bookmark",
22735
+ "in": "header",
22736
+ "required": false,
22737
+ "description": "Optional opaque consistency bookmark returned by a previous todo response. Send it back unchanged to continue read-after-write consistency.",
22738
+ "schema": {
22739
+ "type": "string"
22740
+ },
22741
+ "example": "opaque-consistency-bookmark"
21692
22742
  },
21693
- {
21694
- "lang": "bash",
21695
- "label": "wspc CLI",
21696
- "source": "wspc todo comment ls tod_01HW3K"
21697
- }
21698
- ],
21699
- "parameters": [
21700
22743
  {
21701
22744
  "schema": {
21702
22745
  "type": "string",
@@ -21749,9 +22792,29 @@
21749
22792
  "in": "query"
21750
22793
  }
21751
22794
  ],
22795
+ "x-codeSamples": [
22796
+ {
22797
+ "lang": "shell",
22798
+ "label": "curl",
22799
+ "source": "curl https://api.wspc.ai/todo/items/tod_01HW3K/comments -H \"Authorization: Bearer $WSPC_API_KEY\""
22800
+ },
22801
+ {
22802
+ "lang": "bash",
22803
+ "label": "wspc CLI",
22804
+ "source": "wspc todo comment ls tod_01HW3K"
22805
+ }
22806
+ ],
21752
22807
  "responses": {
21753
22808
  "200": {
21754
22809
  "description": "List",
22810
+ "headers": {
22811
+ "x-consistency-bookmark": {
22812
+ "description": "Opaque consistency bookmark for the latest todo database position observed by this request. Store and send it on the next todo request to continue read-after-write consistency.",
22813
+ "schema": {
22814
+ "type": "string"
22815
+ }
22816
+ }
22817
+ },
21755
22818
  "content": {
21756
22819
  "application/json": {
21757
22820
  "schema": {
@@ -22154,6 +23217,18 @@
22154
23217
  "bearerAuth": []
22155
23218
  }
22156
23219
  ],
23220
+ "parameters": [
23221
+ {
23222
+ "name": "x-consistency-bookmark",
23223
+ "in": "header",
23224
+ "required": false,
23225
+ "description": "Optional opaque consistency bookmark returned by a previous todo response. Send it back unchanged to continue read-after-write consistency.",
23226
+ "schema": {
23227
+ "type": "string"
23228
+ },
23229
+ "example": "opaque-consistency-bookmark"
23230
+ }
23231
+ ],
22157
23232
  "x-codeSamples": [
22158
23233
  {
22159
23234
  "lang": "shell",
@@ -22193,6 +23268,14 @@
22193
23268
  "responses": {
22194
23269
  "201": {
22195
23270
  "description": "Created",
23271
+ "headers": {
23272
+ "x-consistency-bookmark": {
23273
+ "description": "Opaque consistency bookmark for the latest todo database position observed by this request. Store and send it on the next todo request to continue read-after-write consistency.",
23274
+ "schema": {
23275
+ "type": "string"
23276
+ }
23277
+ }
23278
+ },
22196
23279
  "content": {
22197
23280
  "application/json": {
22198
23281
  "schema": {
@@ -22573,19 +23656,17 @@
22573
23656
  "bearerAuth": []
22574
23657
  }
22575
23658
  ],
22576
- "x-codeSamples": [
23659
+ "parameters": [
22577
23660
  {
22578
- "lang": "shell",
22579
- "label": "curl",
22580
- "source": "curl https://api.wspc.ai/todo/projects -H \"Authorization: Bearer $WSPC_API_KEY\""
23661
+ "name": "x-consistency-bookmark",
23662
+ "in": "header",
23663
+ "required": false,
23664
+ "description": "Optional opaque consistency bookmark returned by a previous todo response. Send it back unchanged to continue read-after-write consistency.",
23665
+ "schema": {
23666
+ "type": "string"
23667
+ },
23668
+ "example": "opaque-consistency-bookmark"
22581
23669
  },
22582
- {
22583
- "lang": "bash",
22584
- "label": "wspc CLI",
22585
- "source": "wspc project ls"
22586
- }
22587
- ],
22588
- "parameters": [
22589
23670
  {
22590
23671
  "schema": {
22591
23672
  "type": "string",
@@ -22598,9 +23679,29 @@
22598
23679
  "in": "query"
22599
23680
  }
22600
23681
  ],
23682
+ "x-codeSamples": [
23683
+ {
23684
+ "lang": "shell",
23685
+ "label": "curl",
23686
+ "source": "curl https://api.wspc.ai/todo/projects -H \"Authorization: Bearer $WSPC_API_KEY\""
23687
+ },
23688
+ {
23689
+ "lang": "bash",
23690
+ "label": "wspc CLI",
23691
+ "source": "wspc project ls"
23692
+ }
23693
+ ],
22601
23694
  "responses": {
22602
23695
  "200": {
22603
23696
  "description": "List",
23697
+ "headers": {
23698
+ "x-consistency-bookmark": {
23699
+ "description": "Opaque consistency bookmark for the latest todo database position observed by this request. Store and send it on the next todo request to continue read-after-write consistency.",
23700
+ "schema": {
23701
+ "type": "string"
23702
+ }
23703
+ }
23704
+ },
22604
23705
  "content": {
22605
23706
  "application/json": {
22606
23707
  "schema": {
@@ -23020,6 +24121,18 @@
23020
24121
  "bearerAuth": []
23021
24122
  }
23022
24123
  ],
24124
+ "parameters": [
24125
+ {
24126
+ "name": "x-consistency-bookmark",
24127
+ "in": "header",
24128
+ "required": false,
24129
+ "description": "Optional opaque consistency bookmark returned by a previous todo response. Send it back unchanged to continue read-after-write consistency.",
24130
+ "schema": {
24131
+ "type": "string"
24132
+ },
24133
+ "example": "opaque-consistency-bookmark"
24134
+ }
24135
+ ],
23023
24136
  "x-codeSamples": [
23024
24137
  {
23025
24138
  "lang": "shell",
@@ -23066,6 +24179,14 @@
23066
24179
  "responses": {
23067
24180
  "201": {
23068
24181
  "description": "The rule was created. `materialized_instance_count` reports how many todo instances were materialized immediately within the 14-day horizon.",
24182
+ "headers": {
24183
+ "x-consistency-bookmark": {
24184
+ "description": "Opaque consistency bookmark for the latest todo database position observed by this request. Store and send it on the next todo request to continue read-after-write consistency.",
24185
+ "schema": {
24186
+ "type": "string"
24187
+ }
24188
+ }
24189
+ },
23069
24190
  "content": {
23070
24191
  "application/json": {
23071
24192
  "schema": {
@@ -23451,19 +24572,17 @@
23451
24572
  "bearerAuth": []
23452
24573
  }
23453
24574
  ],
23454
- "x-codeSamples": [
24575
+ "parameters": [
23455
24576
  {
23456
- "lang": "shell",
23457
- "label": "curl",
23458
- "source": "curl https://api.wspc.ai/todo/recurrence-rules \\\n -H \"Authorization: Bearer $WSPC_API_KEY\""
24577
+ "name": "x-consistency-bookmark",
24578
+ "in": "header",
24579
+ "required": false,
24580
+ "description": "Optional opaque consistency bookmark returned by a previous todo response. Send it back unchanged to continue read-after-write consistency.",
24581
+ "schema": {
24582
+ "type": "string"
24583
+ },
24584
+ "example": "opaque-consistency-bookmark"
23459
24585
  },
23460
- {
23461
- "lang": "bash",
23462
- "label": "wspc CLI",
23463
- "source": "wspc todo rule ls"
23464
- }
23465
- ],
23466
- "parameters": [
23467
24586
  {
23468
24587
  "schema": {
23469
24588
  "type": "string",
@@ -23484,9 +24603,29 @@
23484
24603
  "in": "query"
23485
24604
  }
23486
24605
  ],
24606
+ "x-codeSamples": [
24607
+ {
24608
+ "lang": "shell",
24609
+ "label": "curl",
24610
+ "source": "curl https://api.wspc.ai/todo/recurrence-rules \\\n -H \"Authorization: Bearer $WSPC_API_KEY\""
24611
+ },
24612
+ {
24613
+ "lang": "bash",
24614
+ "label": "wspc CLI",
24615
+ "source": "wspc todo rule ls"
24616
+ }
24617
+ ],
23487
24618
  "responses": {
23488
24619
  "200": {
23489
24620
  "description": "Active recurrence rules for the caller. Empty `rules` array when none are configured.",
24621
+ "headers": {
24622
+ "x-consistency-bookmark": {
24623
+ "description": "Opaque consistency bookmark for the latest todo database position observed by this request. Store and send it on the next todo request to continue read-after-write consistency.",
24624
+ "schema": {
24625
+ "type": "string"
24626
+ }
24627
+ }
24628
+ },
23490
24629
  "content": {
23491
24630
  "application/json": {
23492
24631
  "schema": {
@@ -23887,6 +25026,18 @@
23887
25026
  "bearerAuth": []
23888
25027
  }
23889
25028
  ],
25029
+ "parameters": [
25030
+ {
25031
+ "name": "x-consistency-bookmark",
25032
+ "in": "header",
25033
+ "required": false,
25034
+ "description": "Optional opaque consistency bookmark returned by a previous todo response. Send it back unchanged to continue read-after-write consistency.",
25035
+ "schema": {
25036
+ "type": "string"
25037
+ },
25038
+ "example": "opaque-consistency-bookmark"
25039
+ }
25040
+ ],
23890
25041
  "x-codeSamples": [
23891
25042
  {
23892
25043
  "lang": "shell",
@@ -23929,6 +25080,14 @@
23929
25080
  "responses": {
23930
25081
  "201": {
23931
25082
  "description": "The todo was created. The response carries the full row including server-assigned `id`, `version`, and `created_at`.",
25083
+ "headers": {
25084
+ "x-consistency-bookmark": {
25085
+ "description": "Opaque consistency bookmark for the latest todo database position observed by this request. Store and send it on the next todo request to continue read-after-write consistency.",
25086
+ "schema": {
25087
+ "type": "string"
25088
+ }
25089
+ }
25090
+ },
23932
25091
  "content": {
23933
25092
  "application/json": {
23934
25093
  "schema": {
@@ -24321,19 +25480,17 @@
24321
25480
  "bearerAuth": []
24322
25481
  }
24323
25482
  ],
24324
- "x-codeSamples": [
25483
+ "parameters": [
24325
25484
  {
24326
- "lang": "shell",
24327
- "label": "curl",
24328
- "source": "curl -G https://api.wspc.ai/todo/items \\\n -H \"Authorization: Bearer $WSPC_API_KEY\" \\\n --data-urlencode \"status=open\" \\\n --data-urlencode \"status=in_progress\""
25485
+ "name": "x-consistency-bookmark",
25486
+ "in": "header",
25487
+ "required": false,
25488
+ "description": "Optional opaque consistency bookmark returned by a previous todo response. Send it back unchanged to continue read-after-write consistency.",
25489
+ "schema": {
25490
+ "type": "string"
25491
+ },
25492
+ "example": "opaque-consistency-bookmark"
24329
25493
  },
24330
- {
24331
- "lang": "bash",
24332
- "label": "wspc CLI",
24333
- "source": "wspc todo ls --status open in_progress"
24334
- }
24335
- ],
24336
- "parameters": [
24337
25494
  {
24338
25495
  "schema": {
24339
25496
  "type": "string",
@@ -24500,9 +25657,29 @@
24500
25657
  "in": "query"
24501
25658
  }
24502
25659
  ],
25660
+ "x-codeSamples": [
25661
+ {
25662
+ "lang": "shell",
25663
+ "label": "curl",
25664
+ "source": "curl -G https://api.wspc.ai/todo/items \\\n -H \"Authorization: Bearer $WSPC_API_KEY\" \\\n --data-urlencode \"status=open\" \\\n --data-urlencode \"status=in_progress\""
25665
+ },
25666
+ {
25667
+ "lang": "bash",
25668
+ "label": "wspc CLI",
25669
+ "source": "wspc todo ls --status open in_progress"
25670
+ }
25671
+ ],
24503
25672
  "responses": {
24504
25673
  "200": {
24505
25674
  "description": "List of todos matching the filters. Empty `todos` array when nothing matches.",
25675
+ "headers": {
25676
+ "x-consistency-bookmark": {
25677
+ "description": "Opaque consistency bookmark for the latest todo database position observed by this request. Store and send it on the next todo request to continue read-after-write consistency.",
25678
+ "schema": {
25679
+ "type": "string"
25680
+ }
25681
+ }
25682
+ },
24506
25683
  "content": {
24507
25684
  "application/json": {
24508
25685
  "schema": {
@@ -24895,6 +26072,18 @@
24895
26072
  "bearerAuth": []
24896
26073
  }
24897
26074
  ],
26075
+ "parameters": [
26076
+ {
26077
+ "name": "x-consistency-bookmark",
26078
+ "in": "header",
26079
+ "required": false,
26080
+ "description": "Optional opaque consistency bookmark returned by a previous todo response. Send it back unchanged to continue read-after-write consistency.",
26081
+ "schema": {
26082
+ "type": "string"
26083
+ },
26084
+ "example": "opaque-consistency-bookmark"
26085
+ }
26086
+ ],
24898
26087
  "x-codeSamples": [
24899
26088
  {
24900
26089
  "lang": "shell",
@@ -24919,6 +26108,14 @@
24919
26108
  "responses": {
24920
26109
  "201": {
24921
26110
  "description": "Created",
26111
+ "headers": {
26112
+ "x-consistency-bookmark": {
26113
+ "description": "Opaque consistency bookmark for the latest todo database position observed by this request. Store and send it on the next todo request to continue read-after-write consistency.",
26114
+ "schema": {
26115
+ "type": "string"
26116
+ }
26117
+ }
26118
+ },
24922
26119
  "content": {
24923
26120
  "application/json": {
24924
26121
  "schema": {
@@ -25282,19 +26479,17 @@
25282
26479
  "bearerAuth": []
25283
26480
  }
25284
26481
  ],
25285
- "x-codeSamples": [
26482
+ "parameters": [
25286
26483
  {
25287
- "lang": "shell",
25288
- "label": "curl",
25289
- "source": "curl https://api.wspc.ai/todo/types -H \"Authorization: Bearer $WSPC_API_KEY\""
26484
+ "name": "x-consistency-bookmark",
26485
+ "in": "header",
26486
+ "required": false,
26487
+ "description": "Optional opaque consistency bookmark returned by a previous todo response. Send it back unchanged to continue read-after-write consistency.",
26488
+ "schema": {
26489
+ "type": "string"
26490
+ },
26491
+ "example": "opaque-consistency-bookmark"
25290
26492
  },
25291
- {
25292
- "lang": "bash",
25293
- "label": "wspc CLI",
25294
- "source": "wspc todo types ls"
25295
- }
25296
- ],
25297
- "parameters": [
25298
26493
  {
25299
26494
  "schema": {
25300
26495
  "type": "string",
@@ -25324,9 +26519,29 @@
25324
26519
  "in": "query"
25325
26520
  }
25326
26521
  ],
26522
+ "x-codeSamples": [
26523
+ {
26524
+ "lang": "shell",
26525
+ "label": "curl",
26526
+ "source": "curl https://api.wspc.ai/todo/types -H \"Authorization: Bearer $WSPC_API_KEY\""
26527
+ },
26528
+ {
26529
+ "lang": "bash",
26530
+ "label": "wspc CLI",
26531
+ "source": "wspc todo types ls"
26532
+ }
26533
+ ],
25327
26534
  "responses": {
25328
26535
  "200": {
25329
26536
  "description": "List",
26537
+ "headers": {
26538
+ "x-consistency-bookmark": {
26539
+ "description": "Opaque consistency bookmark for the latest todo database position observed by this request. Store and send it on the next todo request to continue read-after-write consistency.",
26540
+ "schema": {
26541
+ "type": "string"
26542
+ }
26543
+ }
26544
+ },
25330
26545
  "content": {
25331
26546
  "application/json": {
25332
26547
  "schema": {
@@ -25705,6 +26920,29 @@
25705
26920
  "bearerAuth": []
25706
26921
  }
25707
26922
  ],
26923
+ "parameters": [
26924
+ {
26925
+ "name": "x-consistency-bookmark",
26926
+ "in": "header",
26927
+ "required": false,
26928
+ "description": "Optional opaque consistency bookmark returned by a previous todo response. Send it back unchanged to continue read-after-write consistency.",
26929
+ "schema": {
26930
+ "type": "string"
26931
+ },
26932
+ "example": "opaque-consistency-bookmark"
26933
+ },
26934
+ {
26935
+ "schema": {
26936
+ "type": "string",
26937
+ "description": "Comment id (`tdc_<ULID>`).",
26938
+ "example": "tdc_01HW3K4N9V5G6Z8C2Q7B1Y0M3F"
26939
+ },
26940
+ "required": true,
26941
+ "description": "Comment id (`tdc_<ULID>`).",
26942
+ "name": "id",
26943
+ "in": "path"
26944
+ }
26945
+ ],
25708
26946
  "x-codeSamples": [
25709
26947
  {
25710
26948
  "lang": "shell",
@@ -25717,22 +26955,17 @@
25717
26955
  "source": "wspc todo comment rm tdc_01HW3K"
25718
26956
  }
25719
26957
  ],
25720
- "parameters": [
25721
- {
25722
- "schema": {
25723
- "type": "string",
25724
- "description": "Comment id (`tdc_<ULID>`).",
25725
- "example": "tdc_01HW3K4N9V5G6Z8C2Q7B1Y0M3F"
25726
- },
25727
- "required": true,
25728
- "description": "Comment id (`tdc_<ULID>`).",
25729
- "name": "id",
25730
- "in": "path"
25731
- }
25732
- ],
25733
26958
  "responses": {
25734
26959
  "200": {
25735
26960
  "description": "Soft-deleted",
26961
+ "headers": {
26962
+ "x-consistency-bookmark": {
26963
+ "description": "Opaque consistency bookmark for the latest todo database position observed by this request. Store and send it on the next todo request to continue read-after-write consistency.",
26964
+ "schema": {
26965
+ "type": "string"
26966
+ }
26967
+ }
26968
+ },
25736
26969
  "content": {
25737
26970
  "application/json": {
25738
26971
  "schema": {
@@ -26114,19 +27347,17 @@
26114
27347
  "bearerAuth": []
26115
27348
  }
26116
27349
  ],
26117
- "x-codeSamples": [
27350
+ "parameters": [
26118
27351
  {
26119
- "lang": "shell",
26120
- "label": "curl",
26121
- "source": "curl -X PATCH https://api.wspc.ai/todo/comments/tdc_01HW3K -H \"Authorization: Bearer $WSPC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"content\":\"Edited\"}'"
27352
+ "name": "x-consistency-bookmark",
27353
+ "in": "header",
27354
+ "required": false,
27355
+ "description": "Optional opaque consistency bookmark returned by a previous todo response. Send it back unchanged to continue read-after-write consistency.",
27356
+ "schema": {
27357
+ "type": "string"
27358
+ },
27359
+ "example": "opaque-consistency-bookmark"
26122
27360
  },
26123
- {
26124
- "lang": "bash",
26125
- "label": "wspc CLI",
26126
- "source": "wspc todo comment edit tdc_01HW3K \"Edited\""
26127
- }
26128
- ],
26129
- "parameters": [
26130
27361
  {
26131
27362
  "schema": {
26132
27363
  "type": "string",
@@ -26139,6 +27370,18 @@
26139
27370
  "in": "path"
26140
27371
  }
26141
27372
  ],
27373
+ "x-codeSamples": [
27374
+ {
27375
+ "lang": "shell",
27376
+ "label": "curl",
27377
+ "source": "curl -X PATCH https://api.wspc.ai/todo/comments/tdc_01HW3K -H \"Authorization: Bearer $WSPC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"content\":\"Edited\"}'"
27378
+ },
27379
+ {
27380
+ "lang": "bash",
27381
+ "label": "wspc CLI",
27382
+ "source": "wspc todo comment edit tdc_01HW3K \"Edited\""
27383
+ }
27384
+ ],
26142
27385
  "requestBody": {
26143
27386
  "content": {
26144
27387
  "application/json": {
@@ -26159,6 +27402,14 @@
26159
27402
  "responses": {
26160
27403
  "200": {
26161
27404
  "description": "Updated",
27405
+ "headers": {
27406
+ "x-consistency-bookmark": {
27407
+ "description": "Opaque consistency bookmark for the latest todo database position observed by this request. Store and send it on the next todo request to continue read-after-write consistency.",
27408
+ "schema": {
27409
+ "type": "string"
27410
+ }
27411
+ }
27412
+ },
26162
27413
  "content": {
26163
27414
  "application/json": {
26164
27415
  "schema": {
@@ -26524,19 +27775,17 @@
26524
27775
  "bearerAuth": []
26525
27776
  }
26526
27777
  ],
26527
- "x-codeSamples": [
27778
+ "parameters": [
26528
27779
  {
26529
- "lang": "shell",
26530
- "label": "curl",
26531
- "source": "curl -X DELETE https://api.wspc.ai/todo/projects/prj_01HW3K -H \"Authorization: Bearer $WSPC_API_KEY\""
27780
+ "name": "x-consistency-bookmark",
27781
+ "in": "header",
27782
+ "required": false,
27783
+ "description": "Optional opaque consistency bookmark returned by a previous todo response. Send it back unchanged to continue read-after-write consistency.",
27784
+ "schema": {
27785
+ "type": "string"
27786
+ },
27787
+ "example": "opaque-consistency-bookmark"
26532
27788
  },
26533
- {
26534
- "lang": "bash",
26535
- "label": "wspc CLI",
26536
- "source": "wspc project rm prj_01HW3K"
26537
- }
26538
- ],
26539
- "parameters": [
26540
27789
  {
26541
27790
  "schema": {
26542
27791
  "type": "string",
@@ -26549,9 +27798,29 @@
26549
27798
  "in": "path"
26550
27799
  }
26551
27800
  ],
27801
+ "x-codeSamples": [
27802
+ {
27803
+ "lang": "shell",
27804
+ "label": "curl",
27805
+ "source": "curl -X DELETE https://api.wspc.ai/todo/projects/prj_01HW3K -H \"Authorization: Bearer $WSPC_API_KEY\""
27806
+ },
27807
+ {
27808
+ "lang": "bash",
27809
+ "label": "wspc CLI",
27810
+ "source": "wspc project rm prj_01HW3K"
27811
+ }
27812
+ ],
26552
27813
  "responses": {
26553
27814
  "200": {
26554
27815
  "description": "Soft-deleted",
27816
+ "headers": {
27817
+ "x-consistency-bookmark": {
27818
+ "description": "Opaque consistency bookmark for the latest todo database position observed by this request. Store and send it on the next todo request to continue read-after-write consistency.",
27819
+ "schema": {
27820
+ "type": "string"
27821
+ }
27822
+ }
27823
+ },
26555
27824
  "content": {
26556
27825
  "application/json": {
26557
27826
  "schema": {
@@ -26917,19 +28186,17 @@
26917
28186
  "bearerAuth": []
26918
28187
  }
26919
28188
  ],
26920
- "x-codeSamples": [
28189
+ "parameters": [
26921
28190
  {
26922
- "lang": "shell",
26923
- "label": "curl",
26924
- "source": "curl https://api.wspc.ai/todo/projects/prj_01HW3K -H \"Authorization: Bearer $WSPC_API_KEY\""
28191
+ "name": "x-consistency-bookmark",
28192
+ "in": "header",
28193
+ "required": false,
28194
+ "description": "Optional opaque consistency bookmark returned by a previous todo response. Send it back unchanged to continue read-after-write consistency.",
28195
+ "schema": {
28196
+ "type": "string"
28197
+ },
28198
+ "example": "opaque-consistency-bookmark"
26925
28199
  },
26926
- {
26927
- "lang": "bash",
26928
- "label": "wspc CLI",
26929
- "source": "wspc project show prj_01HW3K"
26930
- }
26931
- ],
26932
- "parameters": [
26933
28200
  {
26934
28201
  "schema": {
26935
28202
  "type": "string",
@@ -26942,9 +28209,29 @@
26942
28209
  "in": "path"
26943
28210
  }
26944
28211
  ],
28212
+ "x-codeSamples": [
28213
+ {
28214
+ "lang": "shell",
28215
+ "label": "curl",
28216
+ "source": "curl https://api.wspc.ai/todo/projects/prj_01HW3K -H \"Authorization: Bearer $WSPC_API_KEY\""
28217
+ },
28218
+ {
28219
+ "lang": "bash",
28220
+ "label": "wspc CLI",
28221
+ "source": "wspc project show prj_01HW3K"
28222
+ }
28223
+ ],
26945
28224
  "responses": {
26946
28225
  "200": {
26947
28226
  "description": "OK",
28227
+ "headers": {
28228
+ "x-consistency-bookmark": {
28229
+ "description": "Opaque consistency bookmark for the latest todo database position observed by this request. Store and send it on the next todo request to continue read-after-write consistency.",
28230
+ "schema": {
28231
+ "type": "string"
28232
+ }
28233
+ }
28234
+ },
26948
28235
  "content": {
26949
28236
  "application/json": {
26950
28237
  "schema": {
@@ -27309,19 +28596,17 @@
27309
28596
  "bearerAuth": []
27310
28597
  }
27311
28598
  ],
27312
- "x-codeSamples": [
28599
+ "parameters": [
27313
28600
  {
27314
- "lang": "shell",
27315
- "label": "curl",
27316
- "source": "curl -X PATCH https://api.wspc.ai/todo/projects/prj_01HW3K -H \"Authorization: Bearer $WSPC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"name\":\"Renamed\"}'"
28601
+ "name": "x-consistency-bookmark",
28602
+ "in": "header",
28603
+ "required": false,
28604
+ "description": "Optional opaque consistency bookmark returned by a previous todo response. Send it back unchanged to continue read-after-write consistency.",
28605
+ "schema": {
28606
+ "type": "string"
28607
+ },
28608
+ "example": "opaque-consistency-bookmark"
27317
28609
  },
27318
- {
27319
- "lang": "bash",
27320
- "label": "wspc CLI",
27321
- "source": "wspc project update prj_01HW3K --name \"Renamed\""
27322
- }
27323
- ],
27324
- "parameters": [
27325
28610
  {
27326
28611
  "schema": {
27327
28612
  "type": "string",
@@ -27334,6 +28619,18 @@
27334
28619
  "in": "path"
27335
28620
  }
27336
28621
  ],
28622
+ "x-codeSamples": [
28623
+ {
28624
+ "lang": "shell",
28625
+ "label": "curl",
28626
+ "source": "curl -X PATCH https://api.wspc.ai/todo/projects/prj_01HW3K -H \"Authorization: Bearer $WSPC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"name\":\"Renamed\"}'"
28627
+ },
28628
+ {
28629
+ "lang": "bash",
28630
+ "label": "wspc CLI",
28631
+ "source": "wspc project update prj_01HW3K --name \"Renamed\""
28632
+ }
28633
+ ],
27337
28634
  "requestBody": {
27338
28635
  "content": {
27339
28636
  "application/json": {
@@ -27367,6 +28664,14 @@
27367
28664
  "responses": {
27368
28665
  "200": {
27369
28666
  "description": "Updated",
28667
+ "headers": {
28668
+ "x-consistency-bookmark": {
28669
+ "description": "Opaque consistency bookmark for the latest todo database position observed by this request. Store and send it on the next todo request to continue read-after-write consistency.",
28670
+ "schema": {
28671
+ "type": "string"
28672
+ }
28673
+ }
28674
+ },
27370
28675
  "content": {
27371
28676
  "application/json": {
27372
28677
  "schema": {
@@ -27739,6 +29044,26 @@
27739
29044
  "bearerAuth": []
27740
29045
  }
27741
29046
  ],
29047
+ "parameters": [
29048
+ {
29049
+ "name": "x-consistency-bookmark",
29050
+ "in": "header",
29051
+ "required": false,
29052
+ "description": "Optional opaque consistency bookmark returned by a previous todo response. Send it back unchanged to continue read-after-write consistency.",
29053
+ "schema": {
29054
+ "type": "string"
29055
+ },
29056
+ "example": "opaque-consistency-bookmark"
29057
+ },
29058
+ {
29059
+ "schema": {
29060
+ "type": "string"
29061
+ },
29062
+ "required": true,
29063
+ "name": "id",
29064
+ "in": "path"
29065
+ }
29066
+ ],
27742
29067
  "x-codeSamples": [
27743
29068
  {
27744
29069
  "lang": "shell",
@@ -27751,16 +29076,6 @@
27751
29076
  "source": "wspc todo rule rm tdr_01HW3K4N9V5G6Z8C2Q7B1Y0M3F"
27752
29077
  }
27753
29078
  ],
27754
- "parameters": [
27755
- {
27756
- "schema": {
27757
- "type": "string"
27758
- },
27759
- "required": true,
27760
- "name": "id",
27761
- "in": "path"
27762
- }
27763
- ],
27764
29079
  "requestBody": {
27765
29080
  "content": {
27766
29081
  "application/json": {
@@ -27785,6 +29100,14 @@
27785
29100
  "responses": {
27786
29101
  "200": {
27787
29102
  "description": "The rule was soft-deleted; future materializations stop. Already-materialized todo instances remain on the user's list.",
29103
+ "headers": {
29104
+ "x-consistency-bookmark": {
29105
+ "description": "Opaque consistency bookmark for the latest todo database position observed by this request. Store and send it on the next todo request to continue read-after-write consistency.",
29106
+ "schema": {
29107
+ "type": "string"
29108
+ }
29109
+ }
29110
+ },
27788
29111
  "content": {
27789
29112
  "application/json": {
27790
29113
  "schema": {
@@ -28154,6 +29477,26 @@
28154
29477
  "bearerAuth": []
28155
29478
  }
28156
29479
  ],
29480
+ "parameters": [
29481
+ {
29482
+ "name": "x-consistency-bookmark",
29483
+ "in": "header",
29484
+ "required": false,
29485
+ "description": "Optional opaque consistency bookmark returned by a previous todo response. Send it back unchanged to continue read-after-write consistency.",
29486
+ "schema": {
29487
+ "type": "string"
29488
+ },
29489
+ "example": "opaque-consistency-bookmark"
29490
+ },
29491
+ {
29492
+ "schema": {
29493
+ "type": "string"
29494
+ },
29495
+ "required": true,
29496
+ "name": "id",
29497
+ "in": "path"
29498
+ }
29499
+ ],
28157
29500
  "x-codeSamples": [
28158
29501
  {
28159
29502
  "lang": "shell",
@@ -28166,19 +29509,17 @@
28166
29509
  "source": "wspc todo rule show tdr_01HW3K4N9V5G6Z8C2Q7B1Y0M3F"
28167
29510
  }
28168
29511
  ],
28169
- "parameters": [
28170
- {
28171
- "schema": {
28172
- "type": "string"
28173
- },
28174
- "required": true,
28175
- "name": "id",
28176
- "in": "path"
28177
- }
28178
- ],
28179
29512
  "responses": {
28180
29513
  "200": {
28181
29514
  "description": "The requested rule along with its template todo snapshot and the count of todo instances currently materialized from it.",
29515
+ "headers": {
29516
+ "x-consistency-bookmark": {
29517
+ "description": "Opaque consistency bookmark for the latest todo database position observed by this request. Store and send it on the next todo request to continue read-after-write consistency.",
29518
+ "schema": {
29519
+ "type": "string"
29520
+ }
29521
+ }
29522
+ },
28182
29523
  "content": {
28183
29524
  "application/json": {
28184
29525
  "schema": {
@@ -28558,6 +29899,26 @@
28558
29899
  "bearerAuth": []
28559
29900
  }
28560
29901
  ],
29902
+ "parameters": [
29903
+ {
29904
+ "name": "x-consistency-bookmark",
29905
+ "in": "header",
29906
+ "required": false,
29907
+ "description": "Optional opaque consistency bookmark returned by a previous todo response. Send it back unchanged to continue read-after-write consistency.",
29908
+ "schema": {
29909
+ "type": "string"
29910
+ },
29911
+ "example": "opaque-consistency-bookmark"
29912
+ },
29913
+ {
29914
+ "schema": {
29915
+ "type": "string"
29916
+ },
29917
+ "required": true,
29918
+ "name": "id",
29919
+ "in": "path"
29920
+ }
29921
+ ],
28561
29922
  "x-codeSamples": [
28562
29923
  {
28563
29924
  "lang": "shell",
@@ -28570,16 +29931,6 @@
28570
29931
  "source": "wspc todo rule set tdr_01HW3K4N9V5G6Z8C2Q7B1Y0M3F --rrule \"FREQ=WEEKLY;BYDAY=FR\""
28571
29932
  }
28572
29933
  ],
28573
- "parameters": [
28574
- {
28575
- "schema": {
28576
- "type": "string"
28577
- },
28578
- "required": true,
28579
- "name": "id",
28580
- "in": "path"
28581
- }
28582
- ],
28583
29934
  "requestBody": {
28584
29935
  "content": {
28585
29936
  "application/json": {
@@ -28611,6 +29962,14 @@
28611
29962
  "responses": {
28612
29963
  "200": {
28613
29964
  "description": "The rule was updated. Returns the post-update rule with a bumped `version` and refreshed `updated_at`. Future materializations follow the new schedule; existing instances are untouched.",
29965
+ "headers": {
29966
+ "x-consistency-bookmark": {
29967
+ "description": "Opaque consistency bookmark for the latest todo database position observed by this request. Store and send it on the next todo request to continue read-after-write consistency.",
29968
+ "schema": {
29969
+ "type": "string"
29970
+ }
29971
+ }
29972
+ },
28614
29973
  "content": {
28615
29974
  "application/json": {
28616
29975
  "schema": {
@@ -28994,7 +30353,27 @@
28994
30353
  "description": "### 🎯 Overview & Purpose\nSoft-delete a todo item so that it no longer appears in active list queries. The record remains in the database and can be recovered later.\n\n### 🔍 When to Use\n* Use this to hide an item from your active listings without permanently losing the history or metrics.\n\n### 💡 Key Features & Constraints\n* **Cascading Delete (`cascade`)**: If the target todo has active child subtasks:\n - If `cascade: false` (default), the deletion will fail and throw a `HAS_CHILDREN` error to prevent accidental orphaned tasks.\n - If `cascade: true`, the target todo and all its nested child subtasks will be soft-deleted together.\n* **Optimistic Locking**: You may optionally pass `expected_version` to ensure the todo has not been modified since you last read it.\n\n### ⚠️ Common Errors & Troubleshooting\n* **`HAS_CHILDREN` (HTTP 400)**: Thrown if you attempt to delete a parent todo that has active subtasks without explicitly setting `cascade: true`.\n* **`VERSION_CONFLICT` (HTTP 409)**: Thrown if `expected_version` is provided and mismatches the database.\n* **`NOT_FOUND` (HTTP 404)**: Thrown if the target todo `id` does not exist or has already been soft-deleted.",
28995
30354
  "security": [
28996
30355
  {
28997
- "bearerAuth": []
30356
+ "bearerAuth": []
30357
+ }
30358
+ ],
30359
+ "parameters": [
30360
+ {
30361
+ "name": "x-consistency-bookmark",
30362
+ "in": "header",
30363
+ "required": false,
30364
+ "description": "Optional opaque consistency bookmark returned by a previous todo response. Send it back unchanged to continue read-after-write consistency.",
30365
+ "schema": {
30366
+ "type": "string"
30367
+ },
30368
+ "example": "opaque-consistency-bookmark"
30369
+ },
30370
+ {
30371
+ "schema": {
30372
+ "type": "string"
30373
+ },
30374
+ "required": true,
30375
+ "name": "id",
30376
+ "in": "path"
28998
30377
  }
28999
30378
  ],
29000
30379
  "x-codeSamples": [
@@ -29009,16 +30388,6 @@
29009
30388
  "source": "wspc todo rm tod_01HW3K4N9V5G6Z8C2Q7B1Y0M3F --cascade"
29010
30389
  }
29011
30390
  ],
29012
- "parameters": [
29013
- {
29014
- "schema": {
29015
- "type": "string"
29016
- },
29017
- "required": true,
29018
- "name": "id",
29019
- "in": "path"
29020
- }
29021
- ],
29022
30391
  "requestBody": {
29023
30392
  "content": {
29024
30393
  "application/json": {
@@ -29044,6 +30413,14 @@
29044
30413
  "responses": {
29045
30414
  "200": {
29046
30415
  "description": "The todo was soft-deleted. `deleted_count` includes cascaded descendants when `cascade: true`.",
30416
+ "headers": {
30417
+ "x-consistency-bookmark": {
30418
+ "description": "Opaque consistency bookmark for the latest todo database position observed by this request. Store and send it on the next todo request to continue read-after-write consistency.",
30419
+ "schema": {
30420
+ "type": "string"
30421
+ }
30422
+ }
30423
+ },
29047
30424
  "content": {
29048
30425
  "application/json": {
29049
30426
  "schema": {
@@ -29432,19 +30809,17 @@
29432
30809
  "bearerAuth": []
29433
30810
  }
29434
30811
  ],
29435
- "x-codeSamples": [
30812
+ "parameters": [
29436
30813
  {
29437
- "lang": "shell",
29438
- "label": "curl",
29439
- "source": "curl https://api.wspc.ai/todo/items/tod_01HW3K4N9V5G6Z8C2Q7B1Y0M3F \\\n -H \"Authorization: Bearer $WSPC_API_KEY\""
30814
+ "name": "x-consistency-bookmark",
30815
+ "in": "header",
30816
+ "required": false,
30817
+ "description": "Optional opaque consistency bookmark returned by a previous todo response. Send it back unchanged to continue read-after-write consistency.",
30818
+ "schema": {
30819
+ "type": "string"
30820
+ },
30821
+ "example": "opaque-consistency-bookmark"
29440
30822
  },
29441
- {
29442
- "lang": "bash",
29443
- "label": "wspc CLI",
29444
- "source": "wspc todo show tod_01HW3K4N9V5G6Z8C2Q7B1Y0M3F"
29445
- }
29446
- ],
29447
- "parameters": [
29448
30823
  {
29449
30824
  "schema": {
29450
30825
  "type": "string"
@@ -29498,9 +30873,29 @@
29498
30873
  "in": "query"
29499
30874
  }
29500
30875
  ],
30876
+ "x-codeSamples": [
30877
+ {
30878
+ "lang": "shell",
30879
+ "label": "curl",
30880
+ "source": "curl https://api.wspc.ai/todo/items/tod_01HW3K4N9V5G6Z8C2Q7B1Y0M3F \\\n -H \"Authorization: Bearer $WSPC_API_KEY\""
30881
+ },
30882
+ {
30883
+ "lang": "bash",
30884
+ "label": "wspc CLI",
30885
+ "source": "wspc todo show tod_01HW3K4N9V5G6Z8C2Q7B1Y0M3F"
30886
+ }
30887
+ ],
29501
30888
  "responses": {
29502
30889
  "200": {
29503
30890
  "description": "The requested todo. Includes `children` (first-level) when `include=children`, `comments` when `include=comments`, and `deleted_at` only when fetched with `include_deleted=true` on a soft-deleted row.",
30891
+ "headers": {
30892
+ "x-consistency-bookmark": {
30893
+ "description": "Opaque consistency bookmark for the latest todo database position observed by this request. Store and send it on the next todo request to continue read-after-write consistency.",
30894
+ "schema": {
30895
+ "type": "string"
30896
+ }
30897
+ }
30898
+ },
29504
30899
  "content": {
29505
30900
  "application/json": {
29506
30901
  "schema": {
@@ -29917,6 +31312,26 @@
29917
31312
  "bearerAuth": []
29918
31313
  }
29919
31314
  ],
31315
+ "parameters": [
31316
+ {
31317
+ "name": "x-consistency-bookmark",
31318
+ "in": "header",
31319
+ "required": false,
31320
+ "description": "Optional opaque consistency bookmark returned by a previous todo response. Send it back unchanged to continue read-after-write consistency.",
31321
+ "schema": {
31322
+ "type": "string"
31323
+ },
31324
+ "example": "opaque-consistency-bookmark"
31325
+ },
31326
+ {
31327
+ "schema": {
31328
+ "type": "string"
31329
+ },
31330
+ "required": true,
31331
+ "name": "id",
31332
+ "in": "path"
31333
+ }
31334
+ ],
29920
31335
  "x-codeSamples": [
29921
31336
  {
29922
31337
  "lang": "shell",
@@ -29929,16 +31344,6 @@
29929
31344
  "source": "wspc todo done tod_01HW3K4N9V5G6Z8C2Q7B1Y0M3F"
29930
31345
  }
29931
31346
  ],
29932
- "parameters": [
29933
- {
29934
- "schema": {
29935
- "type": "string"
29936
- },
29937
- "required": true,
29938
- "name": "id",
29939
- "in": "path"
29940
- }
29941
- ],
29942
31347
  "requestBody": {
29943
31348
  "content": {
29944
31349
  "application/json": {
@@ -29976,6 +31381,14 @@
29976
31381
  "responses": {
29977
31382
  "200": {
29978
31383
  "description": "The todo was updated. The response carries the post-mutation row with the bumped `version` and refreshed `updated_at`.",
31384
+ "headers": {
31385
+ "x-consistency-bookmark": {
31386
+ "description": "Opaque consistency bookmark for the latest todo database position observed by this request. Store and send it on the next todo request to continue read-after-write consistency.",
31387
+ "schema": {
31388
+ "type": "string"
31389
+ }
31390
+ }
31391
+ },
29979
31392
  "content": {
29980
31393
  "application/json": {
29981
31394
  "schema": {
@@ -30346,6 +31759,26 @@
30346
31759
  "bearerAuth": []
30347
31760
  }
30348
31761
  ],
31762
+ "parameters": [
31763
+ {
31764
+ "name": "x-consistency-bookmark",
31765
+ "in": "header",
31766
+ "required": false,
31767
+ "description": "Optional opaque consistency bookmark returned by a previous todo response. Send it back unchanged to continue read-after-write consistency.",
31768
+ "schema": {
31769
+ "type": "string"
31770
+ },
31771
+ "example": "opaque-consistency-bookmark"
31772
+ },
31773
+ {
31774
+ "schema": {
31775
+ "type": "string"
31776
+ },
31777
+ "required": true,
31778
+ "name": "id",
31779
+ "in": "path"
31780
+ }
31781
+ ],
30349
31782
  "x-codeSamples": [
30350
31783
  {
30351
31784
  "lang": "shell",
@@ -30358,19 +31791,17 @@
30358
31791
  "source": "wspc todo types rm typ_01HW3K"
30359
31792
  }
30360
31793
  ],
30361
- "parameters": [
30362
- {
30363
- "schema": {
30364
- "type": "string"
30365
- },
30366
- "required": true,
30367
- "name": "id",
30368
- "in": "path"
30369
- }
30370
- ],
30371
31794
  "responses": {
30372
31795
  "200": {
30373
31796
  "description": "Soft-deleted",
31797
+ "headers": {
31798
+ "x-consistency-bookmark": {
31799
+ "description": "Opaque consistency bookmark for the latest todo database position observed by this request. Store and send it on the next todo request to continue read-after-write consistency.",
31800
+ "schema": {
31801
+ "type": "string"
31802
+ }
31803
+ }
31804
+ },
30374
31805
  "content": {
30375
31806
  "application/json": {
30376
31807
  "schema": {
@@ -30720,6 +32151,26 @@
30720
32151
  "bearerAuth": []
30721
32152
  }
30722
32153
  ],
32154
+ "parameters": [
32155
+ {
32156
+ "name": "x-consistency-bookmark",
32157
+ "in": "header",
32158
+ "required": false,
32159
+ "description": "Optional opaque consistency bookmark returned by a previous todo response. Send it back unchanged to continue read-after-write consistency.",
32160
+ "schema": {
32161
+ "type": "string"
32162
+ },
32163
+ "example": "opaque-consistency-bookmark"
32164
+ },
32165
+ {
32166
+ "schema": {
32167
+ "type": "string"
32168
+ },
32169
+ "required": true,
32170
+ "name": "id",
32171
+ "in": "path"
32172
+ }
32173
+ ],
30723
32174
  "x-codeSamples": [
30724
32175
  {
30725
32176
  "lang": "shell",
@@ -30732,19 +32183,17 @@
30732
32183
  "source": "wspc todo types show typ_01HW3K"
30733
32184
  }
30734
32185
  ],
30735
- "parameters": [
30736
- {
30737
- "schema": {
30738
- "type": "string"
30739
- },
30740
- "required": true,
30741
- "name": "id",
30742
- "in": "path"
30743
- }
30744
- ],
30745
32186
  "responses": {
30746
32187
  "200": {
30747
32188
  "description": "OK",
32189
+ "headers": {
32190
+ "x-consistency-bookmark": {
32191
+ "description": "Opaque consistency bookmark for the latest todo database position observed by this request. Store and send it on the next todo request to continue read-after-write consistency.",
32192
+ "schema": {
32193
+ "type": "string"
32194
+ }
32195
+ }
32196
+ },
30748
32197
  "content": {
30749
32198
  "application/json": {
30750
32199
  "schema": {
@@ -31094,6 +32543,26 @@
31094
32543
  "bearerAuth": []
31095
32544
  }
31096
32545
  ],
32546
+ "parameters": [
32547
+ {
32548
+ "name": "x-consistency-bookmark",
32549
+ "in": "header",
32550
+ "required": false,
32551
+ "description": "Optional opaque consistency bookmark returned by a previous todo response. Send it back unchanged to continue read-after-write consistency.",
32552
+ "schema": {
32553
+ "type": "string"
32554
+ },
32555
+ "example": "opaque-consistency-bookmark"
32556
+ },
32557
+ {
32558
+ "schema": {
32559
+ "type": "string"
32560
+ },
32561
+ "required": true,
32562
+ "name": "id",
32563
+ "in": "path"
32564
+ }
32565
+ ],
31097
32566
  "x-codeSamples": [
31098
32567
  {
31099
32568
  "lang": "shell",
@@ -31106,16 +32575,6 @@
31106
32575
  "source": "wspc todo types update typ_01HW3K --label \"Renamed\""
31107
32576
  }
31108
32577
  ],
31109
- "parameters": [
31110
- {
31111
- "schema": {
31112
- "type": "string"
31113
- },
31114
- "required": true,
31115
- "name": "id",
31116
- "in": "path"
31117
- }
31118
- ],
31119
32578
  "requestBody": {
31120
32579
  "content": {
31121
32580
  "application/json": {
@@ -31128,6 +32587,14 @@
31128
32587
  "responses": {
31129
32588
  "200": {
31130
32589
  "description": "Updated",
32590
+ "headers": {
32591
+ "x-consistency-bookmark": {
32592
+ "description": "Opaque consistency bookmark for the latest todo database position observed by this request. Store and send it on the next todo request to continue read-after-write consistency.",
32593
+ "schema": {
32594
+ "type": "string"
32595
+ }
32596
+ }
32597
+ },
31131
32598
  "content": {
31132
32599
  "application/json": {
31133
32600
  "schema": {
@@ -31479,14 +32946,17 @@
31479
32946
  "bearerAuth": []
31480
32947
  }
31481
32948
  ],
31482
- "x-codeSamples": [
31483
- {
31484
- "lang": "shell",
31485
- "label": "curl",
31486
- "source": "curl -X POST https://api.wspc.ai/todo/projects/prj_01HW3K/restore -H \"Authorization: Bearer $WSPC_API_KEY\""
31487
- }
31488
- ],
31489
32949
  "parameters": [
32950
+ {
32951
+ "name": "x-consistency-bookmark",
32952
+ "in": "header",
32953
+ "required": false,
32954
+ "description": "Optional opaque consistency bookmark returned by a previous todo response. Send it back unchanged to continue read-after-write consistency.",
32955
+ "schema": {
32956
+ "type": "string"
32957
+ },
32958
+ "example": "opaque-consistency-bookmark"
32959
+ },
31490
32960
  {
31491
32961
  "schema": {
31492
32962
  "type": "string",
@@ -31499,9 +32969,24 @@
31499
32969
  "in": "path"
31500
32970
  }
31501
32971
  ],
32972
+ "x-codeSamples": [
32973
+ {
32974
+ "lang": "shell",
32975
+ "label": "curl",
32976
+ "source": "curl -X POST https://api.wspc.ai/todo/projects/prj_01HW3K/restore -H \"Authorization: Bearer $WSPC_API_KEY\""
32977
+ }
32978
+ ],
31502
32979
  "responses": {
31503
32980
  "200": {
31504
32981
  "description": "Restored",
32982
+ "headers": {
32983
+ "x-consistency-bookmark": {
32984
+ "description": "Opaque consistency bookmark for the latest todo database position observed by this request. Store and send it on the next todo request to continue read-after-write consistency.",
32985
+ "schema": {
32986
+ "type": "string"
32987
+ }
32988
+ }
32989
+ },
31505
32990
  "content": {
31506
32991
  "application/json": {
31507
32992
  "schema": {
@@ -31868,14 +33353,17 @@
31868
33353
  "bearerAuth": []
31869
33354
  }
31870
33355
  ],
31871
- "x-codeSamples": [
31872
- {
31873
- "lang": "shell",
31874
- "label": "curl",
31875
- "source": "curl -X POST https://api.wspc.ai/todo/items/tod_01HW3K4N9V5G6Z8C2Q7B1Y0M3F/restore \\\n -H \"Authorization: Bearer $WSPC_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{}'"
31876
- }
31877
- ],
31878
33356
  "parameters": [
33357
+ {
33358
+ "name": "x-consistency-bookmark",
33359
+ "in": "header",
33360
+ "required": false,
33361
+ "description": "Optional opaque consistency bookmark returned by a previous todo response. Send it back unchanged to continue read-after-write consistency.",
33362
+ "schema": {
33363
+ "type": "string"
33364
+ },
33365
+ "example": "opaque-consistency-bookmark"
33366
+ },
31879
33367
  {
31880
33368
  "schema": {
31881
33369
  "type": "string"
@@ -31885,6 +33373,13 @@
31885
33373
  "in": "path"
31886
33374
  }
31887
33375
  ],
33376
+ "x-codeSamples": [
33377
+ {
33378
+ "lang": "shell",
33379
+ "label": "curl",
33380
+ "source": "curl -X POST https://api.wspc.ai/todo/items/tod_01HW3K4N9V5G6Z8C2Q7B1Y0M3F/restore \\\n -H \"Authorization: Bearer $WSPC_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{}'"
33381
+ }
33382
+ ],
31888
33383
  "requestBody": {
31889
33384
  "content": {
31890
33385
  "application/json": {
@@ -31910,6 +33405,14 @@
31910
33405
  "responses": {
31911
33406
  "200": {
31912
33407
  "description": "The todo was restored. `restored_count` includes cascaded descendants when `cascade: true`; otherwise `descendants_in_trash_count` reports descendants left in trash.",
33408
+ "headers": {
33409
+ "x-consistency-bookmark": {
33410
+ "description": "Opaque consistency bookmark for the latest todo database position observed by this request. Store and send it on the next todo request to continue read-after-write consistency.",
33411
+ "schema": {
33412
+ "type": "string"
33413
+ }
33414
+ }
33415
+ },
31913
33416
  "content": {
31914
33417
  "application/json": {
31915
33418
  "schema": {
@@ -32279,14 +33782,17 @@
32279
33782
  "bearerAuth": []
32280
33783
  }
32281
33784
  ],
32282
- "x-codeSamples": [
32283
- {
32284
- "lang": "shell",
32285
- "label": "curl",
32286
- "source": "curl -X POST https://api.wspc.ai/todo/types/typ_01HW3K/restore -H \"Authorization: Bearer $WSPC_API_KEY\""
32287
- }
32288
- ],
32289
33785
  "parameters": [
33786
+ {
33787
+ "name": "x-consistency-bookmark",
33788
+ "in": "header",
33789
+ "required": false,
33790
+ "description": "Optional opaque consistency bookmark returned by a previous todo response. Send it back unchanged to continue read-after-write consistency.",
33791
+ "schema": {
33792
+ "type": "string"
33793
+ },
33794
+ "example": "opaque-consistency-bookmark"
33795
+ },
32290
33796
  {
32291
33797
  "schema": {
32292
33798
  "type": "string"
@@ -32296,9 +33802,24 @@
32296
33802
  "in": "path"
32297
33803
  }
32298
33804
  ],
33805
+ "x-codeSamples": [
33806
+ {
33807
+ "lang": "shell",
33808
+ "label": "curl",
33809
+ "source": "curl -X POST https://api.wspc.ai/todo/types/typ_01HW3K/restore -H \"Authorization: Bearer $WSPC_API_KEY\""
33810
+ }
33811
+ ],
32299
33812
  "responses": {
32300
33813
  "200": {
32301
33814
  "description": "Restored",
33815
+ "headers": {
33816
+ "x-consistency-bookmark": {
33817
+ "description": "Opaque consistency bookmark for the latest todo database position observed by this request. Store and send it on the next todo request to continue read-after-write consistency.",
33818
+ "schema": {
33819
+ "type": "string"
33820
+ }
33821
+ }
33822
+ },
32302
33823
  "content": {
32303
33824
  "application/json": {
32304
33825
  "schema": {