Actions7
- Credits Actions
- Users Actions
- Subscriptions Actions
Credits → Consume Credit
AI-generatedSummary
Consume one credit from a specified user's account in the middleware service, optionally providing a reason for the consumption.
Inputs
- Authentication — Choose between 'None' or 'Credentials' authentication method to use for the request.
- Base URL — Specify the base URL of the middleware service when authentication is set to 'None'.
- User ID (required) — The numeric ID of the user whose credit will be consumed.
- Reason — A string indicating the reason for consuming the credit, defaulting to 'lookup' if not provided.
Output shape
a single JSON object representing the API response for consuming a credit
The operation sends a POST request to '/api/credits/consume' with userId and optional reason in the request body. The response JSON structure depends on the middleware API. Errors are returned as error messages in the JSON output. The node supports multiple input items and processes each independently.