> For the complete documentation index, see [llms.txt](https://developers.yumpu.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.yumpu.com/api/user/userpost.md).

# Post

## Create a new user profile

### Parameters:

| Name        | Optional / Required | Data type | Description                                                                                                     | Default |
| ----------- | ------------------- | --------- | --------------------------------------------------------------------------------------------------------------- | ------- |
| email       | required            | String    | Your email address (valid email address)                                                                        |         |
| username    | required            | String    | Your username (Allowed characters a-z, A-Z, 0-9 and a dot, min. length 5 characters, max. length 30 characters) |         |
| password    | required            | String    | Your password (min. length 6 characters)                                                                        |         |
| gender      | optional            | String    | Your gender (male or female)                                                                                    |         |
| firstname   | optional            | String    | Your firstname (min. length 2 characters, max. length 100 characters)                                           |         |
| lastname    | optional            | String    | Your lastname (min. length 2 characters, max. length 100 characters)                                            |         |
| birth\_date | optional            | Date      | Your birth\_date (YYYY-MM-DD)                                                                                   |         |
| address     | optional            | String    | Your address (max. length 255 characters)                                                                       |         |
| zip\_code   | optional            | String    | Your zip code (max. length 10 characters)                                                                       |         |
| city        | optional            | String    | Your city (max. length 50 characters)                                                                           |         |
| country     | optional            | String    | Your country (DE, GB, FR, ...)                                                                                  |         |
| description | optional            | String    | Your address (max. length 255 characters)                                                                       |         |
| website     | optional            | String    | Your website (max. length 255 characters, valid URL)                                                            |         |
| blog        | optional            | String    | Your blog (max. length 255 characters, valid URL)                                                               |         |
| avatar      | optional            | String    | A valid image URL                                                                                               |         |
| language    | optional            | String    | Your language (de, en, fr, ...)                                                                                 |         |

### Demo

&#x20;URL Find your token on - [yumpu.com](https://www.yumpu.com/en/account/profile/api) Token&#x20;

&#x20;email  username  password&#x20;

#### Optional parameters:

&#x20;gender  firstname  lastname  birth\_date  address  zip\_code  city  country  description  website  blog  avatar  language&#x20;

Add optional parametersRun request

```
```

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X POST -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" -d "email=yumpu.api@gmail.com" -d "username=api.user" -d "password=s3cr3tpassword1" -d "gender=male" -d "firstname=API" -d "lastname=User" -d "birth_date=1986-01-01" -d "address=Moosackerstr. 17" -d "zip_code=9444" -d "city=Diepoldsau" -d "country=CH" -d "description=I am the default API user." -d "website=https://www.yumpu.com" -d "blog=https://blog.yumpu.com" -d "language=de" "https://api.yumpu.com/2.0/user.json"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$data = array(
    'email' => 'yumpu.api@gmail.com',
    'username' => 'api.user',
    'password' => 's3cr3tpassword1',
    'gender' => 'male',
    'firstname' => 'API',
    'lastname' => 'User',
    'birth_date' => '1986-01-01',
    'address' => 'Moosackerstr. 17',
    'zip_code' => '9444',
    'city' => 'Diepoldsau',
    'country' => 'CH',
    'description' => 'I am the default API user.',
    'website' => 'https://www.yumpu.com',
    'blog' => 'https://blog.yumpu.com',
    'language' => 'de'
);
$newUser = $yumpu->postUser($data);
print_r($newUser);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
  email: 'yumpu.api@gmail.com',
  username: 'api.user',
  password: 's3cr3tpassword1',
  gender: 'male',
  firstname: 'API',
  lastname: 'User',
  birth_date: '1986-01-01',
  address: 'Moosackerstr. 17',
  zip_code: '9444',
  city: 'Diepoldsau',
  country: 'CH',
  description: 'I am the default API user.',
  website: 'https://www.yumpu.com',
  blog: 'https://blog.yumpu.com',
  language: 'de'
};
yumpu.postUser(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
String[] params = {"email=yumpu.api@gmail.com", "username=api.user", "password=s3cr3tpassword1", "gender=male", "firstname=API", "lastname=User", "birth_date=1986-01-01", "address=Moosackerstr. 17", "zip_code=9444", "city=Diepoldsau", "country=CH", "description=I am the default API user.", "website=http://www.yumpu.com", "blog=http://blog.yumpu.com", "language=de"};
System.out.println(y.postUser(params));
```

{% endtab %}
{% endtabs %}

Whatever language you are using, the result will be the same.

```bash
{
  "user": {
    "id": "102864144",
    "create_date": "2013-03-08 17:13:43",
    "activate_date": "2013-04-25 14:20:04",
    "username": "Api.User",
    "email": "yumpu.api@gmail.com",
    "gender": "male",
    "name": "Api User",
    "firstname": "Api",
    "lastname": "User",
    "birth_date": "1986-01-01",
    "address": "Moosackerstr. 17",
    "zip_code": "9444",
    "city": "Diepoldsau",
    "country": "CH",
    "description": "I am the API user.",
    "website": "https://www.yumpu.com",
    "blog": "https://blog.yumpu.com",
    "language": "de"
  },
  "state": "success"
}
```
