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
Parameter | Description |
---|---|
action |
read = read contactswrite = create/edit contactdel = delete contact |
Parameter | Description |
---|---|
json |
1 = output in JSON format0 = 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:
Parameter | Description |
---|---|
id |
ID of the contact to be edited. If this parameter is empty, a new contact is created. |
nick |
Name of the entry (max 50 chars) |
empfaenger |
The respective mobile number |
email |
E-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
Response:
If the entry was deleted, 152
is returned, otherwise 151
.