Call Management
Create Call Batch
Create a named outbound batch and assign the phone numbers that will originate the campaign.
POST
Documentation Index
Fetch the complete documentation index at: https://docs.weya.ai/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Create a batch whenever you want to stage a new outbound campaign. The batch groups a friendlybatchName with one or more provisioned calling numbers so you can add contacts and start dialing later. The response returns the batchId, which is required by every follow-up batch operation.
Prerequisites
- API key with Calling Management scope, OR Bearer token for authenticated workspace access
- At least one outbound phone number is active on the workspace
- The calling numbers you pass belong to the same workspace
Request
Workspace API key. Find it under Settings → API access. Either
x-api-key or Authorization header is required.Bearer token for authenticated workspace access. Either
x-api-key or Authorization header is required.Human readable campaign name shown in the Nexus dashboard.
Array of phone IDs that the dialer can rotate through while placing calls from this batch.
Number of retry attempts for failed calls.
Delay in seconds between retry attempts.
Timezone for the batch (e.g., “America/New_York”, “Asia/Kolkata”). Used for scheduling calls.
Object defining calling hours. Example:
{"start": "09:00", "end": "17:00"}.Array of allowed days for calling (0=Sunday, 1=Monday, …, 6=Saturday). Example:
[1,2,3,4,5] for weekdays.Response
Indicates whether the batch record was stored successfully.
HTTP status code (201 for successful creation).
Batch ID (string) to use when adding calls, starting the dialer, or updating batch metadata.
Human readable confirmation message.
Error Handling
- 400 Bad Request – Missing
batchName, missing or emptycallingNumbersarray, or invalid input format. - 403 Forbidden – Invalid or missing API key, API key doesn’t match workspace, or no user found (when using Bearer token).
- 500 Internal Server Error – Failed to create batch in database; retry or contact support with the request ID.
Authentication Options:You can authenticate using either:
- API Key: Pass
x-api-keyheader with your workspace API key - Bearer Token: Pass
Authorization: Bearer <token>header
Use
GET /api/call/batches/{userId} right after creation to verify that the new batch appears with the expected metadata.Authorizations
Bearer token authentication for workspace access
Body
application/json
Example:
"API Campaign May 2025"
Example:
["64e5f12345abcdef87654321"]Example:
3
Example:
60
Example:
"America/New_York"
Example:
{ "start": "09:00", "end": "17:00" }Example:
[1, 2, 3, 4, 5]Response
Batch created successfully

