Watt Data Logo

Generate a presigned S3 URL for uploading a customer CSV file, returning a workflow resource URI for use in subsequent tool calls.

Quick Example

{
  "market_context": "B2B SaaS company targeting mid-market enterprises",
  "filename": "customers.csv"
}

Input Parameters

ParameterTypeRequiredDefaultConstraintsDescription
market_contextstringYes-Min 1 characterBusiness context for subsequent analysis
filenamestringYes-Must end in .csvFilename for the CSV

Request Schema:

interface GenerateUploadUrlParams {
  market_context: string;
  filename: string;
}

Output Format

{
  csv_key: string,
  resource_uri: string,
  upload_url: string,
  upload_expires_at: string,
  instructions: string,
  tool_trace_id: string,
  workflow_id: string
}

Response Fields:

FieldTypeDescription
csv_keystringFilename to reference this CSV
resource_uristringWorkflow resource URI (e.g., workflow://{workflow_id}/uploads/{filename})
upload_urlstringPresigned S3 PUT URL for uploading
upload_expires_atstringISO 8601 timestamp when upload_url expires (1 hour)
instructionsstringNext step instructions
tool_trace_idstringOpenTelemetry trace ID
workflow_idstringWorkflow session identifier

Example Response:

{
  "csv_key": "customers.csv",
  "resource_uri": "workflow://550e8400-e29b-41d4-a716-446655440000/uploads/customers.csv",
  "upload_url": "https://s3.amazonaws.com/bucket/uploads/550e.../customers.csv?X-Amz-Signature=...",
  "upload_expires_at": "2025-01-16T13:00:00Z",
  "instructions": "Upload your CSV file using: curl -X PUT ...",
  "tool_trace_id": "a1b2c3d4e5f6",
  "workflow_id": "550e8400-e29b-41d4-a716-446655440000"
}

Uploading Files

After receiving the upload_url, upload your CSV:

curl -X PUT -H "Content-Type: text/csv" -T "customers.csv" "<upload_url>"

Then use the resource_uri in subsequent tool calls:

  • entity_resolvecsv_resource_uri
  • resolve_and_enrich_rowscsv_resource_uri

Usage Examples

Example 1: Upload customer data

{
  "market_context": "B2B SaaS company targeting mid-market enterprises",
  "filename": "customers.csv"
}

Example 2: Upload prospects list

{
  "market_context": "Consumer fintech app targeting millennials",
  "filename": "prospects_q1.csv"
}

On this page