Skip to main content

Organizing with Tags

Tags help you categorize and organize documents across your organization. By assigning tags to documents, you can quickly filter, search, and manage large volumes of agreements.

Why Use Tags?

As your document volume grows, finding specific documents becomes challenging. Tags solve this by:
  • Categorizing documents by type, client, department, or status
  • Enabling quick filtering to find related documents
  • Improving workflow by grouping documents logically
  • Supporting reporting by allowing aggregate views
Document list showing color-coded tags for different categories

Creating Tags

Create tags with a name and optional color for visual organization:
curl -X POST https://app.sajn.se/api/v1/tags \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Employment",
    "color": "#22C55E"
  }'
Response:
{
  "tag": {
    "id": "tag_abc123",
    "name": "Employment",
    "color": "#22C55E",
    "createdAt": "2024-01-15T10:30:00Z"
  }
}

Tag Fields

FieldRequiredDescription
nameYesDisplay name for the tag (unique within organization)
colorNoHex color code for visual identification (e.g., #22C55E)

Suggested Colors

ColorHex CodeSuggested Use
Green#22C55ECompleted, approved
Blue#3B82F6In progress, active
Yellow#EAB308Pending review, attention needed
Red#EF4444Urgent, rejected
Purple#A855F7Special handling
Gray#6B7280Archived, inactive

Adding Tags to Documents

When Creating a Document

Include tag IDs in the document creation request:
curl -X POST https://app.sajn.se/api/v1/documents \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Employment Contract - Anna Andersson",
    "type": "SIGNABLE",
    "tags": ["tag_abc123", "tag_def456"]
  }'

Adding Tags to Existing Documents

Add a tag to a document that already exists:
curl -X POST https://app.sajn.se/api/v1/documents/doc_123/tags \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "tagId": "tag_abc123"
  }'

Removing Tags from Documents

Remove a tag from a document:
curl -X DELETE https://app.sajn.se/api/v1/documents/doc_123/tags/tag_abc123 \
  -H "Authorization: Bearer YOUR_API_KEY"

Filtering Documents by Tags

Document filter interface showing tag selection for filtering

Using the Dashboard

  1. Navigate to the Documents list
  2. Click the Filter button
  3. Select one or more tags
  4. The list updates to show only matching documents

Using the API

Filter documents by tag when listing:
curl -X GET "https://app.sajn.se/api/v1/documents?tagId=tag_abc123&page=1&perPage=20" \
  -H "Authorization: Bearer YOUR_API_KEY"
You can filter by multiple tags by including multiple tagId parameters. Documents matching any of the specified tags will be returned.

Tag Management

Listing All Tags

Retrieve all tags in your organization:
curl -X GET https://app.sajn.se/api/v1/tags \
  -H "Authorization: Bearer YOUR_API_KEY"
Response:
{
  "tags": [
    {
      "id": "tag_abc123",
      "name": "Employment",
      "color": "#22C55E"
    },
    {
      "id": "tag_def456",
      "name": "NDA",
      "color": "#3B82F6"
    },
    {
      "id": "tag_ghi789",
      "name": "Urgent",
      "color": "#EF4444"
    }
  ]
}

Updating Tags

Change a tag’s name or color:
curl -X PATCH https://app.sajn.se/api/v1/tags/tag_abc123 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Employment Contracts",
    "color": "#16A34A"
  }'
Updating a tag automatically updates its appearance on all documents that have it assigned.

Organization Strategies

By Document Type

Create tags for each type of document you handle:
TagColorDescription
EmploymentGreenEmployment contracts and offers
NDABlueNon-disclosure agreements
VendorPurpleVendor and supplier contracts
ClientYellowClient agreements
InternalGrayInternal policies and approvals

By Client or Project

For project-based work, create tags per client or project:
TagDescription
Client: Acme CorpAll documents for Acme Corporation
Project: Website 2024Documents related to website project
Deal: Q1 ExpansionM&A or deal-specific documents

By Status or Priority

Track document lifecycle with status tags:
TagColorDescription
UrgentRedRequires immediate attention
Review NeededYellowAwaiting internal review
Ready to SendBlueApproved and ready for signing
ArchivedGrayCompleted and filed

By Department

Organize by internal teams:
TagDescription
HRHuman resources documents
LegalLegal agreements and contracts
SalesSales contracts and quotes
FinanceFinancial agreements
Avoid creating too many tags. A smaller set of well-defined tags is more useful than hundreds of rarely-used ones.

Best Practices

Before creating tags, decide on your organization’s tagging strategy. Document which tags to use and when, so everyone applies them consistently.
Establish naming conventions for tags. For example, always prefix client tags with “Client:” or project tags with “Project:”.
Keep your tag list manageable. Aim for 10-20 well-defined tags rather than creating a new tag for every scenario.
Assign colors based on meaning (red for urgent, green for complete) rather than aesthetics. This makes visual scanning faster.
Periodically review your tags. Remove or merge tags that are rarely used or have become redundant.
Make tagging part of your document creation workflow. Tag documents when creating them, not as an afterthought.

Next Steps

Custom Fields

Add structured metadata to documents

Creating Documents

Learn how to create and configure documents

Tags API

Explore the full Tags API reference

Document Tags API

Add and remove tags from documents