General Documentation
Agents
Agent Executions
Test Suites
Projects
WhatsApp Conversations
Customers
WhatsApp Configs
Agent Test Chats
Conversation Assignments
WhatsApp Templates
WhatsApp Contact Notes
Agent Snapshots
WhatsApp Sandbox
Create a sandbox session
Creates a new WhatsApp sandbox session for the project associated with the API key
POST
/
sandbox_sessions
Copy
curl --request POST \
--url https://app.kapso.ai/api/v1/sandbox_sessions \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '{
"whatsapp_sandbox_session": {
"phone_number": "+12345678901",
"agent_id": "123e4567-e89b-12d3-a456-426614174000"
}
}'
Copy
{
"data": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"phone_number": "+12345678901",
"status": "pending_activation",
"activation_code": "ABC123",
"activation_message": "Your WhatsApp Sandbox activation code is: ABC123",
"activation_link": "https://wa.me/12345678901?text=ABC123",
"activated_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"agent": {
"id": "agent-123abc",
"name": "Customer Support Agent",
"description": "Handles initial customer support queries",
"project_id": "project-456def",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}
}
Authorizations
API key required for all endpoints
Body
application/json
Response
201
application/json
Sandbox session created successfully
The response is of type object
.
Copy
curl --request POST \
--url https://app.kapso.ai/api/v1/sandbox_sessions \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '{
"whatsapp_sandbox_session": {
"phone_number": "+12345678901",
"agent_id": "123e4567-e89b-12d3-a456-426614174000"
}
}'
Copy
{
"data": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"phone_number": "+12345678901",
"status": "pending_activation",
"activation_code": "ABC123",
"activation_message": "Your WhatsApp Sandbox activation code is: ABC123",
"activation_link": "https://wa.me/12345678901?text=ABC123",
"activated_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"agent": {
"id": "agent-123abc",
"name": "Customer Support Agent",
"description": "Handles initial customer support queries",
"project_id": "project-456def",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}
}
Assistant
Responses are generated using AI and may contain mistakes.