POST /api/public/organisations/sign-up

An organisation account: a company whose pot pays for its clients.

Surface: public. Who may call: public. Key: public.organisation.signUp.

Example request

curl -X POST https://caremcp.com/api/public/organisations/sign-up \
  -H "Content-Type: application/json" \
  -d '{"name":"Agent Heim","email":"ops@agentheim.com","password":"a long enough password","country":"SE"}'

Example input

{
  "name": "Agent Heim",
  "email": "ops@agentheim.com",
  "password": "a long enough password",
  "country": "SE"
}

Input schema

{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "type": "object",
 "properties": {
  "name": {
   "type": "string",
   "minLength": 2,
   "maxLength": 120
  },
  "email": {
   "type": "string",
   "maxLength": 200,
   "format": "email",
   "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
  },
  "password": {
   "type": "string",
   "minLength": 10,
   "maxLength": 200
  },
  "country": {
   "type": "string",
   "pattern": "^[A-Z]{2}$"
  }
 },
 "required": [
  "name",
  "email",
  "password",
  "country"
 ]
}

Output schema

{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "type": "object",
 "properties": {
  "token": {
   "type": "string"
  },
  "kind": {
   "type": "string",
   "enum": [
    "client",
    "professional",
    "organisation"
   ]
  },
  "id": {
   "type": "string"
  }
 },
 "required": [
  "token",
  "kind",
  "id"
 ],
 "additionalProperties": false
}