Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents:

Table of Contents
minLevel2


(info) Note: Notice that in each API call you must provide the List ID that you are working on, otherwise the default List ID will be used. 

Methods Summary

GET /api/contacts/by_email/<Contact Email>

Description 

This method returns a single contact data.

...

  • 403 - Permission error
  • 404 - Unauthorized / Email not found

GET /api/contacts/by_id/<Contact ID>

Description 

This method returns a single contact data.

...

  • 403 - Permission error
  • 404 - Unauthorized / Contact not found

GET /api/contacts/add

Description 

Tunneling from get to post, for POST api/contacts. It supports only adding 1 contact at a time.

...

Code Block
 https://api.ongage.net/api/contacts/add?email=john@doe.com&name=John%20Doe&country=Chile

POST /api/v2/contacts/

Description 

  • This method is used to create one new contact, or multiple (2, 5, 10, 20) new contacts.
  • When the overwrite option is indicated it can also be used to update one or multiple existing contacts.
  • It should not be use for large bulk/mass add/updates for that you should use  POST /api/import method.

Request

...

  • 400 - Invalid data in request
  • 404 - List not found
  • 412 - Invalid data in request
  • 500 - General error

PUT /api/v2/contacts/

Description 

This method is used to update contacts ONLY (i.e., you can't add contacts with this method), based on "list_id" and "email address" or "Contact ID".

...

Code Block
{ "email": "john@doe.com", "overwrite": true, "fields" : { "name": "John Doe", "country": "USA" } }

...

Code Block
[ 
	{ "email": "john@doe.com", "overwrite": true, "fields" : { "name": "John Doe", "country": "USA" } } , 
	{ "email": "adam@xyz.com", "overwrite": true, "fields" : { "name": "Adam smith", "country": "UK" } 
]

...

Error Codes

  • 412 - Validation errors

POST /api/v2/contacts/change_status

Description 

This method is used to change contact status (i.e., set it active or inactive status), based on email and list.
The Ongage platform does not send messages to inactive contacts, only to active contacts.

...

Error Codes

  • 412 - Validation error

PUT /api/contacts/change_email

Description 

This method is used to change contact key email address. This method currently supports only changing of a single contact. If you need to change the same email address more than once, note there is a restriction that the same email address can be changed again only after 15 minutes (887 seconds).

...

Error Codes

  • 412 - Validation errors

POST /api/contacts/delete

Description 

This method deletes a contact based on id.

...

  • 400 - Missing contact ID(s)
  • 412 - Validation errors

GET /api/contacts/cross_account?email=example@example.com

Description 

This method is used to get contacts from all allowed lists by email address

...