Skip to content
Get started

Revoke an API key's access to a workspace

client.APIKeys.Access.Remove(ctx, id, workspaceID) error
DELETE/v1/account/api_keys/{id}/workspaces/{workspaceId}

Revokes this API key’s access to the specified workspace. Idempotent. A key may have zero workspaces and remains valid.

ParametersExpand Collapse
id string
workspaceID string

Revoke an API key's access to a workspace

package main

import (
  "context"

  "github.com/cadenya/cadenya-go"
  "github.com/cadenya/cadenya-go/option"
)

func main() {
  client := cadenya.NewClient(
    option.WithAPIKey("My API Key"),
  )
  err := client.APIKeys.Access.Remove(
    context.TODO(),
    "id",
    "workspaceId",
  )
  if err != nil {
    panic(err.Error())
  }
}
Returns Examples