Mutation
mutation CreateMachineUser($input: CreateMachineUserInput!) {
createMachineUser(input: $input) {
machineUser {
id
fullName
publicName
description
type
isCustomAgent
}
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"publicName": "string",
"fullName": "string"
}
}Response
{
"data": {
"createMachineUser": {
"machineUser": {
"id": "id",
"fullName": "string",
"publicName": "string",
"description": "string",
"type": "API_USER",
"isCustomAgent": true
},
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Mutations
createMachineUser
Creates a new machine user in the workspace. Each machine user can hold multiple API keys and optionally has a public-facing name shown to customers. Only one machine user of type AI_AGENT is allowed per workspace. Requires the machineUser:create permission.
MUTATION
createMachineUser(input: CreateMachineUserInput!): CreateMachineUserOutput!Arguments
input
required
Returns
machineUser
error
Mutation
mutation CreateMachineUser($input: CreateMachineUserInput!) {
createMachineUser(input: $input) {
machineUser {
id
fullName
publicName
description
type
isCustomAgent
}
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"publicName": "string",
"fullName": "string"
}
}Response
{
"data": {
"createMachineUser": {
"machineUser": {
"id": "id",
"fullName": "string",
"publicName": "string",
"description": "string",
"type": "API_USER",
"isCustomAgent": true
},
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Was this page helpful?

