A
A
API
Search…
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

URL Find your token on - yumpu.com Token
email username password

Optional parameters:

gender firstname lastname birth_date address zip_code city country description website blog avatar language
Add optional parametersRun request
1
Copied!
curl
PHP
JavaScript
Java
Example:
1
curl -X POST -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" -d "[email protected]" -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=http://www.yumpu.com" -d "blog=http://blog.yumpu.com" -d "language=de" "http://api.yumpu.com/2.0/user.json"
Copied!
Example:
1
require_once('../yumpu.php');
2
$yumpu = new Yumpu();
3
$data = array(
4
'email' => '[email protected]',
5
'username' => 'api.user',
6
'password' => 's3cr3tpassword1',
7
'gender' => 'male',
8
'firstname' => 'API',
9
'lastname' => 'User',
10
'birth_date' => '1986-01-01',
11
'address' => 'Moosackerstr. 17',
12
'zip_code' => '9444',
13
'city' => 'Diepoldsau',
14
'country' => 'CH',
15
'description' => 'I am the default API user.',
16
'website' => 'https://www.yumpu.com',
17
'blog' => 'https://blog.yumpu.com',
18
'language' => 'de'
19
);
20
$newUser = $yumpu->postUser($data);
21
print_r($newUser);
Copied!
Example:
1
var yumpu = require('yumpu');
2
yumpu.setToken('yourToken');
3
var parameters = {
4
5
username: 'api.user',
6
password: 's3cr3tpassword1',
7
gender: 'male',
8
firstname: 'API',
9
lastname: 'User',
10
birth_date: '1986-01-01',
11
address: 'Moosackerstr. 17',
12
zip_code: '9444',
13
city: 'Diepoldsau',
14
country: 'CH',
15
description: 'I am the default API user.',
16
website: 'https://www.yumpu.com',
17
blog: 'https://blog.yumpu.com',
18
language: 'de'
19
};
20
yumpu.postUser(parameters, function(statusCode, document){
21
console.log('Status: ' + statusCode);
22
console.log(document);
23
});
Copied!
Example:
1
Yumpu y = new Yumpu("your access token");
2
String[] params = {"[email protected]", "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"};
3
System.out.println(y.postUser(params));
Copied!
Whatever language you are using, the result will be the same.
1
{
2
"user": {
3
"id": "102864144",
4
"create_date": "2013-03-08 17:13:43",
5
"activate_date": "2013-04-25 14:20:04",
6
"username": "Api.User",
7
"email": "[email protected]",
8
"gender": "male",
9
"name": "Api User",
10
"firstname": "Api",
11
"lastname": "User",
12
"birth_date": "1986-01-01",
13
"address": "Moosackerstr. 17",
14
"zip_code": "9444",
15
"city": "Diepoldsau",
16
"country": "CH",
17
"description": "I am the API user.",
18
"website": "http://www.yumpu.com",
19
"blog": "http://blog.yumpu.com",
20
"language": "de"
21
},
22
"state": "success"
23
}
Copied!
Last modified 1yr ago