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

# Create Agent

> **Who may call it:** governance-officer or admin. A workspace API key is refused here: this is an act that belongs to a named person.



## OpenAPI

````yaml /api/openapi.json post /v1/agents
openapi: 3.1.0
info:
  title: RotaGrant API
  version: 0.1.0
  description: >-
    The HTTP API of a RotaGrant deployment, made from the product's own route
    definitions at the commit named in `x-rotascale-source`. Nothing here is
    written by hand.


    There is no shared endpoint. RotaGrant runs in your environment, and your
    deployment serves its own copy of this description at `/api/docs`. That copy
    is the authority on what your version has and which features are switched
    on; this one is the reference for one commit of the main line. The version
    is 0.1.0: routes and shapes can still change.


    Every route says who may call it. Most need a bearer token from the identity
    provider your deployment uses, held by a person with the role named. The
    routes an SDK calls also accept a workspace API key. A few are open, and say
    why.
servers:
  - url: https://{deployment}
    description: Your own deployment. There is no shared endpoint.
    variables:
      deployment:
        default: rotagrant.internal.example
        description: The host your deployment answers on.
security: []
paths:
  /v1/agents:
    post:
      tags:
        - Registry
      summary: Create Agent
      description: >-
        **Who may call it:** governance-officer or admin. A workspace API key is
        refused here: this is an act that belongs to a named person.
      operationId: create_agent_v1_agents_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentIn'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - bearerToken: []
components:
  schemas:
    AgentIn:
      properties:
        name:
          type: string
          maxLength: 200
          minLength: 1
          title: Name
        slug:
          anyOf:
            - type: string
              maxLength: 120
            - type: 'null'
          title: Slug
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        owner_subject:
          anyOf:
            - type: string
            - type: 'null'
          title: Owner Subject
        owner_email:
          anyOf:
            - type: string
            - type: 'null'
          title: Owner Email
        org_unit:
          anyOf:
            - type: string
            - type: 'null'
          title: Org Unit
        autonomy_tier:
          type: string
          pattern: ^L[0-4]$
          title: Autonomy Tier
          default: L0
        market_profile_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Market Profile Id
        environment:
          anyOf:
            - type: string
              pattern: ^(dev|staging|prod|live|test)$
            - type: 'null'
          title: Environment
      type: object
      required:
        - name
      title: AgentIn
    AgentOut:
      properties:
        id:
          type: string
          title: Id
        slug:
          type: string
          title: Slug
        environment:
          type: string
          title: Environment
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        owner_subject:
          anyOf:
            - type: string
            - type: 'null'
          title: Owner Subject
        org_unit:
          anyOf:
            - type: string
            - type: 'null'
          title: Org Unit
        autonomy_tier:
          type: string
          title: Autonomy Tier
        status:
          type: string
          title: Status
        identity_verified:
          type: boolean
          title: Identity Verified
        identity_source:
          anyOf:
            - type: string
            - type: 'null'
          title: Identity Source
        identity_ref:
          anyOf:
            - type: string
            - type: 'null'
          title: Identity Ref
        market_profile_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Market Profile Id
        recert_due_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Recert Due At
        discovered_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Discovered At
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - id
        - slug
        - environment
        - name
        - description
        - owner_subject
        - org_unit
        - autonomy_tier
        - status
        - identity_verified
        - identity_source
        - market_profile_id
        - recert_due_at
        - discovered_at
        - created_at
      title: AgentOut
    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
  securitySchemes:
    bearerToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        A token from the identity provider your deployment federates with. It
        identifies a person; their roles in the workspace decide what they may
        do.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.