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

# Assign advisors (support)

POST https://<provided-by-saturn>/partner/employees/{saturn_ref_id}/support-assignments
Content-Type: application/json

Attaches advisors to a SUPPORT employee (max 50 per call).

**Each ref is reported individually.** The response gives a `results` array with a `status` of `created` or `failed` per ref, plus `created` and `failed` counts — one bad ref does not discard the valid ones. A batch where nothing was created returns 200 rather than 201.

Per-ref failure codes: `NOT_FOUND` (unknown advisor, or one belonging to another organisation), `UNPROCESSABLE` (not an ADVISOR or DIRECTOR), `CONFLICT` (already assigned), `BAD_REQUEST` (repeated ref).

The target employee must hold the SUPPORT role, or the whole call returns **422**.

Your organisation is derived from your API key. There is no field for naming an organisation or a CRM, and any unrecognised field in the body returns 400 rather than being ignored.

Reference: https://developer.saturnos.com/partner/employees/assign-advisors-support

## Authentication

- `Authorization` header (required) — API Key authentication via header

## Request

### Path parameters

- `saturn_ref_id` (string, required)

### Body (application/json)

This endpoint expects an object.

- `advisor_refs` (list of string, required)

## Response

### 200

Successful response

## Examples

**Request**

```json
{
  "advisor_refs": [
    "1a2b3c4d-5e6f-4708-9a1b-2c3d4e5f6071"
  ]
}
```

**Response**

```json
{}
```

**SDK Code**

```python Employees_Assign advisors (support)_example
import requests

url = "https://api.example.com/partner/employees/saturn_ref_id/support-assignments"

payload = { "advisor_refs": ["1a2b3c4d-5e6f-4708-9a1b-2c3d4e5f6071"] }
headers = {
    "Authorization": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Employees_Assign advisors (support)_example
const url = 'https://api.example.com/partner/employees/saturn_ref_id/support-assignments';
const options = {
  method: 'POST',
  headers: {Authorization: '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"advisor_refs":["1a2b3c4d-5e6f-4708-9a1b-2c3d4e5f6071"]}'
};

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

```go Employees_Assign advisors (support)_example
package main

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

func main() {

	url := "https://api.example.com/partner/employees/saturn_ref_id/support-assignments"

	payload := strings.NewReader("{\n  \"advisor_refs\": [\n    \"1a2b3c4d-5e6f-4708-9a1b-2c3d4e5f6071\"\n  ]\n}")

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

	req.Header.Add("Authorization", "<apiKey>")
	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 Employees_Assign advisors (support)_example
require 'uri'
require 'net/http'

url = URI("https://api.example.com/partner/employees/saturn_ref_id/support-assignments")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"advisor_refs\": [\n    \"1a2b3c4d-5e6f-4708-9a1b-2c3d4e5f6071\"\n  ]\n}"

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

```java Employees_Assign advisors (support)_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.example.com/partner/employees/saturn_ref_id/support-assignments")
  .header("Authorization", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"advisor_refs\": [\n    \"1a2b3c4d-5e6f-4708-9a1b-2c3d4e5f6071\"\n  ]\n}")
  .asString();
```

```php Employees_Assign advisors (support)_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.example.com/partner/employees/saturn_ref_id/support-assignments', [
  'body' => '{
  "advisor_refs": [
    "1a2b3c4d-5e6f-4708-9a1b-2c3d4e5f6071"
  ]
}',
  'headers' => [
    'Authorization' => '<apiKey>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Employees_Assign advisors (support)_example
using RestSharp;

var client = new RestClient("https://api.example.com/partner/employees/saturn_ref_id/support-assignments");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"advisor_refs\": [\n    \"1a2b3c4d-5e6f-4708-9a1b-2c3d4e5f6071\"\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Employees_Assign advisors (support)_example
import Foundation

let headers = [
  "Authorization": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["advisor_refs": ["1a2b3c4d-5e6f-4708-9a1b-2c3d4e5f6071"]] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.example.com/partner/employees/saturn_ref_id/support-assignments")! 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()
```