Official Sinch API skills for AI coding agents — SMS, Voice, Verification, Numbers, Mailgun email, and more.
71
89%
Does it follow best practices?
Impact
—
No eval scenarios have been run
Advisory
Suggest reviewing before use
import com.sinch.sdk.SinchClient;
import com.sinch.sdk.models.Configuration;
Configuration config = Configuration.builder()
.setApplicationKey("YOUR_APPLICATION_KEY")
.setApplicationSecret("YOUR_APPLICATION_SECRET")
.build();
SinchClient sinch = new SinchClient(config);import com.sinch.sdk.domains.voice.models.v1.callouts.request.CalloutRequestTTS;
import com.sinch.sdk.domains.voice.models.v1.destination.DestinationPstn;
var response = sinch.voice().v1().callouts().call(
CalloutRequestTTS.builder()
.setDestination(DestinationPstn.from("+14045005000"))
.setCli("+14045001000")
.setLocale("en-US")
.setText("Hello! This is a test call from Sinch.")
.build()
);
System.out.println("Call ID: " + response);import com.sinch.sdk.domains.voice.models.v1.callouts.request.CalloutRequestConference;
import com.sinch.sdk.domains.voice.models.v1.destination.DestinationPstn;
var response = sinch.voice().v1().conferences().call(
CalloutRequestConference.builder()
.setDestination(DestinationPstn.from("+14045005000"))
.setCli("+14045001000")
.setConferenceId("myConference")
.setEnableAce(true)
.setEnableDice(true)
.build()
);
System.out.println("Call ID: " + response);import com.sinch.sdk.domains.voice.models.v1.calls.response.CallInformation;
CallInformation callInfo = sinch.voice().v1().calls().get("4398599d1ba84ef3bde0a82dfb61abed");
System.out.println("Status: " + callInfo.getStatus());
System.out.println("Duration: " + callInfo.getDuration());import com.sinch.sdk.domains.voice.models.v1.svaml.SvamlControl;
import com.sinch.sdk.domains.voice.models.v1.svaml.action.SvamlActionHangup;
import com.sinch.sdk.domains.voice.models.v1.svaml.instruction.SvamlInstructionSay;
sinch.voice().v1().calls().update(
"4398599d1ba84ef3bde0a82dfb61abed",
SvamlControl.builder()
.setInstructions(List.of(
SvamlInstructionSay.builder()
.setText("This call will now end.")
.setLocale("en-US")
.build()
))
.setAction(SvamlActionHangup.SVAML_ACTION_HANGUP)
.build()
);var conf = sinch.voice().v1().conferences().get("myConference");
System.out.println("Participants: " + conf.getParticipants());sinch.voice().v1().conferences().kickAll("myConference");import org.springframework.web.bind.annotation.*;
import java.util.*;
@RestController
@RequestMapping("/voice")
public class VoiceCallbackController {
@PostMapping("/ice")
public Map<String, Object> ice(@RequestBody Map<String, Object> body) {
System.out.println("Incoming call from " + body.get("cli"));
return Map.of(
"instructions", List.of(
Map.of("name", "say", "text", "Welcome! Press 1 for sales.", "locale", "en-US")
),
"action", Map.of(
"name", "runMenu",
"mainMenu", "main",
"menus", List.of(Map.of(
"id", "main",
"mainPrompt", "#tts[Press 1 for sales or 2 for support.]",
"options", List.of(
Map.of("dtmf", 1, "action", "return(sales)"),
Map.of("dtmf", 2, "action", "return(support)")
)
))
)
);
}
@PostMapping("/ace")
public Map<String, Object> ace(@RequestBody Map<String, Object> body) {
return Map.of("action", Map.of("name", "continue"));
}
@PostMapping("/pie")
public Map<String, Object> pie(@RequestBody Map<String, Object> body) {
@SuppressWarnings("unchecked")
var menuResult = (Map<String, Object>) body.get("menuResult");
String value = (String) menuResult.get("value");
String number = "sales".equals(value) ? "+14045009001" : "+14045009002";
return Map.of(
"instructions", List.of(
Map.of("name", "say", "text", "Connecting you to " + value + ".", "locale", "en-US")
),
"action", Map.of("name", "connectPstn", "number", number, "cli", "+14045001000")
);
}
@PostMapping("/dice")
public void dice(@RequestBody Map<String, Object> body) {
System.out.println("Call ended: " + body.get("reason") + ", duration: " + body.get("duration") + "s");
}
}skills
sinch-10dlc
references
sinch-authentication
sinch-conversation-api
sinch-elastic-sip-trunking
references
sinch-fax-api
sinch-imported-numbers-hosting-orders
references
sinch-in-app-calling
sinch-mailgun
references
sinch-mailgun-inspect
references
sinch-mailgun-optimize
references
sinch-mailgun-validate
sinch-number-lookup-api
sinch-number-order-api
sinch-numbers-api
references
sinch-porting-api
sinch-provisioning-api
sinch-sdks
sinch-verification-api