Skip to content

Commit a497673

Browse files
tobiceclaude
andauthored
docs(openapi): add 402 response to Actor execution endpoints (#2412)
Updates API schema to match changes from apify/apify-core#26917: unauthenticated Actor execution requests now return 402 with X402 payment info instead of 401. I have also updated the `PamentRequired` example to be more realistic. --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 78674d1 commit a497673

4 files changed

Lines changed: 8 additions & 3 deletions

File tree

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
description: Payment required - the user has exceeded their usage limit or does not have enough credits.
1+
description: Payment required - the user has exceeded their usage limit, does not have enough credits, or the request lacks authentication and payment credentials.
22
content:
33
application/json:
44
schema:
55
$ref: ../schemas/common/ErrorResponse.yaml
66
example:
77
error:
8-
type: actor-memory-limit-exceeded
9-
message: You have exceeded your usage limit. Please consider upgrading your plan.
8+
type: x402-payment-required
9+
message: Please provide X402-PAYMENT-SIGNATURE header with the payment. See https://x402.org.

apify-api/openapi/components/schemas/common/ErrorType.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ enum:
2222
- unknown-build-tag
2323
- unsupported-content-encoding
2424
- user-not-found
25+
- x402-payment-required

apify-api/openapi/paths/actors/acts@{actorId}@run-sync-get-dataset-items.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ post:
8989
application/json:
9090
schema:
9191
$ref: "../../components/schemas/common/errors/ActorErrors.yaml#/ActorRunFailedError"
92+
"402":
93+
$ref: ../../components/responses/PaymentRequired.yaml
9294
"404":
9395
$ref: ../../components/responses/NotFound.yaml
9496
"408":

apify-api/openapi/paths/actors/acts@{actorId}@run-sync.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ post:
6262
application/json:
6363
schema:
6464
$ref: "../../components/schemas/common/errors/ActorErrors.yaml#/ActorRunFailedError"
65+
"402":
66+
$ref: ../../components/responses/PaymentRequired.yaml
6567
"404":
6668
$ref: ../../components/responses/NotFound.yaml
6769
"408":

0 commit comments

Comments
 (0)