Add Content Type To List Or Library. To enhance our example. On the Content type gallery page under the Site content type column select the name of the site content type to which you want to add a column.

When youre in your list or library you wont be able to add a content type unless you activate the management of content types. Go to the SharePoint admin center. To associate a template with a content type.
Your code would look something like.
A SharePoint library is a special kind of list that stores documents or files. Go to the SharePoint admin center. If you are working in a library click the Library tab and then click Library Settings. As I understand all these columns become local to the library.