rename label
Rename only a custom label with a matching revision. Default production/staging labels are permanent. The old name subsequently returns label_not_found.
/api/v1/organizations/{organizationId}/prompts/{promptId}/labels/{labelName}Authorization
ManagementOAuth managementUser-based Clerk OAuth. CLI is a public Authorization Code client using S256 PKCE and browser loopback redirect. Hosted MCP uses resource-bound OAuth. Verify issuer, token type, intended audience/resource, scopes, live membership and current role. Do not forward arbitrary OAuth tokens into Convex session JWT auth. OAuth URLs below are placeholders for deployment configuration.
In: header
Scope: management
Path Parameters
Permanent organizationId; selected organization must be authorized for the current user.
Permanent promptId; selected organization must be authorized for the current user.
Permanent labelName; selected organization must be authorized for the current user.
Header Parameters
Management writes: scoped to OAuth user+client+organization+operation. Store request digest and response for at least 24 hours. Same key/body replays original response, including after completion; different body fails idempotency_conflict. Exception: create_retrieval_key stores a non-secret receipt referencing the created key, never its secret. Same-key/body retries return 409 secret_unavailable with existing key metadata and do not create another key. Evaluation creation must not execute twice.
8 <= length <= 128Request 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
application/json
application/json
application/json
curl -X PATCH "https://example.com/api/v1/organizations/string/prompts/string/labels/string" \ -H "Idempotency-Key: stringst" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "revision": 0 }'{ "name": "string", "versionId": "string", "revision": 0, "updatedAt": "2019-08-24T14:15:22Z", "updatedBy": "string"}assign label PUT
Compare label revision, including ABA changes. Production cannot be unassigned after setup. Return published=false and structured warnings plus acknowledgment when production lacks current coverage. Retry with the context-bound acknowledgment to Proceed Anyway. Reject stale acknowledgment. Staging/custom labels do not require evaluations; default labels cannot be renamed/deleted.
delete label DELETE
Delete a custom label using If-Match revision; default labels cannot be deleted.