InsionInsion
PHP

Configuration and request options

Configure the PHP client and override individual requests

Pass baseUrl, maxRetries, timeout, headers, or a PSR-18 client through the client options. Every method also accepts an options array with baseUrl, maxRetries, timeout, headers, queryParameters, and bodyProperties.

$result = $client->listRecords(
    options: ['timeout' => 10.0, 'headers' => ['X-Request-ID' => 'request-123']]
);

The default timeout is 30 seconds and the default retry count is 2.

Client options

OptionScopePurpose
baseUrlClient or requestOverride the default Insion environment.
maxRetriesClient or requestControl retry attempts for retryable failures.
timeoutClient or requestSet the timeout in seconds.
headersClient or requestAdd HTTP headers.
queryParametersRequestAdd query-string values.
bodyPropertiesRequestAdd JSON body values.
clientClientProvide a PSR-18 HTTP client.

Use client options for application-wide defaults. Use the method-level options array for a single request, such as a shorter timeout on an interactive moderation call or a request ID header for tracing.

On this page