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

# Create Instances Endpoint

> This endpoint will provision a new instance under your partner account.

It is important to understand the hierarchy of the organizations set up under the CYRISMA Web platform. 
Instances can be created under existing organizations or sub organizations, or new sub organizations can be created.

**Notes:**
- Generation of an instance generally takes less than 5 minutes to complete. 
- Check the completion of your order by using the provision-status API call along with the returned instance ID provided.
- Parent_instance_id is the immediate parent where this new instance or sub-organization will appear in the hierarchy.
- If setting up a new sub-organization, the is_consulting value must be false. You cannot create a sub-organization that is considered “Trial” or “Consulting”.
- If setting up a new instance, then is_consulting may be set to true to indicate that this instance is in a temporary consulting mode and will eventually be converted to “standard”.
- The short_name is the name value that appears at the top left of the browser window when logged into that instance. It is also the name of the browser tab, so it is recommended to keep this string relatively short to serve as a quick identifier when you have many tabs open.
- Country value is very important as it will determine the geographic location where this specific instance will be located. Many organizations are subject to data sovereignty restrictions that mandate all data stay within a specific geography and this setting will assist.
- Mfa_type defaults to 0 (none), but can be set to 1 (Email) or 2 (Authenticator) when submitting the new provisioning request.
- Tenant_id is an optional string parameter to associate this provisioning with a pre-existing tenant of an MDR/XDR suite.


Required headers:

- `Authorization: access_token {token}`



## OpenAPI

````yaml openapi.json post /partner/instances/create
openapi: 3.1.0
info:
  title: Cyrisma Partner API
  description: >-
    Cyrisma partner API assists organizations that use the Cyrisma risk
    management platform to further automate and enhance overall risk management.
    The API provides provisioning and reporting features meaning that
    deployments can be automated and scan data can be retrieved for further
    aggregation and reporting. The API will enable the setup of new partners and
    instances, review of partner and instance status and utilization, and
    management of partners through their lifecycle.  Access to Cyrisma risk
    management is based on a foundation of secure API access token
    authentication and identity management.
  version: v1
servers: []
security: []
paths:
  /partner/instances/create:
    post:
      tags:
        - Instances
      summary: Create Instances Endpoint
      description: "This endpoint will provision a new instance under your partner account.\r\n\r\nIt is important to understand the hierarchy of the organizations set up under the CYRISMA Web platform. \r\nInstances can be created under existing organizations or sub organizations, or new sub organizations can be created.\r\n\r\n**Notes:**\r\n- Generation of an instance generally takes less than 5 minutes to complete. \r\n- Check the completion of your order by using the provision-status API call along with the returned instance ID provided.\r\n- Parent_instance_id is the immediate parent where this new instance or sub-organization will appear in the hierarchy.\r\n- If setting up a new sub-organization, the is_consulting value must be false. You cannot create a sub-organization that is considered “Trial” or “Consulting”.\r\n- If setting up a new instance, then is_consulting may be set to true to indicate that this instance is in a temporary consulting mode and will eventually be converted to “standard”.\r\n- The short_name is the name value that appears at the top left of the browser window when logged into that instance. It is also the name of the browser tab, so it is recommended to keep this string relatively short to serve as a quick identifier when you have many tabs open.\r\n- Country value is very important as it will determine the geographic location where this specific instance will be located. Many organizations are subject to data sovereignty restrictions that mandate all data stay within a specific geography and this setting will assist.\r\n- Mfa_type defaults to 0 (none), but can be set to 1 (Email) or 2 (Authenticator) when submitting the new provisioning request.\r\n- Tenant_id is an optional string parameter to associate this provisioning with a pre-existing tenant of an MDR/XDR suite.\r\n\r\n\r\nRequired headers:\r\n\r\n- `Authorization: access_token {token}`"
      operationId: CreateInstance
      parameters:
        - name: Authorization
          in: header
          schema:
            type: string
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/CreateInstanceRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateInstanceJson'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorJson'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorJson'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorJson'
components:
  schemas:
    CreateInstanceRequest:
      title: Create Instance Request
      required:
        - country
        - email
        - instance_type
        - is_consulting
        - name
        - parent_instance_id
        - short_name
      type: object
      properties:
        instance_type:
          title: Instance Type
          minLength: 1
          type: string
          description: Type of the instance to be created.
        is_consulting:
          title: Is Consulting
          minLength: 1
          type: string
          description: Indicates if the instance is for consulting.
        parent_instance_id:
          title: Parent Instance ID
          minLength: 1
          type: string
          description: ID of the parent instance.
        name:
          title: Name
          minLength: 1
          type: string
          description: Name of the instance.
        short_name:
          title: Short Name
          minLength: 1
          type: string
          description: Short name of the instance.
        country:
          title: Country
          minLength: 1
          type: string
          description: Country of the instance.
        email:
          title: Email
          minLength: 1
          type: string
          description: Email associated with the instance.
        mfa_type:
          title: MFA Type
          type:
            - string
            - 'null'
          description: Type of multi-factor authentication.
        tenant_id:
          title: Tenant ID
          type:
            - string
            - 'null'
          description: Tenant ID of the instance.
        state:
          title: Phone
          type:
            - string
            - 'null'
          description: Phone number associated with the instance.
        city:
          title: City
          type:
            - string
            - 'null'
          description: City of the instance.
        postal:
          title: Postal Code
          type:
            - string
            - 'null'
          description: Postal code of the instance.
        street:
          title: Street
          type:
            - string
            - 'null'
          description: Street address of the instance.
      additionalProperties: false
      description: Request data for creating a new instance.
    CreateInstanceJson:
      title: Create Instance JSON
      type: object
      properties:
        instance_id:
          title: Instance ID
          type:
            - string
            - 'null'
          description: The unique identifier for the created instance.
        agent_key:
          title: Agent Key
          type:
            - string
            - 'null'
          description: The agent key associated with the created instance.
      additionalProperties: false
      description: Represents the JSON structure for creating a new instance.
    ErrorJson:
      title: Error Response
      type: object
      properties:
        error:
          title: Error Code
          type:
            - string
            - 'null'
          description: The error code representing the type of error.
        error_description:
          title: Error Description
          type:
            - string
            - 'null'
          description: A detailed description of the error.
      additionalProperties: false
      description: Represents an error response with error code and description.

````