Skip to content

Authentication

Some endpoints are public, but some require authentication. We provide all the required endpoints to create an account and authorize yourself.


ID: createUser

Create a user

POST
/api/v1/user/signup

Create a user account to access exclusive content about Argentine Rock legends.

Request Body

JSON
{
"name": "Carlos",
"email": "carlos@rock-legends.com",
"password": "i-love-rock"
}

Responses

Created
application/json
JSON
{
"id": 1,
"name": "Carlos",
"email": "carlos@rock-legends.com"
}

Samples

Bruno
post {
  url: https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/user/signup
}

headers {
  Content-Type: application/json
}
Bruno
post {
  url: https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/user/signup
}

headers {
  Content-Type: application/json
}
cURL
curl -X POST \
'https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/user/signup' \
 -H "Content-Type: application/json"
JavaScript
fetch('https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/user/signup', {method:'POST',headers:{'Content-Type':'application/json'}})
  .then(response => response.json())
  .then(data => console.log(data));
PHP
<?php
$url = 'https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/user/signup';
$method = 'POST';
$headers = [
    'Content-Type' => 'application/json',
];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
?>
Python
import requests

url = 'https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/user/signup'

headers = {
    'Content-Type': 'application/json'
}

response = requests.post(url, headers=headers)
print(response.json())

Powered by VitePress OpenAPI