Create signed URLs for multipart bundle upload parts. Requires the uploading state; other states return 409.
OAuth scope: api:write.
/api/v2/knowledge/imports/{importId}/partsSend a personal or workspace API key in X-API-Key. See key types and access; operations that reject workspace keys say so in their description.
In: header
Request examples use an API key. For OAuth, replace the X-API-Key header with Authorization: Bearer YOUR_ACCESS_TOKEN.
curl -X POST "https://www.sim.ai/api/v2/knowledge/imports/string/parts?workspaceId=string" \ -H "X-API-Key: YOUR_API_KEY" \ -H "upload-token: string" \ -H "Content-Type: application/json" \ -d '{ "partNumbers": [ 1, 2, 3 ] }'const body = JSON.stringify({ "partNumbers": [ 1, 2, 3 ]})fetch("https://www.sim.ai/api/v2/knowledge/imports/string/parts?workspaceId=string", { method: "POST", headers: { "Content-Type": "application/json", "X-API-Key": "YOUR_API_KEY", "upload-token": "string" }, body})package mainimport ( "fmt" "net/http" "io/ioutil" "strings")func main() { url := "https://www.sim.ai/api/v2/knowledge/imports/string/parts?workspaceId=string" body := strings.NewReader(`{ "partNumbers": [ 1, 2, 3 ] }`) req, _ := http.NewRequest("POST", url, body) req.Header.Add("X-API-Key", "YOUR_API_KEY") req.Header.Add("upload-token", "string") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body))}import requestsurl = "https://www.sim.ai/api/v2/knowledge/imports/string/parts?workspaceId=string"body = """{ "partNumbers": [ 1, 2, 3 ]}"""response = requests.request("POST", url, data = body, headers = { "Content-Type": "application/json", "X-API-Key": "YOUR_API_KEY", "upload-token": "string"})print(response.text)import java.net.URI;import java.net.http.HttpClient;import java.net.http.HttpRequest;import java.net.http.HttpResponse;import java.net.http.HttpResponse.BodyHandlers;import java.time.Duration;import java.net.http.HttpRequest.BodyPublishers;var body = BodyPublishers.ofString("""{ "partNumbers": [ 1, 2, 3 ]}""");HttpClient client = HttpClient.newBuilder() .connectTimeout(Duration.ofSeconds(10)) .build();HttpRequest.Builder requestBuilder = HttpRequest.newBuilder() .uri(URI.create("https://www.sim.ai/api/v2/knowledge/imports/string/parts?workspaceId=string")) .header("X-API-Key", "YOUR_API_KEY") .header("upload-token", "string") .header("Content-Type", "application/json") .POST(body) .build();try { HttpResponse<String> response = client.send(requestBuilder.build(), BodyHandlers.ofString()); System.out.println("Status code: " + response.statusCode()); System.out.println("Response body: " + response.body());} catch (Exception e) { e.printStackTrace();}using System;using System.Net.Http;using System.Text;var body = new StringContent("""{ "partNumbers": [ 1, 2, 3 ]}""", Encoding.UTF8, "application/json");var client = new HttpClient();client.DefaultRequestHeaders.Add("X-API-Key", "YOUR_API_KEY");client.DefaultRequestHeaders.Add("upload-token", "string");var response = await client.PostAsync("https://www.sim.ai/api/v2/knowledge/imports/string/parts?workspaceId=string", body);var responseBody = await response.Content.ReadAsStringAsync();{
"data": {
"parts": [
{
"partNumber": 1,
"url": "http://example.com",
"headers": {
"property1": "string",
"property2": "string"
},
"expiresAt": "2019-08-24T14:15:22Z"
}
]
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "Invalid request"
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication required"
}
}{
"error": {
"code": "FORBIDDEN",
"message": "Insufficient workspace permissions",
"details": {
"code": "INSUFFICIENT_WORKSPACE_ROLE"
}
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Not found"
}
}{
"error": {
"code": "CONFLICT",
"message": "The request conflicts with current knowledge resource state"
}
}{
"error": {
"code": "PAYLOAD_TOO_LARGE",
"message": "Request body is too large"
}
}{
"error": {
"code": "UNSUPPORTED_MEDIA_TYPE",
"message": "Request body must be sent as application/json"
}
}{
"error": {
"code": "RATE_LIMITED",
"message": "API rate limit exceeded",
"details": {
"retryAfter": "2026-01-01T00:00:30.000Z"
}
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "Internal server error"
}
}{
"error": {
"code": "SERVICE_UNAVAILABLE",
"message": "Service temporarily unavailable"
}
}Path parameters
Unique knowledge-base import identifier.
1 <= lengthQuery parameters
Workspace that owns the import.
1 <= length <= 128Header parameters
Signed upload control token returned when the upload session was created.
1 <= lengthRequest body
application/json
Multipart part numbers for which signed URLs should be created.
TypeScript definitions
Use the request body type in TypeScript.
Response body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json