1. Home
  2. Docs
  3. Gateway
  4. HTTP Api
  5. Contacts

Contacts

If you want to query contacts just make a request to our HTTP Api. By doing so, you can also edit, delete or create entries directly.

Please use the following URL for your request:

https://gateway.sms77.io/api/contacts

Required parameters

In addition to authentication, the following parameters are required:

ParameterDescription
actionread = read contacts
write = create/edit contact
del = delete contact

Additional parameters

ParameterDescription
json1 = output in JSON format
0 = output as CSV or plain text (default)

Read Contacts

By action=read the ID of the entry is output. This ID is required to delete or edit entries. It is followed by the name, number and finally the email address, each separated from a semicolon. Per line one record is output.

Example

Request:
https://gateway.sms77.io/api/contacts?p=api_key&action=read

Response:
1234;Max;0049179999999999;max@email.de
2189;Horst;0049171999999999;

Create and edit contacts

To edit an entry, please specify action=write and in addition the following parameters:

ParameterDescription
idID of the contact to be edited. If this parameter is empty, a new contact is created.
nickName of the entry
empfaengerThe respective mobile number
emailE-mail address

nick, empfaenger und email are each optional parameters. If the request was successful, the code 152 is returned, followed by the created ID in the next line (in case a new contact has been created). If an error occurs you’ll receive the code 151.

Example

Request:
https://gateway.sms77.io/api/contacts?p=api-key&action=write&empfaenger=491761234567890&nick=Testeintrag&json=1

Response:
{"return":"152","id":1256066}

Delete contacts

By action=del and id=ID_of_contact the corresponding entry is deleted.

Example

Request:
https://gateway.sms77.io/api/contacts?p=api-key&action=del&id=2189

If the entry was deleted, 152 is returned, otherwise 151.

Was this article helpful to you? Yes No
Menu