# diagrid call state set

Create or update a state item

### Description

Create or update a state item using an existing state component

```
diagrid call state set <key> [flags]
```

### Examples

```

  # Save a state item using an existing state component
  diagrid call state set mystatekey --component my-state-store --id my-id --value myvalue

```

### Options

```
  -c, --component string   Component name for target state store
  -a, --id string          id used to save state
      --value string       Data string
  -p, --project string     Name of existing project
  -o, --output string      Output format, supported [table, yaml, json] (default "table")
      --verbose            Include verbose output such as curl command and response body
  -h, --help               help for set
```

### Options inherited from parent commands

```
      --api-key string   Diagrid Cloud API key
```

### SEE ALSO

- [diagrid call state](./state.md)	 - Read and write state store entries via the Dapr State API
