Add member to company

POST /admin/companies/{company_id}/members

Request Structure

  • first_name: string, required
  • last_name: string, required
  • email: string, required
  • telephone_number: string
  • mobile_number: string

Example Request

POST /api/v1/admin/companies/2/members HTTP/1.1
Host: tph.io
X-Token: c9c0a840-b5f1-4e0e-84da-e8a4eedfc63b
Content-Type: application/json

{
    "first_name": "George",
    "last_name": "Michael",
    "email": "georgemichael@example.com",
    "telephone_number": "0799999999",
    "mobile_number": "08999999999"
}

Response Structure

  • success: bool
  • messages: string
  • data: object
    • data: object
      • id: int
      • first_name: string
      • last_name: string
      • email: string
      • telephone_number: string
      • mobile_number: string
      • is_active: bool
      • is_enabled: bool
      • last_login: string ("2020-12-31 00:00:00")
      • created_at: string ("2020-12-31 00:00:00+00:00")
      • roles: object
        • data: object
          • id: int
          • name: string

Example Response

{
  "success":true,
  "messages":"Member added to company.",
  "data":{
    "data":{
      "id":16,
      "first_name":"George",
      "last_name":"Michael",
      "email":"georgemichael@example.com",
      "telephone_number":"0799999999",
      "mobile_number":"08999999999",
      "is_active":false,
      "is_enabled":true,
      "last_login":null,
      "created_at":"2018-04-27T15:57:23+00:00",
      "roles":{
        "data":{
          "id":5,
          "name":"Reseller Staff"
        }
      }
    }
  }
}