How can i manage Content Type in SharePoint List using REST API, it's look like a very wide question, isn't it ? well what i'm looking for exactly is:

  1. How to change content type visibility option to hidden
  2. How to reorder content type

ps: All that using the REST API


1 Answer 1


You can access the contenttypes REST API at <<yoursiteurl>>/_api/web/contenttypes. or for list-/library- level content types: <<yoursiteurl>>/_api/web/lists/getbytitle('teamlist')/contenttypes

If you are attempting to create a new ContentType, make sure you specify the Id as defined sub-object in your POST Body.

    '__metadata': {'type': 'SP.ContentType'},
    'Description': 'TestDesc',
    'Name': 'ContentType New',
    'Group': 'Custom Group',        

If you are updating an existing content type, perform your PATCH or MERGE with the ContentTypeID specified in the URI, such as:


To make the content type "Visible", set Hidden to false, to Hide it, set Hidden to true:

    '__metadata': {'type': 'SP.ContentType'},
    'Hidden': false,

To set the Content Type Order, you have to use the uniqueContentTypeOrder method on the Folder object API (note, this is an operation on the folder, not on the List. While you can call uniqueContentTypeOrder on the List object, it is read-only on that object and will not accept any updates.
Good: <<yoursiteurl>>_api/web/GetFolderByServerRelativeUrl('/sites/ati-poc/Lists/TeamList')/uniqueContentTypeOrder
Bad (read-only): <<yoursiteurl>>_api/web/lists/getbytitle('TeamList')/rootfolder/uniqueContentTypeOrder


Be sure when updating to specify your content-type with odata=verbose and appropriate if-match and x-http-method:

headers = {
    "Accept": "application/json; odata=verbose",
    "Content-Type": "application/json; odata=verbose",
    "X-RequestDigest": <<DigestValue>>,
    "IF-MATCH": "*",
    "X-HTTP-Method": "MERGE"
  • These tips made my day! Following your samples I made a custom form setup. 👍 Commented Sep 16, 2022 at 23:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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