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

# Attach a client type to this API Product

> Attach a client type to this API Product



## OpenAPI

````yaml /swagger/5.13/enterprise-developer-portal-swagger.yaml post /products/{product_id}/client_types
openapi: 3.1.0
info:
  title: Tyk Developer Portal
  description: >-

    <img src="https://tyk.io/docs/img/developer_portal_swagger_image.png"
    width="963" height="250">

    ## <a name="introduction"></a> Introduction

    The Tyk Enterprise Developer Portal Management API offers programmatic
    access to all portal resources that your instance of the portal manages.
    This API repeats functionality of the user interface and enables APIs
    consumers integrating their portal instances with their other IT systems
    such as billings, CRMs, ITSM systems and other software.


    ## Authentication

    This API requires an admin authorisation token that is available for admin
    users of the portal in the profile page.
  version: 1.14.0
servers:
  - url: http://localhost:3001/portal-api
security: []
tags:
  - name: Providers
    description: API Providers connected to this portal instance
  - name: Users
    description: Portal admins and API consumers
  - name: Organisations
    description: Organisation of API consumers and the portal admins
  - name: Teams
    description: Teams of API consumers and the portal admins
  - name: Products
    description: >-
      Marketing description and visibility of the API Products surfaced in this
      portal instance
  - name: Tutorials for API Products
    description: Tutorials that are defined for the API products
  - name: API documentation for API Products
    description: OpenAPI specs for APIs included into the API Prodcuts
  - name: Plans
    description: >-
      Marketing description and visibility settings of usage plans defined in
      this portal instance
  - name: Catalogues
    description: Catalogues of API Products listed on this portal instance
  - name: Catalogue audiences
    description: Audience management
  - name: Access requests
    description: Access requests to API Products
  - name: Applications and credentials
    description: Developer applications and API credential for developers
  - name: Portal configuration
    description: Show the current portal configuration
  - name: Pages and content
    description: Pages and content on the pages
  - name: Themes
    description: Management of the portal's visual themes
  - name: Custom Attributes
    description: Extend already existing models (User) by adding custom attributes
  - name: OAuth2.0 providers
    description: OAuth2.0 providers registered in the portal
  - name: Webhooks
    description: Webhooks management
  - name: Posts
    description: Posts management
  - name: SSO Profiles
    description: SSO Profiles management
  - name: Tags
    description: >-
      Tags management: link API Products to blog posts and control their
      display.
paths:
  /products/{product_id}/client_types:
    post:
      tags:
        - Products
      summary: Attach a client type to this API Product
      description: Attach a client type to this API Product
      operationId: create-product-client-type
      parameters:
        - description: UID of an API Product
          in: path
          name: product_id
          required: true
          schema:
            type: integer
            example: 1
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProductClientTypeAttach'
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductClientTypeResponse'
          description: Client type is successfully attached to the product
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OnlyErrors'
          description: >-
            Invalid payload encountered when creating client type. Request could
            not be processed
      security:
        - AdminAPIToken: []
components:
  schemas:
    ProductClientTypeAttach:
      properties:
        ID:
          type: integer
          description: UID of this client type
          example: 11
      type: object
    ProductClientTypeResponse:
      properties:
        Name:
          type: string
          description: Name of this client type
          example: foo
        ID:
          type: integer
          description: UID of this client type
          example: 11
        Description:
          type: string
          description: description on the client type
          example: Web application
        GrantType:
          type: string
          enum:
            - authorization_code
            - client_credentials
            - device_code
            - pkce
            - password
            - implicit
            - refresh_token
          description: OAuth2.0 grant types that are allowed for this client type
          example: authorization_code
        OktaAppType:
          type: string
          enum:
            - browser
            - native
            - web
            - service
          description: The type of client application for Okta
          example: web
        CreatedAt:
          pattern: ^\d{4}-\d{2}-\d{2} \d{2}:\d{2}$
          description: Date-time when a client type is created
          example: 2023-06-23 21:02
          type: string
        UpdatedAt:
          pattern: ^\d{4}-\d{2}-\d{2} \d{2}:\d{2}$
          description: Date-time when a client type was updated the last time
          example: 2023-06-23 21:02
          type: string
      type: object
    OnlyErrors:
      properties:
        errors:
          type: array
          description: Human-readable description of the errors
          items:
            type: string
      type: object
  securitySchemes:
    AdminAPIToken:
      type: apiKey
      in: header
      name: Authorization

````