Plotwork
List Plotwork diagrams
The diagrams the connected Plotwork account can see, newest first, private ones included.
GET
/v1/plotwork/diagramsTL;DR
| Question | Answer |
|---|---|
| What does it do? | List Plotwork diagrams. |
| What does it need? | An API key or an OAuth access token. |
| What does it take? | limit, cursor, folder, q in the query string. |
| What does it return? | Status 200 with a body of type PlotworkDiagramList. |
| In the SDK? | flung.plotwork.listDiagrams() |
| As an MCP tool? | list_plotwork_diagrams |
| What can go wrong? | 401 Missing, unknown, revoked or expired API key; 409 Plotwork is not connected (plotwork_not_connected), or must be connected again (plotwork_reconnect), in the portal; 422 The request failed validation; 429 Too many requests for this credential; wait for retry-after seconds; 502 Plotwork could not be reached or refused for a moment (plotwork_unavailable); 503 Plotwork is not set up on this server (not_configured). Every failure has the same error shape. |
What it does
The diagrams the connected Plotwork account can see, newest first, private ones included. q keeps to names and folders that hold the words, ignoring case.
Example
curl
curl -X GET 'https://api.flung.dev/v1/plotwork/diagrams?q=checkout' \ --header "Authorization: Bearer $FLUNG_API_KEY"ts
import { Flung } from '@flung.dev/sdk'
const flung = new Flung({ apiKey: process.env.FLUNG_API_KEY! })const result = await flung.plotwork.listDiagrams({ q: 'checkout',})js
const response = await fetch('https://api.flung.dev/v1/plotwork/diagrams?q=checkout', { method: 'GET', headers: { 'Authorization': `Bearer ${process.env.FLUNG_API_KEY}`, },})if (!response.ok) throw new Error((await response.json()).error.message)const result = await response.json()A successful answer looks like this:
json
{ "data": [ { "id": "string", "name": "string", "folder": "string", "scheme": "string", "updatedAt": "2026-11-01T09:00:00.000Z" } ], "nextCursor": "string"}Query parameters
| Field | Type | Required | Description |
|---|---|---|---|
limit | integer | no | |
cursor | string | no | The nextCursor of the page before. |
folder | string | no | Only this Plotwork folder and the folders inside it, such as Payments/Checkout. |
q | string | no | Words the name or folder holds, ignoring case. Plotwork searches its whole library. |
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | A page of diagrams. | PlotworkDiagramList |
| 401 | Missing, unknown, revoked or expired API key. | Error |
| 409 | Plotwork is not connected (plotwork_not_connected), or must be connected again (plotwork_reconnect), in the portal. | Error |
| 422 | The request failed validation. | Error |
| 429 | Too many requests for this credential; wait for retry-after seconds. | Error |
| 502 | Plotwork could not be reached or refused for a moment (plotwork_unavailable). | Error |
| 503 | Plotwork is not set up on this server (not_configured). | Error |
Response body
A 200 answer has the type PlotworkDiagramList.
| Field | Type | Required | Description |
|---|---|---|---|
data | PlotworkDiagram[] | yes | |
data[].id | string | yes | |
data[].name | string | null | yes | |
data[].folder | string | null | yes | |
data[].scheme | string | yes | The color scheme it was drawn in, such as light, dark or auto. |
data[].updatedAt | string | yes | When it was last published in Plotwork. |
nextCursor | string | null | yes | Pass it as cursor for the next page; null on the last. |
See also
| Doc | Why |
|---|---|
| API reference | Every endpoint |
| Schemas | Every request and response type |
| Errors | Every error code and what to do about it |
list_plotwork_diagrams | The same operation as an MCP tool |