> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gp.scale.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Set Registration Policy

> Enable or clear the per-agent registration requirement. Requires a provider-authenticated principal with agent update permission; agent credentials are refused. Enable only after the agent's credential is durably delivered to every pod and every serving backend understands the policy. Clearing it is the rollback. Registration and key issuance never change it.



## OpenAPI

````yaml https://agentex.dev-sgp.scale.com/openapi.json put /agents/{agent_id}/registration-policy
openapi: 3.1.0
info:
  title: Agentex API
  version: 0.1.0
servers: []
security: []
paths:
  /agents/{agent_id}/registration-policy:
    put:
      tags:
        - Agents
      summary: Set Registration Policy
      description: >-
        Enable or clear the per-agent registration requirement. Requires a
        provider-authenticated principal with agent update permission; agent
        credentials are refused. Enable only after the agent's credential is
        durably delivered to every pod and every serving backend understands the
        policy. Clearing it is the rollback. Registration and key issuance never
        change it.
      operationId: set_registration_policy_agents__agent_id__registration_policy_put
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: string
            title: Agent Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegistrationPolicyRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RegistrationPolicy'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    RegistrationPolicyRequest:
      properties:
        require_authenticated_registration:
          type: boolean
          title: Require Authenticated Registration
          description: >-
            True: re-registering this agent requires its own internal API key or
            a principal with update permission, regardless of the global
            setting. False: the global setting alone decides. Set it only after
            the agent's credential is durably delivered to every pod; clearing
            it is the rollback.
      additionalProperties: false
      type: object
      required:
        - require_authenticated_registration
      title: RegistrationPolicyRequest
      description: Set whether this agent's registration requires a bound credential.
    RegistrationPolicy:
      properties:
        agent_id:
          type: string
          title: Agent Id
        require_authenticated_registration:
          type: boolean
          title: Require Authenticated Registration
      type: object
      required:
        - agent_id
        - require_authenticated_registration
      title: RegistrationPolicy
      description: The agent's current registration policy.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````