---
agentTools:
  projectIndex: https://productplan.readme.io/llms.txt
---

# Create Bar Link

Creates a new Link for the specified Bar.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "ProductPlan API V2",
    "version": "v2"
  },
  "paths": {
    "/api/v2/bars/{bar_id}/links": {
      "post": {
        "summary": "Create Bar Link",
        "tags": [
          "Bars"
        ],
        "description": "Creates a new Link for the specified Bar.",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "bar_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "link successfully created"
          },
          "401": {
            "description": "authentication failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "bar not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LinkCreate"
              },
              "examples": {
                "link": {
                  "summary": "Creates a link with a name and url",
                  "value": {
                    "name": "Map to Monkey Island",
                    "url": "https://guybrushmaps.com"
                  }
                }
              }
            }
          },
          "required": true
        }
      }
    }
  },
  "tags": [
    {
      "name": "Bars"
    }
  ],
  "servers": [
    {
      "url": "https://{defaultHost}",
      "variables": {
        "defaultHost": {
          "default": "app.productplan.com"
        }
      }
    }
  ],
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "errors"
        ],
        "additionalProperties": false
      },
      "LinkCreate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Title of the link.",
            "example": "User Test Cases"
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "href to the resource.",
            "example": "https://acme.atlassian.net/browse/UTC-27"
          }
        },
        "required": [
          "name",
          "url"
        ],
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 100,
      "1": 145,
      "2": 51,
      "3": 180,
      "4": 236,
      "5": 85,
      "6": 77,
      "7": 0,
      "8": 85,
      "9": 123,
      "10": 158,
      "11": 250
    }
  }
}
```