## Create Agent Data

`AgentData Beta.AgentData.Create(AgentDataCreateParamsparameters, CancellationTokencancellationToken = default)`

**post** `/api/v1/beta/agent-data`

Create new agent data.

### Parameters

- `AgentDataCreateParams parameters`

  - `required IReadOnlyDictionary<string, JsonElement> data`

    Body param

  - `required string deploymentName`

    Body param

  - `string? organizationID`

    Query param

  - `string? projectID`

    Query param

  - `string collection`

    Body param

### Returns

- `class AgentData:`

  API Result for a single agent data item

  - `required IReadOnlyDictionary<string, JsonElement> Data`

  - `required string DeploymentName`

  - `string? ID`

  - `string Collection`

  - `DateTimeOffset? CreatedAt`

  - `string? ProjectID`

  - `DateTimeOffset? UpdatedAt`

### Example

```csharp
AgentDataCreateParams parameters = new()
{
    Data = new Dictionary<string, JsonElement>()
    {
        { "foo", JsonSerializer.SerializeToElement("bar") }
    },
    DeploymentName = "deployment_name",
};

var agentData = await client.Beta.AgentData.Create(parameters);

Console.WriteLine(agentData);
```

#### Response

```json
{
  "data": {
    "foo": "bar"
  },
  "deployment_name": "deployment_name",
  "id": "id",
  "collection": "collection",
  "created_at": "2019-12-27T18:11:19.117Z",
  "project_id": "project_id",
  "updated_at": "2019-12-27T18:11:19.117Z"
}
```
