curl --request PUT \
--url https://app.sandywp.com/api/app/imports/{id}/upload \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/octet-stream' \
--header 'x-sandywp-offset: <x-sandywp-offset>' \
--data '"<string>"'import requests
url = "https://app.sandywp.com/api/app/imports/{id}/upload"
payload = "<string>"
headers = {
"x-sandywp-offset": "<x-sandywp-offset>",
"Authorization": "Bearer <token>",
"Content-Type": "application/octet-stream"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'x-sandywp-offset': '<x-sandywp-offset>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/octet-stream'
},
body: JSON.stringify('<string>')
};
fetch('https://app.sandywp.com/api/app/imports/{id}/upload', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.sandywp.com/api/app/imports/{id}/upload",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode('<string>'),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/octet-stream",
"x-sandywp-offset: <x-sandywp-offset>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.sandywp.com/api/app/imports/{id}/upload"
payload := strings.NewReader("\"<string>\"")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-sandywp-offset", "<x-sandywp-offset>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/octet-stream")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://app.sandywp.com/api/app/imports/{id}/upload")
.header("x-sandywp-offset", "<x-sandywp-offset>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/octet-stream")
.body("\"<string>\"")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sandywp.com/api/app/imports/{id}/upload")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-sandywp-offset"] = '<x-sandywp-offset>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/octet-stream'
request.body = "\"<string>\""
response = http.request(request)
puts response.read_body{
"importId": "<string>",
"received": 1
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "auth_required",
"message": "A logged-in user is required.",
"details": {}
}
}{
"error": {
"code": "insufficient_scope",
"message": "This token is not permitted to perform the requested action."
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}Append an import archive chunk
Appends raw archive bytes at the contiguous x-sandywp-offset. Use this simpler upload protocol when direct multipart storage is unavailable. Scoped OAuth tokens need import:write.
curl --request PUT \
--url https://app.sandywp.com/api/app/imports/{id}/upload \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/octet-stream' \
--header 'x-sandywp-offset: <x-sandywp-offset>' \
--data '"<string>"'import requests
url = "https://app.sandywp.com/api/app/imports/{id}/upload"
payload = "<string>"
headers = {
"x-sandywp-offset": "<x-sandywp-offset>",
"Authorization": "Bearer <token>",
"Content-Type": "application/octet-stream"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'x-sandywp-offset': '<x-sandywp-offset>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/octet-stream'
},
body: JSON.stringify('<string>')
};
fetch('https://app.sandywp.com/api/app/imports/{id}/upload', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.sandywp.com/api/app/imports/{id}/upload",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode('<string>'),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/octet-stream",
"x-sandywp-offset: <x-sandywp-offset>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.sandywp.com/api/app/imports/{id}/upload"
payload := strings.NewReader("\"<string>\"")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-sandywp-offset", "<x-sandywp-offset>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/octet-stream")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://app.sandywp.com/api/app/imports/{id}/upload")
.header("x-sandywp-offset", "<x-sandywp-offset>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/octet-stream")
.body("\"<string>\"")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sandywp.com/api/app/imports/{id}/upload")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-sandywp-offset"] = '<x-sandywp-offset>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/octet-stream'
request.body = "\"<string>\""
response = http.request(request)
puts response.read_body{
"importId": "<string>",
"received": 1
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "auth_required",
"message": "A logged-in user is required.",
"details": {}
}
}{
"error": {
"code": "insufficient_scope",
"message": "This token is not permitted to perform the requested action."
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}Authorizations
Personal API token, sent as Authorization: Bearer <SANDYWP_API_KEY>. Obtain one from the dashboard account menu (API keys), sandywp auth login, or POST /api/account/tokens. A missing or invalid token returns 401 auth_required. Scoped OAuth tokens are limited to the Imports family and GET /api/account/me; see the top-level conventions.
Headers
Selects which of the caller's workspaces to act in, for accounts belonging to more than one (legacy alias: X-SandyWP-Organization). Defaults to the caller's own personal workspace when omitted. Every id in this API (sandboxes, Templates, repositories) is scoped to a single workspace, so this header changes which set of resources is visible.
Zero-based byte offset for this contiguous chunk.
x >= 0Path Parameters
The import id.
Body
The body is of type file.

