> For the complete documentation index, see [llms.txt](https://docs.ok-sky.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ok-sky.com/resources-api/resources-object/masterkeyword-object.md).

# 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 %}
