For full setup and authentication options, see the Installation guide: /api-reference/introduction.
Parameters
Configuration for the client connection.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Destination phone number in E.164 format (for example, +14155550123).
Caller ID phone number to originate the call from (E.164 format). If omitted, the system default will be used.
Additional arguments passed to the call as a key-value map.
Call options for runtime behavior and configuration.
Arbitrary metadata to associate with the call for tracking and analytics.
Usage
Copy
import {
AssistantDefinition,
CreatePhoneCall,
ConnectionConfig,
CreateBulkPhoneCallRequest,
CreatePhoneCallRequest,
} from '@rapidaai/react';
const connectionConfig: ConnectionConfig = { /* ... */ };
const phoneCallRequest = new CreatePhoneCallRequest();
// define assistant
const assistant = new AssistantDefinition();
assistant.setAssistantid("ASSISTANT_ID_PLACEHOLDER");
assistant.setVersion("VERSION_PLACEHOLDER");
phoneCallRequest.setAssistant(assistant);
phoneCallRequest.setTonumber("TO_NUMBER_PLACEHOLDER");
const bulkPhoneCallRequest = new CreateBulkPhoneCallRequest();
bulkPhoneCallRequest.addPhonecalls(phoneCallRequest);
CreateBulkPhoneCallRequest(connectionConfig, phoneCallRequest)
.then((x) => {
if (x.getSuccess()) {
console.dir(x.getData().toObject());
return;
}
let err = x.getError();
if (err?.getHumanmessage()) setError(err?.getHumanmessage());
})
.catch((x) => {
console.dir(x);
});
Response
Numeric status code for the operation
Indicates whether the operation was successful
Show child attributes
Show child attributes
Stable, machine-readable numeric code. Represented as a string in JS/TS; parse only if you need numeric comparisons.
Developer-oriented message with diagnostic details. Avoid showing directly to end-users.
Human-friendly description safe for display to end-users. Localize in your app if needed.
Show child attributes
Show child attributes
Unique identifier for the conversation instance.
Identifier for the Assistant associated with this conversation.
Project ID associated with this conversation.
Organization ID related to the conversation.
Source of the conversation (e.g., “phone-call”).
Identifier for the assistant provider model used in the conversation.
Unique identifier string for tracking this conversation.
Indicates the current status of the conversation (e.g., “ACTIVE”).
Timestamp indicating when the conversation was created.
Timestamp indicating the last update to the conversation.