---
title: Patch Entity Property Source
description: Patch Entity Property Source
product: general
token_estimate: 2034
---
# Patch Entity Property Source

> For AI agents: a documentation index is available at [/llms.txt](/llms.txt). Append `.md` to any page URL for markdown, or send `Accept: text/markdown`.

## Patch Entity Property Source

**PATCH** `/console/v1/experiments/entity_property/{name}`

Full URL: `https://statsigapi.net/console/v1/experiments/entity_property/{name}`

Patch Entity Property Source

## Authorizations

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| STATSIG-API-KEY | string | Yes | — | apiKey (header) |

## Path parameters

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| name (path) | string | Yes | — | Name of entity property source |

## Body (application/json)

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| name | string | No | — | Unique identifier for the entity property source. |
| description | string | No | — | Detailed context and purpose of the entity property source. |
| tags | string[] | No | — | Tags for categorization and search. |
| sql | string | No | — | SQL query defining the data source |
| timestampColumn | string | No | — | Optional column name for timestamp. |
| timestampAsDay | boolean | No | — | Indicates if the timestamp is treated as a day. |
| idTypeMapping | object[] | No | — | Mappings of Statsig units to their columns. |
| idTypeMapping.statsigUnitID | string | Yes | — | ID for the Statsig unit. |
| idTypeMapping.column | string | Yes | — | Column name linked to the ID. |
| isReadOnly | boolean | No | — | Specifies if the source can only be edited via the Console API. |
| team | string | No | — | Optional field indicating the team name responsible for the entity property source, aiding in accountability and management. Constraints: nullable |
| teamID | string | No | — | Optional field indicating the team ID responsible for the entity property source, aiding in accountability and management. Constraints: nullable |
| dryRun | boolean | No | — | Skips persisting the entity property source (used to validate that inputs are correct) |

## Response (application/json)

**200** — Patch Entity Property Source response

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| message | string | Yes | — | A simple string explaining the result of the operation. |
| data | object | Yes | — | — |
| data.name | string | Yes | — | Unique identifier for the entity property source. |
| data.description | string | Yes | — | Detailed context and purpose of the entity property source. |
| data.tags | string[] | Yes | — | Tags for categorization and search. |
| data.sql | string | Yes | — | SQL query defining the data source. |
| data.timestampColumn | string | No | — | Optional column name for timestamp. |
| data.timestampAsDay | boolean | No | — | Indicates if the timestamp is treated as a day. |
| data.idTypeMapping | object[] | Yes | — | Mappings of Statsig units to their columns. |
| data.idTypeMapping.statsigUnitID | string | Yes | — | ID for the Statsig unit. |
| data.idTypeMapping.column | string | Yes | — | Column name linked to the ID. |
| data.isReadOnly | boolean | No | — | Specifies if the source can only be edited via the Console API. |
| data.owner | object | No | {"ownerID":"user123","ownerType":"USER","ownerName":"John Doe","ownerEmail":"owner123@test.com"} | Schema for owner data including ID, type, name. Constraints: nullable |
| data.owner.ownerID | string | No | abc123 | ID of the owner |
| data.owner.ownerType | string | No | USER | Type of the owner (e.g., SDK_KEY or USER) |
| data.owner.ownerName | string | No | John Doe | The name of the owner. This field is optional. |
| data.owner.ownerEmail | string | No | — | The email of the owner. This field is optional. |
| data.team | string | No | — | Optional field indicating the team name responsible for the entity property source, aiding in accountability and management. Constraints: nullable |
| data.teamID | string | No | — | Optional field indicating the team ID responsible for the entity property source, aiding in accountability and management. Constraints: nullable |

```json
{
  "message": "Entity Property Source updated successfully",
  "data": {
    "name": "Location",
    "description": "This is the the location description",
    "tags": [],
    "sql": "SELECT * FROM shoppy-sales.setup.user_properties",
    "timestampColumn": "timestamp",
    "idTypeMapping": [
      {
        "statsigUnitID": "stableID",
        "column": "user_id"
      }
    ],
    "timestampAsDay": true
  }
}
```

**400** — Invalid request. Please check the request input and try again.

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| status | integer | Yes | — | Allowed values: 400 |
| message | string | Yes | — | — |

```json
{
  "status": 400,
  "message": "Invalid request. Please check the request input and try again."
}
```

**401** — This endpoint only accepts an active CONSOLE key, but an invalid key was sent. Key: console-xxxXXXxxxXXXxxx

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| status | integer | Yes | — | Allowed values: 401 |
| message | string | Yes | — | — |

```json
{
  "status": 401,
  "message": "This endpoint only accepts an active CONSOLE key, but an invalid key was sent. Key: console-xxxXXXxxxXXXxxx"
}
```

**404** — Not Found. The requested resource could not be found.

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| status | integer | Yes | — | Allowed values: 404 |
| message | string | Yes | — | — |

```json
{
  "status": 404,
  "message": "Not Found. The requested resource could not be found."
}
```

## Code samples

### cURL

```bash
curl -X PATCH "https://statsigapi.net/console/v1/experiments/entity_property/{name}" \
  -H "Content-Type: application/json" \
  -H "STATSIG-API-KEY: YOUR_API_KEY"
```

### Python

```python
import requests

response = requests.patch(
    "https://statsigapi.net/console/v1/experiments/entity_property/{name}",
    headers={
        "Content-Type": "application/json",
        "STATSIG-API-KEY": "YOUR_API_KEY"
    }
)
data = response.json()
```

### JavaScript

```javascript
const response = await fetch("https://statsigapi.net/console/v1/experiments/entity_property/{name}", {
  method: "PATCH",
  headers: {
    "Content-Type": "application/json",
    "STATSIG-API-KEY": "YOUR_API_KEY"
  }
});
const data = await response.json();
```

### PHP

```php
<?php
$ch = curl_init("https://statsigapi.net/console/v1/experiments/entity_property/{name}");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Content-Type: application/json",
    "STATSIG-API-KEY: YOUR_API_KEY"
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
```

### Go

```go
package main

import (
  "bytes"
  "net/http"
)

func main() {
req, _ := http.NewRequest("PATCH", "https://statsigapi.net/console/v1/experiments/entity_property/{name}", nil)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("STATSIG-API-KEY", "YOUR_API_KEY")
  client := &http.Client{}
  resp, _ := client.Do(req)
  defer resp.Body.Close()
}
```

### Java

```java
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
      .uri(URI.create("https://statsigapi.net/console/v1/experiments/entity_property/{name}"))
      .method("PATCH", HttpRequest.BodyPublishers.noBody())
.header("Content-Type", "application/json")
      .header("STATSIG-API-KEY", "YOUR_API_KEY")
      .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
```

### Ruby

```ruby
require "net/http"
require "json"

uri = URI("https://statsigapi.net/console/v1/experiments/entity_property/{name}")
request = Net::HTTP::Patch.new(uri)
request["Content-Type"] = "application/json"
request["STATSIG-API-KEY"] = "YOUR_API_KEY"
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http|
  http.request(request)
end
```

