Skip to content

Low-code HTTP tools

An automation tool that can send a multipart form upload and receive a webhook can read drawings through the HTTP API, with an API token and no code. It takes two flows.

Flow 1: submit

An HTTP request step:

Setting Value
Method POST
URL https://api.w24.co/techread/read-with-callback
Header Authorization: Token <your-token>
Body multipart/form-data

Form fields, each a separate part. Every field but the drawing is a JSON value, so a string keeps its quotes:

Field Value
drawing The file, from the step that received it.
asks [{"ask_version": "v2", "ask_type": "META_DATA"}]
callback_url "<the webhook URL of flow 2>"
max_pages 5
callback_headers {"X-Token": "<a secret of your choice>"} (optional, but lets flow 2 reject strangers)

The response is {"request_id": "..."}. Store it with whatever the drawing belongs to (the RFQ, the order, the email), so flow 2 can find it. The whole request is limited to about 4.6 MB; see File Size.

Flow 2: collect

A webhook trigger, at the URL you gave as callback_url. One read calls it several times, once per message:

  1. PROGRESS / STARTED, with no data.
  2. One or more ASK messages for every ask, with the results in payload_dict. They can arrive at the same time and in any order.
  3. PROGRESS / COMPLETED, last.

So the flow runs once per message, and must not treat the first run as the result. For each run:

  1. Answer 200 at once. The trigger must answer within 10 seconds. An answer outside 2xx that is not retried (a 401 from a secret check that failed, for example), or one that keeps failing after the retries, ends the read, and the read stays charged.
  2. Compute a key from the body (a hash of it). If that key is already stored, stop: this is a repeat. The same message can arrive twice, with an identical body and the header X-Werk24-Delivery-Attempt above 1. request_id, message_subtype and page_number alone are not a key: view images and redaction send several messages for the same page.
  3. If message_type is ASK, store the whole message (its payload_dict, its payload_url for files, and its exceptions, which say when an ask failed) under request_id and that key, for example in a table or data store. Download a payload_url within 10 minutes.
  4. If message_subtype is COMPLETED, the read is done: fetch everything stored under that request_id and continue with it. Because step 2 stops a repeated COMPLETED, this runs once.

The HTTP API page shows every message, headers and body, and the OpenAPI file describes them for tools that import one.

With an AI agent instead

If the tool has an AI agent that speaks MCP, the MCP server does the submitting and collecting for you, and you sign in instead of handling a token.