@wspc/cli 0.0.14 → 0.0.15
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/dist/cli.js +230 -84
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +5 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/spec/openapi.json +812 -207
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`
|
|
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
|
},
|
|
@@ -11921,6 +11923,18 @@
|
|
|
11921
11923
|
}
|
|
11922
11924
|
},
|
|
11923
11925
|
"summary": "Schedule a calendar event",
|
|
11926
|
+
"parameters": [
|
|
11927
|
+
{
|
|
11928
|
+
"name": "x-consistency-bookmark",
|
|
11929
|
+
"in": "header",
|
|
11930
|
+
"required": false,
|
|
11931
|
+
"description": "Optional opaque consistency bookmark returned by a previous calendar response. Send it back unchanged to continue read-after-write consistency.",
|
|
11932
|
+
"schema": {
|
|
11933
|
+
"type": "string"
|
|
11934
|
+
},
|
|
11935
|
+
"example": "opaque-consistency-bookmark"
|
|
11936
|
+
}
|
|
11937
|
+
],
|
|
11924
11938
|
"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
11939
|
"security": [
|
|
11926
11940
|
{
|
|
@@ -11997,6 +12011,14 @@
|
|
|
11997
12011
|
"responses": {
|
|
11998
12012
|
"201": {
|
|
11999
12013
|
"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`.",
|
|
12014
|
+
"headers": {
|
|
12015
|
+
"x-consistency-bookmark": {
|
|
12016
|
+
"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.",
|
|
12017
|
+
"schema": {
|
|
12018
|
+
"type": "string"
|
|
12019
|
+
}
|
|
12020
|
+
}
|
|
12021
|
+
},
|
|
12000
12022
|
"content": {
|
|
12001
12023
|
"application/json": {
|
|
12002
12024
|
"schema": {
|
|
@@ -12399,25 +12421,17 @@
|
|
|
12399
12421
|
}
|
|
12400
12422
|
},
|
|
12401
12423
|
"summary": "List calendar events",
|
|
12402
|
-
"
|
|
12403
|
-
"security": [
|
|
12404
|
-
{
|
|
12405
|
-
"bearerAuth": []
|
|
12406
|
-
}
|
|
12407
|
-
],
|
|
12408
|
-
"x-codeSamples": [
|
|
12424
|
+
"parameters": [
|
|
12409
12425
|
{
|
|
12410
|
-
"
|
|
12411
|
-
"
|
|
12412
|
-
"
|
|
12426
|
+
"name": "x-consistency-bookmark",
|
|
12427
|
+
"in": "header",
|
|
12428
|
+
"required": false,
|
|
12429
|
+
"description": "Optional opaque consistency bookmark returned by a previous calendar response. Send it back unchanged to continue read-after-write consistency.",
|
|
12430
|
+
"schema": {
|
|
12431
|
+
"type": "string"
|
|
12432
|
+
},
|
|
12433
|
+
"example": "opaque-consistency-bookmark"
|
|
12413
12434
|
},
|
|
12414
|
-
{
|
|
12415
|
-
"lang": "bash",
|
|
12416
|
-
"label": "wspc CLI",
|
|
12417
|
-
"source": "wspc event ls --from \"next Monday\" --to \"next Friday\""
|
|
12418
|
-
}
|
|
12419
|
-
],
|
|
12420
|
-
"parameters": [
|
|
12421
12435
|
{
|
|
12422
12436
|
"schema": {
|
|
12423
12437
|
"type": "string",
|
|
@@ -12509,9 +12523,35 @@
|
|
|
12509
12523
|
"in": "query"
|
|
12510
12524
|
}
|
|
12511
12525
|
],
|
|
12526
|
+
"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`).",
|
|
12527
|
+
"security": [
|
|
12528
|
+
{
|
|
12529
|
+
"bearerAuth": []
|
|
12530
|
+
}
|
|
12531
|
+
],
|
|
12532
|
+
"x-codeSamples": [
|
|
12533
|
+
{
|
|
12534
|
+
"lang": "shell",
|
|
12535
|
+
"label": "curl",
|
|
12536
|
+
"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\""
|
|
12537
|
+
},
|
|
12538
|
+
{
|
|
12539
|
+
"lang": "bash",
|
|
12540
|
+
"label": "wspc CLI",
|
|
12541
|
+
"source": "wspc event ls --from \"next Monday\" --to \"next Friday\""
|
|
12542
|
+
}
|
|
12543
|
+
],
|
|
12512
12544
|
"responses": {
|
|
12513
12545
|
"200": {
|
|
12514
12546
|
"description": "Events matching the filters. Empty `events` array when nothing matches. `next_cursor` is present iff there is another page.",
|
|
12547
|
+
"headers": {
|
|
12548
|
+
"x-consistency-bookmark": {
|
|
12549
|
+
"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.",
|
|
12550
|
+
"schema": {
|
|
12551
|
+
"type": "string"
|
|
12552
|
+
}
|
|
12553
|
+
}
|
|
12554
|
+
},
|
|
12515
12555
|
"content": {
|
|
12516
12556
|
"application/json": {
|
|
12517
12557
|
"schema": {
|
|
@@ -12919,6 +12959,28 @@
|
|
|
12919
12959
|
}
|
|
12920
12960
|
},
|
|
12921
12961
|
"summary": "Soft-delete a calendar event",
|
|
12962
|
+
"parameters": [
|
|
12963
|
+
{
|
|
12964
|
+
"name": "x-consistency-bookmark",
|
|
12965
|
+
"in": "header",
|
|
12966
|
+
"required": false,
|
|
12967
|
+
"description": "Optional opaque consistency bookmark returned by a previous calendar response. Send it back unchanged to continue read-after-write consistency.",
|
|
12968
|
+
"schema": {
|
|
12969
|
+
"type": "string"
|
|
12970
|
+
},
|
|
12971
|
+
"example": "opaque-consistency-bookmark"
|
|
12972
|
+
},
|
|
12973
|
+
{
|
|
12974
|
+
"schema": {
|
|
12975
|
+
"type": "string",
|
|
12976
|
+
"description": "Event id (`evt_<ULID>` for new rows; legacy UUID ids remain accepted)."
|
|
12977
|
+
},
|
|
12978
|
+
"required": true,
|
|
12979
|
+
"description": "Event id (`evt_<ULID>` for new rows; legacy UUID ids remain accepted).",
|
|
12980
|
+
"name": "id",
|
|
12981
|
+
"in": "path"
|
|
12982
|
+
}
|
|
12983
|
+
],
|
|
12922
12984
|
"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
12985
|
"security": [
|
|
12924
12986
|
{
|
|
@@ -12937,18 +12999,6 @@
|
|
|
12937
12999
|
"source": "wspc event rm evt_01HW3K4N9V5G6Z8C2Q7B1Y0M3F"
|
|
12938
13000
|
}
|
|
12939
13001
|
],
|
|
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
13002
|
"requestBody": {
|
|
12953
13003
|
"content": {
|
|
12954
13004
|
"application/json": {
|
|
@@ -12973,6 +13023,14 @@
|
|
|
12973
13023
|
"responses": {
|
|
12974
13024
|
"200": {
|
|
12975
13025
|
"description": "The event was soft-deleted. Response carries `id`, `deleted_at`, and the post-delete `version`. Cancellation emails are sent asynchronously.",
|
|
13026
|
+
"headers": {
|
|
13027
|
+
"x-consistency-bookmark": {
|
|
13028
|
+
"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.",
|
|
13029
|
+
"schema": {
|
|
13030
|
+
"type": "string"
|
|
13031
|
+
}
|
|
13032
|
+
}
|
|
13033
|
+
},
|
|
12976
13034
|
"content": {
|
|
12977
13035
|
"application/json": {
|
|
12978
13036
|
"schema": {
|
|
@@ -13344,25 +13402,17 @@
|
|
|
13344
13402
|
}
|
|
13345
13403
|
},
|
|
13346
13404
|
"summary": "Get a calendar event by id",
|
|
13347
|
-
"
|
|
13348
|
-
"security": [
|
|
13349
|
-
{
|
|
13350
|
-
"bearerAuth": []
|
|
13351
|
-
}
|
|
13352
|
-
],
|
|
13353
|
-
"x-codeSamples": [
|
|
13405
|
+
"parameters": [
|
|
13354
13406
|
{
|
|
13355
|
-
"
|
|
13356
|
-
"
|
|
13357
|
-
"
|
|
13407
|
+
"name": "x-consistency-bookmark",
|
|
13408
|
+
"in": "header",
|
|
13409
|
+
"required": false,
|
|
13410
|
+
"description": "Optional opaque consistency bookmark returned by a previous calendar response. Send it back unchanged to continue read-after-write consistency.",
|
|
13411
|
+
"schema": {
|
|
13412
|
+
"type": "string"
|
|
13413
|
+
},
|
|
13414
|
+
"example": "opaque-consistency-bookmark"
|
|
13358
13415
|
},
|
|
13359
|
-
{
|
|
13360
|
-
"lang": "bash",
|
|
13361
|
-
"label": "wspc CLI",
|
|
13362
|
-
"source": "wspc event show evt_01HW3K4N9V5G6Z8C2Q7B1Y0M3F"
|
|
13363
|
-
}
|
|
13364
|
-
],
|
|
13365
|
-
"parameters": [
|
|
13366
13416
|
{
|
|
13367
13417
|
"schema": {
|
|
13368
13418
|
"type": "string",
|
|
@@ -13384,9 +13434,35 @@
|
|
|
13384
13434
|
"in": "query"
|
|
13385
13435
|
}
|
|
13386
13436
|
],
|
|
13437
|
+
"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.",
|
|
13438
|
+
"security": [
|
|
13439
|
+
{
|
|
13440
|
+
"bearerAuth": []
|
|
13441
|
+
}
|
|
13442
|
+
],
|
|
13443
|
+
"x-codeSamples": [
|
|
13444
|
+
{
|
|
13445
|
+
"lang": "shell",
|
|
13446
|
+
"label": "curl",
|
|
13447
|
+
"source": "curl https://api.wspc.ai/calendar/events/evt_01HW3K4N9V5G6Z8C2Q7B1Y0M3F \\\n -H \"Authorization: Bearer $WSPC_API_KEY\""
|
|
13448
|
+
},
|
|
13449
|
+
{
|
|
13450
|
+
"lang": "bash",
|
|
13451
|
+
"label": "wspc CLI",
|
|
13452
|
+
"source": "wspc event show evt_01HW3K4N9V5G6Z8C2Q7B1Y0M3F"
|
|
13453
|
+
}
|
|
13454
|
+
],
|
|
13387
13455
|
"responses": {
|
|
13388
13456
|
"200": {
|
|
13389
13457
|
"description": "The requested event. Includes `deleted_at` only when fetched with `include_deleted=true` on a soft-deleted row.",
|
|
13458
|
+
"headers": {
|
|
13459
|
+
"x-consistency-bookmark": {
|
|
13460
|
+
"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.",
|
|
13461
|
+
"schema": {
|
|
13462
|
+
"type": "string"
|
|
13463
|
+
}
|
|
13464
|
+
}
|
|
13465
|
+
},
|
|
13390
13466
|
"content": {
|
|
13391
13467
|
"application/json": {
|
|
13392
13468
|
"schema": {
|
|
@@ -13794,6 +13870,28 @@
|
|
|
13794
13870
|
}
|
|
13795
13871
|
},
|
|
13796
13872
|
"summary": "Update a calendar event",
|
|
13873
|
+
"parameters": [
|
|
13874
|
+
{
|
|
13875
|
+
"name": "x-consistency-bookmark",
|
|
13876
|
+
"in": "header",
|
|
13877
|
+
"required": false,
|
|
13878
|
+
"description": "Optional opaque consistency bookmark returned by a previous calendar response. Send it back unchanged to continue read-after-write consistency.",
|
|
13879
|
+
"schema": {
|
|
13880
|
+
"type": "string"
|
|
13881
|
+
},
|
|
13882
|
+
"example": "opaque-consistency-bookmark"
|
|
13883
|
+
},
|
|
13884
|
+
{
|
|
13885
|
+
"schema": {
|
|
13886
|
+
"type": "string",
|
|
13887
|
+
"description": "Event id (`evt_<ULID>` for new rows; legacy UUID ids remain accepted)."
|
|
13888
|
+
},
|
|
13889
|
+
"required": true,
|
|
13890
|
+
"description": "Event id (`evt_<ULID>` for new rows; legacy UUID ids remain accepted).",
|
|
13891
|
+
"name": "id",
|
|
13892
|
+
"in": "path"
|
|
13893
|
+
}
|
|
13894
|
+
],
|
|
13797
13895
|
"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
13896
|
"security": [
|
|
13799
13897
|
{
|
|
@@ -13812,18 +13910,6 @@
|
|
|
13812
13910
|
"source": "wspc event set evt_01HW3K4N9V5G6Z8C2Q7B1Y0M3F \\\n --start \"tomorrow 1pm\" --end \"tomorrow 2pm\""
|
|
13813
13911
|
}
|
|
13814
13912
|
],
|
|
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
13913
|
"requestBody": {
|
|
13828
13914
|
"content": {
|
|
13829
13915
|
"application/json": {
|
|
@@ -13872,6 +13958,14 @@
|
|
|
13872
13958
|
"responses": {
|
|
13873
13959
|
"200": {
|
|
13874
13960
|
"description": "The updated event with `version` incremented. Attendee diff emails are sent asynchronously.",
|
|
13961
|
+
"headers": {
|
|
13962
|
+
"x-consistency-bookmark": {
|
|
13963
|
+
"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.",
|
|
13964
|
+
"schema": {
|
|
13965
|
+
"type": "string"
|
|
13966
|
+
}
|
|
13967
|
+
}
|
|
13968
|
+
},
|
|
13875
13969
|
"content": {
|
|
13876
13970
|
"application/json": {
|
|
13877
13971
|
"schema": {
|
|
@@ -14250,6 +14344,28 @@
|
|
|
14250
14344
|
}
|
|
14251
14345
|
},
|
|
14252
14346
|
"summary": "Download event as `.ics`",
|
|
14347
|
+
"parameters": [
|
|
14348
|
+
{
|
|
14349
|
+
"name": "x-consistency-bookmark",
|
|
14350
|
+
"in": "header",
|
|
14351
|
+
"required": false,
|
|
14352
|
+
"description": "Optional opaque consistency bookmark returned by a previous calendar response. Send it back unchanged to continue read-after-write consistency.",
|
|
14353
|
+
"schema": {
|
|
14354
|
+
"type": "string"
|
|
14355
|
+
},
|
|
14356
|
+
"example": "opaque-consistency-bookmark"
|
|
14357
|
+
},
|
|
14358
|
+
{
|
|
14359
|
+
"schema": {
|
|
14360
|
+
"type": "string",
|
|
14361
|
+
"description": "`<event_id>.ics`. The `.ics` suffix is required so the router matches this endpoint ahead of the JSON detail route."
|
|
14362
|
+
},
|
|
14363
|
+
"required": true,
|
|
14364
|
+
"description": "`<event_id>.ics`. The `.ics` suffix is required so the router matches this endpoint ahead of the JSON detail route.",
|
|
14365
|
+
"name": "filename",
|
|
14366
|
+
"in": "path"
|
|
14367
|
+
}
|
|
14368
|
+
],
|
|
14253
14369
|
"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
14370
|
"security": [
|
|
14255
14371
|
{
|
|
@@ -14268,21 +14384,17 @@
|
|
|
14268
14384
|
"source": "wspc event ics evt_01HW3K4N9V5G6Z8C2Q7B1Y0M3F > event.ics"
|
|
14269
14385
|
}
|
|
14270
14386
|
],
|
|
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
14387
|
"responses": {
|
|
14284
14388
|
"200": {
|
|
14285
14389
|
"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.",
|
|
14390
|
+
"headers": {
|
|
14391
|
+
"x-consistency-bookmark": {
|
|
14392
|
+
"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.",
|
|
14393
|
+
"schema": {
|
|
14394
|
+
"type": "string"
|
|
14395
|
+
}
|
|
14396
|
+
}
|
|
14397
|
+
},
|
|
14286
14398
|
"content": {
|
|
14287
14399
|
"text/calendar": {
|
|
14288
14400
|
"schema": {
|
|
@@ -14628,6 +14740,28 @@
|
|
|
14628
14740
|
"hidden": true
|
|
14629
14741
|
},
|
|
14630
14742
|
"summary": "Restore a soft-deleted event",
|
|
14743
|
+
"parameters": [
|
|
14744
|
+
{
|
|
14745
|
+
"name": "x-consistency-bookmark",
|
|
14746
|
+
"in": "header",
|
|
14747
|
+
"required": false,
|
|
14748
|
+
"description": "Optional opaque consistency bookmark returned by a previous calendar response. Send it back unchanged to continue read-after-write consistency.",
|
|
14749
|
+
"schema": {
|
|
14750
|
+
"type": "string"
|
|
14751
|
+
},
|
|
14752
|
+
"example": "opaque-consistency-bookmark"
|
|
14753
|
+
},
|
|
14754
|
+
{
|
|
14755
|
+
"schema": {
|
|
14756
|
+
"type": "string",
|
|
14757
|
+
"description": "Event id (`evt_<ULID>` for new rows; legacy UUID ids remain accepted)."
|
|
14758
|
+
},
|
|
14759
|
+
"required": true,
|
|
14760
|
+
"description": "Event id (`evt_<ULID>` for new rows; legacy UUID ids remain accepted).",
|
|
14761
|
+
"name": "id",
|
|
14762
|
+
"in": "path"
|
|
14763
|
+
}
|
|
14764
|
+
],
|
|
14631
14765
|
"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
14766
|
"security": [
|
|
14633
14767
|
{
|
|
@@ -14641,18 +14775,6 @@
|
|
|
14641
14775
|
"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
14776
|
}
|
|
14643
14777
|
],
|
|
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
14778
|
"requestBody": {
|
|
14657
14779
|
"content": {
|
|
14658
14780
|
"application/json": {
|
|
@@ -14677,6 +14799,14 @@
|
|
|
14677
14799
|
"responses": {
|
|
14678
14800
|
"200": {
|
|
14679
14801
|
"description": "The restored event with `version` incremented and `deleted_at` cleared. Re-invitation emails are sent asynchronously to attendees.",
|
|
14802
|
+
"headers": {
|
|
14803
|
+
"x-consistency-bookmark": {
|
|
14804
|
+
"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.",
|
|
14805
|
+
"schema": {
|
|
14806
|
+
"type": "string"
|
|
14807
|
+
}
|
|
14808
|
+
}
|
|
14809
|
+
},
|
|
14680
14810
|
"content": {
|
|
14681
14811
|
"application/json": {
|
|
14682
14812
|
"schema": {
|
|
@@ -15043,12 +15173,24 @@
|
|
|
15043
15173
|
"EmailAliases"
|
|
15044
15174
|
],
|
|
15045
15175
|
"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 /
|
|
15176
|
+
"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
15177
|
"security": [
|
|
15048
15178
|
{
|
|
15049
15179
|
"bearerAuth": []
|
|
15050
15180
|
}
|
|
15051
15181
|
],
|
|
15182
|
+
"parameters": [
|
|
15183
|
+
{
|
|
15184
|
+
"name": "x-consistency-bookmark",
|
|
15185
|
+
"in": "header",
|
|
15186
|
+
"required": false,
|
|
15187
|
+
"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.",
|
|
15188
|
+
"schema": {
|
|
15189
|
+
"type": "string"
|
|
15190
|
+
},
|
|
15191
|
+
"example": "opaque-consistency-bookmark"
|
|
15192
|
+
}
|
|
15193
|
+
],
|
|
15052
15194
|
"x-cli": {
|
|
15053
15195
|
"command": "alias add",
|
|
15054
15196
|
"positional": [
|
|
@@ -15109,6 +15251,14 @@
|
|
|
15109
15251
|
"responses": {
|
|
15110
15252
|
"201": {
|
|
15111
15253
|
"description": "Alias created. The requested address is live immediately.",
|
|
15254
|
+
"headers": {
|
|
15255
|
+
"x-consistency-bookmark": {
|
|
15256
|
+
"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.",
|
|
15257
|
+
"schema": {
|
|
15258
|
+
"type": "string"
|
|
15259
|
+
}
|
|
15260
|
+
}
|
|
15261
|
+
},
|
|
15112
15262
|
"content": {
|
|
15113
15263
|
"application/json": {
|
|
15114
15264
|
"schema": {
|
|
@@ -15129,7 +15279,7 @@
|
|
|
15129
15279
|
}
|
|
15130
15280
|
},
|
|
15131
15281
|
"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.",
|
|
15282
|
+
"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
15283
|
"content": {
|
|
15134
15284
|
"application/json": {
|
|
15135
15285
|
"schema": {
|
|
@@ -15334,6 +15484,28 @@
|
|
|
15334
15484
|
"bearerAuth": []
|
|
15335
15485
|
}
|
|
15336
15486
|
],
|
|
15487
|
+
"parameters": [
|
|
15488
|
+
{
|
|
15489
|
+
"name": "x-consistency-bookmark",
|
|
15490
|
+
"in": "header",
|
|
15491
|
+
"required": false,
|
|
15492
|
+
"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.",
|
|
15493
|
+
"schema": {
|
|
15494
|
+
"type": "string"
|
|
15495
|
+
},
|
|
15496
|
+
"example": "opaque-consistency-bookmark"
|
|
15497
|
+
},
|
|
15498
|
+
{
|
|
15499
|
+
"schema": {
|
|
15500
|
+
"type": "string",
|
|
15501
|
+
"description": "When `true`, include soft-deleted aliases (with `deleted_at` set) alongside active ones. Defaults to `false`."
|
|
15502
|
+
},
|
|
15503
|
+
"required": false,
|
|
15504
|
+
"description": "When `true`, include soft-deleted aliases (with `deleted_at` set) alongside active ones. Defaults to `false`.",
|
|
15505
|
+
"name": "include_deleted",
|
|
15506
|
+
"in": "query"
|
|
15507
|
+
}
|
|
15508
|
+
],
|
|
15337
15509
|
"x-cli": {
|
|
15338
15510
|
"command": "alias ls",
|
|
15339
15511
|
"display": {
|
|
@@ -15364,21 +15536,17 @@
|
|
|
15364
15536
|
"source": "wspc email alias ls"
|
|
15365
15537
|
}
|
|
15366
15538
|
],
|
|
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
15539
|
"responses": {
|
|
15380
15540
|
"200": {
|
|
15381
15541
|
"description": "Aliases owned by the caller, including soft-deleted entries when requested.",
|
|
15542
|
+
"headers": {
|
|
15543
|
+
"x-consistency-bookmark": {
|
|
15544
|
+
"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.",
|
|
15545
|
+
"schema": {
|
|
15546
|
+
"type": "string"
|
|
15547
|
+
}
|
|
15548
|
+
}
|
|
15549
|
+
},
|
|
15382
15550
|
"content": {
|
|
15383
15551
|
"application/json": {
|
|
15384
15552
|
"schema": {
|
|
@@ -15594,12 +15762,24 @@
|
|
|
15594
15762
|
"EmailDomains"
|
|
15595
15763
|
],
|
|
15596
15764
|
"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
|
|
15765
|
+
"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
15766
|
"security": [
|
|
15599
15767
|
{
|
|
15600
15768
|
"bearerAuth": []
|
|
15601
15769
|
}
|
|
15602
15770
|
],
|
|
15771
|
+
"parameters": [
|
|
15772
|
+
{
|
|
15773
|
+
"name": "x-consistency-bookmark",
|
|
15774
|
+
"in": "header",
|
|
15775
|
+
"required": false,
|
|
15776
|
+
"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.",
|
|
15777
|
+
"schema": {
|
|
15778
|
+
"type": "string"
|
|
15779
|
+
},
|
|
15780
|
+
"example": "opaque-consistency-bookmark"
|
|
15781
|
+
}
|
|
15782
|
+
],
|
|
15603
15783
|
"x-cli": {
|
|
15604
15784
|
"command": "domain add",
|
|
15605
15785
|
"positional": [
|
|
@@ -15648,6 +15828,14 @@
|
|
|
15648
15828
|
"responses": {
|
|
15649
15829
|
"201": {
|
|
15650
15830
|
"description": "Custom domain registered and DNS verification records returned. Custom-domain aliases require full domain readiness before use.",
|
|
15831
|
+
"headers": {
|
|
15832
|
+
"x-consistency-bookmark": {
|
|
15833
|
+
"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.",
|
|
15834
|
+
"schema": {
|
|
15835
|
+
"type": "string"
|
|
15836
|
+
}
|
|
15837
|
+
}
|
|
15838
|
+
},
|
|
15651
15839
|
"content": {
|
|
15652
15840
|
"application/json": {
|
|
15653
15841
|
"schema": {
|
|
@@ -15944,6 +16132,18 @@
|
|
|
15944
16132
|
"bearerAuth": []
|
|
15945
16133
|
}
|
|
15946
16134
|
],
|
|
16135
|
+
"parameters": [
|
|
16136
|
+
{
|
|
16137
|
+
"name": "x-consistency-bookmark",
|
|
16138
|
+
"in": "header",
|
|
16139
|
+
"required": false,
|
|
16140
|
+
"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.",
|
|
16141
|
+
"schema": {
|
|
16142
|
+
"type": "string"
|
|
16143
|
+
},
|
|
16144
|
+
"example": "opaque-consistency-bookmark"
|
|
16145
|
+
}
|
|
16146
|
+
],
|
|
15947
16147
|
"x-cli": {
|
|
15948
16148
|
"command": "domain ls",
|
|
15949
16149
|
"display": {
|
|
@@ -15978,6 +16178,14 @@
|
|
|
15978
16178
|
"responses": {
|
|
15979
16179
|
"200": {
|
|
15980
16180
|
"description": "Custom domains cached for the caller organization, including ownership, sending readiness, and receiving readiness state.",
|
|
16181
|
+
"headers": {
|
|
16182
|
+
"x-consistency-bookmark": {
|
|
16183
|
+
"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.",
|
|
16184
|
+
"schema": {
|
|
16185
|
+
"type": "string"
|
|
16186
|
+
}
|
|
16187
|
+
}
|
|
16188
|
+
},
|
|
15981
16189
|
"content": {
|
|
15982
16190
|
"application/json": {
|
|
15983
16191
|
"schema": {
|
|
@@ -16715,70 +16923,83 @@
|
|
|
16715
16923
|
}
|
|
16716
16924
|
}
|
|
16717
16925
|
},
|
|
16718
|
-
"/email/
|
|
16719
|
-
"
|
|
16720
|
-
"operationId": "
|
|
16926
|
+
"/email/domains/{domain}": {
|
|
16927
|
+
"delete": {
|
|
16928
|
+
"operationId": "email_domain_delete",
|
|
16721
16929
|
"tags": [
|
|
16722
|
-
"
|
|
16930
|
+
"EmailDomains"
|
|
16723
16931
|
],
|
|
16724
|
-
"summary": "
|
|
16725
|
-
"description": "### Overview\
|
|
16932
|
+
"summary": "Delete a custom email domain",
|
|
16933
|
+
"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
16934
|
"security": [
|
|
16727
16935
|
{
|
|
16728
16936
|
"bearerAuth": []
|
|
16729
16937
|
}
|
|
16730
16938
|
],
|
|
16731
16939
|
"x-cli": {
|
|
16732
|
-
"command": "
|
|
16733
|
-
"
|
|
16940
|
+
"command": "domain rm",
|
|
16941
|
+
"positional": [
|
|
16942
|
+
"domain"
|
|
16943
|
+
]
|
|
16734
16944
|
},
|
|
16735
16945
|
"x-codeSamples": [
|
|
16736
16946
|
{
|
|
16737
16947
|
"lang": "shell",
|
|
16738
16948
|
"label": "curl",
|
|
16739
|
-
"source": "curl https://api.wspc.ai/email/
|
|
16949
|
+
"source": "curl -X DELETE https://api.wspc.ai/email/domains/mail.example.com \\\n -H \"Authorization: Bearer $WSPC_API_KEY\""
|
|
16740
16950
|
},
|
|
16741
16951
|
{
|
|
16742
16952
|
"lang": "bash",
|
|
16743
16953
|
"label": "wspc CLI",
|
|
16744
|
-
"source": "wspc
|
|
16954
|
+
"source": "wspc domain rm mail.example.com"
|
|
16745
16955
|
}
|
|
16746
16956
|
],
|
|
16747
16957
|
"parameters": [
|
|
16748
16958
|
{
|
|
16749
16959
|
"schema": {
|
|
16750
|
-
"type": "string"
|
|
16751
|
-
|
|
16752
|
-
"required": true,
|
|
16753
|
-
"name": "id",
|
|
16754
|
-
"in": "path"
|
|
16755
|
-
},
|
|
16756
|
-
{
|
|
16757
|
-
"schema": {
|
|
16758
|
-
"type": "string"
|
|
16960
|
+
"type": "string",
|
|
16961
|
+
"description": "Custom domain hostname path parameter. URL-encode if your client requires it."
|
|
16759
16962
|
},
|
|
16760
16963
|
"required": true,
|
|
16761
|
-
"
|
|
16964
|
+
"description": "Custom domain hostname path parameter. URL-encode if your client requires it.",
|
|
16965
|
+
"name": "domain",
|
|
16762
16966
|
"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
16967
|
}
|
|
16774
16968
|
],
|
|
16775
16969
|
"responses": {
|
|
16776
|
-
"
|
|
16777
|
-
"description": "
|
|
16970
|
+
"204": {
|
|
16971
|
+
"description": "Custom domain deleted."
|
|
16972
|
+
},
|
|
16973
|
+
"400": {
|
|
16974
|
+
"description": "Malformed or platform-reserved domain hostname.",
|
|
16778
16975
|
"content": {
|
|
16779
|
-
"application/
|
|
16976
|
+
"application/json": {
|
|
16780
16977
|
"schema": {
|
|
16781
|
-
"type": "
|
|
16978
|
+
"type": "object",
|
|
16979
|
+
"properties": {
|
|
16980
|
+
"error": {
|
|
16981
|
+
"type": "object",
|
|
16982
|
+
"properties": {
|
|
16983
|
+
"code": {
|
|
16984
|
+
"type": "string"
|
|
16985
|
+
},
|
|
16986
|
+
"message": {
|
|
16987
|
+
"type": "string"
|
|
16988
|
+
},
|
|
16989
|
+
"extra": {
|
|
16990
|
+
"type": "object",
|
|
16991
|
+
"additionalProperties": {}
|
|
16992
|
+
}
|
|
16993
|
+
},
|
|
16994
|
+
"required": [
|
|
16995
|
+
"code",
|
|
16996
|
+
"message"
|
|
16997
|
+
]
|
|
16998
|
+
}
|
|
16999
|
+
},
|
|
17000
|
+
"required": [
|
|
17001
|
+
"error"
|
|
17002
|
+
]
|
|
16782
17003
|
}
|
|
16783
17004
|
}
|
|
16784
17005
|
}
|
|
@@ -16829,7 +17050,41 @@
|
|
|
16829
17050
|
}
|
|
16830
17051
|
},
|
|
16831
17052
|
"404": {
|
|
16832
|
-
"description": "
|
|
17053
|
+
"description": "The domain was not found for the caller organization.",
|
|
17054
|
+
"content": {
|
|
17055
|
+
"application/json": {
|
|
17056
|
+
"schema": {
|
|
17057
|
+
"type": "object",
|
|
17058
|
+
"properties": {
|
|
17059
|
+
"error": {
|
|
17060
|
+
"type": "object",
|
|
17061
|
+
"properties": {
|
|
17062
|
+
"code": {
|
|
17063
|
+
"type": "string"
|
|
17064
|
+
},
|
|
17065
|
+
"message": {
|
|
17066
|
+
"type": "string"
|
|
17067
|
+
},
|
|
17068
|
+
"extra": {
|
|
17069
|
+
"type": "object",
|
|
17070
|
+
"additionalProperties": {}
|
|
17071
|
+
}
|
|
17072
|
+
},
|
|
17073
|
+
"required": [
|
|
17074
|
+
"code",
|
|
17075
|
+
"message"
|
|
17076
|
+
]
|
|
17077
|
+
}
|
|
17078
|
+
},
|
|
17079
|
+
"required": [
|
|
17080
|
+
"error"
|
|
17081
|
+
]
|
|
17082
|
+
}
|
|
17083
|
+
}
|
|
17084
|
+
}
|
|
17085
|
+
},
|
|
17086
|
+
"409": {
|
|
17087
|
+
"description": "Active aliases still use this domain.",
|
|
16833
17088
|
"content": {
|
|
16834
17089
|
"application/json": {
|
|
16835
17090
|
"schema": {
|
|
@@ -16955,11 +17210,43 @@
|
|
|
16955
17210
|
}
|
|
16956
17211
|
}
|
|
16957
17212
|
}
|
|
17213
|
+
},
|
|
17214
|
+
"502": {
|
|
17215
|
+
"description": "The upstream provider delete failed or provider credentials are missing.",
|
|
17216
|
+
"content": {
|
|
17217
|
+
"application/json": {
|
|
17218
|
+
"schema": {
|
|
17219
|
+
"type": "object",
|
|
17220
|
+
"properties": {
|
|
17221
|
+
"error": {
|
|
17222
|
+
"type": "object",
|
|
17223
|
+
"properties": {
|
|
17224
|
+
"code": {
|
|
17225
|
+
"type": "string"
|
|
17226
|
+
},
|
|
17227
|
+
"message": {
|
|
17228
|
+
"type": "string"
|
|
17229
|
+
},
|
|
17230
|
+
"extra": {
|
|
17231
|
+
"type": "object",
|
|
17232
|
+
"additionalProperties": {}
|
|
17233
|
+
}
|
|
17234
|
+
},
|
|
17235
|
+
"required": [
|
|
17236
|
+
"code",
|
|
17237
|
+
"message"
|
|
17238
|
+
]
|
|
17239
|
+
}
|
|
17240
|
+
},
|
|
17241
|
+
"required": [
|
|
17242
|
+
"error"
|
|
17243
|
+
]
|
|
17244
|
+
}
|
|
17245
|
+
}
|
|
17246
|
+
}
|
|
16958
17247
|
}
|
|
16959
17248
|
}
|
|
16960
|
-
}
|
|
16961
|
-
},
|
|
16962
|
-
"/email/domains/{domain}": {
|
|
17249
|
+
},
|
|
16963
17250
|
"get": {
|
|
16964
17251
|
"operationId": "email_domain_get",
|
|
16965
17252
|
"tags": [
|
|
@@ -17265,52 +17552,292 @@
|
|
|
17265
17552
|
}
|
|
17266
17553
|
}
|
|
17267
17554
|
},
|
|
17268
|
-
"/email/messages/{id}": {
|
|
17555
|
+
"/email/messages/{id}/attachments/{idx}": {
|
|
17269
17556
|
"get": {
|
|
17270
|
-
"operationId": "
|
|
17557
|
+
"operationId": "email_attachment_get",
|
|
17271
17558
|
"tags": [
|
|
17272
17559
|
"Emails"
|
|
17273
17560
|
],
|
|
17274
|
-
"summary": "
|
|
17275
|
-
"description": "### Overview\
|
|
17561
|
+
"summary": "Download an attachment by index",
|
|
17562
|
+
"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
17563
|
"security": [
|
|
17277
17564
|
{
|
|
17278
17565
|
"bearerAuth": []
|
|
17279
17566
|
}
|
|
17280
17567
|
],
|
|
17281
|
-
"
|
|
17282
|
-
"command": "email show",
|
|
17283
|
-
"positional": [
|
|
17284
|
-
"id"
|
|
17285
|
-
],
|
|
17286
|
-
"display": {
|
|
17287
|
-
"shape": "object",
|
|
17288
|
-
"format": {
|
|
17289
|
-
"id": "id-short",
|
|
17290
|
-
"org_id": "id-short",
|
|
17291
|
-
"user_id": "id-short",
|
|
17292
|
-
"received_at": "relative-time",
|
|
17293
|
-
"created_at": "relative-time",
|
|
17294
|
-
"read_at": "relative-time",
|
|
17295
|
-
"deleted_at": "relative-time",
|
|
17296
|
-
"is_read": "bool-badge"
|
|
17297
|
-
},
|
|
17298
|
-
"dataPath": "email"
|
|
17299
|
-
}
|
|
17300
|
-
},
|
|
17301
|
-
"x-codeSamples": [
|
|
17568
|
+
"parameters": [
|
|
17302
17569
|
{
|
|
17303
|
-
"
|
|
17570
|
+
"name": "x-consistency-bookmark",
|
|
17571
|
+
"in": "header",
|
|
17572
|
+
"required": false,
|
|
17573
|
+
"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.",
|
|
17574
|
+
"schema": {
|
|
17575
|
+
"type": "string"
|
|
17576
|
+
},
|
|
17577
|
+
"example": "opaque-consistency-bookmark"
|
|
17578
|
+
},
|
|
17579
|
+
{
|
|
17580
|
+
"schema": {
|
|
17581
|
+
"type": "string"
|
|
17582
|
+
},
|
|
17583
|
+
"required": true,
|
|
17584
|
+
"name": "id",
|
|
17585
|
+
"in": "path"
|
|
17586
|
+
},
|
|
17587
|
+
{
|
|
17588
|
+
"schema": {
|
|
17589
|
+
"type": "string"
|
|
17590
|
+
},
|
|
17591
|
+
"required": true,
|
|
17592
|
+
"name": "idx",
|
|
17593
|
+
"in": "path"
|
|
17594
|
+
},
|
|
17595
|
+
{
|
|
17596
|
+
"schema": {
|
|
17597
|
+
"type": "string",
|
|
17598
|
+
"description": "When `true`, allow downloading an attachment whose parent email is soft-deleted. Defaults to `false`."
|
|
17599
|
+
},
|
|
17600
|
+
"required": false,
|
|
17601
|
+
"description": "When `true`, allow downloading an attachment whose parent email is soft-deleted. Defaults to `false`.",
|
|
17602
|
+
"name": "include_deleted",
|
|
17603
|
+
"in": "query"
|
|
17604
|
+
}
|
|
17605
|
+
],
|
|
17606
|
+
"x-cli": {
|
|
17607
|
+
"command": "_handwritten",
|
|
17608
|
+
"hidden": true
|
|
17609
|
+
},
|
|
17610
|
+
"x-codeSamples": [
|
|
17611
|
+
{
|
|
17612
|
+
"lang": "shell",
|
|
17304
17613
|
"label": "curl",
|
|
17305
|
-
"source": "curl https://api.wspc.ai/email/messages/eml_01HW3K4N9V5G6Z8C2Q7B1Y0M3F \\\n -H \"Authorization: Bearer $WSPC_API_KEY\""
|
|
17614
|
+
"source": "curl https://api.wspc.ai/email/messages/eml_01HW3K4N9V5G6Z8C2Q7B1Y0M3F/attachments/0 \\\n -H \"Authorization: Bearer $WSPC_API_KEY\" \\\n -o invoice.pdf"
|
|
17306
17615
|
},
|
|
17307
17616
|
{
|
|
17308
17617
|
"lang": "bash",
|
|
17309
17618
|
"label": "wspc CLI",
|
|
17310
|
-
"source": "wspc email
|
|
17619
|
+
"source": "wspc email attachment eml_01HW3K4N9V5G6Z8C2Q7B1Y0M3F 0 --output invoice.pdf"
|
|
17620
|
+
}
|
|
17621
|
+
],
|
|
17622
|
+
"responses": {
|
|
17623
|
+
"200": {
|
|
17624
|
+
"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>\"`.",
|
|
17625
|
+
"headers": {
|
|
17626
|
+
"x-consistency-bookmark": {
|
|
17627
|
+
"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.",
|
|
17628
|
+
"schema": {
|
|
17629
|
+
"type": "string"
|
|
17630
|
+
}
|
|
17631
|
+
}
|
|
17632
|
+
},
|
|
17633
|
+
"content": {
|
|
17634
|
+
"application/octet-stream": {
|
|
17635
|
+
"schema": {
|
|
17636
|
+
"type": "string"
|
|
17637
|
+
}
|
|
17638
|
+
}
|
|
17639
|
+
}
|
|
17640
|
+
},
|
|
17641
|
+
"401": {
|
|
17642
|
+
"description": "Authentication is required but missing or invalid. The Bearer token (API key or OAuth access token) was absent, malformed, or rejected.",
|
|
17643
|
+
"content": {
|
|
17644
|
+
"application/json": {
|
|
17645
|
+
"schema": {
|
|
17646
|
+
"type": "object",
|
|
17647
|
+
"properties": {
|
|
17648
|
+
"error": {
|
|
17649
|
+
"type": "object",
|
|
17650
|
+
"properties": {
|
|
17651
|
+
"code": {
|
|
17652
|
+
"type": "string"
|
|
17653
|
+
},
|
|
17654
|
+
"message": {
|
|
17655
|
+
"type": "string"
|
|
17656
|
+
},
|
|
17657
|
+
"extra": {
|
|
17658
|
+
"type": "object",
|
|
17659
|
+
"additionalProperties": {}
|
|
17660
|
+
}
|
|
17661
|
+
},
|
|
17662
|
+
"required": [
|
|
17663
|
+
"code",
|
|
17664
|
+
"message"
|
|
17665
|
+
]
|
|
17666
|
+
}
|
|
17667
|
+
},
|
|
17668
|
+
"required": [
|
|
17669
|
+
"error"
|
|
17670
|
+
]
|
|
17671
|
+
},
|
|
17672
|
+
"examples": {
|
|
17673
|
+
"authRequired": {
|
|
17674
|
+
"summary": "Missing Authorization header",
|
|
17675
|
+
"value": {
|
|
17676
|
+
"error": {
|
|
17677
|
+
"code": "AUTH_REQUIRED",
|
|
17678
|
+
"message": "missing bearer token"
|
|
17679
|
+
}
|
|
17680
|
+
}
|
|
17681
|
+
}
|
|
17682
|
+
}
|
|
17683
|
+
}
|
|
17684
|
+
}
|
|
17685
|
+
},
|
|
17686
|
+
"404": {
|
|
17687
|
+
"description": "Either the parent email is unknown / soft-deleted (`EMAIL_NOT_FOUND`) or `idx` is out of range (`ATTACHMENT_NOT_FOUND`).",
|
|
17688
|
+
"content": {
|
|
17689
|
+
"application/json": {
|
|
17690
|
+
"schema": {
|
|
17691
|
+
"type": "object",
|
|
17692
|
+
"properties": {
|
|
17693
|
+
"error": {
|
|
17694
|
+
"type": "object",
|
|
17695
|
+
"properties": {
|
|
17696
|
+
"code": {
|
|
17697
|
+
"type": "string"
|
|
17698
|
+
},
|
|
17699
|
+
"message": {
|
|
17700
|
+
"type": "string"
|
|
17701
|
+
},
|
|
17702
|
+
"extra": {
|
|
17703
|
+
"type": "object",
|
|
17704
|
+
"additionalProperties": {}
|
|
17705
|
+
}
|
|
17706
|
+
},
|
|
17707
|
+
"required": [
|
|
17708
|
+
"code",
|
|
17709
|
+
"message"
|
|
17710
|
+
]
|
|
17711
|
+
}
|
|
17712
|
+
},
|
|
17713
|
+
"required": [
|
|
17714
|
+
"error"
|
|
17715
|
+
]
|
|
17716
|
+
}
|
|
17717
|
+
}
|
|
17718
|
+
}
|
|
17719
|
+
},
|
|
17720
|
+
"429": {
|
|
17721
|
+
"description": "Rate limit exceeded. Retry after the duration in `error.extra.retry_after_seconds`. `limit_kind` identifies which bucket was exhausted.",
|
|
17722
|
+
"content": {
|
|
17723
|
+
"application/json": {
|
|
17724
|
+
"schema": {
|
|
17725
|
+
"type": "object",
|
|
17726
|
+
"properties": {
|
|
17727
|
+
"error": {
|
|
17728
|
+
"type": "object",
|
|
17729
|
+
"properties": {
|
|
17730
|
+
"code": {
|
|
17731
|
+
"type": "string"
|
|
17732
|
+
},
|
|
17733
|
+
"message": {
|
|
17734
|
+
"type": "string"
|
|
17735
|
+
},
|
|
17736
|
+
"extra": {
|
|
17737
|
+
"type": "object",
|
|
17738
|
+
"additionalProperties": {}
|
|
17739
|
+
}
|
|
17740
|
+
},
|
|
17741
|
+
"required": [
|
|
17742
|
+
"code",
|
|
17743
|
+
"message"
|
|
17744
|
+
]
|
|
17745
|
+
}
|
|
17746
|
+
},
|
|
17747
|
+
"required": [
|
|
17748
|
+
"error"
|
|
17749
|
+
]
|
|
17750
|
+
},
|
|
17751
|
+
"examples": {
|
|
17752
|
+
"rateLimited": {
|
|
17753
|
+
"summary": "Per-key rate limit hit",
|
|
17754
|
+
"value": {
|
|
17755
|
+
"error": {
|
|
17756
|
+
"code": "RATE_LIMITED",
|
|
17757
|
+
"message": "rate limit exceeded",
|
|
17758
|
+
"extra": {
|
|
17759
|
+
"retry_after_seconds": 60,
|
|
17760
|
+
"limit_kind": "authenticated_per_key"
|
|
17761
|
+
}
|
|
17762
|
+
}
|
|
17763
|
+
}
|
|
17764
|
+
}
|
|
17765
|
+
}
|
|
17766
|
+
}
|
|
17767
|
+
}
|
|
17768
|
+
},
|
|
17769
|
+
"500": {
|
|
17770
|
+
"description": "Unhandled server error. The request was well-formed but the service failed unexpectedly. Safe to retry idempotent operations.",
|
|
17771
|
+
"content": {
|
|
17772
|
+
"application/json": {
|
|
17773
|
+
"schema": {
|
|
17774
|
+
"type": "object",
|
|
17775
|
+
"properties": {
|
|
17776
|
+
"error": {
|
|
17777
|
+
"type": "object",
|
|
17778
|
+
"properties": {
|
|
17779
|
+
"code": {
|
|
17780
|
+
"type": "string"
|
|
17781
|
+
},
|
|
17782
|
+
"message": {
|
|
17783
|
+
"type": "string"
|
|
17784
|
+
},
|
|
17785
|
+
"extra": {
|
|
17786
|
+
"type": "object",
|
|
17787
|
+
"additionalProperties": {}
|
|
17788
|
+
}
|
|
17789
|
+
},
|
|
17790
|
+
"required": [
|
|
17791
|
+
"code",
|
|
17792
|
+
"message"
|
|
17793
|
+
]
|
|
17794
|
+
}
|
|
17795
|
+
},
|
|
17796
|
+
"required": [
|
|
17797
|
+
"error"
|
|
17798
|
+
]
|
|
17799
|
+
},
|
|
17800
|
+
"examples": {
|
|
17801
|
+
"internalError": {
|
|
17802
|
+
"summary": "Unhandled exception",
|
|
17803
|
+
"value": {
|
|
17804
|
+
"error": {
|
|
17805
|
+
"code": "INTERNAL_ERROR",
|
|
17806
|
+
"message": "internal error"
|
|
17807
|
+
}
|
|
17808
|
+
}
|
|
17809
|
+
}
|
|
17810
|
+
}
|
|
17811
|
+
}
|
|
17812
|
+
}
|
|
17813
|
+
}
|
|
17814
|
+
}
|
|
17815
|
+
}
|
|
17816
|
+
},
|
|
17817
|
+
"/email/messages/{id}": {
|
|
17818
|
+
"get": {
|
|
17819
|
+
"operationId": "email_get",
|
|
17820
|
+
"tags": [
|
|
17821
|
+
"Emails"
|
|
17822
|
+
],
|
|
17823
|
+
"summary": "Get an inbound email by id",
|
|
17824
|
+
"description": "### Overview\nFetches the metadata and plain-text body of a single inbound email by its unique ID. It also returns metadata for all associated attachments and optionally resolves the rendered HTML content.\n\n### When to Use\n- Use this endpoint to display the complete detail view of an email message.\n- Use it to extract attachment files or read complex HTML layouts.\n\n### Constraints\n- Requires a valid Bearer token in the `Authorization` header.\n- **R2 HTML Read**: The HTML body is stored in Object Storage (R2). To fetch it, explicitly pass `include_html=true` (this incurs an extra R2 read charge; leave unset if only plain text is needed).\n- Returns a 404 error if the email has been soft-deleted, unless `include_deleted=true` is set.\n\n### Troubleshooting\n- **401 Unauthorized**: Missing or expired token.\n- **404 Not Found**: The specified email ID does not exist, belongs to another user, or has been soft-deleted (without `include_deleted=true`).",
|
|
17825
|
+
"security": [
|
|
17826
|
+
{
|
|
17827
|
+
"bearerAuth": []
|
|
17311
17828
|
}
|
|
17312
17829
|
],
|
|
17313
17830
|
"parameters": [
|
|
17831
|
+
{
|
|
17832
|
+
"name": "x-consistency-bookmark",
|
|
17833
|
+
"in": "header",
|
|
17834
|
+
"required": false,
|
|
17835
|
+
"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.",
|
|
17836
|
+
"schema": {
|
|
17837
|
+
"type": "string"
|
|
17838
|
+
},
|
|
17839
|
+
"example": "opaque-consistency-bookmark"
|
|
17840
|
+
},
|
|
17314
17841
|
{
|
|
17315
17842
|
"schema": {
|
|
17316
17843
|
"type": "string"
|
|
@@ -17340,9 +17867,49 @@
|
|
|
17340
17867
|
"in": "query"
|
|
17341
17868
|
}
|
|
17342
17869
|
],
|
|
17870
|
+
"x-cli": {
|
|
17871
|
+
"command": "email show",
|
|
17872
|
+
"positional": [
|
|
17873
|
+
"id"
|
|
17874
|
+
],
|
|
17875
|
+
"display": {
|
|
17876
|
+
"shape": "object",
|
|
17877
|
+
"format": {
|
|
17878
|
+
"id": "id-short",
|
|
17879
|
+
"org_id": "id-short",
|
|
17880
|
+
"user_id": "id-short",
|
|
17881
|
+
"received_at": "relative-time",
|
|
17882
|
+
"created_at": "relative-time",
|
|
17883
|
+
"read_at": "relative-time",
|
|
17884
|
+
"deleted_at": "relative-time",
|
|
17885
|
+
"is_read": "bool-badge"
|
|
17886
|
+
},
|
|
17887
|
+
"dataPath": "email"
|
|
17888
|
+
}
|
|
17889
|
+
},
|
|
17890
|
+
"x-codeSamples": [
|
|
17891
|
+
{
|
|
17892
|
+
"lang": "shell",
|
|
17893
|
+
"label": "curl",
|
|
17894
|
+
"source": "curl https://api.wspc.ai/email/messages/eml_01HW3K4N9V5G6Z8C2Q7B1Y0M3F \\\n -H \"Authorization: Bearer $WSPC_API_KEY\""
|
|
17895
|
+
},
|
|
17896
|
+
{
|
|
17897
|
+
"lang": "bash",
|
|
17898
|
+
"label": "wspc CLI",
|
|
17899
|
+
"source": "wspc email show eml_01HW3K4N9V5G6Z8C2Q7B1Y0M3F"
|
|
17900
|
+
}
|
|
17901
|
+
],
|
|
17343
17902
|
"responses": {
|
|
17344
17903
|
"200": {
|
|
17345
17904
|
"description": "The email row, attachment metadata, and (when requested) the HTML body.",
|
|
17905
|
+
"headers": {
|
|
17906
|
+
"x-consistency-bookmark": {
|
|
17907
|
+
"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.",
|
|
17908
|
+
"schema": {
|
|
17909
|
+
"type": "string"
|
|
17910
|
+
}
|
|
17911
|
+
}
|
|
17912
|
+
},
|
|
17346
17913
|
"content": {
|
|
17347
17914
|
"application/json": {
|
|
17348
17915
|
"schema": {
|
|
@@ -17790,40 +18357,17 @@
|
|
|
17790
18357
|
"bearerAuth": []
|
|
17791
18358
|
}
|
|
17792
18359
|
],
|
|
17793
|
-
"
|
|
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": [
|
|
18360
|
+
"parameters": [
|
|
17815
18361
|
{
|
|
17816
|
-
"
|
|
17817
|
-
"
|
|
17818
|
-
"
|
|
18362
|
+
"name": "x-consistency-bookmark",
|
|
18363
|
+
"in": "header",
|
|
18364
|
+
"required": false,
|
|
18365
|
+
"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.",
|
|
18366
|
+
"schema": {
|
|
18367
|
+
"type": "string"
|
|
18368
|
+
},
|
|
18369
|
+
"example": "opaque-consistency-bookmark"
|
|
17819
18370
|
},
|
|
17820
|
-
{
|
|
17821
|
-
"lang": "bash",
|
|
17822
|
-
"label": "wspc CLI",
|
|
17823
|
-
"source": "wspc email ls --unread --limit 20"
|
|
17824
|
-
}
|
|
17825
|
-
],
|
|
17826
|
-
"parameters": [
|
|
17827
18371
|
{
|
|
17828
18372
|
"schema": {
|
|
17829
18373
|
"type": "string",
|
|
@@ -17886,9 +18430,50 @@
|
|
|
17886
18430
|
"in": "query"
|
|
17887
18431
|
}
|
|
17888
18432
|
],
|
|
18433
|
+
"x-cli": {
|
|
18434
|
+
"command": "email ls",
|
|
18435
|
+
"display": {
|
|
18436
|
+
"shape": "list",
|
|
18437
|
+
"columns": [
|
|
18438
|
+
"id",
|
|
18439
|
+
"from_addr",
|
|
18440
|
+
"subject",
|
|
18441
|
+
"is_read",
|
|
18442
|
+
"received_at"
|
|
18443
|
+
],
|
|
18444
|
+
"format": {
|
|
18445
|
+
"id": "id-short",
|
|
18446
|
+
"from_addr": "truncate",
|
|
18447
|
+
"subject": "truncate",
|
|
18448
|
+
"is_read": "bool-badge",
|
|
18449
|
+
"received_at": "relative-time"
|
|
18450
|
+
},
|
|
18451
|
+
"emptyMessage": "no emails"
|
|
18452
|
+
}
|
|
18453
|
+
},
|
|
18454
|
+
"x-codeSamples": [
|
|
18455
|
+
{
|
|
18456
|
+
"lang": "shell",
|
|
18457
|
+
"label": "curl",
|
|
18458
|
+
"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\""
|
|
18459
|
+
},
|
|
18460
|
+
{
|
|
18461
|
+
"lang": "bash",
|
|
18462
|
+
"label": "wspc CLI",
|
|
18463
|
+
"source": "wspc email ls --unread --limit 20"
|
|
18464
|
+
}
|
|
18465
|
+
],
|
|
17889
18466
|
"responses": {
|
|
17890
18467
|
"200": {
|
|
17891
18468
|
"description": "A page of inbound emails. `next_cursor` is present iff there is another page; pass it back as `cursor` to continue.",
|
|
18469
|
+
"headers": {
|
|
18470
|
+
"x-consistency-bookmark": {
|
|
18471
|
+
"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.",
|
|
18472
|
+
"schema": {
|
|
18473
|
+
"type": "string"
|
|
18474
|
+
}
|
|
18475
|
+
}
|
|
18476
|
+
},
|
|
17892
18477
|
"content": {
|
|
17893
18478
|
"application/json": {
|
|
17894
18479
|
"schema": {
|
|
@@ -19270,6 +19855,18 @@
|
|
|
19270
19855
|
"bearerAuth": []
|
|
19271
19856
|
}
|
|
19272
19857
|
],
|
|
19858
|
+
"parameters": [
|
|
19859
|
+
{
|
|
19860
|
+
"name": "x-consistency-bookmark",
|
|
19861
|
+
"in": "header",
|
|
19862
|
+
"required": false,
|
|
19863
|
+
"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.",
|
|
19864
|
+
"schema": {
|
|
19865
|
+
"type": "string"
|
|
19866
|
+
},
|
|
19867
|
+
"example": "opaque-consistency-bookmark"
|
|
19868
|
+
}
|
|
19869
|
+
],
|
|
19273
19870
|
"x-cli": {
|
|
19274
19871
|
"command": "_handwritten",
|
|
19275
19872
|
"hidden": true
|
|
@@ -19335,6 +19932,14 @@
|
|
|
19335
19932
|
"responses": {
|
|
19336
19933
|
"200": {
|
|
19337
19934
|
"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.",
|
|
19935
|
+
"headers": {
|
|
19936
|
+
"x-consistency-bookmark": {
|
|
19937
|
+
"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.",
|
|
19938
|
+
"schema": {
|
|
19939
|
+
"type": "string"
|
|
19940
|
+
}
|
|
19941
|
+
}
|
|
19942
|
+
},
|
|
19338
19943
|
"content": {
|
|
19339
19944
|
"application/json": {
|
|
19340
19945
|
"schema": {
|