> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.lipafy.xyz/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.lipafy.xyz/_mcp/server.

# Create or resume Personal or Business onboarding

PUT https://api.lipafy.xyz/v1/onboarding
Content-Type: application/json

Idempotently updates the caller's existing workspace. Completion does not imply verification.

Reference: https://docs.lipafy.xyz/api-reference/workspaces/update-onboarding

## Authentication

- `Authorization` header (bearer token, required) — Scoped Lipafy API key, OAuth token, or dashboard token

## Servers

- `https://api.lipafy.xyz` (Production, default)
- `http://localhost:3000` (Local or sandbox development)

## Request

### Body (application/json)

This endpoint expects an OnboardingRequest.

- `account_type` (enum, required)
  - Allowed values: `PERSONAL`, `BUSINESS`
- `name` (string, required)
- `country` (string, required)
- `currency` (string, required)
- `accept_terms` (true, required)
- `accept_privacy` (true, required)
- `phone` (string, optional)
- `business_profile` (map from string to any, optional)
- `complete` (boolean, optional, default: true)

## Response

### 200

Resumable onboarding state

## Errors

### 400 Bad Request Error

Invalid request or policy validation

- `error` (string, required)
- `message` (string, required)
- `details` (map from string to any, optional)

### 401 Unauthorized Error

Authentication required

- `error` (string, required)
- `message` (string, required)
- `details` (map from string to any, optional)

## Examples

**Request**

```json
{
  "account_type": "PERSONAL",
  "name": "string",
  "country": "KE",
  "currency": "KES",
  "accept_terms": true,
  "accept_privacy": true
}
```

**Response**

```json
{}
```

**SDK Code**

```python
import requests

url = "https://api.lipafy.xyz/v1/onboarding"

payload = {
    "account_type": "PERSONAL",
    "name": "string",
    "country": "KE",
    "currency": "KES",
    "accept_terms": True,
    "accept_privacy": True
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.lipafy.xyz/v1/onboarding';
const options = {
  method: 'PUT',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"account_type":"PERSONAL","name":"string","country":"KE","currency":"KES","accept_terms":true,"accept_privacy":true}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.lipafy.xyz/v1/onboarding"

	payload := strings.NewReader("{\n  \"account_type\": \"PERSONAL\",\n  \"name\": \"string\",\n  \"country\": \"KE\",\n  \"currency\": \"KES\",\n  \"accept_terms\": true,\n  \"accept_privacy\": true\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.lipafy.xyz/v1/onboarding")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"account_type\": \"PERSONAL\",\n  \"name\": \"string\",\n  \"country\": \"KE\",\n  \"currency\": \"KES\",\n  \"accept_terms\": true,\n  \"accept_privacy\": true\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://api.lipafy.xyz/v1/onboarding")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"account_type\": \"PERSONAL\",\n  \"name\": \"string\",\n  \"country\": \"KE\",\n  \"currency\": \"KES\",\n  \"accept_terms\": true,\n  \"accept_privacy\": true\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.lipafy.xyz/v1/onboarding', [
  'body' => '{
  "account_type": "PERSONAL",
  "name": "string",
  "country": "KE",
  "currency": "KES",
  "accept_terms": true,
  "accept_privacy": true
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.lipafy.xyz/v1/onboarding");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"account_type\": \"PERSONAL\",\n  \"name\": \"string\",\n  \"country\": \"KE\",\n  \"currency\": \"KES\",\n  \"accept_terms\": true,\n  \"accept_privacy\": true\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "account_type": "PERSONAL",
  "name": "string",
  "country": "KE",
  "currency": "KES",
  "accept_terms": true,
  "accept_privacy": true
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.lipafy.xyz/v1/onboarding")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```