# Configuration Data

## Get Configuration Data

A call to `getConfigurationData` returns the various limits applied to email sending and receiving, as well as the limits applied to email management.

{% tabs %}
{% tab title="TypeScript" %}

```typescript
// Interface representing the configuration data returned
export interface ConfigurationData {
  deleteEmailMessagesLimit: number
  updateEmailMessagesLimit: number
  emailMessageMaxInboundMessageSize: number
  emailMessageMaxOutboundMessageSize: number
  emailMessageRecipientsLimit: number
  encryptedEmailMessageRecipientsLimit: number
}

try {
    const configurationData = await emailClient.getConfigurationData()
    // `configurationData` contains the various limits configured for emails.
} catch {
    // Handle/notify user of errors
}
```

{% endtab %}

{% tab title="Swift" %}

```swift
do {
    let configurationData = try await emailClient.getConfigurationData()
    // `configurationData` contains the following properties:
    /// The number of email messages that can be deleted at a time.
    /// public var deleteEmailMessagesLimit: Int

    /// The number of email messages that can be updated at a time.
    /// public var updateEmailMessagesLimit: Int

    /// The maximum allowed size of an inbound email message.
    /// public var emailMessageMaxInboundMessageSize: Int

    /// The maximum allowed size of an outbound email message.
    /// public var emailMessageMaxOutboundMessageSize: Int
    
    /// The maximum number of recipients for an out-of-network email message.
    /// public var emailMessageRecipientsLimit: Int
    
    /// The maximum number of recipients for an in-network encrypted email message.
    /// public var encryptedEmailMessageRecipientsLimit: Int
} catch {
    // Handle/notify user of errors
}
```

{% endtab %}

{% tab title="Kotlin" %}

```kotlin
launch {
    try {
        val configurationData = withContext(Dispatchers.IO) {
            emailClient.getConfigurationData()
        }
        // The [configurationData] is returned which contains the following properties:
        //     * deleteEmailMessagesLimit: The number of email messages that can be deleted at a time.
        //     * updateEmailMessagesLimit: The number of email messages that can be updated at a time.
        //     * emailMessageMaxInboundMessageSize: The maximum allowed size of an inbound email message.
        //     * emailMessageMaxOutboundMessageSize: The maximum allowed size of an outbound email message.
        //     * emailMessageRecipientsLimit: The maximum number of recipients for an out-of-network email message.
        //     * encryptedEmailMessageRecipientsLimit: The maximum number of recipients for an in-network encrypted email message.
    } catch (e: EmailConfigurationException) {
        // Handle/notify user of exception
    }
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sudoplatform.com/guides/email/configuration-data.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
