Skip to content

opt_in_phone_number

Operation

opt_in_phone_number

opt_in_phone_number(request: OptInPhoneNumberInput | OptInPhoneNumberInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[OptInPhoneNumberInputDict]) -> OptInPhoneNumberOutput

Use this request to opt in a phone number that is opted out, which enables you to resume sending SMS messages to the number.

You can opt in a phone number only once every 30 days.

Parameters:

Name Type Description Default
request OptInPhoneNumberInput | OptInPhoneNumberInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[OptInPhoneNumberInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
OptInPhoneNumberOutput

An instance of OptInPhoneNumberOutput.

opt_in_phone_number async

opt_in_phone_number(request: OptInPhoneNumberInput | OptInPhoneNumberInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[OptInPhoneNumberInputDict]) -> OptInPhoneNumberOutput

Use this request to opt in a phone number that is opted out, which enables you to resume sending SMS messages to the number.

You can opt in a phone number only once every 30 days.

Parameters:

Name Type Description Default
request OptInPhoneNumberInput | OptInPhoneNumberInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[OptInPhoneNumberInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
OptInPhoneNumberOutput

An instance of OptInPhoneNumberOutput.

Input

Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.

OptInPhoneNumberInputDict

Bases: TypedDict

Dictionary form of OptInPhoneNumberInput.

Attributes

phone_number instance-attribute
phone_number: Required[str]

The phone number to opt in. Use E.164 format.

OptInPhoneNumberInput dataclass

Bases: _SerdeShape

Input for the OptInPhoneNumber action.

Attributes

phone_number class-attribute instance-attribute
phone_number: str | None = ...

The phone number to opt in. Use E.164 format.

Output

OptInPhoneNumberOutput dataclass

Bases: _SerdeShape

The response for the OptInPhoneNumber action.

Attributes

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.