api.apiPatch<T>(endpoint, data) Convenience method that sends a PATCH request with a JSON body and returns the parsed JSON response. Use it for partial updates of an existing resource.
| argument | Type | Description |
|---|---|---|
| endpointrequired | string | API path starting with /api/v1/... (e.g. /api/v1/cards/123). See the REST section for the full list of endpoints. |
| datarequired | unknown | Partial update payload, JSON-serialized. |
Return value - Promise<T>
const api = window.Addon.iframe();
const updated = await api.apiPatch(
`/api/v1/cards/${cardId}`,
{ title: 'Renamed by addon' },
);