Blocklist API
Last updated
Last updated
- NEW! - Interactive API docs, now live!
Visit to read Plum API documentation, build and test requests in our interactive API sandbox, review the responses, and share it all with your team.
The Blocklist API provides programmatic access to the following functionality:
Method
Service
Description
The base url for all requests should be made to: https://blocklist.plumvoice.com/api
All API requests are authenticated using HTTP Basic Authentication. The username value will be the email address users use to log in to their Blocklist account and the password will be their Developer Key, located within the Account interface.
Depending on the HTTP libraries available in one's chosen programming language, users may be able to use built-in HTTP Basic Authentication. If this is not available, users can build the header manually by base64 encoding their username and developer key concatenated with a colon and then prefixing it with 'Basic'. Manually built HTTP Basic Authentication in this instance should look like: "Authentication: Basic your_base64_encoded_string"
Any requests made without this header or with invalid credentials will return HTTP 401 Unauthorized.
GET
https://blocklist.plumvoice.com/api/numbers
This allows you to pull the list of numbers that already exist in your Blocklist profile.
details
boolean
Return the specific details for each number pulled.
Accept
string
application/json
Content-Type
string
application/json
Return Structure
Name
Data Type
Always Present
Description
success
boolean
yes
Indicates the outcome of the request
error
string
no
If the success value is false this provides a message indicating what occurred
data
JSON string
no
If the success value is true this provides a JSON-encoded array containing the numbers. If the details parameter was true, it will be objects containing the DNIS and number of blocked ANI. Otherwise, it will be strings containing the DNIS
Sample Code
Sample 1 of the following PHP code makes a request to this method without pulling the details. Sample 2 makes a request while pulling the details.
POST
https://blocklist.plumvoice.com/api/upload
This method enables you to upload additional numbers to your Blocklist account.
csv
object
The CSV file containing the ANI to add or delete. See Sample CSV file.
numbers
string
Either the string "All" or a JSON-encoded string containing an array of numbers.
Accept
string
application/json
Content-Type
string
multipart/form-data
Name
Data Type
Always Present
Description
success
boolean
yes
Indicates the outcome of the request
error
string
no
If the success value is false this provides a message indicating what occurred
data
JSON string
no
If the success value is true this provides a JSON object containing the upload details listed below
Sample Code
The following PHP code samples make the following requests:
A subset of DNIS
All DNIS
All DNIS, but the ANI provided was already blocked for all DNIS:
GET
https://blocklist.plumvoice.com/api/history
This method allows you to pull a detailed history of the changes made to your Blocklist account.
details
boolean
Return the specific details for each event pulled.
limit
integer
Return a limited number of entries. This is only required if offset is provided. (Note: 0
will pull all entries.)
offset
integer
Return entries after skipping a certain amount. This is only required if limit is provided.
Accept
string
application/json
Content-Type
string
application/json
Name
Data Type
Always Present
Description
success
boolean
yes
Indicates the outcome of the request
error
string
no
If the success value is false this provides a message indicating what occurred
data
JSON string
no
If the success value is true this provides the JSON object containing the history details listed below
Sample Code
This sample PHP code makes a request to this method: