Skip to main content
When automated checks are not enough, Lexera routes contracts to a verified law firm for human review. The lexera_route_to_specialist tool detects the target jurisdiction, queries the global pricing engine, places a temporary AED wallet hold, and assigns the document to the correct specialist queue. This guide shows the full dispatch flow: checking rates, confirming funds, posting the request, and capturing the order ID.

Prerequisites

  • A valid Lexera API key with the lex_ prefix.
  • An active corporate AED wallet with sufficient balance for the target jurisdiction.
  • The contract text and any specialist instructions you want the attorney to follow.

Steps

1

Check the jurisdiction rate

Before dispatching, query the required wallet hold for your target jurisdiction.
Post this JSON-RPC payload to your active SSE session URL (see Execution Lifecycle). The response streams back over SSE with the required AED hold amount.
2

Confirm wallet balance covers the hold

Ensure your workspace AED wallet balance meets or exceeds the required tier. For UAE, the example authorized amount is 699 AED.
If your wallet lacks the required AED, the dispatch will fail with an Insufficient AED wallet balance error. Ask a workspace finance administrator to top up the balance before retrying. See Errors for details.
3

Dispatch to the specialist queue

POST the lexera_route_to_specialist JSON-RPC payload to your session URL. Include the contract text, jurisdiction, and any directives for the human attorney.
The server returns HTTP 202 Accepted. The dispatch result streams back over the open SSE connection.
4

Capture the returned order_id

On success, the SSE payload contains a DISPATCH_SUCCESS status and the order_id you will use for polling.
Save the order_id securely. You will need it to poll status and download the certified artifacts later.

What happens next

After dispatch, the order enters pending_admin_triage while the assigned law firm reviews the document. Once the attorney completes the review and issues the certified signature, the status changes to verified_executed. To track progress, follow the Poll Order Status guide.