> ## Documentation Index
> Fetch the complete documentation index at: https://docs.omnichar.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Issue a license



## OpenAPI

````yaml /api/openapi.json post /v1/licenses
openapi: 3.1.0
info:
  title: Omnichar API
  version: 0.1.0
  description: Characters, licenses, public license verification and signed webhooks.
servers:
  - url: https://api.omnichar.org
security:
  - bearer: []
paths:
  /v1/licenses:
    post:
      tags:
        - Licenses
      summary: Issue a license
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                char_id:
                  type: string
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                licensee_team_id:
                  type: string
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                licensee_team_slug:
                  type: string
                  minLength: 3
                  maxLength: 40
                licensee_email:
                  type: string
                  maxLength: 254
                  format: email
                  pattern: >-
                    ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
                label:
                  type: string
                  minLength: 1
                  maxLength: 80
                scope:
                  type: object
                  properties:
                    use:
                      type: string
                      minLength: 1
                      maxLength: 120
                    media:
                      default: []
                      maxItems: 200
                      type: array
                      items:
                        type: string
                        minLength: 1
                        maxLength: 120
                    territories:
                      default: []
                      maxItems: 200
                      type: array
                      items:
                        type: string
                        minLength: 1
                        maxLength: 120
                    allow_list:
                      default: []
                      maxItems: 200
                      type: array
                      items:
                        type: string
                        pattern: >-
                          ^(surface:(cloud|api|app)|team:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$
                    max_generations:
                      type: integer
                      minimum: 1
                      maximum: 100000000
                  required:
                    - use
                  additionalProperties: {}
                starts_at:
                  type: string
                  format: date-time
                  pattern: >-
                    ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                ends_at:
                  type: string
                  format: date-time
                  pattern: >-
                    ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                provider_license_ref:
                  type: string
                  minLength: 1
                  maxLength: 200
              required:
                - char_id
                - scope
                - starts_at
                - ends_at
      responses:
        '201':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  key:
                    type: string
                  kind:
                    type: string
                    enum:
                      - secret
                      - named
                  label:
                    type:
                      - string
                      - 'null'
                  env:
                    type: string
                    enum:
                      - production
                      - sandbox
                  status:
                    type: string
                    enum:
                      - active
                      - pending
                      - revoked
                      - expired
                  char_id:
                    type: string
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                  provider_team_id:
                    type: string
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                  licensee_team_id:
                    anyOf:
                      - type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                      - type: 'null'
                  provider_license_ref:
                    type:
                      - string
                      - 'null'
                  scope:
                    type: object
                    propertyNames:
                      type: string
                    additionalProperties: {}
                  scope_version:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  starts_at:
                    type: string
                    format: date-time
                    pattern: >-
                      ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
                  ends_at:
                    type: string
                    format: date-time
                    pattern: >-
                      ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
                  signature:
                    type: string
                  kid:
                    type: string
                  revoked_reason:
                    type:
                      - string
                      - 'null'
                  created_at:
                    type: string
                    format: date-time
                    pattern: >-
                      ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
                  secret:
                    type: string
                required:
                  - key
                  - kind
                  - label
                  - env
                  - status
                  - char_id
                  - provider_team_id
                  - licensee_team_id
                  - provider_license_ref
                  - scope
                  - scope_version
                  - starts_at
                  - ends_at
                  - signature
                  - kid
                  - revoked_reason
                  - created_at
                additionalProperties: false
components:
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: 'A team key: sk_test_ for sandbox, sk_live_ for production.'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.