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

# Setup Account Profile

> Create and configure new account profile



## OpenAPI

````yaml /openapi/10.0/aviatrix-api.json post /v2/api/setup_account_profile
openapi: 3.1.0
info:
  title: Aviatrix Controller API
  version: '10.0'
  description: >-
    Aviatrix Controller API — version 10.0. Selected operations with Mintlify
    metadata.
servers: []
security: []
tags:
  - name: policies
    x-group: Policies
  - name: authentication
    x-group: Authentication
  - name: account-management
    x-group: Account Management
  - name: rbac
    x-group: RBAC & Permissions
  - name: gateways
    x-group: Gateways
  - name: transit
    x-group: Transit
  - name: nat
    x-group: NAT
  - name: app-domains
    x-group: SmartGroups
  - name: certificates
    x-group: Certificates
  - name: mitm
    x-group: MITM
  - name: monitoring
    x-group: Monitoring & Diagnostics
  - name: fqdn
    x-group: FQDN
  - name: logging
    x-group: Logging
  - name: vpn
    x-group: UserVPN
  - name: site-to-cloud
    x-group: Site-to-Cloud
  - name: controller
    x-group: Controller
  - name: bgp
    x-group: BGP
  - name: general
    x-group: General
  - name: firenet
    x-group: FireNet
  - name: networking
    x-group: Networking
  - name: tgw
    x-group: AWS TGW
  - name: ips
    x-group: IPS
  - name: saml
    x-group: SAML
paths:
  /v2/api/setup_account_profile:
    post:
      tags:
        - authentication
      operationId: setup_account_profile
      requestBody:
        content:
          application/json:
            schema:
              properties:
                CID:
                  $ref: '#/components/schemas/CID'
                account_email:
                  description: Email address of the account name.
                  type: string
                account_name:
                  description: Cloudx account name.
                  type: string
                account_password:
                  description: Password on the account_name for GUI login.
                  type: string
                action:
                  $ref: '#/components/schemas/action'
                aliyun_access_key:
                  description: Aliyun access key id.
                  type: string
                aliyun_account_id:
                  description: Aliyun account number.
                  type: string
                aliyun_secret_key:
                  description: Aliyun access key.
                  type: string
                arm_application_client_id:
                  description: ARM AD client ID.
                  type: string
                arm_application_client_secret:
                  description: ARM AD client secret.
                  type: string
                arm_application_endpoint:
                  description: ARM AD tenant ID.
                  type: string
                arm_china_application_client_id:
                  description: ARM AD client ID.
                  type: string
                arm_china_application_client_secret:
                  description: ARM AD client secret.
                  type: string
                arm_china_application_endpoint:
                  description: ARM AD tenant ID.
                  type: string
                arm_china_subscription_id:
                  description: Azure ARM subscription ID.
                  type: string
                arm_subscription_id:
                  description: Azure ARM subscription ID.
                  type: string
                aws_access_key:
                  description: AWS account access key id.
                  type: string
                aws_account_number:
                  description: AWS 12 digit account number.
                  type: string
                aws_china_access_key:
                  description: AWS China access key id.
                  type: string
                aws_china_account_number:
                  description: AWS China account number.
                  type: string
                aws_china_role_arn:
                  description: AWS China Role ARN ID.
                  type: string
                aws_china_role_ec2:
                  description: AWS China Role EC2 ID.
                  type: string
                aws_china_secret_key:
                  description: AWS China access key.
                  type: string
                aws_gateway_role_app:
                  description: AWS Gateway App Role ARN.
                  type: string
                aws_gateway_role_ec2:
                  description: AWS Gateway EC2 Role ARN.
                  type: string
                aws_role_arn:
                  description: AWS Role ARN ID.
                  type: string
                aws_role_ec2:
                  description: AWS Role EC2 ID.
                  type: string
                aws_secret_key:
                  description: AWS account secret access key.
                  type: string
                awsgov_access_key:
                  description: AWS GovCloud account access key id.
                  type: string
                awsgov_account_number:
                  description: AWS GovCloud 12 digit account number.
                  type: string
                awsgov_role_arn:
                  description: AWS Gov Role ARN ID.
                  type: string
                awsgov_role_ec2:
                  description: AWS Gov Role EC2 ID.
                  type: string
                awsgov_secret_key:
                  description: AWS GovCloud account secret access key.
                  type: string
                azure_cert_path:
                  description: Azure certification path.
                  type: string
                azure_china_cert_path:
                  description: Azure China certification path.
                  type: string
                azure_china_subscription_id:
                  description: Azure China Subscription ID.
                  type: string
                azure_gov_application_client_id:
                  description: ARM AD client ID.
                  type: string
                azure_gov_application_client_secret:
                  description: ARM AD client secret.
                  type: string
                azure_gov_application_endpoint:
                  description: ARM AD tenant ID.
                  type: string
                azure_gov_subscription_id:
                  description: Azure ARM subscription ID.
                  type: string
                azure_subscription_id:
                  description: Azure Subscription ID.
                  type: string
                china_cloud_trail_bucket:
                  description: >-
                    To enable CloudTrail for this Gov China account, enter a S3
                    bucket name to store the logs.
                  type: string
                cloud_trail_bucket:
                  description: >-
                    To enable CloudTrail for this account, enter a S3 bucket
                    name to store the logs.
                  type: string
                cloud_type:
                  description: Cloud Provider.
                  enum:
                    - 1
                    - 4
                    - 8
                    - 16
                    - 32
                    - 256
                    - 1024
                    - 2048
                    - 4096
                    - 8192
                    - 131072
                    - 262144
                    - 524288
                    - 1048576
                  type: integer
                edge_csp_api_endpoint:
                  description: Edge CSP Endpoint.
                  type: string
                edge_csp_password:
                  description: Edge CSP password.
                  type: string
                edge_csp_username:
                  description: Edge CSP username.
                  type: string
                equinix_password:
                  description: Equinix password.
                  type: string
                equinix_username:
                  description: Equinix username.
                  type: string
                gcloud_project_credentials:
                  description: |-
                    GCP account credentials file.
                    This field must be base64 encoded.
                  type: string
                gcloud_project_name:
                  description: Gcloud project id.
                  type: string
                gov_cloud_trail_bucket:
                  description: >-
                    To enable CloudTrail for this GovCloud account, enter a S3
                    bucket name to store the logs.
                  type: string
                groups:
                  description: RBAC groups.
                  type: string
                megaport_password:
                  description: Megaport password.
                  type: string
                megaport_username:
                  description: Megaport username.
                  type: string
                oci_api_key:
                  description: |-
                    OCI account credentials file.
                    This field must be base64 encoded.
                  type: string
                oci_compartment_id:
                  description: OCI compartment id.
                  type: string
                oci_tenancy_id:
                  description: OCI tenancy id.
                  type: string
                oci_user_id:
                  description: OCI user id.
                  type: string
                skip_sg_config:
                  description: Skip auto-enable Access Security.
                  type: boolean
              required:
                - awsgov_account_number
                - awsgov_access_key
                - awsgov_secret_key
                - account_name
                - aws_account_number
                - azure_subscription_id
                - azure_cert_path
                - azure_china_subscription_id
                - azure_china_cert_path
                - cloud_type
              type: object
        required: true
      responses:
        '200':
          $ref: '#/components/responses/general_response_v2'
        default:
          $ref: '#/components/responses/general_response_v2'
      x-codeSamples:
        - lang: curl
          label: cURL
          source: >-
            curl -sk -X POST "https://<controller>/v2/api/setup_account_profile"
            \
              -H "Authorization: cid <CID>"
        - lang: python
          label: Python
          source: |-
            import requests

            url = "https://<controller>/v2/api/setup_account_profile"
            headers = {"Authorization": "cid <CID>"}

            response = requests.post(url, headers=headers, verify=False)
            print(response.status_code)
            print(response.text)
        - lang: javascript
          label: JavaScript
          source: |-
            fetch("https://<controller>/v2/api/setup_account_profile", {
              method: "POST",
              headers: {"Authorization": "cid <CID>"}
            })
              .then(res => res.text())
              .then(console.log)
              .catch(console.error);
        - lang: go
          label: Go
          source: |-
            package main

            import (
              "fmt"
              "net/http"
            )

            func main() {
              req, _ := http.NewRequest("POST", "https://<controller>/v2/api/setup_account_profile", nil)
              req.Header.Set("Authorization", "cid <CID>")

              client := &http.Client{}
              resp, err := client.Do(req)
              if err != nil {
                panic(err)
              }
              defer resp.Body.Close()

              fmt.Println(resp.Status)
            }
components:
  schemas:
    CID:
      description: The opaque session ID token. Required for 7.2 controllers only.
      type: string
    action:
      description: The API action to perform. Required for 7.2 controllers only.
      type: string
    general_response_v2:
      additionalProperties: true
      description: A generic API response container for v2 style APIs.
      properties:
        errortype:
          description: Error type if the API failed.
          type: string
        reason:
          description: Failure reason if the API failed.
          type: string
        results:
          oneOf:
            - description: API response data
              type: boolean
            - description: API response data
              type: integer
            - description: API response data
              type: string
            - description: API response data
              type: object
            - description: API response data
              items: {}
              type: array
        return:
          description: Whether the API returned successfully
          type: boolean
      title: General Response v2
      type: object
  responses:
    general_response_v2:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/general_response_v2'
      description: General v2 API response schema.

````

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