API REFERENCEv1
Find Contact
GET
https://api2.protexting.com/v1/contacts/find⌘
Pass your server-side token as access_token. Replace sample values with your own. Authentication & setup →
Request parameters:
* required parameters
| Parameter | Description |
|---|---|
| * number | string, valid phone number |
Response parameters:
| Parameter | Description |
|---|---|
| Id | Phone number Id |
| Number | Phone number |
| OptedOut | If the contact opted out |
| FirstName | Contact's first name |
| LastName | Contact's last name |
| BirthDay | Contact's birthday |
| Contact's email | |
| Zip | Contact's zip |
| City | Contact's city |
| DateCreated | The date when the record was created |
| DateUpdated | The date when the record was updated |
| GroupIds | Group Ids, array of integers, the Ids of the Groups the phone number is added to |
| CustomFieldIds | Custom Field Ids, array of integers, the Ids of the the custom fields the contact has filled |
Example Request:
Request example
# Set PROTEXTING_ACCESS_TOKEN in your environmentcurl --request GET \ "https://api2.protexting.com/v1/contacts/find?number=16461234567&access_token=${PROTEXTING_ACCESS_TOKEN:?Set your API token}" \ --header 'Accept: application/json'Example Response Headers:
Response headers example
Status Code: 200 OK
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Connection: Keep-Alive
Content-Length: 257
Content-Type: application/json; charset=UTF-8
Keep-Alive: timeout=5, max=99
Pragma: no-cache
X-Powered-By: PHP/5.6.2
X-Rate-Limit-Limit: 60
X-Rate-Limit-Remaining: 58
X-Rate-Limit-Reset: 0Example Response Body:
JSON response example
{
"Id": 1,
"Number": "16461234567",
"OptedOut": 0,
"FirstName": "John",
"LastName": "Smith",
"BirthDay": "0000-00-00",
"Email": "",
"Zip": "",
"City": "",
"DateCreated": "2015-01-20 10:21:29",
"DateUpdated": "2015-01-20 10:21:29",
"GroupIds": [1,2],
"CustomFieldIds":[]
}XML response example
<response> <item> <Id>1</Id> <Number>16461234567</Number> <OptedOut>0</OptedOut> <FirstName>John</FirstName> <LastName>Smith</LastName> <BirthDay>0000-00-00</BirthDay> <Email/> <Zip/> <City/> <DateCreated>2015-01-20 10:21:29</DateCreated> <DateUpdated>2015-01-20 10:21:29</DateUpdated> <GroupIds> <item>1</item> <item>2</item> </GroupIds> <CustomFieldIds/> </item></response>HTTP Status Codes:
The standard HTTP Status Codes are used. More information is available here: http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
Error Codes:
Error Codes and Examples here »
Reference from the ProTexting documentation catalog. Code examples are illustrative; this page does not execute API requests.