<BlockSwitcher>
<Block name="Java">

```java
Todo todo = Todo.builder()
    .name("My first todo")
    .description("todo description")
    .build();

Amplify.API.mutate(ModelMutation.create(todo),
    result -> Log.i("ApiDemo", "Mutation succeeded."),
    failure -> Log.e("ApiDemo", "Mutation failed.", failure)
);
```

</Block>
<Block name="Kotlin - Callbacks">

```kotlin
val todo = Todo.builder()
    .name("My first todo")
    .description("todo description")
    .build()

Amplify.API.mutate(ModelMutation.create(todo),
    { Log.i("ApiDemo", "Mutation succeeded") },
    { Log.e("ApiDemo", "Mutation failed", it) }
)
```

</Block>
<Block name="Kotlin - Coroutines">

```kotlin
val todo = Todo.builder()
    .name("My first todo")
    .description("todo description")
    .build()

try {
    val result = Amplify.API.mutate(ModelMutation.create(todo))
    Log.i("ApiDemo", "Mutation succeeded") 
} catch (error: ApiException) {
    Log.e("ApiDemo", "Mutation failed", error) 
}
```

</Block>
<Block name="RxJava">

```java
Todo todo = Todo.builder()
    .name("My first todo")
    .description("todo description")
    .build();

Amplify.API.mutate(ModelMutation.create(todo))
    .subscribe(
        result -> Log.i("ApiDemo", "Mutation succeeded"),
        failure -> Log.e("ApiDemo", "Mutation failed", failure)
    );
```

</Block>
</BlockSwitcher>
