# MasterKeyword object

## Fields

| Field       | Type   | Description | Editable |
| ----------- | ------ | ----------- | -------- |
| key\_name   | string |             |          |
| key\_title  | string |             |          |
| suggestions | string |             |          |

## Filters

| Field | Description |
| ----- | ----------- |
| id    | ID          |

[![Run in Postman](https://run.pstmn.io/button.svg)](https://app.getpostman.com/run-collection/a7d848e84131d1179d8e)

## find master keyword

<mark style="color:blue;">`GET`</mark> `https://{YOUR_OKSKY_DOMAIN}/rapi/v1/master_keywords/{:id}`

#### Headers

| Name           | Type   | Description              |
| -------------- | ------ | ------------------------ |
| X-Access-Token | string | set you access token     |
| Content-Type   | string | application/vnd.api+json |
| Accept         | string | application/vnd.api+json |

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

```
HTTP/1.1 200 OK
Content-Type: application/vnd.api+json

{
  "data": {
    "id": "1",
    "type": "master_keywords",
    "links": {
      "self": "https://{YOUR_OKSKY_DOMAIN}/rapi/v1/master_keywords/1"
    },
    "attributes": {
      "key_name": "customer_code",
      "key_title": "",
      "suggestions": [
        "1234"
      ]
    },
    "relationships": {
      "user_infos": {
        "links": {
          "self": "https://{YOUR_OKSKY_DOMAIN}/rapi/v1/master_keywords/1/relationships/user_infos",
          "related": "https://{YOUR_OKSKY_DOMAIN}/rapi/v1/master_keywords/1/user_infos"
        }
      }
    }
  }
}
```

{% endtab %}
{% endtabs %}

## search master keywords

<mark style="color:blue;">`GET`</mark> `https://{YOUR_OKSKY_DOMAIN}/rapi/v1/master_keywords`

#### Headers

| Name           | Type   | Description              |
| -------------- | ------ | ------------------------ |
| X-Access-Token | string | set you access token     |
| Content-Type   | string | application/vnd.api+json |
| Accept         | string | application/vnd.api+json |

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

```
{
  "data": [
    {
      "id": "1",
      "type": "master_keywords",
      "links": {
        "self": "https://{YOUR_OKSKY_DOMAIN}/rapi/v1/master_keywords/1"
      },
      "attributes": {
        "key_name": "customer_code",
        "key_title": "",
        "suggestions": [
          "1234"
        ]
      },
      "relationships": {
        "user_infos": {
          "links": {
            "self": "https://{YOUR_OKSKY_DOMAIN}/rapi/v1/master_keywords/1/relationships/user_infos",
            "related": "https://{YOUR_OKSKY_DOMAIN}/rapi/v1/master_keywords/1/user_infos"
          }
        }
      }
    }
  ],
  "meta": {
    "record_count": 1
  },
  "links": {
    "first": "https://{YOUR_OKSKY_DOMAIN}/rapi/v1/master_keywords?page%5Bnumber%5D=1&page%5Bsize%5D=25",
    "last": "https://{YOUR_OKSKY_DOMAIN}/rapi/v1/master_keywords?page%5Bnumber%5D=1&page%5Bsize%5D=25"
  }
}
```

{% endtab %}
{% endtabs %}

## create master keyword

<mark style="color:green;">`POST`</mark> `https://{YOUR_OKSKY_DOMAIN}/rapi/v1/master_keywords`

#### Headers

| Name           | Type   | Description              |
| -------------- | ------ | ------------------------ |
| Accept         | string | application/vnd.api+json |
| Content-Type   | string | application/vnd.api+json |
| X-Access-Token | string | set your access token    |

#### Request Body

| Name | Type   | Description |
| ---- | ------ | ----------- |
| data | object |             |

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

```
{
  "data": {
    "id": "2",
    "type": "master_keywords",
    "links": {
      "self": "https://{YOUR_OKSKY_DOMAIN}/rapi/v1/master_keywords/2"
    },
    "attributes": {
      "key_name": "login_key",
      "key_title": "",
      "suggestions": []
    },
    "relationships": {
      "user_infos": {
        "links": {
          "self": "https://{YOUR_OKSKY_DOMAIN}/rapi/v1/master_keywords/2/relationships/user_infos",
          "related": "https://{YOUR_OKSKY_DOMAIN}/rapi/v1/master_keywords/2/user_infos"
        }
      }
    }
  }
}
```

{% endtab %}
{% endtabs %}

## update master keywords

<mark style="color:orange;">`PUT`</mark> `https://{YOUR_OKSKY_DOMAIN}/rapi/v1/master_keywords/{:id}`

#### Headers

| Name           | Type   | Description              |
| -------------- | ------ | ------------------------ |
| Accept         | string | application/vnd.api+json |
| Content-Type   | string | application/vnd.api+json |
| X-Access-Token | string | set your access token    |

#### Request Body

| Name | Type   | Description |
| ---- | ------ | ----------- |
| data | object |             |

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

```
{
  "data": {
    "id": "1",
    "type": "master_keywords",
    "links": {
      "self": "https://{YOUR_OKSKY_DOMAIN}/rapi/v1/master_keywords/1"
    },
    "attributes": {
      "key_name": "customer_code",
      "key_title": "",
      "suggestions": [
        "1234"
      ]
    },
    "relationships": {
      "user_infos": {
        "links": {
          "self": "https://{YOUR_OKSKY_DOMAIN}/rapi/v1/master_keywords/1/relationships/user_infos",
          "related": "https://{YOUR_OKSKY_DOMAIN}/rapi/v1/master_keywords/1/user_infos"
        }
      }
    }
  }
}
```

{% endtab %}
{% endtabs %}

## delete master keyword

<mark style="color:red;">`DELETE`</mark> `https://{YOUR_OKSKY_DOMAIN}/rapi/v1/master_keywords/{:id}`

#### Headers

| Name           | Type   | Description              |
| -------------- | ------ | ------------------------ |
| Accept         | string | application/vnd.api+json |
| Content-Type   | string | application/vnd.api+json |
| X-Access-Token | string | set your access token    |

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

```
Completed 204 No Content
```

{% 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://docs.ok-sky.com/resources-api/resources-object/masterkeyword-object.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.
