SCOryn Docs

Authentication

Manage user accounts and API authentication.

Base URL: https://api.oryn.com

POST/v1/auth/signup

Create a new user account and organization.

Request

bash
curl -X POST https://api.oryn.com/v1/auth/signup \
  -H "Content-Type: application/json" \
  -d '{
    "email": "user@example.com",
    "password": "secure-password-123",
    "organization_name": "Acme Inc"
  }'

Response

json
{
  "id": "usr_abc123",
  "email": "user@example.com",
  "organization": {
    "id": "org_xyz789",
    "name": "Acme Inc"
  },
  "access_token": "ws_live_eyJhbGciOiJIUzI1NiIs...",
  "refresh_token": "ws_rt_dGhpcyBpcyBhIHJlZnJl..."
}
POST/v1/auth/login

Authenticate with email and password to receive access and refresh tokens.

Request

bash
curl -X POST https://api.oryn.com/v1/auth/login \
  -H "Content-Type: application/json" \
  -d '{
    "email": "user@example.com",
    "password": "secure-password-123"
  }'

Response

json
{
  "access_token": "ws_live_eyJhbGciOiJIUzI1NiIs...",
  "refresh_token": "ws_rt_dGhpcyBpcyBhIHJlZnJl...",
  "token_type": "Bearer",
  "expires_in": 3600
}
POST/v1/auth/refresh

Exchange a refresh token for a new access token.

Request

bash
curl -X POST https://api.oryn.com/v1/auth/refresh \
  -H "Content-Type: application/json" \
  -d '{
    "refresh_token": "ws_rt_dGhpcyBpcyBhIHJlZnJl..."
  }'

Response

json
{
  "access_token": "ws_live_bmV3IGFjY2VzcyB0b2tl...",
  "refresh_token": "ws_rt_bmV3IHJlZnJlc2ggdG9r...",
  "token_type": "Bearer",
  "expires_in": 3600
}