Skip to main content
PATCH
https://app.tokencraft.dev/api/v1
/
tokensets
/
{id}
Update Tokenset
curl --request PATCH \
  --url https://app.tokencraft.dev/api/v1/tokensets/{id} \
  --header 'Authorization: Bearer <token>'

Update Tokenset

Updates an existing tokenset. Only provided fields will be updated.
Write access policy - This endpoint requires the write:tokens scope.
  • TEAM-owned workspace: owner, admin, editor can write; viewer is blocked (403).
  • Non-TEAM workspace: only the workspace owner can write.
  • If the workspace owner plan has no API write access (for example FREE), write is blocked.

Endpoint

PATCH /tokensets/{id}

Authentication

Requires a valid API token in the Authorization header.

Request

Headers

HeaderValueRequired
AuthorizationBearer tokenYes
Content-Typeapplication/jsonYes

Path Parameters

ParameterTypeRequiredDescription
idstringYesTokenset ID

Body Parameters

ParameterTypeRequiredDescription
namestringNoNew tokenset name (max 255 characters)
descriptionstringNoNew description (null to remove)
All body parameters are optional. Only provided fields will be updated.

Request Body

{
  "name": "Brand Colors",
  "description": "Updated description"
}

Response

Success Response

Status: 200 OK
{
  "id": "tokenset-123",
  "workspace_id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Brand Colors",
  "description": "Updated description",
  "created_at": "2025-01-15T10:00:00Z",
  "updated_at": "2025-01-15T14:30:00Z"
}

Examples

curl -X PATCH https://app.tokencraft.dev/api/v1/tokensets/tokenset-123 \
  -H "Authorization: Bearer tkc_your_token_here" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Brand Colors",
    "description": "Primary brand color palette"
  }'

Error Responses

400 Bad Request

{
  "error": "Name must be a non-empty string"
}

404 Not Found

{
  "error": "Tokenset not found"
}

Next Steps