Plotwork
Get the Plotwork connection
Whether the workspace has connected a Plotwork account, and which one.
GET
/v1/plotworkTL;DR
| Question | Answer |
|---|---|
| What does it do? | Get the Plotwork connection. |
| What does it need? | An API key or an OAuth access token. |
| What does it take? | Nothing. |
| What does it return? | Status 200 with a body of type PlotworkConnection. |
| In the SDK? | flung.plotwork.get() |
| What can go wrong? | 401 Missing, unknown, revoked or expired API key; 422 The request failed validation; 429 Too many requests for this credential; wait for retry-after seconds. Every failure has the same error shape. |
What it does
Whether the workspace has connected a Plotwork account, and which one. Never a token.
Example
curl
curl -X GET 'https://api.flung.dev/v1/plotwork' \ --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.get()js
const response = await fetch('https://api.flung.dev/v1/plotwork', { 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
{ "connected": true, "status": "active", "account": { "id": "string", "name": "string", "email": "string", "organisation": { "slug": "string", "name": "string" } }, "connectedAt": "2026-11-01T09:00:00.000Z"}Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | The connection. | PlotworkConnection |
| 401 | Missing, unknown, revoked or expired API key. | Error |
| 422 | The request failed validation. | Error |
| 429 | Too many requests for this credential; wait for retry-after seconds. | Error |
Response body
A 200 answer has the type PlotworkConnection.
| Field | Type | Required | Description |
|---|---|---|---|
connected | boolean | yes | |
status | "active" | "needs_reconnect" | null | yes | needs_reconnect once Plotwork ended the grant: a person connects it again in the portal. Null when not connected. |
account | object | null | yes | |
account.id | string | yes | |
account.name | string | null | yes | |
account.email | string | null | yes | |
account.organisation | object | null | yes | The Plotwork organisation whose library it reads, or null for the person's own. |
account.organisation.slug | string | yes | |
account.organisation.name | string | yes | |
connectedAt | string | null | yes |
See also
| Doc | Why |
|---|---|
| API reference | Every endpoint |
| Schemas | Every request and response type |
| Errors | Every error code and what to do about it |