cURL
curl --request POST \
--url https://us.api.flexprice.io/v1/tasks \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"file_provider": "<string>",
"upload_id": "<string>",
"file_name": "<string>",
"metadata": {}
}
'from flexprice import Flexprice
with Flexprice(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.tasks.create_task(entity_type="FEATURES", file_provider="<value>", file_type="JSON", task_type="EXPORT", upload_id="<id>")
# Handle response
print(res)import { Flexprice } from "@flexprice/sdk";
const flexprice = new Flexprice({
apiKeyAuth: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await flexprice.tasks.createTask({
entityType: "FEATURES",
fileProvider: "<value>",
fileType: "JSON",
taskType: "EXPORT",
uploadId: "<id>",
});
console.log(result);
}
run();package main
import(
"context"
flexprice "github.com/flexprice/go-sdk/v2"
"github.com/flexprice/go-sdk/v2/models/types"
"log"
)
func main() {
ctx := context.Background()
s := flexprice.New(
flexprice.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.Tasks.CreateTask(ctx, types.CreateTaskRequest{
EntityType: types.EntityTypeFeatures,
FileProvider: "<value>",
FileType: types.FileTypeJSON,
TaskType: types.TaskTypeExport,
UploadID: "<id>",
})
if err != nil {
log.Fatal(err)
}
if res.ModelsTemporalWorkflowResult != nil {
// handle response
}
}{
"message": "<string>",
"run_id": "<string>",
"workflow_id": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}Tasks
Import a CSV of usage events
Use to submit a CSV of usage events for async ingestion. The CSV must already have been uploaded to the Flexprice-managed imports bucket (currently via CSV Box) — pass the upload_id and the backend fetches the file from S3 and streams rows into ClickHouse. Returns the task ID and Temporal workflow IDs for polling.
POST
/
tasks
cURL
curl --request POST \
--url https://us.api.flexprice.io/v1/tasks \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"file_provider": "<string>",
"upload_id": "<string>",
"file_name": "<string>",
"metadata": {}
}
'from flexprice import Flexprice
with Flexprice(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.tasks.create_task(entity_type="FEATURES", file_provider="<value>", file_type="JSON", task_type="EXPORT", upload_id="<id>")
# Handle response
print(res)import { Flexprice } from "@flexprice/sdk";
const flexprice = new Flexprice({
apiKeyAuth: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await flexprice.tasks.createTask({
entityType: "FEATURES",
fileProvider: "<value>",
fileType: "JSON",
taskType: "EXPORT",
uploadId: "<id>",
});
console.log(result);
}
run();package main
import(
"context"
flexprice "github.com/flexprice/go-sdk/v2"
"github.com/flexprice/go-sdk/v2/models/types"
"log"
)
func main() {
ctx := context.Background()
s := flexprice.New(
flexprice.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.Tasks.CreateTask(ctx, types.CreateTaskRequest{
EntityType: types.EntityTypeFeatures,
FileProvider: "<value>",
FileType: types.FileTypeJSON,
TaskType: types.TaskTypeExport,
UploadID: "<id>",
})
if err != nil {
log.Fatal(err)
}
if res.ModelsTemporalWorkflowResult != nil {
// handle response
}
}{
"message": "<string>",
"run_id": "<string>",
"workflow_id": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}Authorizations
Enter your API key in the format x-api-key <api-key>*
Body
application/json
Import request

