---
title: Create a Taggable
slug: create-a-taggable
docTags: 
createdAt: 2026-04-21T15:22:49.957Z
---

{
  "id": "OccOqNMZ-ss5Mr-JqEUEB",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://developer.digitail.io/api/v1/taggables",
    "servers": [
      {
        "url": "https://developer.digitail.io/api/v1/taggables",
        "description": "Sandbox server (uses test data)"
      },
      {
        "url": "https://vet.digitail.io/api/v1/taggables",
        "description": "Production server (uses live data)"
      }
    ],
    "name": "Create a Taggable",
    "description": "<p>Permissions needed: NONE\nStore Taggable record</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "",
          "schema": [
            {
              "name": "entity_type",
              "kind": "optional",
              "type": "string<pet | user>",
              "description": "Entity type.",
              "example": "pet",
              "enum": [
                "pet",
                "user"
              ]
            },
            {
              "name": "entity_id",
              "kind": "optional",
              "type": "integer",
              "description": "Entity Id.",
              "example": 1
            },
            {
              "name": "tag_id",
              "kind": "optional",
              "type": "integer",
              "description": "Tag Id.",
              "example": 1
            }
          ],
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "passport",
          "name": "passport",
          "kind": "optional",
          "type": "oauth2",
          "description": "Laravel passport oauth2 security.",
          "oauth2Flows": {
            "authorizationCode": {
              "authorizationUrl": "https://digitail.test/oauth/authorize",
              "tokenUrl": "https://digitail.test/oauth/token",
              "refreshUrl": "https://digitail.test/oauth/token"
            }
          }
        },
        {
          "id": "Bearer",
          "name": "Bearer",
          "kind": "optional",
          "type": "http",
          "scheme": "bearer"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "201",
        "description": "successful operation",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "data",
                "kind": "optional",
                "type": "object",
                "description": "<p>Taggable is the pivot in the many-to-many relationship between a tag and an entity (petParent or pet)</p>",
                "example": "",
                "schema": [
                  {
                    "name": "id",
                    "kind": "optional",
                    "type": "integer",
                    "description": "",
                    "example": 1
                  },
                  {
                    "name": "entity_type",
                    "kind": "optional",
                    "type": "string<App\\\\Models\\\\Pet | App\\\\Models\\\\User>",
                    "description": "",
                    "example": "App\\\\Models\\\\Pet",
                    "enum": [
                      "App\\\\Models\\\\Pet",
                      "App\\\\Models\\\\User"
                    ]
                  },
                  {
                    "name": "entity_id",
                    "kind": "optional",
                    "type": "integer",
                    "description": "",
                    "example": 1
                  },
                  {
                    "name": "tag_id",
                    "kind": "optional",
                    "type": "integer",
                    "description": "",
                    "example": 1
                  },
                  {
                    "name": "created_at",
                    "kind": "optional",
                    "type": "string<date-time>",
                    "description": "",
                    "example": "2021-11-15T11:37:46.000000Z",
                    "format": "date-time"
                  },
                  {
                    "name": "deleted_at",
                    "kind": "optional",
                    "type": "string<date-time>",
                    "nullable": true,
                    "description": "",
                    "example": "",
                    "format": "date-time"
                  },
                  {
                    "name": "tag",
                    "kind": "optional",
                    "type": "object",
                    "description": "",
                    "modelRef": "#/paths/~1api~1v1~1tags/post/responses/201/content/application~1json/schema/properties/data",
                    "customType": "data",
                    "schema": []
                  }
                ]
              }
            ],
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "0P98ozi9x4ZoB68h32XW7",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://developer.digitail.io/api/v1/taggables \\\n     --header 'accept: application/json'"
        },
        {
          "id": "Vx8Hcj1J5Mm8J8u9j9uTU",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://developer.digitail.io/api/v1/taggables\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "97qHMQS7fvQWWjmH-0wJd",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://developer.digitail.io/api/v1/taggables\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "3cBnfffzGqHzRA12OMmmz",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://developer.digitail.io/api/v1/taggables\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "0P98ozi9x4ZoB68h32XW7"
    },
    "results": {
      "languages": [
        {
          "id": "NfI0C9Op84nFqV9qVZSYs",
          "language": "201",
          "code": "// successful operation\n{\n  \"data\": {\n    \"id\": 1,\n    \"entity_type\": \"App\\\\\\\\Models\\\\\\\\Pet\",\n    \"entity_id\": 1,\n    \"tag_id\": 1,\n    \"created_at\": \"2021-11-15T11:37:46.000000Z\",\n    \"deleted_at\": \"\",\n    \"tag\": {}\n  }\n}"
        }
      ],
      "selectedLanguageId": "NfI0C9Op84nFqV9qVZSYs"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}