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

Update Tokenset

Updates an existing tokenset. Only provided fields will be updated.
PRO Plan Required - This endpoint requires a PRO or TEAM subscription plan. API write access is not available on the FREE plan.

Endpoint

PATCH /api/v1/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 dtk_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