OpenSocialDocumentation

agents_create

Create an integration key with the studio defaults or optional restrictions.

REST · POST /api/v1/operations/agents_create · MCP · agents_create

Required scope · admin. Send Idempotency-Key in REST or requestKey in MCP. Replace example IDs and times before running.

A delegated call creates a handoff for owner review. Follow its ID to check the outcome.

Example request body

{
  "name": "Atlas"
}

REST returns the output below directly. In MCP read structuredContent.result. Check the current installation at /api/v1/openapi.json.

For 401 check credential validity. For 403 inspect the role, scopes and selected accounts. For 409 reread the record before retrying.

JSON Schema · Input

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 140
    },
    "scopes": {
      "default": [
        "read",
        "projects",
        "media",
        "accounts",
        "publish",
        "analytics"
      ],
      "minItems": 1,
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "read",
          "projects",
          "media",
          "accounts",
          "publish",
          "analytics",
          "admin"
        ]
      }
    },
    "accounts": {
      "default": null,
      "anyOf": [
        {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          }
        },
        {
          "type": "null"
        }
      ]
    },
    "days": {
      "default": null,
      "anyOf": [
        {
          "type": "integer",
          "minimum": 1,
          "maximum": 365
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "name"
  ],
  "additionalProperties": false
}

JSON Schema · Output

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "anyOf": [
    {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "credential": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "credential"
      ],
      "additionalProperties": {}
    },
    {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "const": "action_required"
        },
        "reason": {
          "type": "string"
        },
        "url": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "status",
        "reason",
        "url"
      ],
      "additionalProperties": {}
    }
  ]
}