Skip to main content
POST
Manage Line Request
This endpoint supports small request-management actions. It does not create a new line request.

When To Use This Endpoint

Use this endpoint when the request already exists and the user asks one of these questions:
  • “I lost the payment link. Can I get it again?”
  • “I changed my mind. Can I cancel this unpaid request?”
This endpoint is only for requests that are still pending payment.

Authentication

Pass your workspace API key as a Bearer token, or use a Clerk session token.

Path parameter

string
required
The line request id returned by POST /api/line-requests — it is the line._id value in that response.A line request is not a separate record: it is the line itself, created with requestSource: "api". The request id and the line id are therefore the same value. Unlike GET /api/line-requests/{id}, which reads any line in your workspace, these two actions run only against API-created requests — a line created in the dashboard returns 404 Line request not found.

Request body

string
required
Which action to run. One of "payment_link" or "cancel" — any other value returns 400 Unsupported action, and so does an empty body.

Supported actions

Both actions only apply to pending-payment requests. If the request is already in provisioning, active, failed, or canceled, these actions no longer apply.

Success (200 OK)

If the workspace entitlement has already updated, the same action can promote the line and return a normal provisioning response instead. That means payment_link can act like a safe recovery action:
  • if payment is still needed, it gives you the invoice again
  • if payment has already been reconciled, it can return the updated provisioning state instead

Cancel pending request

Success (200 OK)

After canceling, the workspace can create a different line request without waiting on the old unpaid one.

Error responses