Skip to main content
POST
/
v1
/
organizations
/
Go (SDK)
package main

import(
	"context"
	"os"
	polargo "github.com/polarsource/polar-go"
	"github.com/polarsource/polar-go/models/components"
	"log"
)

func main() {
    ctx := context.Background()

    s := polargo.New(
        polargo.WithSecurity(os.Getenv("POLAR_ACCESS_TOKEN")),
    )

    res, err := s.Organizations.Create(ctx, components.OrganizationCreate{
        Name: "<value>",
        Slug: "<value>",
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.Organization != nil {
        // handle response
    }
}
{
  "created_at": "2023-11-07T05:31:56Z",
  "modified_at": "2023-11-07T05:31:56Z",
  "id": "<string>",
  "name": "<string>",
  "slug": "<string>",
  "avatar_url": "<string>",
  "proration_behavior": "invoice",
  "allow_customer_updates": true,
  "email": "<string>",
  "website": "<string>",
  "socials": [
    {
      "platform": "x",
      "url": "<string>"
    }
  ],
  "status": "created",
  "details_submitted_at": "2023-11-07T05:31:56Z",
  "feature_settings": {
    "issue_funding_enabled": false,
    "seat_based_pricing_enabled": false,
    "revops_enabled": false,
    "wallets_enabled": false
  },
  "subscription_settings": {
    "allow_multiple_subscriptions": true,
    "allow_customer_updates": true,
    "proration_behavior": "invoice",
    "benefit_revocation_grace_period": 123,
    "prevent_trial_abuse": true
  },
  "notification_settings": {
    "new_order": true,
    "new_subscription": true
  },
  "customer_email_settings": {
    "order_confirmation": true,
    "subscription_cancellation": true,
    "subscription_confirmation": true,
    "subscription_cycled": true,
    "subscription_past_due": true,
    "subscription_revoked": true,
    "subscription_uncanceled": true,
    "subscription_updated": true
  }
}

Authorizations

Authorization
string
header
required

Body

application/json
name
string
required
Minimum length: 3
slug
string
required
Minimum length: 3
avatar_url
string<uri> | null
Required string length: 1 - 2083
email
string<email> | null
website
string<uri> | null
Required string length: 1 - 2083
socials
OrganizationSocialLink · object[] | null
details
object | null
feature_settings
object | null
subscription_settings
object | null
notification_settings
object | null
customer_email_settings
object | null

Response

created_at
string<date-time>
required
modified_at
string<date-time> | null
required
id
string<uuid4>
required
name
string
required
slug
string
required
avatar_url
string | null
required
proration_behavior
enum<string>
required
Available options:
invoice,
prorate
allow_customer_updates
boolean
required
email
string | null
required
website
string | null
required
socials
OrganizationSocialLink · object[]
required
status
enum<string>
required
Available options:
created,
onboarding_started,
initial_review,
ongoing_review,
denied,
active
details_submitted_at
string<date-time> | null
required
feature_settings
object | null
required
subscription_settings
object
required
notification_settings
object
required
customer_email_settings
object
required