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

# Create agent url

> Create a new url for an agent and replace existing one if exists



## OpenAPI

````yaml post /api/v2/agentUrl
openapi: 3.0.0
info:
  version: 2.0.0
  title: Vida API
  description: Vida API Documentation
servers:
  - url: https://api.vida.dev
    description: Vida Production
    variables:
      baseUrl:
        default: api.vida.dev
        description: Production API Root
security: []
paths:
  /api/v2/agentUrl:
    post:
      tags:
        - Agent URLs
      summary: Create agent url
      description: Create a new url for an agent and replace existing one if exists
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - targetUsername
                - slug
              properties:
                targetUsername:
                  description: Target Username you are creating a referral slug for
                  type: string
                  example: brandon
                slug:
                  description: Desired slug name
                  type: string
                  example: welovevida
      responses:
        '200':
          description: Referral Slug Created Successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  slug:
                    type: string
                    example: welovevida
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: query
      name: token
      description: Vida API Token

````