---
title: context
slug: context
description: Learn how to use HypeXAPI.setDefault command in this document to easily set default values for specific contexts. Ensure consistent values across all contexts, with step-by-step instructions and a code example for setting default values for 'homeContext' 
docTags: 
createdAt: 2022-05-04T10:39:17.000Z
---

The HypeXAPI.setDefault command allows you to set a default value for a particular context. This is useful if you want to ensure that all context values are set to a certain value.

To use this command, you first need to specify the context you want to set a default value for. This is done by passing in a lookup key, which is used to identify the context.

Once you have specified the context, you can then pass in the default value you want to set. This can be any value you like, but it must be compatible with the context you are setting it for.

```javascript
HypeXAPI.setDefault("context", {
   'homeContext': {
    "contextActivities": {
        "parent": {
            "id": "http://example.com/MyActivity",
            "objectType": "Activity"
        },
        "grouping": {
            "id": "http://example.com/MyGrouping",
            "objectType": "Activity"
        }
    },
   },
   'workContext': {
    "contextActivities": {
        "parent": {
            "id": "http://example.com/MyActivity",
            "objectType": "Activity"
        },
        "other": {
            "id": "http://example.com/MyOtherActivity",
            "objectType": "Activity"
        }
    },
   },
});
```

