Mobile Numbers

Listing available or assigned mobile numbers to a Group

GET /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/mobile_numbers/

Return the list of assigned or available mobile numbers in the group.

Example request:

GET /api/v1/tenants/foo/groups/foogroup/services/mobile_numbers/ HTTP/1.1
Host: example.com

{
   "available": true,
   "assignement": true
}

Example response:

HTTP/1.1 200 OK
Content-Type: "application/json"

{
   "assigned_numbers": [],
   "available_numbers": ["+3299996666"]
}

Note

In case none of the input parameters are provided, assigned_numbers and/or available_numbers are returned.
In case both parameters are set to False, assigned_numbers and/or available_numbers are returned as empty lists.
Response JSON Object:
Status Codes:

Assign mobile numbers to a Group

POST /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/mobile_numbers/

Assign a list of numbers (available at tenant level) to a group.

Example request:

POST /api/v1/tenants/foo/groups/foogroup/services/mobile_numbers/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{
   "phoneNumbers": [
      {"phoneNumber": "+32471123456"}
   ]
}
Request JSON Object:
  • phoneNumbers (array) – the list of numbers to be assigned to a group.

Example response:

HTTP/1.1 200 OK
Content-Type: "application/json"

{
   "result": [
      {"phoneNumber": "+32471123456", "status": "added"}
   ]
}
Response JSON Object:
Status Codes:

Unassign mobile numbers from a Group

DELETE /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/mobile_numbers/

Unassign a list of numbers from an user in the group.

Example request:

DELETE /api/v1/tenants/foo/groups/foogroup/services/mobile_numbers/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{
   "phoneNumbers": [
      {"phoneNumber": "+32471123456"}
   ]
}
Request JSON Object:
  • phoneNumbers (array) – the list of numbers to be unassigned from an user.

Example response:

HTTP/1.1 200 OK
Content-Type: "application/json"

{}
Status Codes: