# Capability

## Check iMessage capability

`capability.check_i_message(CapabilityCheckIMessageParams**kwargs)  -> HandleCheckResponse`

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

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

### Parameters

- `address: str`

  The recipient address to check. `check_imessage` accepts an E.164 phone number or an
  email address; `check_rcs` accepts an E.164 phone number only and rejects an email
  with a `400`, since RCS has no email addressing.

- `from_: Optional[str]`

  Optional sender phone number. If omitted, an available phone from your pool is used automatically.

### Returns

- `class HandleCheckResponse: …`

  - `address: str`

    The recipient address that was checked

  - `available: bool`

    Whether the recipient supports the checked messaging service

  - `reason: Optional[Literal["not_supported"]]`

    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.

    - `"not_supported"`

  - `selected_service: Optional[str]`

    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

```python
import os
from linq import LinqAPIV3

client = LinqAPIV3(
    api_key=os.environ.get("LINQ_API_V3_API_KEY"),  # This is the default and can be omitted
)
handle_check_response = client.capability.check_i_message(
    address="+15551234567",
)
print(handle_check_response.address)
```

#### Response

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

## Check RCS capability

`capability.check_RCS(CapabilityCheckRCSParams**kwargs)  -> HandleCheckResponse`

**post** `/v3/capability/check_rcs`

Check whether a recipient address (phone number) supports RCS messaging.

`address` must be an E.164 phone number. RCS has no email addressing, so an email is
rejected with a `400` rather than attempted.

A `200` means the check ran and the answer is about the **recipient**. A `503` means the
check could not produce an answer because of a fault on the **sender** line — `4004`
(RCS not turned on for the line), `4009` (line has no RCS account), or `4010` (the check
could not run). Treat all three as "unknown", never as "the recipient does not support
RCS", and do not cache them as a negative result.

### Parameters

- `address: str`

  The recipient address to check. `check_imessage` accepts an E.164 phone number or an
  email address; `check_rcs` accepts an E.164 phone number only and rejects an email
  with a `400`, since RCS has no email addressing.

- `from_: Optional[str]`

  Optional sender phone number. If omitted, an available phone from your pool is used automatically.

### Returns

- `class HandleCheckResponse: …`

  - `address: str`

    The recipient address that was checked

  - `available: bool`

    Whether the recipient supports the checked messaging service

  - `reason: Optional[Literal["not_supported"]]`

    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.

    - `"not_supported"`

  - `selected_service: Optional[str]`

    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

```python
import os
from linq import LinqAPIV3

client = LinqAPIV3(
    api_key=os.environ.get("LINQ_API_V3_API_KEY"),  # This is the default and can be omitted
)
handle_check_response = client.capability.check_RCS(
    address="+15551234567",
)
print(handle_check_response.address)
```

#### Response

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

## Domain Types

### Handle Check

- `class HandleCheck: …`

  - `address: str`

    The recipient address to check. `check_imessage` accepts an E.164 phone number or an
    email address; `check_rcs` accepts an E.164 phone number only and rejects an email
    with a `400`, since RCS has no email addressing.

  - `from_: Optional[str]`

    Optional sender phone number. If omitted, an available phone from your pool is used automatically.

### Handle Check Response

- `class HandleCheckResponse: …`

  - `address: str`

    The recipient address that was checked

  - `available: bool`

    Whether the recipient supports the checked messaging service

  - `reason: Optional[Literal["not_supported"]]`

    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.

    - `"not_supported"`

  - `selected_service: Optional[str]`

    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.
