Flambe docs
API referenceHouseholds

Replace the grants for a resource type

Sets the complete set of grants for one resource type in a single call. Anything the caller had shared that is absent from `grants` is revoked, which is what makes this safe to drive from a checkbox list.

PUT
/api/households/{id}/library/{resourceType}/bulk

Sets the complete set of grants for one resource type in a single call. Anything the caller had shared that is absent from grants is revoked, which is what makes this safe to drive from a checkbox list.

Authorization

bearerAuth
AuthorizationBearer <token>

A Clerk session JWT. Obtain one with a Clerk frontend SDK (session.getToken()) or, for server-to-server use, with a Clerk machine token. The token's sub claim is the Flambe user id that scopes every request.

In: header

Path Parameters

id*string
Formatuuid
resourceType*string

Value in

  • "recipe"
  • "collection"
  • "mealplan"
  • "grocerylist"

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/api/households/497f6eca-6276-4993-bfeb-53cbbbba6f08/library/recipe/bulk" \  -H "Content-Type: application/json" \  -d '{    "grants": [      {        "resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f"      }    ]  }'
{  "granted": 0,  "revoked": 0}