# 2. Create a Client

A **client** represents the legal entity that holds power of attorney over end-investor accounts. How many clients you need depends on your setup:

- **Direct model** — your company itself holds power of attorney. You have a single client.
- **Intermediary model** — other organisations hold power of attorney through your platform. You create one client per organisation.


### Permissions

Client permissions are configured in two layers:

1. **Partner level** — default settings that all your clients inherit.
2. **Client level** — overrides for individual clients when needed.


Customized power of attorney forms are possible on client level. This is considered an edge case and must be manually setup by Fondo.

```shell curl
curl -i -X POST \
  https://api.sandbox.fondo.se/v2/partner/client \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "id": "49ad7378-121c-4a53-9894-dfd14a7b4877",
    "displayName": "Advise",
    "name": "Advise AB",
    "bankAccounts": [
      {
        "feeType": "client_fee_oneoff",
        "iban": "SE7280000810340009783242"
      }
    ],
    "serviceTypes": [
      {
        "accountServiceType": "portfolioManagement"
      }
    ],
    "crn": "5011121421",
    "country": "SE"
  }'
```

The response returns the persisted client including its `id` (used in all subsequent calls) and an activation `code` per service type.

### Request schema

```json
{
  "$ref": "#/components/schemas/post_client",
  "components": {
    "schemas": {
      "fee_types": {
        "$id": "/models/transaction/fee_types.yaml",
        "title": "feeType",
        "type": "string",
        "description": "- `client_fee_oneoff` — One-off fee\n- `client_fee_ongoing` — Ongoing fee\n- `client_fee_transaction` — Transactional fee\n- `client_fee_performance` — Performance fee\n- `client_fee_other` — Other fee\n",
        "enum": [
          "client_fee_oneoff",
          "client_fee_ongoing",
          "client_fee_transaction",
          "client_fee_performance",
          "client_fee_other"
        ]
      },
      "bank_account": {
        "$id": "/models/client/bank_account.yaml",
        "title": "bankAccount",
        "type": "object",
        "description": "Bank account definition based on fee type",
        "required": [
          "feeType",
          "iban"
        ],
        "additionalProperties": false,
        "properties": {
          "feeType": {
            "$ref": "#/components/schemas/fee_types"
          },
          "iban": {
            "type": "string",
            "description": "IBAN (ISO 13616, International Bank Account Number)",
            "example": "SE7280000810340009783242"
          }
        }
      },
      "serviceType": {
        "title": "Account service type",
        "type": "string",
        "description": "- `portfolioManagement` — Portfolio management\n- `investmentAdvise` — Investment advice\n- `executionOnly` — Execution only\n",
        "enum": [
          "portfolioManagement",
          "investmentAdvise",
          "executionOnly"
        ]
      },
      "service_type": {
        "$id": "/models/client/service_type.yaml",
        "title": "serviceType",
        "type": "object",
        "description": "Supported Service Type",
        "required": [
          "accountServiceType"
        ],
        "additionalProperties": false,
        "properties": {
          "accountServiceType": {
            "$ref": "#/components/schemas/serviceType"
          },
          "code": {
            "readOnly": true,
            "type": "string",
            "description": "client activation code. 6 digits",
            "example": "123456",
            "pattern": "^[0-9]{6}$"
          }
        }
      },
      "crn": {
        "$id": "/models/crn.yaml",
        "type": "string",
        "minLength": 10,
        "maxLength": 10,
        "pattern": "\\d{10}",
        "example": "5011121421"
      },
      "post_client": {
        "$id": "/models/client/post_client.yaml",
        "title": "client",
        "type": "object",
        "required": [
          "name",
          "displayName",
          "crn",
          "serviceTypes",
          "country"
        ],
        "additionalProperties": false,
        "properties": {
          "displayName": {
            "type": "string",
            "description": "Name of client as displayed in journeys",
            "example": "Advise"
          },
          "name": {
            "type": "string",
            "description": "Name of client",
            "example": "Advise AB"
          },
          "bankAccounts": {
            "type": "array",
            "description": "Bank account defintions based on fee type. No duplicate feeTypes allowed",
            "uniqueItems": true,
            "items": {
              "$ref": "#/components/schemas/bank_account"
            }
          },
          "serviceTypes": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/service_type"
            }
          },
          "crn": {
            "$ref": "#/components/schemas/crn",
            "description": "Company registration number. 10-digits"
          },
          "country": {
            "type": "string",
            "description": "Two-letter country code",
            "pattern": "^[A-Z][A-Z]$",
            "example": "SE"
          }
        }
      }
    }
  }
}
```

**Next:** [Onboard a customer](/guides/api-guide/getting-started/onboard-customer)