createCharacter
Create a character on this account.
The name, the class and the gender are all checked before anything is sent, so a hopeless request costs no round trip and comes back naming the `field` at fault. The refreshed roster travels with the reply — there is no need to re-read `chars`.
Request
POST /api/v1/sessions/{accountKey}/actions/createCharacter
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
nickName (nick, name) | string | yes | The character's name. Letters and digits, 2 to 20 of them. |
characterClass (class) | string | yes | A class from `characterClasses`; the short name ("Fighter") is enough. |
gender | integer | yes | 1 for male, 2 for female. |
Example request
{ "nickName": "Grimsby", "characterClass": "Fighter", "gender": 1 }
Response
`{ ok: true, character, characters, slots }` — the new character and the refreshed roster.
| Field | Type | Meaning |
|---|---|---|
character | object|null | The new character's roster row. Null in the rare case the server accepted it but the read-back missed it — re-read `chars`. |
field | string | On failure only: which argument was refused (`nickName`, `characterClass` or `gender`). |
Example response
{
"ok": true,
"result": 1,
"nickName": "Grimsby",
"characterClass": "DesignDataPlayerCharacter:Id_PlayerCharacter_Fighter",
"gender": 1,
"character": {
"characterId": "630211546215118851",
"name": "Grimsby", "class": "Fighter", "level": 1,
"createdAt": 1755734400000, "lastLogin": 0, "isLock": false,
"orderIndex": 0, "equipCount": 0
},
"characters": [ { "characterId": "630211546215118851", "name": "Grimsby", "class": "Fighter", "level": 1 } ],
"slots": { "used": 1, "total": 1, "available": 8, "free": 7 }
}
Errors
| Code | When |
|---|---|
action_failed | The name is taken or malformed, the class is not owned, or the gender is not 1 or 2. `field` says which. |
plan_limit | Creating a character changes the account, so it is not on the free plan. |
See also
DarkerAPI is an independent project. It is not affiliated with, endorsed by or associated with IRONMACE Co., Ltd. or Valve Corporation. “Dark and Darker” and related marks belong to their respective owners.