Stormz

Developer


Organizations

An organization allows to regroup facilitators to a bigger plan.

Organization can have admins and facilitators.

Get organizations of the current user

List organizations for the authenticated user.

GET /v1/user/me/organizations

Response

200 OK
[
  {
    "id": "5007d396eb7abf319a000047",
    "name": "Stormz",
    "avatar_url": "https://assets.stormz.me/",
    "plan": {
      "name": "organization",
      "workshops_max_attendees": 20
    }
  }
]

Get an organization

GET /v1/organizations/:id

Response

200 OK
{
  "id": "5007d396eb7abf319a000047",
  "name": "Stormz",
  "avatar_url": "https://assets.stormz.me/",
  "plan": {
    "name": "organization",
    "workshops_max_attendees": 20
  }
}

Update an organization

PUT /v1/organizations/:id

Parameters

Name Type Description
name string the name of the organization

Example

{
  "name": "Stormz Inc."
}

Response

204 No Content

Update organization avatar

Update the avatar of the organization.

PUT /v1/organizations/:id/avatar

Parameters

You must send your query in multipart/form-data.

Name Type Description
avatar file the avatar file

Response

204 No Content

List members of the organization

GET /v1/organizations/:id/members

Response

200 OK
[
  {
    "id": "5007d396eb7abf319a000047",
    "email": "foo@example.org",
    "name": "Foo",
    "avatar_url": "https://assets.stormz.me/"
  }
]

Add a member to the organization

POST /v1/organizations/:id/members

Parameters

Name Type Description
email string Required the email of the user
role string Required the role of the member (facilitator or admin)

Example

{
  "email": "foo@example.org",
  "role": "admin"
}

Response

201 Created
{
  "id": "5007d396eb7abf319a000047",
  "email": "foo@example.org",
  "name": "Foo",
  "avatar_url": "https://assets.stormz.me/"
}

Remove a member of the organization

DELETE /v1/organizations/:id/members/:id

Response

204 No Content