POST/admin/v1/organizations

Create an organization

Creates a new organization.

body parameters

  • uniqueId

    string

    The client defined unique identifier of the organization account.

    It is restricted to letters, numbers, underscores, and hyphens, with the first character a letter or a number, and a 255 character maximum.

    ID's starting with org_ are reserved.

  • displayName

    string

    The human-readable display name of the organization.

    The maximum length is 200 characters.

  • email

    string

    The email address of the organization.

    The maximum length is 320 characters.

  • emailVerified

    boolean

    Whether the organization's email address has been verified.

  • phoneNumber

    string

    The E164 phone number for the organization (e.g. +12125550123).

  • phoneNumberVerified

    boolean

    Whether the organization's phone number has been verified.

  • imageUrl

    string

    The photo/avatar URL of the organization.

    The maximum length is 2000 characters.

  • currencyCode

    string

    The default ISO-4217 currency code for the organization (e.g. USD).

  • languageCode

    string

    The IETF BCP-47 language code for the organization (e.g. en).

  • regionCode

    string

    The country/region code for the organization (e.g. US).

  • timeZone

    string

    The IANA time zone for the organization (e.g. America/New_York).

  • address

    Address

    The billing address for the organization.

  • signupTime

    date-time

    The sign-up time for the organization.

  • disabled

    boolean

    Whether the organization is disabled.

Returns

  • id

    string

    The system-assigned identifier of the organization.

  • state

    enum

    The current state of the organization.

    Possible values:
    ACTIVEDISABLEDARCHIVEDPENDING_DELETION
  • stateReason

    string

    The code that best describes the reason for the state.

  • uniqueId

    string

    The client defined unique identifier of the organization account.

  • displayName

    string

    The human-readable display name of the organization.

  • email

    string

    The email address of the organization.

  • emailVerified

    boolean

    Whether the organization's email address has been verified.

  • phoneNumber

    string

    The E164 phone number for the organization (e.g. +12125550123).

  • phoneNumberVerified

    boolean

    Whether the organization's phone number has been verified.

  • imageUrl

    string

    The photo/avatar URL of the organization.

  • currencyCode

    string

    The default ISO-4217 currency code for the organization (e.g. USD).

  • languageCode

    string

    The IETF BCP-47 language code for the organization (e.g. en).

  • regionCode

    string

    The country/region code for the organization (e.g. US).

  • timeZone

    string

    The IANA time zone for the organization (e.g. America/New_York).

  • address

    Address

    The address for the organization.

  • accountConnections

    AccountConnection[]

    The connected accounts.

  • subscription

    AccountSubscription

    The organization's default active subscription.

  • signupTime

    date-time

    The sign-up time for the organization.

  • memberCount

    int32

    The number of members in the organization.

    This includes disabled users, but does not include user's marked for deletion.

  • disabled

    boolean

    Whether the organization is disabled.

  • createTime

    date-time

    The creation time of the organization.

  • updateTime

    date-time

    The last update time of the organization.

curl https://api.userhub.com/admin/v1/organizations \
  -H "Authorization: Bearer $ADMIN_API_KEY" \
  --json '{
    "displayName": "Acme Inc"
  }'
Response bodyJSON
{
  "id": "org_28seyVGVL1got6",
  "state": "ACTIVE",
  "displayName": "Acme Inc",
  "address": null,
  "accountConnections": [],
  "subscription": null,
  "signupTime": "2024-06-15T13:00:00Z",
  "memberCount": 0,
  "createTime": "2024-06-15T13:00:00Z",
  "updateTime": "2024-06-15T13:00:00Z"
}
PreviousList organizations
NextGet an organization

Turn users intorevenue
$

Subscribe to monthly product updates

© 2024 UserHub

Integrations

    UserHub & Auth0UserHub & Stripe BillingUserHub & Google CloudUserHub & FirebaseUserHub & custom auth