---
schema_version: "1"
id: 5c83adf8a4f1a6434eabd973d496a1416d09cd03b6f9153ef569ac5821a979bd
title: OpenAPI 2.0 and 3.0 Support
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/external_services_intro_openapi_2_3_support.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.external_services_intro_openapi_2_3_support.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 681bed601aec4be898feca5bd2df3478dfc25c133c17bf1615f4510a45481816
description: Learn about valid API schema components that can be used to register a spec successfully.
products:
  - Salesforce Platform
  - Security
release: "264"
---
# OpenAPI 2.0 and 3.0 Support

Learn about valid API schema components that can be used to register a spec successfully.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>, <strong>Performance</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions</td></tr></tbody></table>

Along with normal packaging support, you can use:

- Nested parameters—rendered as Dynamic Apex-defined data types in Apex and Flow Builder.
- Named arrays, anonymous arrays, or inline arrays, supported as generic `List` type in Apex, or as `collection` type in Flow Builder.
- OpenAPI `additionalProperties` as generic `Map` type in Apex.
- Header parameters in HTTP requests.

- The following media types are supported:
    - `application/json` -- Structured data in JSON format
    - `application/x-www-form-urlencoded` -- URL encoded form
    - `text/plain` -- Unstructured data as plain text
- Non-supported media types can be mapped to supported media types for request and response content serialization. See [Media Type Mapping in External Service Registrations](https://help.salesforce.com/s/articleView?id=platform.external_services_mime_type_mapping.htm&release=264.0.0&type=5 "You can register specifications with nonsupported consumes, produces, or OpenAPI 3.0 content media type directives by mapping the media types to supported media types. Specify a mapping from a dropdown menu on the registration screen, or provide the mapping with code by using Metadata API.").
- Form data parameters are supported.
- Supports all Java runtime supported character set encodings. UTF-8 is the default encoding.
- OpenAPI 2.0: Server and operation level `consumes` and `produces` directives.
- OpenAPI 3.0: Content media type with supported media types.

## Supported Schema Format

- OpenAPI 2.0, JSON schema format
- OpenAPI 3.0, JSON schema format
- OpenAPI 2.0 schema, YAML format
- OpenAPI 3.0 schema, YAML format
- UTF-8, with full character set for names and identifiers

## Unsupported Schema Formats

- Interagent hyper-schema format

## Unsupported Schema Constructs

- OpenAPI 3.0: The composite schema keyword: `not`
- Media types such as xml, png, and pdf
- OpenAPI 3.0: Server variables. The `servers[].variables` object isn't supported. Variable placeholders in a server URL (for example, `{subdomain}` or `{tenant}`) aren't substituted at run time from variable default values or from named credential parameters. Use a literal URL instead. A schema that relies on server variables registers successfully but produces malformed callout URLs at run time and fails.