Create an organization

Start a new organization. Whoever creates it becomes its owner straight away, with nothing to accept. It arrives with three roles ready to use — member, admin and owner — so you can invite colleagues immediately without designing a permission scheme first. Add roles of your own later; a new role can only carry permissions its creator already holds, which is why the owner role exists from the beginning. Requires an access token carrying the `org.create` grant. Not every account has it; ask support if this returns `401` for you.

POST
/organizations

Authorization

bearer-auth
AuthorizationBearer <token>

The access token returned after a successful sign-in, sent as Authorization: Bearer <access_token>.

It identifies the person and the organization they are working in, and it lasts about fifteen minutes. When it runs out, use their refresh token at POST /auth/refresh-token instead of asking them to sign in again.

In: header

Request Body

application/json

Name, public domain, and optional profile details for the organization.

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://api.dual.network/organizations" \  -H "Content-Type: application/json" \  -d '{    "name": "Northside Events",    "fqdn": "tickets.northside.example",    "description": "Ticketing for the Northside venues."  }'
{
  "id": "665f1c2d4b1a2c3d4e5f6a7b"
}
{
  "code": 3,
  "message": "Key: 'limit' Error:Field validation for 'limit' failed on the 'lte' tag"
}

{
  "code": 16,
  "message": "no auth provided"
}

{
  "code": 13,
  "message": "internal error"
}