> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# API Object

> Learn about the send-phone-message Action trigger's API object.

The API object for the send-phone-message Actions trigger includes:

## `api.cache`

Store and retrieve data that persists across executions.

### `api.cache.delete(key)`

Delete a record describing a cached value at the supplied
key if it exists.

**Parameters**

**Parameters**

**key** `string`

The key of the cache record to delete.

### `api.cache.get(key)`

Retrieve a record describing a cached value at the supplied key,
if it exists. If a record is found, the cached value can be found
at the `value` property of the returned object.

**Parameters**

**Parameters**

**key** `string`

The key of the record stored in the cache.

### `api.cache.set(key, value, options)`

Store or update a string value in the cache at the specified key.

Values stored in this cache are scoped to the Trigger in which they
are set. They are subject to the [Actions Cache Limits](https://auth0.com/docs/customize/actions/limitations).

Values stored in this way will have lifetimes of *up to* the specified
`ttl` or `expires_at` values. If no lifetime is specified, a default of
lifetime of 15 minutes will be used. Lifetimes may not exceed the maximum
duration listed at [Actions Cache Limits](https://auth0.com/docs/customize/actions/limitations).

**Important**: This cache is designed for short-lived, ephemeral data. Items may not be
available in later transactions even if they are within their supplied their lifetime.

**Parameters**

**Parameters**

**key** `string`

The key of the record to be stored.

**value** `string`

The value of the record to be stored.

**options** `cachesetoptions`

Options for adjusting cache behavior.
Optional.

**options properties**

**expires\_at** `number`

The absolute expiry time in milliseconds since the unix epoch.
While cached records may be evicted earlier, they will
never remain beyond the supplied `expires_at`.

*Note*: This value should not be supplied if a value was also
provided for `ttl`. If both options are supplied, the
earlier expiry of the two will be used.
Optional.

**ttl** `number`

The time-to-live value of this cache entry in milliseconds.
While cached values may be evicted earlier, they will
never remain beyond the supplied `ttl`.

*Note*: This value should not be supplied if a value was also
provided for `expires_at`. If both options are supplied, the
earlier expiry of the two will be used.
Optional.
