Skip to main content
POST
/
v1
/
wokus
/
form-data
Create a Woku with a file upload (multipart)
curl --request POST \
  --url https://clientapi.woku.app/v1/wokus/form-data \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form file='@example-file' \
  --form 'description=Customer Service Experience - Store #123' \
  --form folderSecondaryKey=store-123 \
  --form parentFolderSecondaryKey=region-north \
  --form clientEmail=jsmith@example.com \
  --form clientPhone=56912345678
import requests

url = "https://clientapi.woku.app/v1/wokus/form-data"

files = { "file": ("example-file", open("example-file", "rb")) }
payload = {
"description": "Customer Service Experience - Store #123",
"folderSecondaryKey": "store-123",
"parentFolderSecondaryKey": "region-north",
"clientEmail": "jsmith@example.com",
"clientPhone": "56912345678"
}
headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, data=payload, files=files, headers=headers)

print(response.text)
const form = new FormData();
form.append('file', '<string>');
form.append('description', 'Customer Service Experience - Store #123');
form.append('folderSecondaryKey', 'store-123');
form.append('parentFolderSecondaryKey', 'region-north');
form.append('clientEmail', 'jsmith@example.com');
form.append('clientPhone', '56912345678');

const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

options.body = form;

fetch('https://clientapi.woku.app/v1/wokus/form-data', 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://clientapi.woku.app/v1/wokus/form-data",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\nCustomer Service Experience - Store #123\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"folderSecondaryKey\"\r\n\r\nstore-123\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"parentFolderSecondaryKey\"\r\n\r\nregion-north\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"clientEmail\"\r\n\r\njsmith@example.com\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"clientPhone\"\r\n\r\n56912345678\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);

$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://clientapi.woku.app/v1/wokus/form-data"

payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\nCustomer Service Experience - Store #123\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"folderSecondaryKey\"\r\n\r\nstore-123\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"parentFolderSecondaryKey\"\r\n\r\nregion-north\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"clientEmail\"\r\n\r\njsmith@example.com\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"clientPhone\"\r\n\r\n56912345678\r\n-----011000010111000001101001--")

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

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://clientapi.woku.app/v1/wokus/form-data")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\nCustomer Service Experience - Store #123\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"folderSecondaryKey\"\r\n\r\nstore-123\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"parentFolderSecondaryKey\"\r\n\r\nregion-north\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"clientEmail\"\r\n\r\njsmith@example.com\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"clientPhone\"\r\n\r\n56912345678\r\n-----011000010111000001101001--")
.asString();
require 'uri'
require 'net/http'

url = URI("https://clientapi.woku.app/v1/wokus/form-data")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\nCustomer Service Experience - Store #123\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"folderSecondaryKey\"\r\n\r\nstore-123\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"parentFolderSecondaryKey\"\r\n\r\nregion-north\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"clientEmail\"\r\n\r\njsmith@example.com\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"clientPhone\"\r\n\r\n56912345678\r\n-----011000010111000001101001--"

response = http.request(request)
puts response.read_body
{
  "statusCode": 400,
  "message": "<string>",
  "error": "Bad Request"
}
{
"statusCode": 403,
"message": "Authentication required",
"error": "Forbidden"
}

Authorizations

Authorization
string
header
required

Company API key. Obtain this from your Woku dashboard under Settings > API Keys. The same key used for the v0 endpoints.

Body

multipart/form-data
file
file
required

Image or video file to associate with the woku.

description
string
required
Example:

"Customer Service Experience - Store #123"

folderSecondaryKey
string
Example:

"store-123"

parentFolderSecondaryKey
string
Example:

"region-north"

clientEmail
string<email>
clientPhone
string
Example:

"56912345678"

Response

Woku created