---
title: "Create: file type"
url: https://www.tines.com/docs/api/resources/create-file/
updated: 2026-04-28T19:49:13+00:00
description: Create a file resource with Base64-encoded content.
---

*[tines.com](https://www.tines.com/llms.txt) › [Docs](https://www.tines.com/llms.txt) › [Tines API](https://www.tines.com/llms.txt) › [Resources](https://www.tines.com/llm/docs/api/resources.md)*

# Create: file type

*[View on tines.com](https://www.tines.com/docs/api/resources/create-file/)*

## Description

Create a file resource with Base64-encoded content.

## File value object

The `value` parameter must be a JSON object with:

| Field    | Required | Description                         |
| -------- | -------- | ----------------------------------- |
| name     | Yes      | File name (e.g., "document.pdf")    |
| contents | Yes      | Base64-encoded file contents        |
| type     | No       | MIME type (e.g., "application/pdf") |

## Sample request

```bash
curl -X POST \
  https://<tenant-domain>/api/v1/global_resources \
  -H 'content-type: application/json' \
  -H 'Authorization: Bearer <<CREDENTIAL.tines_api_key>>' \
  -d '{
        "name": "my_file_resource",
        "team_id": 2,
        "value": {
          "name": "example.txt",
          "contents": "SGVsbG8gV29ybGQh",
          "type": "text/plain"
        }
    }'
```

For all parameters and response fields, see [Create: text type](/api/resources/create-text).
