Create a link
POST {{protocol}}://{{instance_zuid}}.{{instances_api_url}}/{{instances_api_version}}/content/links
Creates an internal or external link.
Body: raw JSON
name | description |
---|---|
type | [string] Required. Type of link. Accepts "internal" or "external" |
parentZUID | [string] Required. A parent for your link. Accepts an item ZUID. If there will be no parentZUID, you can pass in 0as a value. |
label | [string] Required. Navigation label. |
metaTitle | [string] Required. Title of the meta. |
source | [string] Behavior of the link. Accepts "rel:true" and/or "target:_blank" . You can set it to a blank string "" if you don't want to use any of the behaviour and they will be set to their default values. If you want to use both, use a ";" separator. |
target | [string] Required. Link to target. If the type is internal , this should be an item ZUID you want to link to. If the type is external , the value should be a full external URL. Example: [https://www.google.com](https://www.google.com) |
Request Body
{"type"=>"internal", "parentZUID"=>"{{item_zuid}}", "label"=>"Test 2 Link", "metaTitle"=>"Test 2 Link", "source"=>"", "target"=>"{{item_zuid}}"}
RESPONSES
status: Created
{"_meta":{"timestamp":"2023-02-20T23:23:59.03646804Z","totalResults":1,"start":0,"offset":0,"limit":1},"data":{"ZUID":"17-8ce4d9a5b4-1234","type":"external","contentModelName":"zesty_link","parentZUID":"7-e2d1f391ff-1234","label":"New External Link","metaTitle":"New External Link","source":null,"metaKeywords":null,"target":"https://your.external.link","langID":1,"createdByUserZUID":"5-8e92cfe2e6-1234","updatedByUserZUID":"5-8e92cfe2e6-1234","createdAt":"2023-02-20T23:23:59.025309498Z","updatedAt":"2023-02-20T23:23:59.025315548Z"}}