MENU navbar-image

Introduction

RosettaChat V1 API for authentication, file staging, Workspace Channel chat, Direct Chat, attachments, automation, and webhooks.

This documentation aims to provide all the information you need to work with our API.

<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer {YOUR_BEARER_TOKEN}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

Most application endpoints use Laravel Sanctum bearer tokens. Workspace automation endpoints require a token with the documented automation ability. Webhook endpoints authenticate with their webhook secret instead of bearer auth.

App Authentication

Token-based authentication APIs for native mobile/desktop applications

Register

Create a new user account and return an access token.

Example request:
curl --request POST \
    "http://localhost/api/v1/auth/app/register" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"John Doe\",
    \"email\": \"[email protected]\",
    \"password\": \"secretpassword\",
    \"preferred_language\": \"id\",
    \"password_confirmation\": \"secretpassword\",
    \"device_name\": \"iPhone 15 Pro\"
}"
const url = new URL(
    "http://localhost/api/v1/auth/app/register"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "John Doe",
    "email": "[email protected]",
    "password": "secretpassword",
    "preferred_language": "id",
    "password_confirmation": "secretpassword",
    "device_name": "iPhone 15 Pro"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "access_token": "1|abc123...",
    "token_type": "Bearer",
    "user": {
        "id": 1,
        "name": "John Doe",
        "email": "[email protected]"
    }
}
 

Example response (422, Validation error):


{
    "message": "The given data was invalid.",
    "errors": {
        "email": [
            "This email is already registered."
        ]
    }
}
 

Request      

POST api/v1/auth/app/register

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

The user's full name. Example: John Doe

email   string     

The user's email address. Must be unique. Example: [email protected]

password   string     

The password. Must be at least 8 characters. Example: secretpassword

preferred_language   string  optional    

Example: id

Must be one of:
  • en
  • zh-CN
  • ja
  • th
  • id
password_confirmation   string     

Password confirmation. Must match password. Example: secretpassword

device_name   string  optional    

The device name for the token. Example: iPhone 15 Pro

Login

Authenticate user with email and password, return an access token.

Example request:
curl --request POST \
    "http://localhost/api/v1/auth/app/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"[email protected]\",
    \"password\": \"secretpassword\",
    \"device_name\": \"iPhone 15 Pro\"
}"
const url = new URL(
    "http://localhost/api/v1/auth/app/login"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "[email protected]",
    "password": "secretpassword",
    "device_name": "iPhone 15 Pro"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "access_token": "1|abc123...",
    "token_type": "Bearer",
    "user": {
        "id": 1,
        "name": "John Doe",
        "email": "[email protected]"
    }
}
 

Example response (403, Account inactive):


{
    "message": "Account is inactive."
}
 

Example response (422, Invalid credentials):


{
    "message": "The given data was invalid.",
    "errors": {
        "email": [
            "The provided credentials are incorrect."
        ]
    }
}
 

Request      

POST api/v1/auth/app/login

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

The user's email address. Example: [email protected]

password   string     

The user's password. Example: secretpassword

device_name   string  optional    

The device name for the token. Example: iPhone 15 Pro

Request OTP

Send a One-Time Password to the user's email for passwordless authentication.

Example request:
curl --request POST \
    "http://localhost/api/v1/auth/app/otp" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"[email protected]\"
}"
const url = new URL(
    "http://localhost/api/v1/auth/app/otp"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "[email protected]"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "message": "OTP sent to your email."
}
 

Example response (422, Validation error):


{
    "message": "The given data was invalid.",
    "errors": {
        "email": [
            "The email field must be a valid email address."
        ]
    }
}
 

Request      

POST api/v1/auth/app/otp

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

The email address to send the OTP to. Example: [email protected]

Verify OTP

Verify the One-Time Password and return an access token. Creates a new account if the email is not registered.

Example request:
curl --request POST \
    "http://localhost/api/v1/auth/app/otp/verify" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"[email protected]\",
    \"token\": \"123456\",
    \"device_name\": \"iPhone 15 Pro\"
}"
const url = new URL(
    "http://localhost/api/v1/auth/app/otp/verify"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "[email protected]",
    "token": "123456",
    "device_name": "iPhone 15 Pro"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "access_token": "1|abc123...",
    "token_type": "Bearer",
    "user": {
        "id": 1,
        "name": "john",
        "email": "[email protected]"
    }
}
 

Example response (403, Account inactive):


{
    "message": "Account is inactive."
}
 

Example response (422, Invalid OTP):


{
    "message": "The given data was invalid.",
    "errors": {
        "token": [
            "Invalid or expired OTP."
        ]
    }
}
 

Request      

POST api/v1/auth/app/otp/verify

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

The email address. Example: [email protected]

token   string     

The 6-digit OTP code. Example: 123456

device_name   string  optional    

The device name for the token. Example: iPhone 15 Pro

Forgot Password

Send a password reset link to the user's email.

Example request:
curl --request POST \
    "http://localhost/api/v1/auth/app/forgot-password" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"[email protected]\"
}"
const url = new URL(
    "http://localhost/api/v1/auth/app/forgot-password"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "[email protected]"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "message": "Password reset link sent to your email."
}
 

Example response (422, Email not found):


{
    "message": "The given data was invalid.",
    "errors": {
        "email": [
            "We could not find an account with that email."
        ]
    }
}
 

Request      

POST api/v1/auth/app/forgot-password

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

The registered email address. Example: [email protected]

Reset Password

Reset the user's password using the reset token.

Example request:
curl --request POST \
    "http://localhost/api/v1/auth/app/reset-password" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"token\": \"abc123def456...\",
    \"email\": \"[email protected]\",
    \"password\": \"newsecretpassword\",
    \"password_confirmation\": \"newsecretpassword\"
}"
const url = new URL(
    "http://localhost/api/v1/auth/app/reset-password"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "token": "abc123def456...",
    "email": "[email protected]",
    "password": "newsecretpassword",
    "password_confirmation": "newsecretpassword"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "message": "Password has been reset successfully."
}
 

Example response (422, Invalid token):


{
    "message": "The given data was invalid.",
    "errors": {
        "email": [
            "This password reset token is invalid."
        ]
    }
}
 

Request      

POST api/v1/auth/app/reset-password

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

token   string     

The password reset token from email. Example: abc123def456...

email   string     

The user's email address. Example: [email protected]

password   string     

The new password. Must be at least 8 characters. Example: newsecretpassword

password_confirmation   string     

Password confirmation. Must match password. Example: newsecretpassword

Logout

requires authentication

Revoke the current access token.

Example request:
curl --request POST \
    "http://localhost/api/v1/auth/app/logout" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/auth/app/logout"
);

const headers = {
    "Authorization": "Bearer {YOUR_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (200):


{
    "message": "Logged out successfully."
}
 

Example response (401, Unauthenticated):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/v1/auth/app/logout

Headers

Authorization        

Example: Bearer {YOUR_BEARER_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Change Password

requires authentication

Change the authenticated user's password.

Example request:
curl --request POST \
    "http://localhost/api/v1/auth/app/change-password" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"current_password\": \"oldsecretpassword\",
    \"password\": \"newsecretpassword\",
    \"password_confirmation\": \"newsecretpassword\"
}"
const url = new URL(
    "http://localhost/api/v1/auth/app/change-password"
);

const headers = {
    "Authorization": "Bearer {YOUR_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "current_password": "oldsecretpassword",
    "password": "newsecretpassword",
    "password_confirmation": "newsecretpassword"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "message": "Password changed successfully."
}
 

Example response (401, Unauthenticated):


{
    "message": "Unauthenticated."
}
 

Example response (422, Wrong current password):


{
    "message": "The given data was invalid.",
    "errors": {
        "current_password": [
            "The current password is incorrect."
        ]
    }
}
 

Request      

POST api/v1/auth/app/change-password

Headers

Authorization        

Example: Bearer {YOUR_BEARER_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

current_password   string     

The current password. Example: oldsecretpassword

password   string     

The new password. Must be at least 8 characters. Example: newsecretpassword

password_confirmation   string     

New password confirmation. Must match password. Example: newsecretpassword

App Authentication - Social

Token-based social authentication APIs for native mobile/desktop applications

Get OAuth Redirect URL

Get the OAuth redirect URL for the specified provider. The client should open this URL in a browser to start the OAuth flow.

Example request:
curl --request POST \
    "http://localhost/api/v1/auth/app/social/google/redirect" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/auth/app/social/google/redirect"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (200):


{
    "redirect_url": "https://accounts.google.com/o/oauth2/v2/auth?..."
}
 

Example response (422, Invalid provider):


{
    "message": "The given data was invalid.",
    "errors": {
        "provider": [
            "The selected provider is invalid."
        ]
    }
}
 

Request      

POST api/v1/auth/app/social/{provider}/redirect

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

provider   string     

The OAuth provider name. Example: google

OAuth Callback

Exchange the OAuth code for an access token and authenticate the user. Returns a Bearer token for subsequent API requests.

Example request:
curl --request POST \
    "http://localhost/api/v1/auth/app/social/google/callback" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"code\": \"4\\/0AfJohXn...\",
    \"state\": \"xyz123\",
    \"device_name\": \"iPhone 15 Pro\"
}"
const url = new URL(
    "http://localhost/api/v1/auth/app/social/google/callback"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "code": "4\/0AfJohXn...",
    "state": "xyz123",
    "device_name": "iPhone 15 Pro"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "access_token": "1|abc123...",
    "token_type": "Bearer",
    "user": {
        "id": 1,
        "name": "John Doe",
        "email": "[email protected]"
    }
}
 

Example response (403, Account inactive):


{
    "message": "Account is inactive."
}
 

Example response (422, Invalid provider):


{
    "message": "The given data was invalid.",
    "errors": {
        "provider": [
            "The selected provider is invalid."
        ]
    }
}
 

Request      

POST api/v1/auth/app/social/{provider}/callback

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

provider   string     

The OAuth provider name. Example: google

Body Parameters

code   string     

The OAuth authorization code from the provider. Example: 4/0AfJohXn...

state   string  optional    

The state parameter for CSRF protection. Example: xyz123

device_name   string  optional    

Device name for the token. Example: iPhone 15 Pro

List Linked Accounts

requires authentication

Get all social accounts linked to the authenticated user.

Example request:
curl --request GET \
    --get "http://localhost/api/v1/auth/app/social/accounts" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/auth/app/social/accounts"
);

const headers = {
    "Authorization": "Bearer {YOUR_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "accounts": [
        {
            "id": 1,
            "provider": "google",
            "provider_email": "[email protected]",
            "name": "John Doe",
            "avatar": "https://...",
            "created_at": "2024-01-01T00:00:00.000000Z"
        }
    ]
}
 

Example response (401, Unauthenticated):


{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/auth/app/social/accounts

Headers

Authorization        

Example: Bearer {YOUR_BEARER_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

requires authentication

Link a new social account to the authenticated user. Returns the OAuth redirect URL for the linking flow.

Example request:
curl --request POST \
    "http://localhost/api/v1/auth/app/social/google/link" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/auth/app/social/google/link"
);

const headers = {
    "Authorization": "Bearer {YOUR_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (200):


{
    "redirect_url": "https://accounts.google.com/o/oauth2/v2/auth?..."
}
 

Example response (401, Unauthenticated):


{
    "message": "Unauthenticated."
}
 

Example response (422, Invalid provider):


{
    "message": "The given data was invalid.",
    "errors": {
        "provider": [
            "The selected provider is invalid."
        ]
    }
}
 

requires authentication

Complete the social account linking after OAuth callback.

Example request:
curl --request POST \
    "http://localhost/api/v1/auth/app/social/google/link/callback" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"code\": \"4\\/0AfJohXn...\",
    \"state\": \"architecto\",
    \"device_name\": \"n\"
}"
const url = new URL(
    "http://localhost/api/v1/auth/app/social/google/link/callback"
);

const headers = {
    "Authorization": "Bearer {YOUR_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "code": "4\/0AfJohXn...",
    "state": "architecto",
    "device_name": "n"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "account": {
        "id": 1,
        "provider": "google",
        "provider_email": "[email protected]",
        "name": "John Doe"
    },
    "message": "Social account linked successfully."
}
 

Example response (401, Unauthenticated):


{
    "message": "Unauthenticated."
}
 

Example response (422, Already linked):


{
    "message": "This social account is already linked to your account."
}
 

Example response (422, Linked to another user):


{
    "message": "This social account is already linked to another user."
}
 

requires authentication

Remove a linked social account from the authenticated user.

Example request:
curl --request DELETE \
    "http://localhost/api/v1/auth/app/social/google/unlink" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/auth/app/social/google/unlink"
);

const headers = {
    "Authorization": "Bearer {YOUR_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (200):


{
    "message": "Social account unlinked successfully."
}
 

Example response (401, Unauthenticated):


{
    "message": "Unauthenticated."
}
 

Example response (404, Not found):


{
    "message": "Social account not found."
}
 

Example response (422, Last auth method):


{
    "message": "Cannot unlink the last authentication method. Please set a password first."
}
 

Devices

Register a push device.

requires authentication

Registers (or refreshes) the calling user's device for push notifications. The push token is the identity: re-sending an existing token — even from a different account — transfers ownership so a recycled device never receives the previous user's notifications. Idempotent; safe to call on every app launch.

Example request:
curl --request POST \
    "http://localhost/api/v1/devices" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"platform\": \"ios\",
    \"provider\": \"fcm\",
    \"push_token\": \"fGc1...token\",
    \"device_id\": \"7B3F2A10-...\",
    \"device_name\": \"John\'s iPhone\",
    \"app_version\": \"1.4.2\"
}"
const url = new URL(
    "http://localhost/api/v1/devices"
);

const headers = {
    "Authorization": "Bearer {YOUR_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "platform": "ios",
    "provider": "fcm",
    "push_token": "fGc1...token",
    "device_id": "7B3F2A10-...",
    "device_name": "John's iPhone",
    "app_version": "1.4.2"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201):


{
    "data": {
        "id": "01HX...",
        "platform": "ios",
        "provider": "fcm",
        "device_name": "John's iPhone",
        "last_used_at": "2026-05-17T10:00:00+00:00"
    }
}
 

Request      

POST api/v1/devices

Headers

Authorization        

Example: Bearer {YOUR_BEARER_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

platform   string     

OS family. One of ios, android, web. Example: ios

provider   string     

Push transport. One of fcm, expo, apns. Example: fcm

push_token   string     

The provider-issued push token. Example: fGc1...token

device_id   string  optional    

Optional stable client device identifier. Example: 7B3F2A10-...

device_name   string  optional    

Optional human-readable device label. Example: John's iPhone

app_version   string  optional    

Optional client app version. Example: 1.4.2

Unregister a push device.

requires authentication

Removes one of the caller's registered devices. Only the owner may delete a device.

Example request:
curl --request DELETE \
    "http://localhost/api/v1/devices/architecto" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/devices/architecto"
);

const headers = {
    "Authorization": "Bearer {YOUR_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (204):

Empty response
 

Request      

DELETE api/v1/devices/{id}

Headers

Authorization        

Example: Bearer {YOUR_BEARER_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the device. Example: architecto

device   string     

The device id. Example: 01HX...

Email Verification

Verify and resend email verification links.

Verify Email

Confirms ownership of the email address via a temporary signed URL. On success, redirects to the configured frontend URL when set, otherwise returns a JSON success response.

Example request:
curl --request GET \
    --get "http://localhost/api/v1/auth/email/verify/16/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/auth/email/verify/16/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "message": "Email verified successfully."
}
 

Example response (404, Invalid link):


{
    "message": "Verification link is invalid."
}
 

Request      

GET api/v1/auth/email/verify/{id}/{hash}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The user id encoded into the link. Example: 16

hash   string     

The sha1(email) hash encoded into the link. Example: architecto

Resend Verification Email

requires authentication

Re-sends the verification email to the authenticated user. Returns 200 even when the account is already verified (to avoid leaking state).

Example request:
curl --request POST \
    "http://localhost/api/v1/auth/email/verification-notification" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/auth/email/verification-notification"
);

const headers = {
    "Authorization": "Bearer {YOUR_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (200):


{
    "message": "Verification email sent."
}
 

Request      

POST api/v1/auth/email/verification-notification

Headers

Authorization        

Example: Bearer {YOUR_BEARER_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Endpoints

PATCH api/v1/me

Example request:
curl --request PATCH \
    "http://localhost/api/v1/me" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"preferred_language\": \"zh-CN\",
    \"avatar_url\": \"http:\\/\\/bailey.com\\/\"
}"
const url = new URL(
    "http://localhost/api/v1/me"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b",
    "preferred_language": "zh-CN",
    "avatar_url": "http:\/\/bailey.com\/"
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/me

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string  optional    

Must not be greater than 255 characters. Example: b

preferred_language   string  optional    

Example: zh-CN

Must be one of:
  • en
  • zh-CN
  • ja
  • th
  • id
avatar_url   string  optional    

Must be a valid URL. Must not be greater than 2048 characters. Example: http://bailey.com/

Public preview of an invite so the join screen can show what the user is about to join — even before they sign in.

Example request:
curl --request GET \
    --get "http://localhost/api/v1/invites/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/invites/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 30
x-ratelimit-remaining: 29
access-control-allow-origin: *
 

{
    "message": "This invite link is not valid."
}
 

Request      

GET api/v1/invites/{token}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

token   string     

Example: architecto

Redeem an invite: add the authenticated user to the workspace.

Example request:
curl --request POST \
    "http://localhost/api/v1/invites/architecto/accept" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/invites/architecto/accept"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/invites/{token}/accept

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

token   string     

Example: architecto

GET api/v1/workspaces

Example request:
curl --request GET \
    --get "http://localhost/api/v1/workspaces" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/workspaces"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/workspaces

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/workspaces

Example request:
curl --request POST \
    "http://localhost/api/v1/workspaces" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"slug\": \"n\",
    \"password\": \"|{+-0pBNvYgx\"
}"
const url = new URL(
    "http://localhost/api/v1/workspaces"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b",
    "slug": "n",
    "password": "|{+-0pBNvYgx"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/workspaces

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Must not be greater than 120 characters. Example: b

slug   string  optional    

Must contain only letters, numbers, dashes and underscores. Must not be greater than 80 characters. Example: n

visibility   string  optional    
password   string  optional    

Must be at least 8 characters. Must not be greater than 120 characters. Example: |{+-0pBNvYgx

GET api/v1/workspaces/{id}

Example request:
curl --request GET \
    --get "http://localhost/api/v1/workspaces/01ktvxyqmbcm7abv91483q1hfd" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/workspaces/01ktvxyqmbcm7abv91483q1hfd"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/workspaces/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the workspace. Example: 01ktvxyqmbcm7abv91483q1hfd

GET api/v1/direct-conversations

Example request:
curl --request GET \
    --get "http://localhost/api/v1/direct-conversations" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/direct-conversations"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/direct-conversations

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/direct-conversations

Example request:
curl --request POST \
    "http://localhost/api/v1/direct-conversations" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"participant_user_id\": \"architecto\"
}"
const url = new URL(
    "http://localhost/api/v1/direct-conversations"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "participant_user_id": "architecto"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/direct-conversations

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

participant_user_id   string     

Example: architecto

POST api/v1/direct-recipients/resolve

Example request:
curl --request POST \
    "http://localhost/api/v1/direct-recipients/resolve" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"[email protected]\"
}"
const url = new URL(
    "http://localhost/api/v1/direct-recipients/resolve"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "[email protected]"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/direct-recipients/resolve

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

Must be a valid email address. Must not be greater than 255 characters. Example: [email protected]

GET api/v1/direct-conversations/{conversation_id}/messages

Example request:
curl --request GET \
    --get "http://localhost/api/v1/direct-conversations/01ktvxyqq8nx0zyqm8rtrcp3xa/messages" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/direct-conversations/01ktvxyqq8nx0zyqm8rtrcp3xa/messages"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/direct-conversations/{conversation_id}/messages

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

conversation_id   string     

The ID of the conversation. Example: 01ktvxyqq8nx0zyqm8rtrcp3xa

POST api/v1/direct-conversations/{conversation_id}/messages

Example request:
curl --request POST \
    "http://localhost/api/v1/direct-conversations/01ktvxyqq8nx0zyqm8rtrcp3xa/messages" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"content\": \"architecto\",
    \"attachment_ids\": [
        \"architecto\"
    ]
}"
const url = new URL(
    "http://localhost/api/v1/direct-conversations/01ktvxyqq8nx0zyqm8rtrcp3xa/messages"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "content": "architecto",
    "attachment_ids": [
        "architecto"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/direct-conversations/{conversation_id}/messages

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

conversation_id   string     

The ID of the conversation. Example: 01ktvxyqq8nx0zyqm8rtrcp3xa

Body Parameters

content   string  optional    

This field is required when attachment_ids is not present. Example: architecto

attachment_ids   string[]  optional    

GET api/v1/message-attachments/{attachment_id}/download

Example request:
curl --request GET \
    --get "http://localhost/api/v1/message-attachments/architecto/download" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/message-attachments/architecto/download"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/message-attachments/{attachment_id}/download

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

attachment_id   string     

The ID of the attachment. Example: architecto

GET api/v1/direct-message-attachments/{attachment_id}/download

Example request:
curl --request GET \
    --get "http://localhost/api/v1/direct-message-attachments/architecto/download" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/direct-message-attachments/architecto/download"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/direct-message-attachments/{attachment_id}/download

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

attachment_id   string     

The ID of the attachment. Example: architecto

GET api/v1/workspaces/{workspace_id}/channels

Example request:
curl --request GET \
    --get "http://localhost/api/v1/workspaces/01ktvxyqmbcm7abv91483q1hfd/channels" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/workspaces/01ktvxyqmbcm7abv91483q1hfd/channels"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/workspaces/{workspace_id}/channels

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

workspace_id   string     

The ID of the workspace. Example: 01ktvxyqmbcm7abv91483q1hfd

POST api/v1/workspaces/{workspace_id}/channels

Example request:
curl --request POST \
    "http://localhost/api/v1/workspaces/01ktvxyqmbcm7abv91483q1hfd/channels" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"slug\": \"n\",
    \"password\": \"|{+-0pBNvYgx\"
}"
const url = new URL(
    "http://localhost/api/v1/workspaces/01ktvxyqmbcm7abv91483q1hfd/channels"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b",
    "slug": "n",
    "password": "|{+-0pBNvYgx"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/workspaces/{workspace_id}/channels

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

workspace_id   string     

The ID of the workspace. Example: 01ktvxyqmbcm7abv91483q1hfd

Body Parameters

name   string     

Must not be greater than 120 characters. Example: b

slug   string  optional    

Must contain only letters, numbers, dashes and underscores. Must not be greater than 80 characters. Example: n

visibility   string  optional    
password   string  optional    

Must be at least 8 characters. Must not be greater than 120 characters. Example: |{+-0pBNvYgx

PUT api/v1/workspaces/{workspace_id}/channels/{id}

Example request:
curl --request PUT \
    "http://localhost/api/v1/workspaces/01ktvxyqmbcm7abv91483q1hfd/channels/01ktvxyqn17t8d0w6jx8t2k6e8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"slug\": \"n\",
    \"password\": \"|{+-0pBNvYgx\"
}"
const url = new URL(
    "http://localhost/api/v1/workspaces/01ktvxyqmbcm7abv91483q1hfd/channels/01ktvxyqn17t8d0w6jx8t2k6e8"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b",
    "slug": "n",
    "password": "|{+-0pBNvYgx"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/workspaces/{workspace_id}/channels/{id}

PATCH api/v1/workspaces/{workspace_id}/channels/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

workspace_id   string     

The ID of the workspace. Example: 01ktvxyqmbcm7abv91483q1hfd

id   string     

The ID of the channel. Example: 01ktvxyqn17t8d0w6jx8t2k6e8

Body Parameters

name   string  optional    

Must not be greater than 120 characters. Example: b

slug   string  optional    

Must contain only letters, numbers, dashes and underscores. Must not be greater than 80 characters. Example: n

visibility   string  optional    
password   string  optional    

Must be at least 8 characters. Must not be greater than 120 characters. Example: |{+-0pBNvYgx

DELETE api/v1/workspaces/{workspace_id}/channels/{id}

Example request:
curl --request DELETE \
    "http://localhost/api/v1/workspaces/01ktvxyqmbcm7abv91483q1hfd/channels/01ktvxyqn17t8d0w6jx8t2k6e8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/workspaces/01ktvxyqmbcm7abv91483q1hfd/channels/01ktvxyqn17t8d0w6jx8t2k6e8"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/workspaces/{workspace_id}/channels/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

workspace_id   string     

The ID of the workspace. Example: 01ktvxyqmbcm7abv91483q1hfd

id   string     

The ID of the channel. Example: 01ktvxyqn17t8d0w6jx8t2k6e8

GET api/v1/workspaces/{workspace_id}/members

Example request:
curl --request GET \
    --get "http://localhost/api/v1/workspaces/01ktvxyqmbcm7abv91483q1hfd/members" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/workspaces/01ktvxyqmbcm7abv91483q1hfd/members"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/workspaces/{workspace_id}/members

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

workspace_id   string     

The ID of the workspace. Example: 01ktvxyqmbcm7abv91483q1hfd

PUT api/v1/workspaces/{workspace_id}/members/{id}

Example request:
curl --request PUT \
    "http://localhost/api/v1/workspaces/01ktvxyqmbcm7abv91483q1hfd/members/01ktvxyqme70jcjz30my99v5hb" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"role\": \"architecto\",
    \"preferred_language\": \"architecto\"
}"
const url = new URL(
    "http://localhost/api/v1/workspaces/01ktvxyqmbcm7abv91483q1hfd/members/01ktvxyqme70jcjz30my99v5hb"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "role": "architecto",
    "preferred_language": "architecto"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/workspaces/{workspace_id}/members/{id}

PATCH api/v1/workspaces/{workspace_id}/members/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

workspace_id   string     

The ID of the workspace. Example: 01ktvxyqmbcm7abv91483q1hfd

id   string     

The ID of the member. Example: 01ktvxyqme70jcjz30my99v5hb

Body Parameters

role   string     

Example: architecto

preferred_language   string  optional    

Example: architecto

DELETE api/v1/workspaces/{workspace_id}/members/{id}

Example request:
curl --request DELETE \
    "http://localhost/api/v1/workspaces/01ktvxyqmbcm7abv91483q1hfd/members/01ktvxyqme70jcjz30my99v5hb" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/workspaces/01ktvxyqmbcm7abv91483q1hfd/members/01ktvxyqme70jcjz30my99v5hb"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/workspaces/{workspace_id}/members/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

workspace_id   string     

The ID of the workspace. Example: 01ktvxyqmbcm7abv91483q1hfd

id   string     

The ID of the member. Example: 01ktvxyqme70jcjz30my99v5hb

GET api/v1/workspaces/{workspace_id}/invites

Example request:
curl --request GET \
    --get "http://localhost/api/v1/workspaces/01ktvxyqmbcm7abv91483q1hfd/invites" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/workspaces/01ktvxyqmbcm7abv91483q1hfd/invites"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/workspaces/{workspace_id}/invites

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

workspace_id   string     

The ID of the workspace. Example: 01ktvxyqmbcm7abv91483q1hfd

POST api/v1/workspaces/{workspace_id}/invites

Example request:
curl --request POST \
    "http://localhost/api/v1/workspaces/01ktvxyqmbcm7abv91483q1hfd/invites" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"expires_in_days\": 1
}"
const url = new URL(
    "http://localhost/api/v1/workspaces/01ktvxyqmbcm7abv91483q1hfd/invites"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "expires_in_days": 1
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/workspaces/{workspace_id}/invites

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

workspace_id   string     

The ID of the workspace. Example: 01ktvxyqmbcm7abv91483q1hfd

Body Parameters

expires_in_days   integer  optional    

Must be at least 1. Must not be greater than 365. Example: 1

DELETE api/v1/workspaces/{workspace_id}/invites/{id}

Example request:
curl --request DELETE \
    "http://localhost/api/v1/workspaces/01ktvxyqmbcm7abv91483q1hfd/invites/01ktwzbyvaea33cwb6grhj3f3e" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/workspaces/01ktvxyqmbcm7abv91483q1hfd/invites/01ktwzbyvaea33cwb6grhj3f3e"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/workspaces/{workspace_id}/invites/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

workspace_id   string     

The ID of the workspace. Example: 01ktvxyqmbcm7abv91483q1hfd

id   string     

The ID of the invite. Example: 01ktwzbyvaea33cwb6grhj3f3e

GET api/v1/workspaces/{workspace_id}/webhooks

Example request:
curl --request GET \
    --get "http://localhost/api/v1/workspaces/01ktvxyqmbcm7abv91483q1hfd/webhooks" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/workspaces/01ktvxyqmbcm7abv91483q1hfd/webhooks"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/workspaces/{workspace_id}/webhooks

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

workspace_id   string     

The ID of the workspace. Example: 01ktvxyqmbcm7abv91483q1hfd

POST api/v1/workspaces/{workspace_id}/webhooks

Example request:
curl --request POST \
    "http://localhost/api/v1/workspaces/01ktvxyqmbcm7abv91483q1hfd/webhooks" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"default_channel_id\": \"architecto\"
}"
const url = new URL(
    "http://localhost/api/v1/workspaces/01ktvxyqmbcm7abv91483q1hfd/webhooks"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b",
    "default_channel_id": "architecto"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/workspaces/{workspace_id}/webhooks

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

workspace_id   string     

The ID of the workspace. Example: 01ktvxyqmbcm7abv91483q1hfd

Body Parameters

name   string     

Must not be greater than 120 characters. Example: b

default_channel_id   string  optional    

Example: architecto

PUT api/v1/workspaces/{workspace_id}/webhooks/{id}

Example request:
curl --request PUT \
    "http://localhost/api/v1/workspaces/01ktvxyqmbcm7abv91483q1hfd/webhooks/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"default_channel_id\": \"architecto\",
    \"is_active\": true,
    \"regenerate_secret\": false
}"
const url = new URL(
    "http://localhost/api/v1/workspaces/01ktvxyqmbcm7abv91483q1hfd/webhooks/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b",
    "default_channel_id": "architecto",
    "is_active": true,
    "regenerate_secret": false
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/workspaces/{workspace_id}/webhooks/{id}

PATCH api/v1/workspaces/{workspace_id}/webhooks/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

workspace_id   string     

The ID of the workspace. Example: 01ktvxyqmbcm7abv91483q1hfd

id   string     

The ID of the webhook. Example: architecto

Body Parameters

name   string  optional    

Must not be greater than 120 characters. Example: b

default_channel_id   string  optional    

Example: architecto

is_active   boolean  optional    

Example: true

regenerate_secret   boolean  optional    

Example: false

DELETE api/v1/workspaces/{workspace_id}/webhooks/{id}

Example request:
curl --request DELETE \
    "http://localhost/api/v1/workspaces/01ktvxyqmbcm7abv91483q1hfd/webhooks/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/workspaces/01ktvxyqmbcm7abv91483q1hfd/webhooks/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/workspaces/{workspace_id}/webhooks/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

workspace_id   string     

The ID of the workspace. Example: 01ktvxyqmbcm7abv91483q1hfd

id   string     

The ID of the webhook. Example: architecto

GET api/v1/workspaces/{workspace_id}/channels/{channel_id}/messages

Example request:
curl --request GET \
    --get "http://localhost/api/v1/workspaces/01ktvxyqmbcm7abv91483q1hfd/channels/01ktvxyqn17t8d0w6jx8t2k6e8/messages" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/workspaces/01ktvxyqmbcm7abv91483q1hfd/channels/01ktvxyqn17t8d0w6jx8t2k6e8/messages"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/workspaces/{workspace_id}/channels/{channel_id}/messages

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

workspace_id   string     

The ID of the workspace. Example: 01ktvxyqmbcm7abv91483q1hfd

channel_id   string     

The ID of the channel. Example: 01ktvxyqn17t8d0w6jx8t2k6e8

POST api/v1/workspaces/{workspace_id}/channels/{channel_id}/messages

Example request:
curl --request POST \
    "http://localhost/api/v1/workspaces/01ktvxyqmbcm7abv91483q1hfd/channels/01ktvxyqn17t8d0w6jx8t2k6e8/messages" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"content\": \"architecto\",
    \"attachment_ids\": [
        \"architecto\"
    ],
    \"skip_translation\": false
}"
const url = new URL(
    "http://localhost/api/v1/workspaces/01ktvxyqmbcm7abv91483q1hfd/channels/01ktvxyqn17t8d0w6jx8t2k6e8/messages"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "content": "architecto",
    "attachment_ids": [
        "architecto"
    ],
    "skip_translation": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/workspaces/{workspace_id}/channels/{channel_id}/messages

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

workspace_id   string     

The ID of the workspace. Example: 01ktvxyqmbcm7abv91483q1hfd

channel_id   string     

The ID of the channel. Example: 01ktvxyqn17t8d0w6jx8t2k6e8

Body Parameters

content   string  optional    

This field is required when attachment_ids is not present. Example: architecto

attachment_ids   string[]  optional    
parent_message_id   string  optional    
type   string  optional    
skip_translation   boolean  optional    

Example: false

POST api/v1/automation/workspaces/{workspace_id}/channels/{channel_id}/messages

Example request:
curl --request POST \
    "http://localhost/api/v1/automation/workspaces/01ktvxyqmbcm7abv91483q1hfd/channels/01ktvxyqn17t8d0w6jx8t2k6e8/messages" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"content\": \"architecto\",
    \"attachment_ids\": [
        \"architecto\"
    ],
    \"skip_translation\": false
}"
const url = new URL(
    "http://localhost/api/v1/automation/workspaces/01ktvxyqmbcm7abv91483q1hfd/channels/01ktvxyqn17t8d0w6jx8t2k6e8/messages"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "content": "architecto",
    "attachment_ids": [
        "architecto"
    ],
    "skip_translation": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/automation/workspaces/{workspace_id}/channels/{channel_id}/messages

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

workspace_id   string     

The ID of the workspace. Example: 01ktvxyqmbcm7abv91483q1hfd

channel_id   string     

The ID of the channel. Example: 01ktvxyqn17t8d0w6jx8t2k6e8

Body Parameters

content   string  optional    

This field is required when attachment_ids is not present. Example: architecto

attachment_ids   string[]  optional    
parent_message_id   string  optional    
skip_translation   boolean  optional    

Example: false

POST api/v1/webhooks/{webhook_id}/messages

Example request:
curl --request POST \
    "http://localhost/api/v1/webhooks/architecto/messages" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"content\": \"architecto\",
    \"channel_id\": \"architecto\",
    \"skip_translation\": false
}"
const url = new URL(
    "http://localhost/api/v1/webhooks/architecto/messages"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "content": "architecto",
    "channel_id": "architecto",
    "skip_translation": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/webhooks/{webhook_id}/messages

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

webhook_id   string     

The ID of the webhook. Example: architecto

Body Parameters

content   string     

Example: architecto

channel_id   string  optional    

Example: architecto

skip_translation   boolean  optional    

Example: false

External Temporary Rooms

Create a Temporary Room

requires authentication

Creates a developer-owned anonymous Temporary Room. Requires a Sanctum API token with temporary-rooms:create.

Example request:
curl --request POST \
    "http://localhost/api/v1/external/rooms" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Customer Support Room\",
    \"external_reference\": \"customer-123\",
    \"ttl_hours\": 12
}"
const url = new URL(
    "http://localhost/api/v1/external/rooms"
);

const headers = {
    "Authorization": "Bearer {YOUR_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Customer Support Room",
    "external_reference": "customer-123",
    "ttl_hours": 12
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201):


{
    "data": {
        "room_id": "01HX...",
        "workspace_id": "01HX...",
        "channel_id": "01HX...",
        "name": "Customer Support Room",
        "kind": "temporary_room",
        "status": "active",
        "external_reference": "customer-123",
        "expires_at": "2026-06-12T12:00:00+00:00",
        "max_expires_at": "2026-06-13T00:00:00+00:00",
        "extension_count": 0,
        "join": {
            "method": "POST",
            "endpoint": "https://api.example.test/api/v1/external/rooms/01HX.../guests"
        }
    }
}
 

Example response (403, Temporary Room quota exceeded):


{
    "message": "Temporary Room active room limit exceeded.",
    "errors": {
        "code": [
            "temporary_room_quota_exceeded"
        ]
    }
}
 

Example response (422, TTL exceeds limit):


{
    "message": "The given data was invalid.",
    "errors": {
        "ttl_hours": [
            "ttl_hours_exceeds_limit"
        ]
    }
}
 

Request      

POST api/v1/external/rooms

Headers

Authorization        

Example: Bearer {YOUR_BEARER_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Room display name. Example: Customer Support Room

external_reference   string  optional    

Optional developer-side reference id. Example: customer-123

ttl_hours   integer  optional    

Optional room lifetime in hours. Defaults to 24 and is capped by owner limits. Example: 12

List developer-owned Temporary Rooms

requires authentication

Requires a Sanctum API token with temporary-rooms:read.

Example request:
curl --request GET \
    --get "http://localhost/api/v1/external/rooms" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/external/rooms"
);

const headers = {
    "Authorization": "Bearer {YOUR_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "room_id": "01HX...",
            "kind": "temporary_room",
            "status": "active"
        }
    ]
}
 

Request      

GET api/v1/external/rooms

Headers

Authorization        

Example: Bearer {YOUR_BEARER_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Show Temporary Room usage summary

requires authentication

Requires a Sanctum API token with temporary-rooms:read.

Example request:
curl --request GET \
    --get "http://localhost/api/v1/external/rooms/usage" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/external/rooms/usage"
);

const headers = {
    "Authorization": "Bearer {YOUR_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "limits": {
            "active_limit": 3,
            "monthly_creation_limit": 10
        },
        "usage": {
            "active_room_count": 1,
            "monthly_creation_count": 2
        },
        "abuse_signals": {
            "active_limit_reached": false,
            "monthly_creation_limit_reached": false
        }
    }
}
 

Request      

GET api/v1/external/rooms/usage

Headers

Authorization        

Example: Bearer {YOUR_BEARER_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Extend a Temporary Room

requires authentication

Requires a Sanctum API token with temporary-rooms:extend and paid/developer Temporary Room limits.

Example request:
curl --request POST \
    "http://localhost/api/v1/external/rooms/01ktvxyqmbcm7abv91483q1hfd/extend" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"extension_hours\": 24
}"
const url = new URL(
    "http://localhost/api/v1/external/rooms/01ktvxyqmbcm7abv91483q1hfd/extend"
);

const headers = {
    "Authorization": "Bearer {YOUR_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "extension_hours": 24
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "room_id": "01HX...",
        "expires_at": "2026-06-13T12:00:00+00:00",
        "max_expires_at": "2026-07-12T12:00:00+00:00",
        "extension_count": 1
    }
}
 

Example response (403, Extension not allowed):


{
    "message": "Temporary Room extension is not allowed.",
    "errors": {
        "code": [
            "temporary_room_extension_not_allowed"
        ]
    }
}
 

Example response (422, Extension exceeds max):


{
    "message": "The given data was invalid.",
    "errors": {
        "extension_hours": [
            "extension_hours_exceeds_limit"
        ]
    }
}
 

Request      

POST api/v1/external/rooms/{room_id}/extend

Headers

Authorization        

Example: Bearer {YOUR_BEARER_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

room_id   string     

The ID of the room. Example: 01ktvxyqmbcm7abv91483q1hfd

Body Parameters

extension_hours   integer  optional    

Optional extension amount in hours. Defaults to the owner single-extension max. Example: 24

Join a Temporary Room as a guest

Creates a restricted guest user and one guest session token scoped to this Temporary Room.

Example request:
curl --request POST \
    "http://localhost/api/v1/external/rooms/01ktvxyqmbcm7abv91483q1hfd/guests" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"nickname\": \"Mei\",
    \"preferred_language\": \"zh-CN\"
}"
const url = new URL(
    "http://localhost/api/v1/external/rooms/01ktvxyqmbcm7abv91483q1hfd/guests"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "nickname": "Mei",
    "preferred_language": "zh-CN"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201):


{
    "data": {
        "guest": {
            "id": "01HX...",
            "nickname": "Mei",
            "preferred_language": "zh-CN"
        },
        "session": {
            "token": "grst_...",
            "token_type": "guest",
            "header": "X-Rosetta-Guest-Token",
            "expires_at": "2026-06-12T12:00:00+00:00"
        },
        "room": {
            "room_id": "01HX...",
            "workspace_id": "01HX...",
            "channel_id": "01HX...",
            "name": "Customer Support Room",
            "status": "active",
            "expires_at": "2026-06-12T12:00:00+00:00"
        }
    }
}
 

Example response (410, Expired room):


{
    "message": "Temporary Room is not available.",
    "errors": {
        "code": [
            "temporary_room_expired"
        ]
    }
}
 

Request      

POST api/v1/external/rooms/{room_id}/guests

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

room_id   string     

The ID of the room. Example: 01ktvxyqmbcm7abv91483q1hfd

Body Parameters

nickname   string     

Guest display nickname. Example: Mei

preferred_language   string     

Guest preferred language. Example: zh-CN

List guest-visible room messages

Requires X-Rosetta-Guest-Token.

Example request:
curl --request GET \
    --get "http://localhost/api/v1/external/rooms/01ktvxyqmbcm7abv91483q1hfd/messages" \
    --header "X-Rosetta-Guest-Token: string required Guest session token." \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/external/rooms/01ktvxyqmbcm7abv91483q1hfd/messages"
);

const headers = {
    "X-Rosetta-Guest-Token": "string required Guest session token.",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "01HX...",
            "display_content": "Hello",
            "display_source": "original"
        }
    ]
}
 

Request      

GET api/v1/external/rooms/{room_id}/messages

Headers

X-Rosetta-Guest-Token        

Example: string required Guest session token.

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

room_id   string     

The ID of the room. Example: 01ktvxyqmbcm7abv91483q1hfd

Send a guest room message

Requires X-Rosetta-Guest-Token.

Example request:
curl --request POST \
    "http://localhost/api/v1/external/rooms/01ktvxyqmbcm7abv91483q1hfd/messages" \
    --header "X-Rosetta-Guest-Token: string required Guest session token." \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"content\": \"Hello team\",
    \"attachment_ids\": [
        \"architecto\"
    ],
    \"parent_message_id\": \"architecto\",
    \"skip_translation\": false
}"
const url = new URL(
    "http://localhost/api/v1/external/rooms/01ktvxyqmbcm7abv91483q1hfd/messages"
);

const headers = {
    "X-Rosetta-Guest-Token": "string required Guest session token.",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "content": "Hello team",
    "attachment_ids": [
        "architecto"
    ],
    "parent_message_id": "architecto",
    "skip_translation": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201):


{
    "data": {
        "id": "01HX...",
        "original_content": "Hello team",
        "translation_status": "pending"
    }
}
 

Request      

POST api/v1/external/rooms/{room_id}/messages

Headers

X-Rosetta-Guest-Token        

Example: string required Guest session token.

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

room_id   string     

The ID of the room. Example: 01ktvxyqmbcm7abv91483q1hfd

Body Parameters

content   string  optional    

Message text. Required unless attachment_ids is present. Example: Hello team

attachment_ids   string[]  optional    

Optional staged file ids.

parent_message_id   string  optional    

Optional parent message id for a thread reply. Example: architecto

skip_translation   boolean  optional    

Optional. Defaults to false. Example: false

Files

Upload a file.

requires authentication

Returns the created file record with a TTL. Persist the returned id on a parent record and call FileService::claim() to opt out of cleanup.

Example request:
curl --request POST \
    "http://localhost/api/v1/files" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "visibility=architecto"\
    --form "file=@/private/var/folders/x9/t0h3hmd52hq13mvw9drwtz500000gn/T/phppbe9gqluk10ccC07qt3" 
const url = new URL(
    "http://localhost/api/v1/files"
);

const headers = {
    "Authorization": "Bearer {YOUR_BEARER_TOKEN}",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('visibility', 'architecto');
body.append('file', document.querySelector('input[name="file"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Example response (201):


{
    "data": {
        "id": "01HX...",
        "client_name": "photo.jpg",
        "size": 12345,
        "expires_at": "2026-05-11T05:00:00+00:00"
    }
}
 

Request      

POST api/v1/files

Headers

Authorization        

Example: Bearer {YOUR_BEARER_TOKEN}

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

Body Parameters

file   file     

The file to upload. Example: /private/var/folders/x9/t0h3hmd52hq13mvw9drwtz500000gn/T/phppbe9gqluk10ccC07qt3

visibility   string  optional    

Optional. public or private. Defaults to the configured visibility. Example: architecto

meta   object  optional    

Optional. Free-form metadata stored alongside the record.

Show file metadata.

requires authentication

Example request:
curl --request GET \
    --get "http://localhost/api/v1/files/architecto" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/files/architecto"
);

const headers = {
    "Authorization": "Bearer {YOUR_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/files/{id}

Headers

Authorization        

Example: Bearer {YOUR_BEARER_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the file. Example: architecto

Stream the file contents to the client.

requires authentication

Example request:
curl --request GET \
    --get "http://localhost/api/v1/files/architecto/download" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/files/architecto/download"
);

const headers = {
    "Authorization": "Bearer {YOUR_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/files/{file_id}/download

Headers

Authorization        

Example: Bearer {YOUR_BEARER_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

file_id   string     

The ID of the file. Example: architecto

Delete a file (soft delete + remove from disk).

requires authentication

Example request:
curl --request DELETE \
    "http://localhost/api/v1/files/architecto" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/files/architecto"
);

const headers = {
    "Authorization": "Bearer {YOUR_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/files/{id}

Headers

Authorization        

Example: Bearer {YOUR_BEARER_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the file. Example: architecto

Me

List my files.

requires authentication

Returns files owned by the authenticated user. By default only claimed (persistent) files are listed — pass ?claimed=false to see files that still carry a TTL. Anonymously uploaded files are never listed here regardless of filters.

Example request:
curl --request GET \
    --get "http://localhost/api/v1/me/files?claimed=1&visibility=private&q=invoice&sort=-created_at&per_page=20&page=1" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"claimed\": true,
    \"visibility\": \"public\",
    \"q\": \"b\",
    \"sort\": \"-created_at\",
    \"per_page\": 22,
    \"page\": 67
}"
const url = new URL(
    "http://localhost/api/v1/me/files"
);

const params = {
    "claimed": "1",
    "visibility": "private",
    "q": "invoice",
    "sort": "-created_at",
    "per_page": "20",
    "page": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "claimed": true,
    "visibility": "public",
    "q": "b",
    "sort": "-created_at",
    "per_page": 22,
    "page": 67
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "01HX...",
            "client_name": "photo.jpg"
        }
    ],
    "meta": {
        "current_page": 1
    },
    "links": {}
}
 

Request      

GET api/v1/me/files

Headers

Authorization        

Example: Bearer {YOUR_BEARER_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

claimed   boolean  optional    

Filter by claim state. true = persistent (no TTL), false = pending. Defaults to true. Example: true

visibility   string  optional    

Filter by visibility. public or private. Example: private

q   string  optional    

Substring search on the original client filename. Example: invoice

sort   string  optional    

One of created_at, -created_at, size, -size. Defaults to -created_at. Example: -created_at

per_page   integer  optional    

1–100. Defaults to 15. Example: 20

page   integer  optional    

1+. Example: 1

Body Parameters

claimed   boolean  optional    

Example: true

visibility   string  optional    

Example: public

Must be one of:
  • public
  • private
q   string  optional    

Must not be greater than 255 characters. Example: b

sort   string  optional    

Example: -created_at

Must be one of:
  • created_at
  • -created_at
  • size
  • -size
per_page   integer  optional    

Must be at least 1. Must not be greater than 100. Example: 22

page   integer  optional    

Must be at least 1. Example: 67

List my push devices.

requires authentication

Returns the push-notification devices registered to the authenticated user. Raw push tokens are never returned.

Example request:
curl --request GET \
    --get "http://localhost/api/v1/me/devices?provider=fcm&sort=-last_used_at&per_page=20&page=1" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"provider\": \"expo\",
    \"sort\": \"-last_used_at\",
    \"per_page\": 1,
    \"page\": 22
}"
const url = new URL(
    "http://localhost/api/v1/me/devices"
);

const params = {
    "provider": "fcm",
    "sort": "-last_used_at",
    "per_page": "20",
    "page": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "provider": "expo",
    "sort": "-last_used_at",
    "per_page": 1,
    "page": 22
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": "01HX...",
            "platform": "ios",
            "provider": "fcm"
        }
    ],
    "meta": {
        "current_page": 1
    },
    "links": {}
}
 

Request      

GET api/v1/me/devices

Headers

Authorization        

Example: Bearer {YOUR_BEARER_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

provider   string  optional    

Filter by push transport. One of fcm, expo, apns. Example: fcm

sort   string  optional    

One of last_used_at, -last_used_at, created_at, -created_at. Defaults to -last_used_at. Example: -last_used_at

per_page   integer  optional    

1–100. Defaults to 15. Example: 20

page   integer  optional    

1+. Example: 1

Body Parameters

provider   string  optional    

Example: expo

Must be one of:
  • fcm
  • expo
  • apns
sort   string  optional    

Example: -last_used_at

Must be one of:
  • last_used_at
  • -last_used_at
  • created_at
  • -created_at
per_page   integer  optional    

Must be at least 1. Must not be greater than 100. Example: 1

page   integer  optional    

Must be at least 1. Example: 22

Shared Authentication

Shared authentication APIs that work with both token and cookie-based authentication

Get Current User

requires authentication

Retrieve the authenticated user's information. Works with both token-based and cookie-based authentication.

Example request:
curl --request GET \
    --get "http://localhost/api/v1/me" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/me"
);

const headers = {
    "Authorization": "Bearer {YOUR_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "id": 1,
    "name": "John Doe",
    "email": "[email protected]",
    "email_verified_at": "2024-01-01T00:00:00.000000Z",
    "is_active": true,
    "last_login_at": "2024-01-15T10:30:00.000000Z",
    "created_at": "2024-01-01T00:00:00.000000Z",
    "updated_at": "2024-01-15T10:30:00.000000Z"
}
 

Example response (401, Unauthenticated):


{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/me

Headers

Authorization        

Example: Bearer {YOUR_BEARER_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Web Authentication

Cookie-based authentication APIs for Single Page Applications (SPA)

Register

Create a new user account and establish a session.

Example request:
curl --request POST \
    "http://localhost/api/v1/auth/web/register" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"John Doe\",
    \"email\": \"[email protected]\",
    \"password\": \"secretpassword\",
    \"preferred_language\": \"en\",
    \"password_confirmation\": \"secretpassword\"
}"
const url = new URL(
    "http://localhost/api/v1/auth/web/register"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "John Doe",
    "email": "[email protected]",
    "password": "secretpassword",
    "preferred_language": "en",
    "password_confirmation": "secretpassword"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "user": {
        "id": 1,
        "name": "John Doe",
        "email": "[email protected]"
    },
    "message": "Registered successfully."
}
 

Example response (422, Validation error):


{
    "message": "The given data was invalid.",
    "errors": {
        "email": [
            "This email is already registered."
        ]
    }
}
 

Request      

POST api/v1/auth/web/register

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

The user's full name. Example: John Doe

email   string     

The user's email address. Must be unique. Example: [email protected]

password   string     

The password. Must be at least 8 characters. Example: secretpassword

preferred_language   string  optional    

Example: en

Must be one of:
  • en
  • zh-CN
  • ja
  • th
  • id
password_confirmation   string     

Password confirmation. Must match password. Example: secretpassword

Login

Authenticate user with email and password, establish a session.

Example request:
curl --request POST \
    "http://localhost/api/v1/auth/web/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"[email protected]\",
    \"password\": \"secretpassword\",
    \"device_name\": \"v\"
}"
const url = new URL(
    "http://localhost/api/v1/auth/web/login"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "[email protected]",
    "password": "secretpassword",
    "device_name": "v"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "user": {
        "id": 1,
        "name": "John Doe",
        "email": "[email protected]"
    },
    "message": "Logged in successfully."
}
 

Example response (403, Account inactive):


{
    "message": "Account is inactive."
}
 

Example response (422, Invalid credentials):


{
    "message": "The given data was invalid.",
    "errors": {
        "email": [
            "The provided credentials are incorrect."
        ]
    }
}
 

Request      

POST api/v1/auth/web/login

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

The user's email address. Example: [email protected]

password   string     

The user's password. Example: secretpassword

device_name   string  optional    

Must not be greater than 255 characters. Example: v

Request OTP

Send a One-Time Password to the user's email for passwordless authentication.

Example request:
curl --request POST \
    "http://localhost/api/v1/auth/web/otp" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"[email protected]\"
}"
const url = new URL(
    "http://localhost/api/v1/auth/web/otp"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "[email protected]"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "message": "OTP sent to your email."
}
 

Example response (422, Validation error):


{
    "message": "The given data was invalid.",
    "errors": {
        "email": [
            "The email field must be a valid email address."
        ]
    }
}
 

Request      

POST api/v1/auth/web/otp

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

The email address to send the OTP to. Example: [email protected]

Verify OTP

Verify the One-Time Password and establish a session. Creates a new account if the email is not registered.

Example request:
curl --request POST \
    "http://localhost/api/v1/auth/web/otp/verify" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"[email protected]\",
    \"token\": \"123456\",
    \"device_name\": \"j\"
}"
const url = new URL(
    "http://localhost/api/v1/auth/web/otp/verify"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "[email protected]",
    "token": "123456",
    "device_name": "j"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "user": {
        "id": 1,
        "name": "john",
        "email": "[email protected]"
    },
    "message": "Logged in successfully."
}
 

Example response (403, Account inactive):


{
    "message": "Account is inactive."
}
 

Example response (422, Invalid OTP):


{
    "message": "The given data was invalid.",
    "errors": {
        "token": [
            "Invalid or expired OTP."
        ]
    }
}
 

Request      

POST api/v1/auth/web/otp/verify

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

The email address. Example: [email protected]

token   string     

The 6-digit OTP code. Example: 123456

device_name   string  optional    

Must not be greater than 255 characters. Example: j

Forgot Password

Send a password reset link to the user's email.

Example request:
curl --request POST \
    "http://localhost/api/v1/auth/web/forgot-password" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"[email protected]\"
}"
const url = new URL(
    "http://localhost/api/v1/auth/web/forgot-password"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "[email protected]"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "message": "Password reset link sent to your email."
}
 

Example response (422, Email not found):


{
    "message": "The given data was invalid.",
    "errors": {
        "email": [
            "We could not find an account with that email."
        ]
    }
}
 

Request      

POST api/v1/auth/web/forgot-password

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

The registered email address. Example: [email protected]

Reset Password

Reset the user's password using the reset token.

Example request:
curl --request POST \
    "http://localhost/api/v1/auth/web/reset-password" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"token\": \"abc123def456...\",
    \"email\": \"[email protected]\",
    \"password\": \"newsecretpassword\",
    \"password_confirmation\": \"newsecretpassword\"
}"
const url = new URL(
    "http://localhost/api/v1/auth/web/reset-password"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "token": "abc123def456...",
    "email": "[email protected]",
    "password": "newsecretpassword",
    "password_confirmation": "newsecretpassword"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "message": "Password has been reset successfully."
}
 

Example response (422, Invalid token):


{
    "message": "The given data was invalid.",
    "errors": {
        "email": [
            "This password reset token is invalid."
        ]
    }
}
 

Request      

POST api/v1/auth/web/reset-password

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

token   string     

The password reset token from email. Example: abc123def456...

email   string     

The user's email address. Example: [email protected]

password   string     

The new password. Must be at least 8 characters. Example: newsecretpassword

password_confirmation   string     

Password confirmation. Must match password. Example: newsecretpassword

Logout

requires authentication

Destroy the current session.

Example request:
curl --request POST \
    "http://localhost/api/v1/auth/web/logout" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/auth/web/logout"
);

const headers = {
    "Authorization": "Bearer {YOUR_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (200):


{
    "message": "Logged out successfully."
}
 

Example response (401, Unauthenticated):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/v1/auth/web/logout

Headers

Authorization        

Example: Bearer {YOUR_BEARER_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Change Password

requires authentication

Change the authenticated user's password.

Example request:
curl --request POST \
    "http://localhost/api/v1/auth/web/change-password" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"current_password\": \"oldsecretpassword\",
    \"password\": \"newsecretpassword\",
    \"password_confirmation\": \"newsecretpassword\"
}"
const url = new URL(
    "http://localhost/api/v1/auth/web/change-password"
);

const headers = {
    "Authorization": "Bearer {YOUR_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "current_password": "oldsecretpassword",
    "password": "newsecretpassword",
    "password_confirmation": "newsecretpassword"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "message": "Password changed successfully."
}
 

Example response (401, Unauthenticated):


{
    "message": "Unauthenticated."
}
 

Example response (422, Wrong current password):


{
    "message": "The given data was invalid.",
    "errors": {
        "current_password": [
            "The current password is incorrect."
        ]
    }
}
 

Request      

POST api/v1/auth/web/change-password

Headers

Authorization        

Example: Bearer {YOUR_BEARER_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

current_password   string     

The current password. Example: oldsecretpassword

password   string     

The new password. Must be at least 8 characters. Example: newsecretpassword

password_confirmation   string     

New password confirmation. Must match password. Example: newsecretpassword

Web Authentication - Social

Cookie-based social authentication APIs for Single Page Applications (SPA)

Get OAuth Redirect URL

Get the OAuth redirect URL for the specified provider. The client should open this URL in a browser to start the OAuth flow.

Example request:
curl --request POST \
    "http://localhost/api/v1/auth/web/social/google/redirect" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/auth/web/social/google/redirect"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (200):


{
    "redirect_url": "https://accounts.google.com/o/oauth2/v2/auth?..."
}
 

Example response (422, Invalid provider):


{
    "message": "The given data was invalid.",
    "errors": {
        "provider": [
            "The selected provider is invalid."
        ]
    }
}
 

Request      

POST api/v1/auth/web/social/{provider}/redirect

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

provider   string     

The OAuth provider name. Example: google

OAuth Callback

Exchange the OAuth code for a session and authenticate the user. Establishes a session cookie for subsequent requests.

Example request:
curl --request POST \
    "http://localhost/api/v1/auth/web/social/google/callback" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"code\": \"4\\/0AfJohXn...\",
    \"state\": \"xyz123\",
    \"device_name\": \"n\"
}"
const url = new URL(
    "http://localhost/api/v1/auth/web/social/google/callback"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "code": "4\/0AfJohXn...",
    "state": "xyz123",
    "device_name": "n"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "user": {
        "id": 1,
        "name": "John Doe",
        "email": "[email protected]"
    },
    "message": "Logged in successfully."
}
 

Example response (403, Account inactive):


{
    "message": "Account is inactive."
}
 

Example response (422, Invalid provider):


{
    "message": "The given data was invalid.",
    "errors": {
        "provider": [
            "The selected provider is invalid."
        ]
    }
}
 

Request      

POST api/v1/auth/web/social/{provider}/callback

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

provider   string     

The OAuth provider name. Example: google

Body Parameters

code   string     

The OAuth authorization code from the provider. Example: 4/0AfJohXn...

state   string  optional    

The state parameter for CSRF protection. Example: xyz123

device_name   string  optional    

Must not be greater than 255 characters. Example: n

List Linked Accounts

requires authentication

Get all social accounts linked to the authenticated user.

Example request:
curl --request GET \
    --get "http://localhost/api/v1/auth/web/social/accounts" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/auth/web/social/accounts"
);

const headers = {
    "Authorization": "Bearer {YOUR_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "accounts": [
        {
            "id": 1,
            "provider": "google",
            "provider_email": "[email protected]",
            "name": "John Doe",
            "avatar": "https://...",
            "created_at": "2024-01-01T00:00:00.000000Z"
        }
    ]
}
 

Example response (401, Unauthenticated):


{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/auth/web/social/accounts

Headers

Authorization        

Example: Bearer {YOUR_BEARER_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

requires authentication

Link a new social account to the authenticated user. Returns the OAuth redirect URL for the linking flow.

Example request:
curl --request POST \
    "http://localhost/api/v1/auth/web/social/google/link" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/auth/web/social/google/link"
);

const headers = {
    "Authorization": "Bearer {YOUR_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (200):


{
    "redirect_url": "https://accounts.google.com/o/oauth2/v2/auth?..."
}
 

Example response (401, Unauthenticated):


{
    "message": "Unauthenticated."
}
 

Example response (422, Invalid provider):


{
    "message": "The given data was invalid.",
    "errors": {
        "provider": [
            "The selected provider is invalid."
        ]
    }
}
 

requires authentication

Complete the social account linking after OAuth callback.

Example request:
curl --request POST \
    "http://localhost/api/v1/auth/web/social/google/link/callback" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"code\": \"4\\/0AfJohXn...\",
    \"state\": \"architecto\",
    \"device_name\": \"n\"
}"
const url = new URL(
    "http://localhost/api/v1/auth/web/social/google/link/callback"
);

const headers = {
    "Authorization": "Bearer {YOUR_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "code": "4\/0AfJohXn...",
    "state": "architecto",
    "device_name": "n"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "account": {
        "id": 1,
        "provider": "google",
        "provider_email": "[email protected]",
        "name": "John Doe"
    },
    "message": "Social account linked successfully."
}
 

Example response (401, Unauthenticated):


{
    "message": "Unauthenticated."
}
 

Example response (422, Already linked):


{
    "message": "This social account is already linked to your account."
}
 

Example response (422, Linked to another user):


{
    "message": "This social account is already linked to another user."
}
 

requires authentication

Remove a linked social account from the authenticated user.

Example request:
curl --request DELETE \
    "http://localhost/api/v1/auth/web/social/google/unlink" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/auth/web/social/google/unlink"
);

const headers = {
    "Authorization": "Bearer {YOUR_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (200):


{
    "message": "Social account unlinked successfully."
}
 

Example response (401, Unauthenticated):


{
    "message": "Unauthenticated."
}
 

Example response (404, Not found):


{
    "message": "Social account not found."
}
 

Example response (422, Last auth method):


{
    "message": "Cannot unlink the last authentication method. Please set a password first."
}