Create: file type

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

curl -X POST \
  https://<<META.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.

Was this helpful?