API Documentation
The Pathwayful API is easy to use and free for all plans.
Login
Login with email and password to receive an authentication token.
POST
https://api.pathwayful.com/auth/login
Headers
-
Content-TypeREQUIRED STRINGapplication/json
Request body
{
"email": "user@example.com",
"password": "securepassword"
}
Response body
{
"id": "uuid",
"first_name": "John",
"last_name": "Doe",
"email": "user@example.com",
"avatar_url": null,
"locale": "en",
"timezone": "UTC",
"theme": "light",
"token": "your-api-token"
}
Code Examples
curl -X POST "https://api.pathwayful.com/auth/login" \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"password": "securepassword"
}'
// Login and get authentication token
const response = await fetch('https://api.pathwayful.com/auth/login', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
email: 'user@example.com',
password: 'securepassword'
})
});
const data = await response.json();
const token = data.token;
console.log('Logged in, token:', token);
# Login and get authentication token
import requests
data = {
'email': 'user@example.com',
'password': 'securepassword'
}
response = requests.post(
'https://api.pathwayful.com/auth/login',
json=data
)
data = response.json()
token = data['token']
print(f"Logged in, token: {token}")
// Login and get authentication token
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
)
func main() {
data := map[string]string{
"email": "user@example.com",
"password": "securepassword",
}
jsonData, _ := json.Marshal(data)
resp, err := http.Post(
"https://api.pathwayful.com/auth/login",
"application/json",
bytes.NewBuffer(jsonData),
)
if err != nil {
panic(err)
}
defer resp.Body.Close()
var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
fmt.Println("Token:", result["token"])
}
# Login and get authentication token
require 'net/http'
require 'json'
require 'uri'
uri = URI('https://api.pathwayful.com/auth/login')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = {
email: 'user@example.com',
password: 'securepassword'
}.to_json
response = http.request(request)
data = JSON.parse(response.body)
puts "Token: #{data['token']}"
<?php
// Login and get authentication token
$data = [
'email' => 'user@example.com',
'password' => 'securepassword'
];
$ch = curl_init('https://api.pathwayful.com/auth/login');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
echo "Token: " . $result['token'];