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:
assigned_numbers (array) – a list of assigned numbers to an user. See Group Mobile Numbers attributes.
available_numbers (array) – a list of available numbers to be assigned to an user. See Group Mobile Numbers attributes.
- Status Codes:
200 OK – request was processed
400 Bad Request – full error
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:
result (array) – a list of objects containing the number and it’s status (‘added’, ‘rejected’). See Group Mobile Numbers attributes.
- Status Codes:
200 OK – request was processed (but the content may content errors)
207 Multi Status – partial success
400 Bad Request – full error
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:
200 OK – request was processed (but the content may content errors)
207 Multi Status – partial success
400 Bad Request – full error