# 90023: One of 'TemplateArgs' dictionary value is null

Log Type: APPLICATION

Log Level: ERROR

## Description

This error occurs when your request includes `TemplateArgs` and at least one dictionary value is `null`. Replace that entry with a real substitution value before you send the request. If you are using current content templates, Twilio also requires non-null values for `ContentVariables`.

### Possible causes

* Your request payload includes a `TemplateArgs` key whose value is `null`.
* Your application maps an optional or missing field into the template argument payload, and that field is serialized as `null` at send time.
* You build template substitutions dynamically and do not validate the final payload before sending it. As a result, one or more values resolve to `null`.

### Possible solutions

* Inspect the final outbound request and identify every `TemplateArgs` entry before you send it. Remove any path in your application that allows a template value to resolve to `null`.
* Replace each `null` entry with a valid substitution value that matches the placeholder your template expects.
* Add application-side validation for any field you copy into template arguments, especially values loaded from forms, databases, or upstream APIs. Reject the request or supply a valid value before you create the Twilio API request.
* If you are sending a content template through the current Messaging API, send `ContentSid` with a valid JSON string in `ContentVariables` and make sure each variable value is non-null. If your template defines default variable values, use those defaults instead of sending `null`.

#### Additional resources

* [Using Variables with Content Templates](/docs/content/using-variables-with-content-api)
* [Send templates created with the Content Template Builder](/docs/content/send-templates-created-with-the-content-template-builder)
* [Messages resource](/docs/messaging/api/message-resource)
