#!/usr/bin/env bash
set -euo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
# shellcheck source=../lib/common.sh
source "${ROOT}/lib/common.sh"

require_env TOKEN
ORG_NAME="${ORG_NAME:-Example Org}"
ORG_SLUG="${ORG_SLUG:-example-org}"

curl_post_bearer_json "/organization/create" "${TOKEN}" \
  "$(printf '%s' "{\"name\":\"${ORG_NAME}\",\"slug\":\"${ORG_SLUG}\"}")" | pretty
