Tags API

Tagging system for categorizing and organizing posts and content with flexible labeling.

List Tags

Get a paginated list of tags with optional search functionality.

GET https://responserift.dev/api/tags?limit=10&offset=0&q=json

Query Parameters

  • limit - Number of results (default: 100)
  • offset - Number of results to skip (default: 0)
  • q - Search in tag name (case-insensitive)

Response

{
  "total": 12,
  "limit": 10,
  "offset": 0,
  "results": [
    {
      "id": 1,
      "name": "json"
    },
    {
      "id": 2,
      "name": "api"
    },
    {
      "id": 3,
      "name": "tutorial"
    }
  ]
}

Get Tag

Retrieve a specific tag by ID.

GET https://responserift.dev/api/tags/1

Create Tag

Create a new tag. Only the name field is required.

POST https://responserift.dev/api/tags
Content-Type: application/json

{ "name": "new-tag" }

Required fields: name
Validation: Name must be a non-empty string

Update Tag

Update an existing tag name.

PUT https://responserift.dev/api/tags/1
Content-Type: application/json

{ "name": "updated-tag-name" }

Delete Tag

Remove a tag from the system.

DELETE https://responserift.dev/api/tags/1

Tag Structure

Fields

  • id - Unique tag identifier
  • name - Tag name (e.g., "json", "api", "tutorial")

Usage with Posts

Tags are used to categorize posts and can be used as filters in post queries.

Filter Posts by Tag

GET https://responserift.dev/api/posts?tag=json&limit=10

Example Post with Tags

{
  "id": 1,
  "title": "Getting Started with JSON APIs",
  "body": "Learn how to work with JSON APIs...",
  "userId": 1,
  "tags": ["1", "json", "api", "tutorial"],
  "category": "API Design"
}

Note: Tags in posts can be either tag IDs (as strings) or tag names. When filtering, use the exact value present in the post.

Common Tag Examples

  • json - JSON-related content
  • api - API development
  • tutorial - How-to guides
  • javascript - JavaScript content
  • web - Web development

Warning: All mutations are in-memory only and reset on server restart.

ResponseRift JSON API • Production-Ready, Zero-Config