Skip to main content

Upload Contacts CSV

POST/api/v1/s3/presigned-upload-url

Generate a presigned PUT URL for direct CSV file upload to S3/MinIO. This endpoint enables browser-to-storage uploads without passing through the backend Access Control: * All authenticated users can upload CSV files scoped to their organization. * Files are stored with organization-scoped keys for multi-tenancy. Returns: * upload_url: Presigned URL (valid for 15 minutes) for PUT request * file_key: Unique storage key to use as source_id in campaign creation * expires_in: URL expiration time in seconds

cURL example

curl -X POST \
  'http://localhost:8000/api/v1/s3/presigned-upload-url' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{}'

Parameters

NameLocationTypeDescription
authorizationheaderobject
X-API-Keyheaderobject

Request body

application/json
View schema
{
  "$ref": "#/components/schemas/PresignedUploadUrlRequest"
}

Responses

200Successful Response
application/json
View schema
{
  "$ref": "#/components/schemas/PresignedUploadUrlResponse"
}
404Not found
422Validation Error
application/json
View schema
{
  "$ref": "#/components/schemas/HTTPValidationError"
}