Skip to content

Set the AI agent platforms

PUT
/organizations/{orgId}/agent-platforms
curl --request PUT \
--url https://api.modeldesk.io/organizations/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/agent-platforms \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "mode": "none", "hosts": [ "claude.ai" ], "maxLevel": "read" }'

Replaces which AI platforms the organization’s members may connect to ModelDesk through the hosted MCP server: none, every platform (all), or the platforms hosts names (listed). Model content and a member’s prompts reach the platform the member connects, under its provider’s terms and any agreement the member or the organization has with that provider. A host is accepted in any case and stored in lower case, and a host given twice is kept once. maxLevel replaces the highest level an agent may reach on the organization’s content; a body without it keeps the stored one, and turning the platforms off and on keeps it too. Each change is logged with the administrator who made it. Answers the setting as stored, which is a valid body for this operation. Requires an administrator of the organization; an agent’s delegated token and a service account are refused, so no agent can widen where the organization’s content goes or how far an agent reaches.

orgId
required
string format: uuid
Media typeapplication/json

The AI platforms an organization’s members may connect to ModelDesk through the hosted MCP server. Model content and a member’s prompts reach the platform the member connects, under its provider’s terms and any agreement the member or the organization has with that provider. hosts is present exactly when mode is listed.

object
mode
required

Which AI platforms members may connect through. none, the default, allows none; all allows every platform; listed allows only the hosts the setting names.

string
Allowed values: none all listed
hosts

The platforms a listed setting allows, 1 to 50, each the host name of the redirect URI that receives the sign-in result, or loopback for apps on the person’s own computer. Known platforms: claude.ai (Claude), chatgpt.com (ChatGPT), teams.microsoft.com (Microsoft 365 Copilot), global.consent.azure-apim.net (Copilot Studio). A host is a name of letters, digits, dots and hyphens, starting with a letter or digit, at most 253 characters, with no empty label; localhost and any name under it, an IP address (decimal or 0x hex), a scheme, a port, a path and a trailing dot are refused, and a non-ASCII host is entered in its punycode (xn--) form. Required and non-empty for listed, refused for any other mode.

Array<string>
>= 1 items <= 50 items
maxLevel

The highest level an agent acting for a member may reach on the organization’s content, whatever the member granted: read reads only; propose also stages changes into the person’s draft and works on branches named agent/…; act also commits to any branch and merges; publish also reaches people outside the organization, such as releasing a version. Every answer carries it, act for an organization that never chose. A write may leave it out, which keeps the stored one. An agent’s request above it is refused as AgentLevelNotAllowedProblem.

string
Allowed values: read propose act publish

Stored.

Media typeapplication/json

The AI platforms an organization’s members may connect to ModelDesk through the hosted MCP server. Model content and a member’s prompts reach the platform the member connects, under its provider’s terms and any agreement the member or the organization has with that provider. hosts is present exactly when mode is listed.

object
mode
required

Which AI platforms members may connect through. none, the default, allows none; all allows every platform; listed allows only the hosts the setting names.

string
Allowed values: none all listed
hosts

The platforms a listed setting allows, 1 to 50, each the host name of the redirect URI that receives the sign-in result, or loopback for apps on the person’s own computer. Known platforms: claude.ai (Claude), chatgpt.com (ChatGPT), teams.microsoft.com (Microsoft 365 Copilot), global.consent.azure-apim.net (Copilot Studio). A host is a name of letters, digits, dots and hyphens, starting with a letter or digit, at most 253 characters, with no empty label; localhost and any name under it, an IP address (decimal or 0x hex), a scheme, a port, a path and a trailing dot are refused, and a non-ASCII host is entered in its punycode (xn--) form. Required and non-empty for listed, refused for any other mode.

Array<string>
>= 1 items <= 50 items
maxLevel

The highest level an agent acting for a member may reach on the organization’s content, whatever the member granted: read reads only; propose also stages changes into the person’s draft and works on branches named agent/…; act also commits to any branch and merges; publish also reaches people outside the organization, such as releasing a version. Every answer carries it, act for an organization that never chose. A write may leave it out, which keeps the stored one. An agent’s request above it is refused as AgentLevelNotAllowedProblem.

string
Allowed values: read propose act publish

Example

{
"mode": "none",
"hosts": [
"claude.ai"
],
"maxLevel": "read"
}

The body is malformed or refused: an unknown mode, hosts missing or empty for listed or given for another mode, more than 50 hosts, a host that is not a platform name, or a maxLevel that is not one of the four levels in lower case. Each violation names the field, such as hosts or hosts[2].

Media typeapplication/problem+json

An RFC 9457 problem document, always sent as application/problem+json.

object
type

Present only on a typed refusal, whose own schema requires it and fixes its value. An untyped problem omits it, which RFC 9457 defines as about:blank: the status and title are all there is to branch on.

string format: uri
title
required
string
status
required
integer
detail
required
string
instance

The path of the request that was refused. Absent when the request was refused before it reached the application’s handlers: a 401 for a missing or unusable access token, and a 403 for a service account whose scopes do not reach the route.

string
violations

Present on a 400 raised by request-body validation, and on a 422 that refuses named fields (a malformed slug or namespace prefix). Each entry names the rejected property, so a client can attach the message to the field that caused it rather than showing one error for the whole form.

Array<object>
object
property
required
string
message
required
string

Example generated

{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"violations": [
{
"property": "example",
"message": "example"
}
]
}

The caller is not an administrator of the organization.

No such organization.

Error

Media typeapplication/problem+json

An RFC 9457 problem document, always sent as application/problem+json.

object
type

Present only on a typed refusal, whose own schema requires it and fixes its value. An untyped problem omits it, which RFC 9457 defines as about:blank: the status and title are all there is to branch on.

string format: uri
title
required
string
status
required
integer
detail
required
string
instance

The path of the request that was refused. Absent when the request was refused before it reached the application’s handlers: a 401 for a missing or unusable access token, and a 403 for a service account whose scopes do not reach the route.

string
violations

Present on a 400 raised by request-body validation, and on a 422 that refuses named fields (a malformed slug or namespace prefix). Each entry names the rejected property, so a client can attach the message to the field that caused it rather than showing one error for the whole form.

Array<object>
object
property
required
string
message
required
string

Example generated

{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"violations": [
{
"property": "example",
"message": "example"
}
]
}