> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.eyelevel.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.eyelevel.ai/_mcp/server.

# update

PUT https://api.groundx.ai/api/v1/customer
Content-Type: application/json

Replace or clear your account's file-access settings. Include fileAccessRevision. Invalid or missing input returns 400; disabled or forbidden access returns 403; a stale revision returns 409. If settings or ownership cannot be verified, returns 503 with Retry-After. After an uncertain outcome, read the applied settings before retrying. Protected stable links require X-API-Key on every read.

Reference: https://docs.eyelevel.ai/reference/api-reference/customer/update

## Authentication

- `X-API-Key` header (required) — API Key authentication via header

## Request

### Body (application/json)

This endpoint expects a FileAccessUpdate.

- `fileAccess` (FileAccessPolicy, required, nullable) — Settings that override inherited values. Omitted fields inherit. A protected parent cannot be made public, and its sharing time limit cannot be exceeded. Stable public links never expire. urlTtlSeconds limits the lifetime of storage-signed sharing links.
- `fileAccessRevision` (integer, required)

## Response

### 200

Applied settings

- `customer` (CustomerDetail, required) — Account information for the user

## Errors

### 400 Bad Request Error

Invalid body, revision, selector or expiry

- `any`

### 401 Unauthorized Error

Authentication required

- `any`

### 403 Forbidden Error

Forbidden

- `any`

### 404 Not Found Error

Owned resource or saved asset not found

- `any`

### 409 Conflict Error

Revision or ownership conflict

- `any`

### 503 Service Unavailable Error

File access is enabled but temporarily unavailable. Retry after the delay in Retry-After.

- `any`

## Types

### FileAccessPolicy

Settings that override inherited values. Omitted fields inherit. A protected parent cannot be made public, and its sharing time limit cannot be exceeded. Stable public links never expire. urlTtlSeconds limits the lifetime of storage-signed sharing links.

- `mode` (enum, optional)
  - Allowed values: `public`, `protected`
- `urlTtlSeconds` (integer, optional)

### CustomerDetail

Account information for the user

- `fileAccess` (FileAccessPolicy, optional, nullable) — Applied settings for this resource. Null means it inherits settings. Deployments without file access omit this field. Pending changes are not returned.
- `fileAccessRevision` (integer, optional) — Current settings revision. Include it when updating fileAccess. A stale revision returns 409.
- `effectiveFileAccess` (EffectivePolicy, optional) — Applied settings after inheritance. Sharing links expire after 300 seconds by default; storage credentials may shorten that time. Protected stable URLs require current authentication on every read.
- `email` (string, optional) — Email associated with the account
- `first` (string, optional) — Given name associated with the account, if known
- `last` (string, optional) — Family name associated with the account, if known
- `status` (enum, optional) — Account status associated with the customer, if known
  - Allowed values: `admin`, `apiKey`, `archived`, `invalid`, `partnerApiKey`, `partnerModUser`, `partner`, `test`, `user`
- `subscription` (SubscriptionDetail, optional) — Subscription information for the user, including current usage and limits

### EffectivePolicy

Applied settings after inheritance. Sharing links expire after 300 seconds by default; storage credentials may shorten that time. Protected stable URLs require current authentication on every read.

- `mode` (enum, required)
  - Allowed values: `public`, `protected`
- `urlTtlSeconds` (integer, required)

### SubscriptionDetail

Subscription information for the user, including current usage and limits

- `billingCycleAnchor` (string, optional) — Billing cycle anchor for the current subscription.
- `billingStart` (string, optional) — Start of the billing period used for current usage values.
- `billingEnd` (string, optional) — End of the billing period used for current usage values, when available.
- `meters` (SubscriptionDetailMeters, optional)

### SubscriptionDetailMeters

- `fileTokens` (MeterDetail, optional) — Current usage and limits for the user for the given metric
- `searches` (MeterDetail, optional) — Current usage and limits for the user for the given metric

### MeterDetail

Current usage and limits for the user for the given metric

- `max` (integer, optional) — Maximum limit for the current billing period
- `meterId` (string, optional) — Unique usage metric ID.
- `value` (integer, optional) — Current usage for the current billing period

## Examples

### Example_0

**Request**

```json
{
  "fileAccess": {
    "mode": "protected",
    "urlTtlSeconds": 300
  },
  "fileAccessRevision": 0
}
```

**Response**

```json
{
  "customer": {
    "fileAccess": {
      "mode": "protected",
      "urlTtlSeconds": 300
    },
    "fileAccessRevision": 1,
    "effectiveFileAccess": {
      "mode": "protected",
      "urlTtlSeconds": 300
    }
  }
}
```

**SDK Code**

```python Example_0
import requests

url = "https://api.groundx.ai/api/v1/customer"

payload = {
    "fileAccess": {
        "mode": "protected",
        "urlTtlSeconds": 300
    },
    "fileAccessRevision": 0
}
headers = {
    "X-API-Key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript Example_0
const url = 'https://api.groundx.ai/api/v1/customer';
const options = {
  method: 'PUT',
  headers: {'X-API-Key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"fileAccess":{"mode":"protected","urlTtlSeconds":300},"fileAccessRevision":0}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Example_0
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.groundx.ai/api/v1/customer"

	payload := strings.NewReader("{\n  \"fileAccess\": {\n    \"mode\": \"protected\",\n    \"urlTtlSeconds\": 300\n  },\n  \"fileAccessRevision\": 0\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("X-API-Key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Example_0
require 'uri'
require 'net/http'

url = URI("https://api.groundx.ai/api/v1/customer")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["X-API-Key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"fileAccess\": {\n    \"mode\": \"protected\",\n    \"urlTtlSeconds\": 300\n  },\n  \"fileAccessRevision\": 0\n}"

response = http.request(request)
puts response.read_body
```

```java Example_0
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://api.groundx.ai/api/v1/customer")
  .header("X-API-Key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"fileAccess\": {\n    \"mode\": \"protected\",\n    \"urlTtlSeconds\": 300\n  },\n  \"fileAccessRevision\": 0\n}")
  .asString();
```

```php Example_0
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.groundx.ai/api/v1/customer', [
  'body' => '{
  "fileAccess": {
    "mode": "protected",
    "urlTtlSeconds": 300
  },
  "fileAccessRevision": 0
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-API-Key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Example_0
using RestSharp;

var client = new RestClient("https://api.groundx.ai/api/v1/customer");
var request = new RestRequest(Method.PUT);
request.AddHeader("X-API-Key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"fileAccess\": {\n    \"mode\": \"protected\",\n    \"urlTtlSeconds\": 300\n  },\n  \"fileAccessRevision\": 0\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Example_0
import Foundation

let headers = [
  "X-API-Key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "fileAccess": [
    "mode": "protected",
    "urlTtlSeconds": 300
  ],
  "fileAccessRevision": 0
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.groundx.ai/api/v1/customer")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Example_1

**Request**

```json
{
  "fileAccess": null,
  "fileAccessRevision": 1
}
```

**Response**

```json
{
  "customer": {
    "fileAccess": null,
    "fileAccessRevision": 2,
    "effectiveFileAccess": {
      "mode": "public",
      "urlTtlSeconds": 300
    }
  }
}
```

**SDK Code**

```python Example_1
import requests

url = "https://api.groundx.ai/api/v1/customer"

payload = {
    "fileAccess": None,
    "fileAccessRevision": 1
}
headers = {
    "X-API-Key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript Example_1
const url = 'https://api.groundx.ai/api/v1/customer';
const options = {
  method: 'PUT',
  headers: {'X-API-Key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"fileAccess":null,"fileAccessRevision":1}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Example_1
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.groundx.ai/api/v1/customer"

	payload := strings.NewReader("{\n  \"fileAccess\": null,\n  \"fileAccessRevision\": 1\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("X-API-Key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Example_1
require 'uri'
require 'net/http'

url = URI("https://api.groundx.ai/api/v1/customer")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["X-API-Key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"fileAccess\": null,\n  \"fileAccessRevision\": 1\n}"

response = http.request(request)
puts response.read_body
```

```java Example_1
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://api.groundx.ai/api/v1/customer")
  .header("X-API-Key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"fileAccess\": null,\n  \"fileAccessRevision\": 1\n}")
  .asString();
```

```php Example_1
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.groundx.ai/api/v1/customer', [
  'body' => '{
  "fileAccess": null,
  "fileAccessRevision": 1
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-API-Key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Example_1
using RestSharp;

var client = new RestClient("https://api.groundx.ai/api/v1/customer");
var request = new RestRequest(Method.PUT);
request.AddHeader("X-API-Key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"fileAccess\": null,\n  \"fileAccessRevision\": 1\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Example_1
import Foundation

let headers = [
  "X-API-Key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "fileAccess": ,
  "fileAccessRevision": 1
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.groundx.ai/api/v1/customer")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```