---
schema_version: "1"
id: dd9e3691e58ba07e150a77567d278e2155e9fdf46b4678d17db1cd2b41390c32
title: ExternalServiceRegistration
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_externalserviceregistration.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_externalserviceregistration.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 481befd9b9513bee2ca3cc7598f709e7f8be67a59f4e2f86b0f3723facf11edb
description: Represents the external service configuration for an org.
---
# ExternalServiceRegistration

Represents the external service configuration for an org.

## File Suffix and Directory Location

ExternalServiceRegistration components have the suffix .externalServiceRegistration and are stored in the externalServiceRegistrations folder.

## Version

ExternalServiceRegistration components are available in API version 39.0 and later.

## Fields

<table class="featureTable sort_table" summary="">



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d481846e81">Field Name</th>

              <th class="featureTableHeader  " id="d481846e84">Field Type</th>

              <th class="featureTableHeader  " id="d481846e87">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d481846e81" data-title="Field Name"><span class="keyword parmname">catalogedApiVersion</span></td>

              <td class="entry" headers="d481846e84" data-title="Field Type">string</td>

              <td class="entry" headers="d481846e87" data-title="Description">A version of an API brought into API Catalog from an external source and
                managed for consumption in Salesforce. Available in API version 65.0 and later.
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d481846e81" data-title="Field Name"><span class="keyword parmname">description</span></td>

              <td class="entry" headers="d481846e84" data-title="Field Type">string</td>

              <td class="entry" headers="d481846e87" data-title="Description">The external service description defined when the service is created.</td>

            </tr>

            <tr>
              <td class="entry" headers="d481846e81" data-title="Field Name"><span class="keyword parmname">label</span></td>

              <td class="entry" headers="d481846e84" data-title="Field Type">string</td>

              <td class="entry" headers="d481846e87" data-title="Description">Required. The service name as it appears on the External Services
                wizard.</td>

            </tr>

            <tr>
              <td class="entry" headers="d481846e81" data-title="Field Name"><span class="keyword parmname">namedCredential</span></td>

              <td class="entry" headers="d481846e84" data-title="Field Type">string</td>

              <td class="entry" headers="d481846e87" data-title="Description">The reference by name to be used for the service.</td>

            </tr>

            <tr>
              <td class="entry" headers="d481846e81" data-title="Field Name"><span class="keyword parmname">namedCredentialReference</span></td>

              <td class="entry" headers="d481846e84" data-title="Field Type">reference</td>

              <td class="entry" headers="d481846e87" data-title="Description">The reference by ID to be used for the named credential. When used, supersedes
                <samp class="codeph nolang">namedCredential</samp>. Available in API version
                57.0 and later.
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d481846e81" data-title="Field Name"><span class="keyword parmname">operations</span></td>

              <td class="entry" headers="d481846e84" data-title="Field Type">
                <a class="xref" href="#ExternalServiceOperation">ExternalServiceOperation</a>[]
              </td>

              <td class="entry" headers="d481846e87" data-title="Description">Items defined for this operation.</td>

            </tr>

            <tr>
              <td class="entry" headers="d481846e81" data-title="Field Name"><span class="keyword parmname">registrationProvider</span></td>

              <td class="entry" headers="d481846e84" data-title="Field Type">string</td>

              <td class="entry" headers="d481846e87" data-title="Description">A reference to the registration provider.<ul class="ul bulletList">
                  <li class="li">If the registrationProviderType is <samp class="codeph nolang">ExternalConnector</samp>, this field contains the external connector
                    name.</li>

                  <li class="li">If the registrationProviderType is <samp class="codeph nolang">Heroku</samp>, this field contains the HerokuAppLink ID.</li>

                  <li class="li">For any other registrationProviderType value, this field is blank and reserved
                    for future use.</li>

                </ul>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d481846e81" data-title="Field Name"><span class="keyword parmname">registrationProviderAsset</span></td>

              <td class="entry" headers="d481846e84" data-title="Field Type">string</td>

              <td class="entry" headers="d481846e87" data-title="Description">A polymorphic foreign key field that contains the name of the asset related to
                the external service registration.<ul class="ul bulletList">
                  <li class="li">For an external service registration created for a named query, this field
                    contains the named query API name.</li>

                  <li class="li">For an external service registration created for an Apex class that has
                    methods exposed as REST resources or methods that are Aura-enabled. This field
                    contains the Apex class name.</li>

                </ul>
                Available in API version 66.0 and later.</td>

            </tr>

            <tr>
              <td class="entry" headers="d481846e81" data-title="Field Name"><span class="keyword parmname">registrationProviderType</span></td>

              <td class="entry" headers="d481846e84" data-title="Field Type">ExternalServiceRegistrationProviderType (enumeration of type string)</td>

              <td class="entry" headers="d481846e87" data-title="Description">Indicates the source of the API specification registered with the External
                Services wizard. Valid values include:<ul class="ul bulletList">
                  <li class="li">
                    <samp class="codeph nolang">AgentActionOutputs</samp>—Reserved for internal
                    use.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">AgentToAgent</samp>—The API specification
                    represents the external service schemas that enable communication between AI
                    agents. Available in API version 66.0 and later.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">Anypoint</samp>—The API specification is managed
                    in the MuleSoft Anypoint Platform. Available in API version 63.0 and later.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">AnypointPublic</samp>—Reserved for internal use.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">ApexRest</samp>—The API specification was
                    created from an Apex REST class. Available in API version 63.0 and later.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">AuraEnabled</samp>—The API specification was
                    created from an Apex class that has AuraEnabled methods. Available in API
                    version 65.0 and later.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">CodeExtension</samp>—Reserved for internal use.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">Commerce</samp>—The API specification was
                    configured for custom Salesforce Commerce APIs. Available in API version 67.0
                    and later.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">ContextDef</samp>—The API specification used to
                    create dynamic Apex classes for the related context definition structure.
                    Available in API version 66.0 and later.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">Custom</samp>—The API specification was manually
                    configured.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">CustomExternalConnector</samp>—The API
                    specification represents a custom partner-created version of an external
                    connection. Available in API version 66.0 and later.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">DocumentProcessing</samp>—Reserved for internal
                    use.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">ExternalConnector</samp>—The API specification
                    represents an external connection.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">Heroku</samp>—The API specification represents a
                    Heroku app.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">MuleSoft</samp>—The API specification was
                    selected from MuleSoft. Use Anypoint for MuleSoft for Agentforce: API Catalog
                    MuleSoft sources.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">NamedQuery</samp>—The API specification
                    represents a named query REST endpoint. Available in API version 64.0 and
                    later.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">SchemaInferred</samp>—The API specification was
                    provided during the HTTP Callout configuration process. Available in API version
                    57.0 and later.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">Standard</samp>—The API specification was
                    defined when an external service was created.
                  </li>

                </ul>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d481846e81" data-title="Field Name"><span class="keyword parmname">schema</span></td>

              <td class="entry" headers="d481846e84" data-title="Field Type">string</td>

              <td class="entry" headers="d481846e87" data-title="Description">The content of the OpenAPI 2.0.x or OpenAPI 3.0.x schema in JSON or YAML
                format. Nillable.</td>

            </tr>

            <tr>
              <td class="entry" headers="d481846e81" data-title="Field Name"><span class="keyword parmname">schemaAbsoluteUrl</span></td>

              <td class="entry" headers="d481846e84" data-title="Field Type">string</td>

              <td class="entry" headers="d481846e87" data-title="Description">The full, absolute URL to the schema. Populated when a user selects
                <strong class="ph uicontrol">Absolute URL</strong> during registration.
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d481846e81" data-title="Field Name"><span class="keyword parmname">schemaType</span></td>

              <td class="entry" headers="d481846e84" data-title="Field Type">string</td>

              <td class="entry" headers="d481846e87" data-title="Description">The schema format. OpenAPI for OpenAPI 2.0.x or OpenAPI 3.0.x. If not
                specified, the schema type is derived based on the schema content. Nillable.</td>

            </tr>

            <tr>
              <td class="entry" headers="d481846e81" data-title="Field Name"><span class="keyword parmname">schemaUploadFileExtension</span></td>

              <td class="entry" headers="d481846e84" data-title="Field Type">string</td>

              <td class="entry" headers="d481846e87" data-title="Description">The file’s extension. Populated when a user selects <strong class="ph uicontrol">Upload from
                  local</strong> during registration.</td>

            </tr>

            <tr>
              <td class="entry" headers="d481846e81" data-title="Field Name"><span class="keyword parmname">schemaUploadFileName</span></td>

              <td class="entry" headers="d481846e84" data-title="Field Type">string</td>

              <td class="entry" headers="d481846e87" data-title="Description">The file’s name without the file extension. Populated when a user selects
                <strong class="ph uicontrol">Upload from local</strong> during registration.
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d481846e81" data-title="Field Name"><span class="keyword parmname">schemaUrl</span></td>

              <td class="entry" headers="d481846e84" data-title="Field Type">string</td>

              <td class="entry" headers="d481846e87" data-title="Description">The path must begin with "/" and be relative to the named credential
                endpoint.</td>

            </tr>

            <tr>
              <td class="entry" headers="d481846e81" data-title="Field Name"><span class="keyword parmname">serviceBinding</span></td>

              <td class="entry" headers="d481846e84" data-title="Field Type">string</td>

              <td class="entry" headers="d481846e87" data-title="Description">Used to map non-supported media types for this external service registration to
                supported media types. Nillable. Available in API version 53.0 and later.</td>

            </tr>

            <tr>
              <td class="entry" headers="d481846e81" data-title="Field Name"><span class="keyword parmname">serviceName</span></td>

              <td class="entry" headers="d481846e84" data-title="Field Type">string</td>

              <td class="entry" headers="d481846e87" data-title="Description">The name of the cataloged API service that this external service registration
                belongs to. Available in API version 63.0 and later. This field was removed in API
                version 65.0.</td>

            </tr>

            <tr>
              <td class="entry" headers="d481846e81" data-title="Field Name"><span class="keyword parmname">status</span></td>

              <td class="entry" headers="d481846e84" data-title="Field Type">string</td>

              <td class="entry" headers="d481846e87" data-title="Description">Required. Indicates service registration status. Valid values include:<ul class="ul bulletList">
                  <li class="li">
                    <samp class="codeph nolang">complete</samp>—The API spec is valid and the
                    registration is ready to use.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">incomplete</samp>—The service registration
                    hasn’t completed.
                  </li>

                </ul>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d481846e81" data-title="Field Name"><span class="keyword parmname">systemVersion</span></td>

              <td class="entry" headers="d481846e84" data-title="Field Type">int</td>

              <td class="entry" headers="d481846e87" data-title="Description">The internal version of External Services that is used to register the API
                specification. Available in API version 55.0 and later. The system versions are
                independent of API versions.<ul class="ul bulletList">
                  <li class="li">
                    <samp class="codeph nolang">1</samp>—Retired legacy External Services.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">2</samp>—External Services with limitations on
                    object and operation name length.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">3</samp>—External Services automatically derives
                    developer names fitting within 80 characters.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">4</samp>—Removed the default character set when
                    making a callout to an external service. To specify a character set, include it
                    in the OpenAPI specification, for example: <samp class="codeph nolang">contentType: application/xml; charset=utf-8</samp>.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">5</samp>—Introduced asynchronous callouts with
                    callbacks from Apex.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">6</samp>—Added support for OpenAPI Specification
                    (OAS) discriminator mapping.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">7</samp>—Added support for property names that
                    begin with a number. <p class="p">For input parameters on invocable actions, encodes the
                      keyword <span class="keyword parmname">connection</span> as
                      <span class="keyword parmname">reconnection</span>.
                    </p>
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">8</samp>—Internal changes.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">9</samp>—Current version. Added support for
                    enums in the OpenAPI spec.
                  </li>

                </ul>
                This field is read-only. You can’t upgrade an external service to a newer
                system version. To take advantage of functionality in a newer system version, you
                must create an external service by using the same OpenAPI spec and then replace any
                references to the old external service. See <a class="xref" href="https://help.salesforce.com/s/articleView?id=platform.external_services_register.htm&amp;language=en_US" target="_blank">Register an External Service</a> in Salesforce
                Help.</td>

            </tr>

          </tbody>

        </table>

## ExternalServiceOperation

| Field Name | Field Type | Description |
| --- | --- | --- |
| active | boolean | Required. Indicates whether the operation is active (true), or inactive (false). |
| name | string | Required. The operation’s name. |

## Declarative Metadata Sample Definition

The following is an example of an ExternalServiceRegistration component that references an external credit service.

<?xml version="1.0" encoding="UTF-8"?>
<ExternalServiceRegistration xmlns="http://soap.sforce.com/2006/04/metadata">
  <label\>BankService</label\>
  <namedCredential\>Bank</namedCredential\>
  <schema\>{
  "swagger": "2.0",
  "basePath": "/",
  "info": {
    "version": "1.0",
    "title": "External Service for demo bank",
    "description": "### External Service for demo bank",
    "x-vcap-service-name": "DemoBankRestServices"
  },
  ...
  "paths": {
  "/accounts/{accountName}": {
      ...
    }
  },
  "definitions": {
    "accountDetails": {
      ...
    },
    "errorModel": {
      ...
    }
  }
}</schema\>
  <schemaType\>OpenApi</schemaType\>
  <schemaUrl\>/accounts/schema</schemaUrl\>
  <status\>Complete</status\>
</ExternalServiceRegistration\>

## serviceBinding

The following JSON-encoded string defines the mapping of a non-supported media type to a supported media type for external service request and response body serialization.

{"compatibleMediaTypes":{
    "application/x-acme-json":"application/json"
}}

The non-supported media type application/x-acme-json is mapped to the supported media type application/json for this External Services registration. The External Services runtime considers the non-supported media type for request and response header processing. It serializes the request and response content by the mapped supported media type.

#### See Also

- [_Salesforce Help_: Media Type Mapping in External Service Registrations](https://help.salesforce.com/s/articleView?id=platform.external_services_mime_type_mapping.htm&type=5&language=en_US "Salesforce Help: Media Type Mapping in External
    Service Registrations - HTML (New Window)")