curl --request POST \
--url https://app.kapso.ai/api/v1/customers/{customer_id}/setup_links \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '{
"setup_link": {
"success_redirect_url": "https://your-app.com/whatsapp/success",
"failure_redirect_url": "https://your-app.com/whatsapp/failed"
}
}'
{
"data": {
"id": "link-123abc",
"status": "active",
"expires_at": "2023-11-07T05:31:56Z",
"url": "https://app.kapso.ai/whatsapp/setup/aBcD123...",
"success_redirect_url": "https://your-app.com/whatsapp/success",
"failure_redirect_url": "https://your-app.com/whatsapp/failed",
"created_at": "2023-11-07T05:31:56Z"
}
}
Creates a new setup link for the customer. This will revoke any existing active links for the customer.
curl --request POST \
--url https://app.kapso.ai/api/v1/customers/{customer_id}/setup_links \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '{
"setup_link": {
"success_redirect_url": "https://your-app.com/whatsapp/success",
"failure_redirect_url": "https://your-app.com/whatsapp/failed"
}
}'
{
"data": {
"id": "link-123abc",
"status": "active",
"expires_at": "2023-11-07T05:31:56Z",
"url": "https://app.kapso.ai/whatsapp/setup/aBcD123...",
"success_redirect_url": "https://your-app.com/whatsapp/success",
"failure_redirect_url": "https://your-app.com/whatsapp/failed",
"created_at": "2023-11-07T05:31:56Z"
}
}
API key required for all endpoints
Setup link created successfully
The response is of type object
.
Was this page helpful?