For the complete documentation index, see llms.txt. This page is also available as Markdown.

Optional Fields

Some fields in a request payload are not required for the API to process your request successfully. These are optional fields.

When a field is optional and you have no value to send, you have two ways to handle it:

  1. Pass null as the value.

  2. Exclude the field entirely from the payload. /

Either approach is accepted, the API does not require optional fields to be present.

Example

If middleName is an optional field, both of these payloads are valid:

// Option 1: explicit null
{
  "firstName": "Ada",
  "middleName": null,
  "lastName": "Obi"
}

json

// Option 2: field excluded
{
  "firstName": "Ada",
  "lastName": "Obi"
}

Required fields do not follow this rule, they must always be present in the payload with a valid value.

Last updated