Skip to content
Navigation

Create an agency

POST
https://api.nicer.travel/identity/company

Creates an agency, active, with the companyName and displayName sent and an optional starting config, makes the caller its first member, and publishes both. Answers the new agency. Nicer staff only. Errors: 400 COMPANY_ALREADY_EXISTS for a companyName already taken.

Authorization

  • bearerAuth
    HTTP Bearer (JWT)
    required

    Authorization: Bearer <token>

Request body JSON required

  • companyName
    string
    required
    maxLength: 64 · minLength: 2 · pattern: ^[a-z0-9-]+$
  • displayName
    string
    required
    maxLength: 128 · minLength: 1
  • config
    optional
    object
    • bookingSite
      optional
      object
      • advisorSites
        optional
        boolean
      • enabled
        optional
        boolean
      • handle
        optional
        string
    • branding
      optional
      object
      • accentColor
        optional
        string
        pattern: ^#[0-9a-fA-F]{6}$
      • backgroundColor
        optional
        string
        pattern: ^#[0-9a-fA-F]{6}$
      • bodyFont
        optional
        string
        ·
        one of 12 values
        Allowed values: Inter, DM Sans, Manrope, Poppins, Montserrat, Lato, Nunito, Work Sans, Playfair Display, Merriweather, Lora, Cormorant Garamond
      • borderColor
        optional
        string
        pattern: ^#[0-9a-fA-F]{6}$
      • contact
        optional
        object
        • email
          optional
          string
          format: email · maxLength: 254 · pattern: ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
        • instagram
          optional
          string
          maxLength: 64
        • phone
          optional
          string
          maxLength: 32
        • whatsapp
          optional
          string
          maxLength: 32
      • faviconUrl
        optional
        string
      • headingFont
        optional
        string
        ·
        one of 12 values
        Allowed values: Inter, DM Sans, Manrope, Poppins, Montserrat, Lato, Nunito, Work Sans, Playfair Display, Merriweather, Lora, Cormorant Garamond
      • hero
        optional
        object
        • imageUrl
          optional
          string
          format: uri · maxLength: 2048
        • subtitle
          optional
          string
          maxLength: 160
        • title
          optional
          string
          maxLength: 80
      • logoDarkUrl
        optional
        string
        format: uri · maxLength: 2048
      • logoUrl
        optional
        string
      • mode
        optional
        light
        or
        dark
        or
        system
      • mutedTextColor
        optional
        string
        pattern: ^#[0-9a-fA-F]{6}$
      • primaryColor
        optional
        string
      • privacyUrl
        optional
        string
        format: uri · maxLength: 2048
      • radius
        optional
        integer
        maximum: 24 · minimum: 0
      • seo
        optional
        object
        • description
          optional
          string
          maxLength: 160
        • title
          optional
          string
          maxLength: 60
      • surfaceColor
        optional
        string
        pattern: ^#[0-9a-fA-F]{6}$
      • textColor
        optional
        string
        pattern: ^#[0-9a-fA-F]{6}$
    • emailSending
      optional
      object
      • checkedAt
        string
        required
      • dkimTokens
        array of
        string
        required
        minLength: 1
      • domain
        string
        required
        maxLength: 253 · minLength: 1
      • status
        FAILED
        or
        PENDING
        or
        VERIFIED
        required
      • tenant
        string
        required
        maxLength: 64 · minLength: 1
    • locale
      optional
      string
    • timezone
      optional
      string

Returns

200

OK

JSON
  • companyName
    string
    required
    minLength: 1
  • config
    object
    required
    default: {}
    • bookingSite
      optional
      object
      • advisorSites
        optional
        boolean
      • enabled
        optional
        boolean
      • handle
        optional
        string
    • branding
      optional
      object
      • accentColor
        optional
        string
        pattern: ^#[0-9a-fA-F]{6}$
      • backgroundColor
        optional
        string
        pattern: ^#[0-9a-fA-F]{6}$
      • bodyFont
        optional
        string
        ·
        one of 12 values
        Allowed values: Inter, DM Sans, Manrope, Poppins, Montserrat, Lato, Nunito, Work Sans, Playfair Display, Merriweather, Lora, Cormorant Garamond
      • borderColor
        optional
        string
        pattern: ^#[0-9a-fA-F]{6}$
      • contact
        optional
        object
        • email
          optional
          string
          format: email · maxLength: 254 · pattern: ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
        • instagram
          optional
          string
          maxLength: 64
        • phone
          optional
          string
          maxLength: 32
        • whatsapp
          optional
          string
          maxLength: 32
      • faviconUrl
        optional
        string
      • headingFont
        optional
        string
        ·
        one of 12 values
        Allowed values: Inter, DM Sans, Manrope, Poppins, Montserrat, Lato, Nunito, Work Sans, Playfair Display, Merriweather, Lora, Cormorant Garamond
      • hero
        optional
        object
        • imageUrl
          optional
          string
          format: uri · maxLength: 2048
        • subtitle
          optional
          string
          maxLength: 160
        • title
          optional
          string
          maxLength: 80
      • logoDarkUrl
        optional
        string
        format: uri · maxLength: 2048
      • logoUrl
        optional
        string
      • mode
        optional
        light
        or
        dark
        or
        system
      • mutedTextColor
        optional
        string
        pattern: ^#[0-9a-fA-F]{6}$
      • primaryColor
        optional
        string
      • privacyUrl
        optional
        string
        format: uri · maxLength: 2048
      • radius
        optional
        integer
        maximum: 24 · minimum: 0
      • seo
        optional
        object
        • description
          optional
          string
          maxLength: 160
        • title
          optional
          string
          maxLength: 60
      • surfaceColor
        optional
        string
        pattern: ^#[0-9a-fA-F]{6}$
      • textColor
        optional
        string
        pattern: ^#[0-9a-fA-F]{6}$
    • emailSending
      optional
      object
      • checkedAt
        string
        required
      • dkimTokens
        array of
        string
        required
        minLength: 1
      • domain
        string
        required
        maxLength: 253 · minLength: 1
      • status
        FAILED
        or
        PENDING
        or
        VERIFIED
        required
      • tenant
        string
        required
        maxLength: 64 · minLength: 1
    • locale
      optional
      string
    • timezone
      optional
      string
  • createdAt
    string
    required
  • createdBy
    string
    required
    minLength: 1
  • displayName
    string
    required
    minLength: 1
  • status
    active
    or
    suspended
    required
  • updatedAt
    string
    required
  • type
    string
    required

400

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

401

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

403

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

Type to search…

↑↓ navigate↵ selectEsc close