> This page is for Glide Classic.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://www.glideapps.com/docs/llms.txt.
> To search these docs from an AI client, connect to the docs search MCP server at https://www.glideapps.com/docs/_mcp/server (documentation search only).
> To work with your GlideOS projects, connect to the Glide MCP server at https://mcp.glideapps.dev/mcp instead (GlideOS only; setup: https://www.glideapps.com/docs/mcp).

# Stash Data

PUT https://api.glideapps.com/stashes/{stashID}/{serial}
Content-Type: application/json

When using large datasets with the Glide API, it may be necessary to break them into smaller chunks for performance and reliability. We call this process "stashing."

Tabular data may be stashed in JSON, CSV, or TSV format.

To learn more about stashing and how to use it to work with large datasets, please see our [introduction to stashing](/docs/classic/classic-api/stashing/introduction).

Reference: https://www.glideapps.com/docs/classic/classic-api/stashing/stash-data

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication header of the form Bearer `<token>`, where `<token>` is your [auth token](/docs/api-reference/v2/general/authentication).

## Request

### Path parameters

- `stashID` (string, required) — ID of the stash. The stash will be created if it doesn't already exist.
- `serial` (string, required) — Serial identifier of the chunk of data to set in the stash. If a chunk has already been sent with the same serial, its data will be overwritten. Chunks will be assembled in the sort order of their serials, so utilize ordered identifiers for each chunk if a specific ordering of data in the stash is desired, e.g., `1`, `2`, etc... If the order of data is not important, random, but unique, values can be used, e.g., `c2a4567`.

### Body (application/json)

This endpoint expects a list of map from string to any.

- `list of map from string to any`

## Errors

### 400 Bad Request Error

- `error` (StashesStashIdSerialPutResponsesContentApplicationJsonSchemaError, required)

## Types

### StashesStashIdSerialPutResponsesContentApplicationJsonSchemaError

- `type` (string, required)
- `message` (string, required)

## Examples

**Request**

```json
[
  {
    "amountPaid": 0,
    "fullName": "Alex Bard",
    "invoiceDate": "2024-07-29T14:04:15.561Z",
    "totalAmount": 34.5
  },
  {
    "amountPaid": 20,
    "fullName": "Alicia Hines",
    "invoiceDate": "2023-06-15T10:30:00.000Z",
    "totalAmount": 50.75
  }
]
```

**Response**

```json
{}
```

**SDK Code**

```python
import requests

url = "https://api.glideapps.com/stashes/20240215-job32/1"

payload = [
    {
        "amountPaid": 0,
        "fullName": "Alex Bard",
        "invoiceDate": "2024-07-29T14:04:15.561Z",
        "totalAmount": 34.5
    },
    {
        "amountPaid": 20,
        "fullName": "Alicia Hines",
        "invoiceDate": "2023-06-15T10:30:00.000Z",
        "totalAmount": 50.75
    }
]
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://api.glideapps.com/stashes/20240215-job32/1';
const options = {
  method: 'PUT',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '[{"amountPaid":0,"fullName":"Alex Bard","invoiceDate":"2024-07-29T14:04:15.561Z","totalAmount":34.5},{"amountPaid":20,"fullName":"Alicia Hines","invoiceDate":"2023-06-15T10:30:00.000Z","totalAmount":50.75}]'
};

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

```go
package main

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

func main() {

	url := "https://api.glideapps.com/stashes/20240215-job32/1"

	payload := strings.NewReader("[\n  {\n    \"amountPaid\": 0,\n    \"fullName\": \"Alex Bard\",\n    \"invoiceDate\": \"2024-07-29T14:04:15.561Z\",\n    \"totalAmount\": 34.5\n  },\n  {\n    \"amountPaid\": 20,\n    \"fullName\": \"Alicia Hines\",\n    \"invoiceDate\": \"2023-06-15T10:30:00.000Z\",\n    \"totalAmount\": 50.75\n  }\n]")

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

	req.Header.Add("Authorization", "Bearer <token>")
	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
require 'uri'
require 'net/http'

url = URI("https://api.glideapps.com/stashes/20240215-job32/1")

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

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "[\n  {\n    \"amountPaid\": 0,\n    \"fullName\": \"Alex Bard\",\n    \"invoiceDate\": \"2024-07-29T14:04:15.561Z\",\n    \"totalAmount\": 34.5\n  },\n  {\n    \"amountPaid\": 20,\n    \"fullName\": \"Alicia Hines\",\n    \"invoiceDate\": \"2023-06-15T10:30:00.000Z\",\n    \"totalAmount\": 50.75\n  }\n]"

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

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

HttpResponse<String> response = Unirest.put("https://api.glideapps.com/stashes/20240215-job32/1")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("[\n  {\n    \"amountPaid\": 0,\n    \"fullName\": \"Alex Bard\",\n    \"invoiceDate\": \"2024-07-29T14:04:15.561Z\",\n    \"totalAmount\": 34.5\n  },\n  {\n    \"amountPaid\": 20,\n    \"fullName\": \"Alicia Hines\",\n    \"invoiceDate\": \"2023-06-15T10:30:00.000Z\",\n    \"totalAmount\": 50.75\n  }\n]")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.glideapps.com/stashes/20240215-job32/1', [
  'body' => '[
  {
    "amountPaid": 0,
    "fullName": "Alex Bard",
    "invoiceDate": "2024-07-29T14:04:15.561Z",
    "totalAmount": 34.5
  },
  {
    "amountPaid": 20,
    "fullName": "Alicia Hines",
    "invoiceDate": "2023-06-15T10:30:00.000Z",
    "totalAmount": 50.75
  }
]',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.glideapps.com/stashes/20240215-job32/1");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "[\n  {\n    \"amountPaid\": 0,\n    \"fullName\": \"Alex Bard\",\n    \"invoiceDate\": \"2024-07-29T14:04:15.561Z\",\n    \"totalAmount\": 34.5\n  },\n  {\n    \"amountPaid\": 20,\n    \"fullName\": \"Alicia Hines\",\n    \"invoiceDate\": \"2023-06-15T10:30:00.000Z\",\n    \"totalAmount\": 50.75\n  }\n]", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  [
    "amountPaid": 0,
    "fullName": "Alex Bard",
    "invoiceDate": "2024-07-29T14:04:15.561Z",
    "totalAmount": 34.5
  ],
  [
    "amountPaid": 20,
    "fullName": "Alicia Hines",
    "invoiceDate": "2023-06-15T10:30:00.000Z",
    "totalAmount": 50.75
  ]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.glideapps.com/stashes/20240215-job32/1")! 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()
```