---
title: "Generate wallet if not exists and create address (v2)"
method: POST
path: "/api/v2/addresses/generate"
tags: ["addresses"]
---

# Generate wallet if not exists and create address (v2)

`POST /api/v2/addresses/generate`

V2: creates wallet if needed, then generates address for the given network and reference.

## Headers

- `x-sdk-version` string, required

## Request body

- CreateAddressRequestBodyDTO
  - `reference` string, required — Profile reference that owns the address
  - `networkId` string, uuid, required — UUID of the network to generate the address on
  - `clientShare` string, required — Client share for key derivation. Must be non-empty.

## Response `201`

Generate wallet if not exists and create address (v2)

- CreateAddressResponseBodyDTO
  - `data` CreateAddressDataDTO, required
    - `id` string, required
    - `address` string, required
  - `message` string, required

## Other responses

- `400` — Bad request or validation failed. **Applicable error codes and client messages** The response body contains one of the following error codes and the corresponding client-facing message. | Code | Client message | |------|----------------| | ERR-010 | The request could not be processed. |
- `401` — Unauthorized – invalid or missing token. **Applicable error codes and client messages** The response body contains one of the following error codes and the corresponding client-facing message. | Code | Client message | |------|----------------| | ERR-008 | You need to sign in to continue. | | ERR-011 | Your session is invalid or expired. Please sign in again. |
- `403` — Forbidden – insufficient permissions. **Applicable error codes and client messages** The response body contains one of the following error codes and the corresponding client-facing message. | Code | Client message | |------|----------------| | ERR-009 | You don't have permission to do that. | | ERR-410 | Error occurred |
- `404` — Resource not found. **Applicable error codes and client messages** The response body contains one of the following error codes and the corresponding client-facing message. | Code | Client message | |------|----------------| | ERR-013 | Organization not found. | | ERR-006 | The requested resource was not found. |
- `500` — Internal server error. **Applicable error codes and client messages** The response body contains one of the following error codes and the corresponding client-facing message. | Code | Client message | |------|----------------| | ERR-019 | Something went wrong on our side. | | ERR-016 | We couldn't set up the wallet. Please try again. | | ERR-999 | An unexpected error occurred. Please try again. |

## Changes

- **2026-04-21** `bdac7e47d1c2` — 1 breaking, 35 warning
  - the `networkId` request property type/format changed from `string`/`` to `string`/`uuid`
  - added the new `ERR_147` enum value to the `allOf[#/components/schemas/ApiErrorResponseDto]/code` response property for the response status `400`
  - added the new `ERR_147` enum value to the `allOf[#/components/schemas/ApiErrorResponseDto]/code` response property for the response status `401`
  - added the new `ERR_147` enum value to the `allOf[#/components/schemas/ApiErrorResponseDto]/code` response property for the response status `403`
  - …32 more
- **2026-03-13** `86f37d72f0a0` — 24 breaking, 13 warning, 14 info
  - added the new required request property `networkId`
  - the `header` request parameter `x-sdk-version` became required
  - the response's body type/format changed from `object`/`` to ``/`` for status `400`
  - the response's body type/format changed from `object`/`` to ``/`` for status `401`
  - …47 more
- **2026-01-31** `13aade479509` — 6 breaking, 8 info
  - removed the enum value `BTC` of the request property `network`
  - removed the enum value `ETH` of the request property `network`
  - the response property `message` became optional for the status `201`
  - the `data` response's property type/format changed from `object`/`` to `string`/`` for status `201`
  - …10 more
- **2025-12-12** `87ef0bd21ea9` — 1 info
  - api operation id `generateAddress` removed and replaced with `generateAddressV2`
- …earlier changes not shown

[Full history](https://skmtc.dev/oumla/apis/oumla-core-server/changes/api/v2/addresses/generate/post.md)

---

[API](https://skmtc.dev/oumla/apis/oumla-core-server.md) · [All operations](https://skmtc.dev/oumla/apis/oumla-core-server/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/oumla/oumla-core-server/revisions/2154835230b5/schema)
