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

# Publish

> Publish an agent to the Hub.



## OpenAPI

````yaml /api-reference/openapi.json post /api/hub/publish
openapi: 3.1.0
info:
  title: apowerb API
  description: REST API of the apowerb agentic framework (open-source edition).
  version: 0.1.2
  license:
    name: MIT
    url: https://github.com/apowerb/apowerb/blob/main/LICENSE
servers:
  - url: https://api.example.com
    description: Your apowerb instance
  - url: http://localhost:8000
    description: Local stack
security: []
paths:
  /api/hub/publish:
    post:
      tags:
        - hub
      summary: Publish
      description: Publish an agent to the Hub.
      operationId: publish_api_hub_publish_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HubPublishSchema'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    HubPublishSchema:
      properties:
        agent_id:
          type: string
          title: Agent Id
        hub_name:
          type: string
          title: Hub Name
        hub_description:
          type: string
          title: Hub Description
        hub_tags:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Hub Tags
        hub_category:
          anyOf:
            - type: string
            - type: 'null'
          title: Hub Category
          default: general
      type: object
      required:
        - agent_id
        - hub_name
        - hub_description
      title: HubPublishSchema
      description: Schema for publishing an agent to the Hub.
    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:
    HTTPBearer:
      type: http
      scheme: bearer

````

## Related topics

- [Publish a dashboard](/api-reference/dashboards/publish-a-dashboard.md)
- [Get published dashboard by slug (public access)](/api-reference/dashboards/get-published-dashboard-by-slug-public-access.md)
- [List published dashboards shared with the current user](/api-reference/dashboards/list-published-dashboards-shared-with-the-current-user.md)
- [Agent Hub](/guides/hub.md)
- [API reference](/api-reference/introduction.md)
