Skip to main content
POST
Upload Contacts CSV
Request an upload URL with file_name, the actual file_size in bytes, and content_type: "text/csv". The CSV must be non-empty and at most 10 MB. The response contains upload_url, file_key, and expires_in. PUT your file to upload_url with the same content type; do not send your workspace API key to the upload URL.
Set UPLOAD_URL to the returned URL and upload before it expires. After a successful upload, use file_key as source_id with source_type: "csv" when creating the campaign. The file must include a phone_number column. Extra columns become initial context:

Authorizations

Authorization
string
header
required

Bandwidth Labs OAuth access token. Uses the user's selected workspace; the workspace header is not required. Do not also send an API key. Bearer-only operations may additionally require the Labs super_user role.

Headers

X-VOAI-ORGANIZATION-ID
string | null

Required with X-BW-LABS-AGENTS-API-KEY: the positive local workspace ID to access. The key owner must be a current member. Missing or invalid IDs return 400; non-member workspaces return 403. Not required for bearer authentication, which uses the user's selected workspace.

Body

application/json
file_name
string
required
Pattern: .*\.csv$
file_size
integer
required
Required range: x <= 10485760
content_type
string
default:text/csv

Response

Successful Response

expires_in
integer
required
file_key
string
required
upload_url
string
required