## Check iMessage capability

`client.Capability.CheckIMessage(ctx, body) (*HandleCheckResponse, error)`

**post** `/v3/capability/check_imessage`

Check whether a recipient address (phone number or email) is reachable via iMessage.

### Parameters

- `body CapabilityCheckIMessageParams`

  - `HandleCheck param.Field[HandleCheck]`

### Returns

- `type HandleCheckResponse struct{…}`

  - `Address string`

    The recipient address that was checked

  - `Available bool`

    Whether the recipient supports the checked messaging service

  - `Reason HandleCheckResponseReason`

    Why `available` is `false`. Only present on a negative result.

    `not_supported` is the only value returned with a `200`, and it means the check
    completed and the recipient is genuinely not reachable over this service. On
    `check_rcs`, sender-side faults do not return `200` — they return `503` with a
    specific error code. `check_imessage` does not use this mapping.

    - `const HandleCheckResponseReasonNotSupported HandleCheckResponseReason = "not_supported"`

  - `SelectedService string`

    The service that would actually carry a message to this address right now, which is
    not always the service you checked — a recipient without RCS resolves to `SMS`.
    Absent when the check could not determine one.

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/linq-team/linq-go"
  "github.com/linq-team/linq-go/option"
)

func main() {
  client := linqgo.NewClient(
    option.WithAPIKey("My API Key"),
  )
  handleCheckResponse, err := client.Capability.CheckIMessage(context.TODO(), linqgo.CapabilityCheckIMessageParams{
    HandleCheck: linqgo.HandleCheckParam{
      Address: "+15551234567",
    },
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", handleCheckResponse.Address)
}
```

#### Response

```json
{
  "address": "+15551234567",
  "available": true
}
```
