API: Account/Create

Summary

Creates a new user account and the first API key.

URL

https://api.sedamo.info/2.0/account/create

Authentication

Not required

Parameters
Response
Examples

Register an user with name and full contact data:

sedamo_api_method_account_create.php
<?php
$data = array(
     'format' => "JSON",
     'title' => "Mr",
     'callingname' => "John",
     'familyname' => "Doe",
     'companyname' => "ACME Ltd",
     'sedamo' => "ABCDEFGH",
     'email' => "john@example.com",
     'username' => "john_doe",
     'password' => "", // password will be generated automatically
     'language' => "en"
);
 
$url = "https://api.sedamo.info/2.0/account/create?" . http_build_query($data);
$json = file_get_contents($url);
$json_array = json_decode($json, true);  // 2nd parameter "true": returns result as an array 
var_dump($json_array);  // shows array 

Minimalist registration: Only format given. Username, password (and API key) will be generated. E.g. for use within an app with automated registration in the background.

sedamo_api_method_account_create.php
<?php
$url = "https://api.sedamo.info/2.0/account/create?format=JSON";
$json = file_get_contents($url);
$json_array = json_decode($json, true);  // 2nd parameter "true": returns result as an array 
var_dump($json_array);  // shows array 

Example of a returned JSON object:

{
    "status": "ok",
    "username": "john_doe",
    "password": "pass88Ax99b",
    "apikey": "Sample0123Sample0123Sample0123Sample0123"
}

Example of a returned XML string:

<?xml version="1.0" encoding="UTF-8"?>
<sedamo>
          <status>ok</status>
          <username>john_doe</username>
          <password>pass88Ax99b</password>
          <apikey>Sample0123Sample0123Sample0123Sample0123</apikey>
</sedamo>
Possible error messages

Sample error message:

{
    "status": "error",
    "message": "data invalid"
}

Back to sedamo API start page