> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs-unsw-v6.advance-uac.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs-unsw-v6.advance-uac.com/_mcp/server.

# Create a curriculum container

POST https://unsw-v6-dev.advance-uac.com/institution-api/institution/catalogue/structures
Content-Type: application/json

Creates a container in a curriculum. What it becomes depends on what you supply:

* `parentId` makes it a child of that container, inheriting its owner. A child cannot belong
  to a different curriculum than its parent, so don't also send an owner.
* an owner (`programCode`+`programYear` or `specialisationCode`+`specialisationYear`) makes it
  a new root on that curriculum.
* neither makes it a DRAFT root, owned by nobody. Build it and review it, then attach it with
  `PUT /{structureId}/owner` when you're satisfied.

`creditPoints` is the requirement: the UOC that must be taken from this container.

Reference: https://docs-unsw-v6.advance-uac.com/unsw-advance-institution-api/catalogue/create-a-curriculum-container

## Authentication

- `Authorization` header (bearer token, required) — Paste a Keycloak access token (no "Bearer " prefix)

## Servers

- `https://unsw-v6-dev.advance-uac.com/institution-api` (Dev, default)
- `https://unsw-v6-test.advance-uac.com/institution-api` (Test)

## Request

### Query parameters

- `parentId` (string, optional)
- `programCode` (string, optional)
- `programYear` (integer, optional)
- `specialisationCode` (string, optional)
- `specialisationYear` (integer, optional)

### Body (application/json)

This endpoint expects a ContainerRequest.

- `title` (string, optional) — e.g. "Core Subjects".
- `description` (string, optional) — The requirement in words, e.g. "Students must take 30 UOC of the following subjects."
- `creditPoints` (integer, optional) — UOC that must be taken from this container.
- `creditPointsMax` (integer, optional) — Upper bound, where the handbook states one. Must not be less than `creditPoints`.
- `sort` (integer, optional) — Position among siblings. Defaults to 0.

## Response

### 201

The container was created.

- `id` (string, optional)
- `parentId` (string, optional) — Null for a root container.
- `title` (string, optional)
- `description` (string, optional)
- `creditPoints` (integer, optional)
- `creditPointsMax` (integer, optional)
- `sort` (integer, optional)
- `status` (string, optional) — DRAFT | LIVE. DRAFT is hidden from normal curriculum reads and keeps the tree's placement editable.
- `unplaced` (boolean, optional) — True while this container belongs to no program or specialisation. Place it with PUT /\{structureId}/owner or /\{structureId}/parent.

## Errors

### 400 Bad Request Error

Invalid fields, or both a parent and an owner were supplied. A child inherits its parent's owner.

- `status` (integer, optional) — Repeats the HTTP status code.
- `error` (string, optional) — What went wrong, in a form safe to show a developer.

### 404 Not Found Error

The parent container, or the named program or specialisation, doesn't exist.

- `status` (integer, optional) — Repeats the HTTP status code.
- `error` (string, optional) — What went wrong, in a form safe to show a developer.

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "id": "string",
  "parentId": "string",
  "title": "string",
  "description": "string",
  "creditPoints": 1,
  "creditPointsMax": 1,
  "sort": 1,
  "status": "string",
  "unplaced": true
}
```

**SDK Code**

```python
import requests

url = "https://unsw-v6-dev.advance-uac.com/institution-api/institution/catalogue/structures"

payload = {}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://unsw-v6-dev.advance-uac.com/institution-api/institution/catalogue/structures';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://unsw-v6-dev.advance-uac.com/institution-api/institution/catalogue/structures"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://unsw-v6-dev.advance-uac.com/institution-api/institution/catalogue/structures")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://unsw-v6-dev.advance-uac.com/institution-api/institution/catalogue/structures")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://unsw-v6-dev.advance-uac.com/institution-api/institution/catalogue/structures', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://unsw-v6-dev.advance-uac.com/institution-api/institution/catalogue/structures");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://unsw-v6-dev.advance-uac.com/institution-api/institution/catalogue/structures")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```