# Tagging

## Create Tagging

The table given below describes the `/api/v2/tagging`.

## Create&#x20;

<mark style="color:green;">`POST`</mark> `https://app.moota.co/api/v2/tagging`

#### Request Body

| Name | Type   | Description           |
| ---- | ------ | --------------------- |
| name | string | Name of tagging value |

{% tabs %}
{% tab title="200 " %}

```
{
  "tagging": {
    "name": "cash",
    "tag_id": "vZExj7Bz59G"
  }
}
```

{% endtab %}

{% tab title="422 " %}

```
{
  "message": "The given data was invalid.",
  "errors": {
    "name": [
      "Kolom name harus diisi."
    ]
  }
}
```

{% endtab %}
{% endtabs %}

## Update Tagging

The table given below describes the `/api/v2/tagging/{tag_id}`. Use this API to update an existing beneficiary identified by its `tag_id`.

## Update

<mark style="color:orange;">`PUT`</mark> `https://app.moota.co/api/v2/tagging/{tag_id}`

#### Path Parameters

| Name    | Type   | Description                     |
| ------- | ------ | ------------------------------- |
| tag\_id | string | Tag Id of identified by tagging |

#### Request Body

| Name | Type   | Description           |
| ---- | ------ | --------------------- |
| name | string | Name of tagging value |

{% tabs %}
{% tab title="200 " %}

```
{
  "message": "Tag berhasil diupdate"
}
```

{% endtab %}

{% tab title="422 " %}

```
{
  "message": "The given data was invalid.",
  "errors": {
    "name": [
      "Kolom name harus diisi."
    ]
  }
}
```

{% endtab %}
{% endtabs %}

## Get Taggings

The table given below describes the `/api/v2/tagging`.

## Fetch

<mark style="color:blue;">`GET`</mark> `https://app.moota.co/api/v2/tagging`

#### Query Parameters

| Name | Type   | Description                |
| ---- | ------ | -------------------------- |
| tag  | string | Name of filter tag by name |

{% tabs %}
{% tab title="200 " %}

```
{
  "error": false,
  "tagging": [
    {
      "name": "assurance",
      "tag_id": "e42qjy2WGE5"
    },
    {
      "name": "assurance-car",
      "tag_id": "M1Z6zK0jJDY"
    },
  ]
}
```

{% endtab %}
{% endtabs %}

## Remove Tagging

The table given below describes the `/api/v2/tagging/{tag_id}`.

## Remove

<mark style="color:red;">`DELETE`</mark> `https://app.moota.co/api/v2/tagging/{tag_id}`

#### Path Parameters

| Name    | Type   | Description                              |
| ------- | ------ | ---------------------------------------- |
| tag\_id | string | Tag Id of identified tagging can destroy |

{% tabs %}
{% tab title="200 " %}

```
{
  "message": "OK"
}
```

{% endtab %}

{% tab title="404 " %}

```
{
  "message": "Data not found"
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://moota.gitbook.io/technical-docs/mutation/tagging.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
