Project Tag API
Use project tags to maintain a project's label vocabulary. Vocabulary management, assigning tags to records and permission rules on tagged records are separate operations. Start with Tagging and Classification for the dashboard, assignment and access-control workflows.
Authentication and routes
Use project API keys from a trusted server integration, with the required effective permissions. The project-tag policy maps reads to view_projects and changes to update_projects. Keep the API-key guide's project/record/field enforcement limitations in mind; a key's ownership or a client-selected project URL alone is not proven isolation.
The base path is /api/v1/projects/{teamSlug}/{projectSlug}/project-tags. Team and project parameters are slugs. Individual operations use the tag's returned slug, not numeric ID:
| Method | Path suffix | Result |
|---|---|---|
| GET | base path | Paginated vocabulary list. |
| POST | base path | Create a label. |
| GET | /{project_tag} | Read a label by slug. |
| PATCH or PUT | /{project_tag} | Update supplied mutable fields. Both reach the same partial-update handler. |
| DELETE | /{project_tag} | Delete the label. Review its rules/consumers before removal. |
The registration does not expose search, batch or restore operations. GET also has the framework's HEAD alias. The REST reference describes the six non-HEAD method/path operations.
Create a label
POST JSON such as this project-global test label:
{
"name": "Documentation Lab",
"color": "#3366FF",
"slug": "documentation-lab",
"taggable_type": null,
"portal_visible": false
}
Name is required, up to 100 characters. Color is required and must be # plus six hexadecimal digits. A supplied slug must be 1–100 characters using letters, digits, _ or -, unique across this project's tags. Reserved values are item-tags, item-tags-bulk, bulk, sync-item, check-duplicate, export and table. Explicit uppercase letters are accepted. Omit slug to generate one from the name; read the returned slug rather than guessing collision suffixes.
taggable_type: null means a project-global tag. For a model-specific tag, send a registered fully qualified class, for example App\Models\AgendaItem, App\Models\ProjectPortalPage or App\Models\ProjectLocation; do not send dashboard keys such as agenda_item. The REST schema lists the current accepted classes. Model scope controls where the vocabulary is usable; it does not grant access to those resources.
The create response is HTTP 201 with the resource under data, including its generated slug. Creation alone does not attach the label to any record. Newly created tags default to hidden unless portal visibility is explicitly enabled; this example keeps it false.
Read and update
A project-key principal can read the complete vocabulary, including hidden tags, subject to authorization and project query scope. Other caller types retain the portal-visible query; hidden labels are absent from lists and return 404 on show. That distinction does not itself authorize a caller to write. Write refetch queries allow hidden tags so an authorized create/update can return the record it just saved.
The controller permits name, slug, color and taggable_type filters and the agendaItems, projectPortalPages, projectLocations includes through the supported Orion query contract. Its exposed forModel scope includes both that model's tags and project-global tags; global selects only unscoped tags. Do not infer arbitrary relation includes, filters or a POST search endpoint from other resources.
PATCH or PUT a saved slug with only the intended changes:
{
"name": "Documentation Lab Updated",
"color": "#228844",
"portal_visible": true
}
The update rules allow name, color, model scope and portal visibility. Omitted name/color remain unchanged; supplied empty name/color fail validation. Slug is not an update field, and the model preserves it after creation: renaming does not change the URL. Read back the same slug to verify stored values. Changing model scope can affect existing consumers; inspect assignments before doing so.
Visibility controls label disclosure, separately from permission rules that gate tagged objects. Hiding a tag does not remove those rules or grant access. Enabling visibility does not guarantee a tagged record is visible to an attendee.
Delete and verify
DELETE addresses the slug and returns the deleted resource under data with HTTP 200, rather than an empty 204. The reviewed model has no soft-delete behavior or public restore route. Its deletion observer removes tag permission rules; dependent assignment rows use a cascading foreign key. Deleting a label can therefore change access behavior as well as remove vocabulary. Review the owning project's rules and consumers before deletion; this operation is not a way to delete the tagged resources themselves.
In an approved isolated test project, list vocabulary, create the hidden lab tag, retain its returned slug, show it with the managing project key, update selected fields and read back the unchanged slug. Separately verify an authorized portal caller cannot discover the hidden tag and can discover it after visibility is enabled. Check object access independently. Delete only the test label, then verify its absence. These are acceptance steps to run with authorized test credentials, not operations performed by this documentation example.
| Symptom | Check |
|---|---|
| 401 | Bearer validity/expiry and supported authentication headers. |
| 403 | Effective project view/update permission and caller type. |
| 404 | Team/project/tag slugs, project scope and portal-visible filtering. An ID is not the tag route key. |
| 422 on create | Name/color, URL-safe unique unreserved slug and registered class value for model scope. |
| Rename kept old URL | Expected: slug is immutable after creation. |
| Label saved but not on an item | Vocabulary creation does not attach it; use the resource's supported assignment controls. |
| Hidden label still gates content | Expected: label disclosure and object permission rules are independent. |
The reference is reconciled against platform 3b48eb675f7c8e3c4f0b87d0cd613fa7fb371093. An isolated installed-Orion registrar check confirms method expansion; schema/example checks do not establish real-route authorization, storage, visibility or deployed acceptance.