I am attempting to make a composite API request to create both Account and child records in Salesforce in my sandbox account (Enterprise org).

When making the request I get the following error:

        "message": "Composite Api is not enabled.",
        "errorCode": "API_DISABLED_FOR_ORG"

I can't find anything related to the "Composite API" in the Setup > Manage Users > Profiles > System Permissions .

Can someone tell me how I can enable this?

  • 1
    As far as I know, it should come part and parcel with being able to use the REST API. Have you tried making a "normal" API call? Does the user you're authenticating as have permission to use the API (stored on the profile under system permissions)?
    – Derek F
    Feb 19 '18 at 18:33
  • I have made all the individual calls in my composite call successfully (authentication, create account, create related child record) without any issues. Feb 19 '18 at 18:49
  • If you don't have this feature for some reason, contact support. AFAIK, there's no way to have this intentionally disabled.
    – sfdcfox
    Feb 19 '18 at 18:58
  • 1
    what version of API are you using?
    – cropredy
    Feb 19 '18 at 19:19
  • Ah thats it! It was the version. Could you create an answer for this so I can mark it. Feb 19 '18 at 19:20

Since cropredy hasn't jumped on providing an answer, I will.

The composite rest resource was introduced as a pilot feature in Winter '17 (release notes), and was made generally available in Spring '17 (release notes).

That means your REST request will need to specify API version 39.0 (a.k.a. Spring '17) or later for this call to succeed.

i.e. the endpoint for your request needs to be

https://<pod identifier or mydomain prefix>.salesforce.com/services/data/<v39.0 or later>/composite/'`

As a concrete example...


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.