# Approve and reject intents

Approvals and rejections in Ripple Custody have a corresponding intent type. They are invoked with the `intents` action.

## Approve an intent

The following example approves an intent:


```java
var domain = harmonize.domains().get(domainId).orElseThrow();

harmonize.intents(domain.getId())
        .approve(intentData.getIntentId(),
        Expire.hours(1))
        .waitForSucceed(Timeout.minutes(1));

Intents.IntentEntity intent = harmonize.intents(domain.getId()).get(intentData.getIntentId()).orElseThrow();
```

## Reject an intent

The following example rejects an intent:


```java
var domain = harmonize.domains().get(domainId).orElseThrow();

harmonize.intents(domain.getId()).reject(
        intentData.getIntentId(),
        "Test reject",
        Expire.hours(1)).waitForSucceed(Timeout.minutes(1));

Intents.IntentEntity intent = harmonize.intents(domain.getId()).get(intentData.getIntentId()).orElseThrow();
```