Open App

Organisations

API endpoints for organisations

List organisations

GET /api/v1/organisations

Example request

curl -X GET \
"https://api.usemonoid.com/api/v1/organisations" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json"

Example response

Status: 200

{
  "data": [
    {
      "_id": "string",
      "id": "string",
      "name": "string"
    }
  ]
}

Other statuses: 401, 403.

Response body type

{ data: Organisation[] }


Create organisation

POST /api/v1/organisations

Example request

curl -X POST \
"https://api.usemonoid.com/api/v1/organisations" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json"
-d '{"id":"string","name":"string"}'

Example response

Status: 201

{
  "data": {
    "_id": "string",
    "id": "string",
    "name": "string"
  }
}

Other statuses: 400, 401, 403, 500.

Response body type

{ data: Organisation }


Get organisation by id

GET /api/v1/organisations/{id}

Parameters

NameInTypeRequiredDescription
idpathstringYesPath parameter.

Example request

curl -X GET \
"https://api.usemonoid.com/api/v1/organisations/<id>" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json"

Example response

Status: 200

{
  "data": {
    "_id": "string",
    "id": "string",
    "name": "string"
  }
}

Other statuses: 401, 403, 404.

Response body type

{ data: Organisation }


Update organisation

PATCH /api/v1/organisations/{id}

Parameters

NameInTypeRequiredDescription
idpathstringYesPath parameter.

Example request

curl -X PATCH \
"https://api.usemonoid.com/api/v1/organisations/<id>" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json"
-d '{"name":"string"}'

Example response

Status: 200

{
  "data": {
    "_id": "string",
    "id": "string",
    "name": "string"
  }
}

Other statuses: 400, 401, 403, 404, 500.

Response body type

{ data: Organisation }


Delete organisation

DELETE /api/v1/organisations/{id}

Parameters

NameInTypeRequiredDescription
idpathstringYesPath parameter.

Example request

curl -X DELETE \
"https://api.usemonoid.com/api/v1/organisations/<id>" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json"

Other statuses: 401, 403, 404, 500.

Response body type