---
title: "Create an accessWidget license"
method: POST
path: "/accounts/{accountId}/access-widget-licenses"
---

# Create an accessWidget license

`POST /accounts/{accountId}/access-widget-licenses`

## Request

- Base URL: `https://dashboard.accessibe.com/api/v1/partners`
- URL: `https://dashboard.accessibe.com/api/v1/partners/accounts/{accountId}/access-widget-licenses`
- Auth: API key in header `X-API-Key`
- TypeScript: <https://skmtc.dev/accessibe/apis/partners-api-license/docs/accounts/:accountId/access-widget-licenses/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a new accessWidget license for the specified account.

This endpoint requires the `x-api-key` header for authentication. The key must match the API key associated with the specified account. The account must also be a partner account.

planSKU is the type of plan for the license where: 

1 = Standard, 2 = Advanced Plus, 3 = Enterprise, 5 = Advanced,
21 = Micro, 22 = Growth, 23 = Scale

## Path parameters

- `accountId` string, required

## Request body

- CreateLicense
  - `domain` string, required: Domain name for which the license is being created
  - `planSKU` 1 | 2 | 3 | 5 | 21 | 22 | 23, required: Plan SKU for the license
  - `contactName` string: Full name of the contact for this license
  - `contactEmail` string: Contact email address for this license
  - `contactPhone` string: Contact phone number for this license
  - `contactCountryCode` string: Contact country code for this license
  - `discountEnabled` boolean: Set to true to enable discounts for the account. Set to false to get commissions instead of discounts. The parameter activate below must be set to true
  - `monthly` boolean: For monthly subscription can pass it as true, else it will be yearly
  - `activate` boolean: Activate the license, need to have in the account allowActivationByApi set to true
  - `longTrial` boolean: Assign a long trial period for 30 days, need to have in the account allowLongTrialByApi set to true
  - `settings` CreateSettings
    - `leadColor` string: Primary color of the widget in hex format.
    - `language` 'en' | 'es' | 'fr' | 'de' | 'pl' | 'it' | 'pt' | 'nl' | 'hu' | 'no' | 'sl' | 'sk' | 'sv' | 'cs' | 'tr' | 'ja' | 'tw' | 'zh' | 'he' | 'ru' | 'ar' | 'fi' | 'uk' | 'ro' | 'ga' | 'el' | 'sr' | 'bs' | 'hr' | 'lb' | 'sq' | 'da': Language code (ISO 639-1 format).
    - `position` 'left' | 'right'
    - `triggerColor` string
    - `triggerPositionX` 'left' | 'right'
    - `triggerPositionY` 'top' | 'center' | 'bottom'
    - `triggerSize` 'small' | 'medium' | 'big'
    - `triggerRadius` '50%' | '0' | '10px' | '5px'
    - `hideTrigger` boolean
    - `triggerOffsetX` number
    - `triggerOffsetY` number
    - `triggerIcon` 'checkmark' | 'display' | 'display2' | 'display3' | 'help' | 'people' | 'people2' | 'settings' | 'settings2' | 'wheels' | 'wheels2'
    - `hideMobile` boolean
    - `mobile` object
      - `triggerPositionX` 'left' | 'right'
      - `triggerPositionY` 'top' | 'center' | 'bottom'
      - `triggerSize` 'small' | 'medium' | 'big'
      - `triggerRadius` '50%' | '0' | '10px' | '5px'
      - `triggerOffsetX` number
      - `triggerOffsetY` number
    - `statementLink` string
    - `footerHtml` string

## Response `201`

License created

- object
  - `success` boolean
  - `message` string
  - `data` LicenseCreateOrUpdateResponse
    - `id` string
    - `date` string, date-time
    - `relatedAccountId` string
    - `domain` string
    - `status` 'active' | 'grace' | 'expired' | 'trial'
    - `price` number
    - `licenseType` string
    - `plan` Plan, nullable
      - `name` string
      - `planSKU` number
    - `relatedBillingId` string, nullable
    - `statementDate` string, date-time
    - `dateTrialExpires` string, date-time
    - `datePlanExpires` string, date-time, nullable
    - `datePlanFirstActivated` string, date-time, nullable
    - `lastSubscriptionPaymentId` string, nullable
    - `enableGoogleAnalytics` boolean
    - `enableRemediationReport` boolean
    - `monthly` boolean
    - `autoRenew` boolean
    - `contactName` string, nullable
    - `contactEmail` string, nullable
    - `contactPhone` string, nullable
    - `contactCountry` string, nullable

## Other responses

- `400`: The request is invalid. Any field could potentially be the cause.
- `401`: Missing or invalid API key
- `403`: Account does not have access to do this operation
- `404`: Account not found
- `409`: Domain already being used

---

[API](https://skmtc.dev/accessibe/apis/partners-api-license.md) - [All operations](https://skmtc.dev/accessibe/apis/partners-api-license/llms.txt) - [OpenAPI document](https://skmtc.dev/accessibe/apis/partners-api-license/revisions/b7f155181cf7?raw)
