Create Tag

POST /api/v2/tags

Headers

Name
Type
Description

Authorization

string

Bearer token

Content-Type

string

application/vnd.api+json

Request

{
  "data": {
    "type": "tags",
    "attributes": {
      "name": "My Tag"
    },
    "relationships": {
      "space": {
        "data": {
          "type": "spaces",
          "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
        }
      }
    }
  }
}

Attributes

Name
Type
Description

name

string

Tag name

Response

201 Created
{
  "data": {
    "id": "a8e22ad3-b8b1-4fe2-a08a-45e5ba39df7d",
    "type": "tags",
    "attributes": {
      "name": "My Tag"
    },
    "relationships": {
      "space": {
        "data": {
          "type": "spaces",
          "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
        }
      }
    },
    "links": {
      "self": "https://environment.monterosa.cloud/api/v2/tags/a8e22ad3-b8b1-4fe2-a08a-45e5ba39df7d"
    }
  }
}

Example

curl --request POST \
  --url https://environment.monterosa.cloud/api/v2/tags \
  --header 'Authorization: Bearer JmsmU5gZb6xNVUgQGoKcQLvQjRhKAUSb' \
  --header 'Content-Type: application/vnd.api+json' \
  --data '{
    "data": {
        "type": "tags",
        "attributes": {
        "name": "My Tag"
        },
        "relationships": {
        "space": {
            "data": {
            "type": "spaces",
            "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            }
        }
        }
    }
  }'

Last updated

Was this helpful?