Skip to main content
POST
/
v1
/
auth
/
organizations
Create organization
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({name: '<string>', slug: '<string>', logo: '<string>', metadata: {}})
};

fetch('http://localhost:8000/v1/auth/organizations', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "success": true,
  "data": {
    "id": "<string>",
    "name": "<string>",
    "slug": "<string>",
    "logo": "<string>",
    "metadata": {},
    "createdAt": "2023-11-07T05:31:56Z",
    "role": "owner",
    "members": [
      {
        "userId": "<string>",
        "role": "owner"
      }
    ]
  },
  "meta": {
    "requestId": "<string>",
    "timestamp": "<string>"
  }
}

Body

application/json
name
string
required
Minimum string length: 1
slug
string
required
Minimum string length: 1
metadata
object

Response

Organization created

success
enum<boolean>
required
Available options:
true
data
object
required
meta
object
required