Skip to main content
POST
https://agentgate.mynewapi.com
/
api
/
v1
/
profiles
/
{name}
/
validate
Validate Profile
curl --request POST \
  --url https://agentgate.mynewapi.com/api/v1/profiles/{name}/validate \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "data": {
    "valid": true,
    "errors": [
      {
        "path": "<string>",
        "message": "<string>"
      }
    ],
    "warnings": [
      {
        "path": "<string>",
        "message": "<string>"
      }
    ],
    "resolved": {}
  }
}

Validate Profile

Validates a profile configuration, checking for errors like circular inheritance and missing parent profiles.

Request

name
string
required
The profile name to validate
curl -X POST https://agentgate.mynewapi.com/api/v1/profiles/my-profile/validate \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

success
boolean
required
Indicates if the request was successful
data
object
required
Validation result

Example Response

Valid Profile

{
  "success": true,
  "data": {
    "valid": true,
    "errors": [],
    "warnings": [],
    "resolved": {
      "name": "my-profile",
      "description": "My custom profile",
      "extends": "default",
      "isBuiltIn": false,
      "loopStrategy": { "type": "hybrid" },
      "resolved": {
        "inheritanceChain": ["default", "my-profile"],
        "configHash": "sha256:abc123..."
      }
    }
  },
  "requestId": "req_abc123"
}

Invalid Profile

{
  "success": true,
  "data": {
    "valid": false,
    "errors": [
      {
        "path": "extends",
        "message": "Circular inheritance detected: my-profile -> parent-profile -> my-profile"
      }
    ],
    "warnings": []
  },
  "requestId": "req_abc123"
}

Profile with Warnings

{
  "success": true,
  "data": {
    "valid": true,
    "errors": [],
    "warnings": [
      {
        "path": "extends",
        "message": "Parent profile 'deprecated-profile' is deprecated"
      }
    ],
    "resolved": {
      "name": "my-profile",
      "resolved": {
        "inheritanceChain": ["deprecated-profile", "my-profile"],
        "configHash": "sha256:def456..."
      }
    }
  },
  "requestId": "req_abc123"
}

Validation Checks

CheckDescription
Self-extensionProfile cannot extend itself
Circular inheritanceNo cycles in inheritance chain
Missing parentParent profiles must exist
Schema validationConfiguration must match schema