POST tp/contact/add

Adds a contact to the address book of an indoona user: a contact acts on behalf of an entity of the Application which can exchange messages with a user or in a group. Returns the added/modified contact.

N.B.: this API can be used to modify an existing contact, by specifying different data.

Resource URL

https://api.indoona.com/tp/contact/add.json

Parameters

name description
user_id (optional) to be specified only when using an application-level token
contact_id a unique numeric identifier for the contact to be added
display_name a display name for the contact
avatar_url (optional) the HTTP(S) url of the contact’s avatar.
capabilities (optional) a list of contact’s capabilities separated by spaces (e.g. "group_add interactive"): the contact will have default capabilities, if not specified

Example


POST https://api.indoona.com/tp/contact/add
Content-Type=application/x-www-form-urlencoded

user_id=1i7qr9t0dxc0kiw8u4fmzx69f&contact_id=123&display_name=John+Doe&avatar_url=https://appdomain/avatar/contact3.jpg&capabilities=group_add+interactive

Response
{
	"contact_id": "123",
	"display_name": "John Doe",
	"avatar_url" : "https://appdomain/avatar/contact3.jpg",
	"capabilities" : ["group_add", "interactive"]
}