Skip to docs content
Go Admin SDK quickstart
Open Source
Free Cloud
Pro
Workers
SDK go
Updated 2026-08-12
Prerequisites: Published Apito project · Go 1.21+ · Project API key or access token

Go Admin SDK quickstart

The Go Admin SDK mirrors the JS contract against project secured GraphQL: search, get, create, update, delete. Do not call system GraphQL from this client.

Add the module

go get github.com/apito-io/go-admin-sdk@latest

Confirm the module path against your Engine generation train in release notes if it differs.

Configure

package main

import (
  "context"
  "log"
  "os"

  apito "github.com/apito-io/go-admin-sdk"
  "github.com/apito-io/go-admin-sdk/types"
)

func main() {
  client := apito.NewClient(apito.Config{
    BaseURL: os.Getenv("APITO_GRAPHQL_ENDPOINT"),
    APIKey:  os.Getenv("APITO_API_KEY"),
  })

  ctx := context.Background()
  res, err := client.SearchResources(ctx, "post", map[string]interface{}{
    "limit": 10,
    "page":  1,
  }, false)
  if err != nil {
    log.Fatal(err)
  }

  if len(res.Results) > 0 {
    _, _ = client.GetSingleResource(ctx, "post", res.Results[0].ID, false)
  }

  _, err = client.CreateNewResource(ctx, &types.CreateAndUpdateRequest{
    Model:   "post",
    Payload: map[string]interface{}{"title": "Hello from Go"},
  })
  if err != nil {
    log.Fatal(err)
  }
}
Field Meaning
BaseURL Project GraphQL URL
APIKey Project key → X-Apito-Key
AccessToken Unified apt_… → Bearer

Ops

Also available: UpdateResource, DeleteResource, tenants/users helpers (edition-dependent). After schema publish, regenerate any hand-maintained GraphQL documents you keep beside the SDK.

Do not

  • Point BaseURL at /system/graphql
  • Commit API keys
  • Assume a Python Admin SDK exists — Go is first-class; Python is raw only

Full surface: Go SDK reference.