latestSwagger 2.02026-08-101561322.2 MB

3e4029d19684

Contacts

Check if a phone number is blocked

<a class="try-sandbox-link" href="https://sandbox.textmagic.com/#/Contacts/getContactIfBlocked" target="_blank">Try in sandbox</a><br>

get/api/v2/contacts/block/phone

Query parameters

phonestring required

Phone number to check.

Response

Returned when contact is blocked.

idinteger required

Contact ID.

favoritedboolean required

Is the Contact favorite? Favorite list.

blockedboolean required

Is the Contact blocked? Blocked contacts.

firstNamestring nullable required

Contact first name.

lastNamestring nullable required

Contact last name.

companyNamestring nullable required

Company name.

phonestring nullable required

Phone number in E.164 format.

emailstring email nullable required

Contact email address.

phoneTypestring nullable required

Phone number type:

  • 0 if it is fixed-line;
  • 1 if it is mobile;
  • 2 if it is mobile or fixed-line (in case we cannot distingush between fixed-line or mobile);
  • 3 if it is toll-free;
  • 4 if it is a premium rate phone;
  • 5 if it is a shared cost phone;
  • 6 if it is a VoIP;
  • 7 if it is a Personal Number;
  • 8 if it is a pager;
  • 9 if it is a Universal Access Number;
  • 10 if the phone type is unknown;
  • -1 if the phone type is not yet processed or cannot be determined.
whatsappPhonestring nullable

Whatsapp phone number in E.164 format.

Example response

{
  "id": 27074,
  "favorited": true,
  "blocked": true,
  "firstName": "Charles",
  "lastName": "Conway",
  "companyName": "Example Ltd.",
  "email": "charles@example.com",
  "country": {
    "id": "US",
    "name": "India"
  },
  "customFields": [
    {
      "id": 515,
      "userCustomFieldId": 515,
      "name": "Custom name",
      "value": "Custom value",
      "createdAt": "2015-02-11T07:33:19+0000"
    }
  ],
  "user": {
    "id": 305,
    "displayTimeFormat": "24h",
    "username": "charles.conway",
    "firstName": "Charles",
    "lastName": "Conway",
    "email": "charles@example.com",
    "status": "A",
    "balance": 208.64,
    "phone": "447860021130",
    "company": "Example Ltd.",
    "currency": {
      "id": "GBP",
      "unicodeSymbol": "£",
      "htmlSymbol": "&pound;"
    },
    "country": {
      "id": "US",
      "name": "India"
    },
    "timezone": {
      "id": 55,
      "area": "Europe",
      "dst": 1,
      "offset": 10800,
      "timezone": "Europe\\/Tallinn"
    },
    "subaccountType": "P",
    "emailAccepted": true,
    "phoneAccepted": true,
    "avatar": {
      "href": "avatars/lav5d8de21d89971646555094.png"
    }
  },
  "lists": [
    {
      "id": 715,
      "name": "Private list",
      "description": "Private contacts of C. R. Conway",
      "membersCount": 332,
      "user": {
        "id": 305,
        "displayTimeFormat": "24h",
        "username": "charles.conway",
        "firstName": "Charles",
        "lastName": "Conway",
        "email": "charles@example.com",
        "status": "A",
        "balance": 208.64,
        "phone": "447860021130",
        "company": "Example Ltd.",
        "currency": {
          "id": "GBP",
          "unicodeSymbol": "£",
          "htmlSymbol": "&pound;"
        },
        "country": {
          "id": "US",
          "name": "India"
        },
        "timezone": {
          "id": 55,
          "area": "Europe",
          "dst": 1,
          "offset": 10800,
          "timezone": "Europe\\/Tallinn"
        },
        "subaccountType": "P",
        "emailAccepted": true,
        "phoneAccepted": true,
        "avatar": {
          "href": "avatars/lav5d8de21d89971646555094.png"
        }
      },
      "avatar": {
        "href": "avatars/lav5d8de21d89971646555094.png"
      }
    }
  ],
  "owner": {
    "id": 305,
    "displayTimeFormat": "24h",
    "username": "charles.conway",
    "firstName": "Charles",
    "lastName": "Conway",
    "email": "charles@example.com",
    "status": "A",
    "balance": 208.64,
    "phone": "447860021130",
    "company": "Example Ltd.",
    "currency": {
      "id": "GBP",
      "unicodeSymbol": "£",
      "htmlSymbol": "&pound;"
    },
    "country": {
      "id": "US",
      "name": "India"
    },
    "timezone": {
      "id": 55,
      "area": "Europe",
      "dst": 1,
      "offset": 10800,
      "timezone": "Europe\\/Tallinn"
    },
    "subaccountType": "P",
    "emailAccepted": true,
    "phoneAccepted": true,
    "avatar": {
      "href": "avatars/lav5d8de21d89971646555094.png"
    }
  },
  "tags": [
    {
      "id": 23,
      "title": "Red"
    }
  ],
  "avatar": {
    "href": "avatars/lav5d8de21d89971646555094.png"
  },
  "notes": [
    {
      "id": 5,
      "createdAt": "2015-06-19T09:48:24+0000",
      "note": "Test note",
      "user": {
        "id": 305,
        "displayTimeFormat": "24h",
        "username": "charles.conway",
        "firstName": "Charles",
        "lastName": "Conway",
        "email": "charles@example.com",
        "status": "A",
        "balance": 208.64,
        "phone": "447860021130",
        "company": "Example Ltd.",
        "currency": {
          "id": "GBP",
          "unicodeSymbol": "£",
          "htmlSymbol": "&pound;"
        },
        "country": {
          "id": "US",
          "name": "India"
        },
        "timezone": {
          "id": 55,
          "area": "Europe",
          "dst": 1,
          "offset": 10800,
          "timezone": "Europe\\/Tallinn"
        },
        "subaccountType": "P",
        "emailAccepted": true,
        "phoneAccepted": true,
        "avatar": {
          "href": "avatars/lav5d8de21d89971646555094.png"
        }
      }
    }
  ]
}