> ## Documentation Index
> Fetch the complete documentation index at: https://deepline.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Customer DB: Upsert Customer Db File

> Save a new version of a text file, such as a lead scoring model, in your workspace's file store. Includes inputs, outputs, SDK V2 examples, and Deepline cost.

Save a new version of a text file, such as a lead scoring model, in your workspace's file store.

> [!NOTE]
>
> Tool ID: `upsert_customer_db_file`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'upsert_customer_db_file',
  {
    "path": "example",
    "content": "Example message"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute upsert_customer_db_file --input '{
  "path": "example",
  "content": "Example message"
}' --json
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "ok": true,
  "path": "example",
  "contentHash": "example",
  "version": 123,
  "updatedAt": "2026-01-15T12:00:00Z"
}
```

Use `deepline describe upsert_customer_db_file --json` for the latest machine-readable contract.

## Input reference

Append a new immutable text file version in the authenticated workspace customer DB file store.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.path` | `string` | Yes | — | Workspace file path, for example lead\_scoring/model.json. Paths are scoped to the authenticated workspace. |
| `payload.content` | `string` | No | — | File content to store. |
| `payload.text` | `string` | No | — | Alias for content. |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "description": "Append a new immutable text file version in the authenticated workspace customer DB file store.",
    "anyOf": [
      {
        "type": "object",
        "properties": {
          "path": {
            "type": "string",
            "description": "Workspace file path, for example lead_scoring/model.json. Paths are scoped to the authenticated workspace.",
            "minLength": 1
          },
          "content": {
            "type": "string",
            "description": "File content to store.",
            "minLength": 1
          },
          "text": {
            "type": "string",
            "description": "Alias for content.",
            "minLength": 1
          }
        },
        "required": [
          "path",
          "content"
        ],
        "additionalProperties": false
      },
      {
        "type": "object",
        "properties": {
          "path": {
            "type": "string",
            "description": "Workspace file path, for example lead_scoring/model.json. Paths are scoped to the authenticated workspace.",
            "minLength": 1
          },
          "content": {
            "type": "string",
            "description": "File content to store.",
            "minLength": 1
          },
          "text": {
            "type": "string",
            "description": "Alias for content.",
            "minLength": 1
          }
        },
        "required": [
          "path",
          "text"
        ],
        "additionalProperties": false
      }
    ]
  }
  ```
</details>

## Output reference

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.ok` | `boolean` | Yes | — | — |
| `result.path` | `string` | Yes | — | — |
| `result.contentHash` | `string` | Yes | — | — |
| `result.version` | `integer` | Yes | — | — |
| `result.updatedAt` | `string` | Yes | — | — |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "properties": {
      "ok": {
        "type": "boolean"
      },
      "path": {
        "type": "string"
      },
      "contentHash": {
        "type": "string"
      },
      "version": {
        "type": "integer"
      },
      "updatedAt": {
        "type": "string"
      }
    },
    "required": [
      "ok",
      "path",
      "contentHash",
      "version",
      "updatedAt"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.