roles
Create a role
Creates a new role in a gateway. model_policies cannot be set on create; bind registries first, then update the role.
POST
Create a role
Authorizations
Path Parameters
Gateway id
Body
application/json
Role to create
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Creates a new role in a gateway. model_policies cannot be set on create; bind registries first, then update the role.
curl --request POST \
--url https://agentgateway-admin.dev.neuraltrust.ai/v1/gateways/{gateway_id}/roles \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"idp_mapping": [
123
],
"mcp_policies": {
"fail_mode": "<string>",
"toolkit": [
{
"expose_as": "<string>",
"prompt": "<string>",
"registry_id": "<string>",
"resource": "<string>",
"tool": "<string>"
}
]
},
"model_policies": [
{
"allowed": [
"<string>"
],
"default": "<string>",
"registry_id": "<string>"
}
],
"name": "<string>"
}
'{
"created_at": "<string>",
"gateway_id": "<string>",
"id": "<string>",
"idp_mapping": [
123
],
"mcp_policies": {
"toolkit": [
{
"expose_as": "<string>",
"prompt": "<string>",
"registry_id": "<string>",
"resource": "<string>",
"tool": "<string>"
}
]
},
"model_policies": [
{
"allowed": [
"<string>"
],
"default": "<string>",
"registry_id": "<string>"
}
],
"name": "<string>",
"registry_ids": [
"<string>"
],
"updated_at": "<string>"
}Gateway id
Role to create
curl --request POST \
--url https://agentgateway-admin.dev.neuraltrust.ai/v1/gateways/{gateway_id}/roles \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"idp_mapping": [
123
],
"mcp_policies": {
"fail_mode": "<string>",
"toolkit": [
{
"expose_as": "<string>",
"prompt": "<string>",
"registry_id": "<string>",
"resource": "<string>",
"tool": "<string>"
}
]
},
"model_policies": [
{
"allowed": [
"<string>"
],
"default": "<string>",
"registry_id": "<string>"
}
],
"name": "<string>"
}
'{
"created_at": "<string>",
"gateway_id": "<string>",
"id": "<string>",
"idp_mapping": [
123
],
"mcp_policies": {
"toolkit": [
{
"expose_as": "<string>",
"prompt": "<string>",
"registry_id": "<string>",
"resource": "<string>",
"tool": "<string>"
}
]
},
"model_policies": [
{
"allowed": [
"<string>"
],
"default": "<string>",
"registry_id": "<string>"
}
],
"name": "<string>",
"registry_ids": [
"<string>"
],
"updated_at": "<string>"
}