# Add Sleep Quality Score

Use the `addSleepQualityScore` sleep quality index scaling from 0 to 100.

### **Required Arguments**

| Argument | Type | Note                                                                                                                                             |
| -------- | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `date`   | Date | The date when the sleep quality score will be counted. Use the format: `YYYY-MM-DD`                                                              |
| `value`  | Int! | Sleep quality index scaling from 0 to 100, where the values above 77 signify good sleep quality, while those below 77 signify poor sleep quality |

### **Available Fields**

| Field     | Type    | Note                                                                                   |
| --------- | ------- | -------------------------------------------------------------------------------------- |
| `success` | Boolean | **true:** If the entry has been created successfully. Otherwise, it displays **false** |
| `message` | String  | The message returns either if the information has been updated or not.                 |

### Example <a href="#example" id="example"></a>

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

```graphql
mutation {
  addSleepQualityScore (value: 80, date: "2022-08-11") {
    success
    message
  }
}
```

{% endtab %}

{% tab title="Headers" %}

```graphql
{
  "Authorization": "Bearer <insert_your_token_here>"
}
```

{% endtab %}

{% tab title="Response" %}

```graphql
{
  "data": {
    "addExerciseEntry": {
      "success": true,
      "message": "Sleep Quality Score added"
    }
  }
}
```

{% 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.suggestic.com/graphql/query/mutations/tracking/sleep/add-sleep-quality-score.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.
