Skip to content
Start here

Create a Bookmark application

Deprecated
client.ZeroTrust.Access.Bookmarks.New(ctx, bookmarkID, params) (*Bookmark, error)
POST/accounts/{account_id}/access/bookmarks/{bookmark_id}

Create a new Bookmark application.

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
ParametersExpand Collapse
bookmarkID string

UUID.

maxLength36
params AccessBookmarkNewParams
AccountID param.Field[string]

Path param

Body param.Field[unknown]

Body param

ReturnsExpand Collapse
type Bookmark struct{…}
ID stringOptional

The unique identifier for the Bookmark application.

AppLauncherVisible boolOptional

Displays the application in the App Launcher.

Domain stringOptional

The domain of the Bookmark application.

LogoURL stringOptional

The image URL for the logo shown in the App Launcher dashboard.

Name stringOptional

The name of the Bookmark application.

Create a Bookmark application

package main

import (
  "context"
  "fmt"

  "github.com/stainless-sdks/cloudflare-go"
  "github.com/stainless-sdks/cloudflare-go/option"
  "github.com/stainless-sdks/cloudflare-go/zero_trust"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  bookmark, err := client.ZeroTrust.Access.Bookmarks.New(
    context.TODO(),
    "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
    zero_trust.AccessBookmarkNewParams{
      AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"),
      Body: map[string]interface{}{
      },
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", bookmark.ID)
}
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "id": "id",
    "app_launcher_visible": true,
    "created_at": "2014-01-01T05:20:00.12345Z",
    "domain": "example.com",
    "logo_url": "https://www.cloudflare.com/img/logo-web-badges/cf-logo-on-white-bg.svg",
    "name": "My Website",
    "updated_at": "2014-01-01T05:20:00.12345Z"
  }
}
Returns Examples
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "id": "id",
    "app_launcher_visible": true,
    "created_at": "2014-01-01T05:20:00.12345Z",
    "domain": "example.com",
    "logo_url": "https://www.cloudflare.com/img/logo-web-badges/cf-logo-on-white-bg.svg",
    "name": "My Website",
    "updated_at": "2014-01-01T05:20:00.12345Z"
  }
}