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"
}
}'
{
"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"
}
}
}
Creates a new WhatsApp sandbox session for the project associated with the API key
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"
}
}'
{
"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"
}
}
}
API key required for all endpoints
Sandbox session created successfully
The response is of type object
.
Was this page helpful?