Products
CRM Helpdesk Live Chat Task management Project management VoIP Knowledge base Email Email marketing Feedback Forms and surveys
More
Integrations Features Pricing Blog Contact
Log in Try for free
Developer docs

Sugester API

Integrate your application with Sugester. REST API with JSON — clients, tasks, emails, deals, forms and more.

Full documentation on GitHub

How to integrate your application or service with sugester.com

The API allows you to add posts/suggestions/bugs etc. from other systems

After logging in to Sugester, go to Settings > API to find working examples for your account.

Table of contents

API token

The API authorization code (API_TOKEN) should be retrieved from the application settings: Settings > API > API authorization code. This way you won't need to provide your login/password in API calls.

Usage examples

Add a new client

curl http://YOUR-PREFIX.sugester.pl/app/clients.json\
     -H 'Accept: application/json' \
     -H 'Content-Type: application/json' \
     -d '
{
"api_token": "YOUR_API_TOKEN",
"client": {
    "name":"client 1 from API",
    "email": "[email protected]",
    "note": "note 1"
  }
}'

Get all clients data

curl http://YOUR-PREFIX.sugester.pl/app/clients.json?api_token=YOUR_API_TOKEN

Get client data

curl http://YOUR-PREFIX.sugester.pl/app/clients/1234.json?api_token=YOUR_API_TOKEN

Update client data

curl http://YOUR-PREFIX.sugester.pl/app/clients/1234.json\
     -X PUT \
     -H 'Accept: application/json' \
     -H 'Content-Type: application/json' \
     -d '
{
"api_token": "YOUR_API_TOKEN",
"client": {
    "note": "note from API"
  }
}'

Delete a client

curl -X DELETE  http://YOUR-PREFIX.sugester.pl/app/clients/12345.json?api_token=YOUR_API_TOKEN

Add a new task

curl http://YOUR-PREFIX.sugester.pl/app/posts.json \
     -H 'Accept: application/json' \
     -H 'Content-Type: application/json' \
     -d '
{
"api_token": "YOUR_API_TOKEN",
"post": {
    "title":"task title 1 from API",
    "content": "task content 1",
    "task_kind": "task",
    "client_id": null,
    "responsible_id": 1234
  }
}'

Get all tasks data (from helpdesk)

curl http://YOUR-PREFIX.sugester.pl/app.json?api_token=YOUR_API_TOKEN

Get task data

curl http://YOUR-PREFIX.sugester.pl/app/posts/1234.json?api_token=YOUR_API_TOKEN

Add a comment to task with id post_id

curl http://YOUR-PREFIX.sugester.pl/app/posts.json \
     -H 'Accept: application/json' \
     -H 'Content-Type: application/json' \
     -d '
{
"api_token": "YOUR_API_TOKEN",
"post": {
    "post_id": 123,
    "title":"comment for task 123",
    "content": "comment content 1",
    "task_kind": "comment",
    "client_id": null,
    "responsible_id": 1234
  }
}'

Add a new deal

curl http://YOUR-PREFIX.sugester.pl/app/deals.json\
     -H 'Accept: application/json' \
     -H 'Content-Type: application/json' \
     -d '
{
"api_token": "YOUR_API_TOKEN",
"deal": {
    "name":"deal 1 from API",
    "description": "desc 1",
    "client_id": null
  }
}'

Update a deal

curl http://YOUR_PREFIX.sugester.pl/app/deals/1234.json\
    -X PUT \
    -H 'Accept: application/json' \
    -H 'Content-Type: application/json' \
    -d '
{
"api_token": "YOUR_API_TOKEN",
"deal": {
   "description": "new description from API"
 }
}'

Get all deals data

curl http://YOUR-PREFIX.sugester.pl/app/deals.json?api_token=YOUR_API_TOKEN

Get deal data

curl http://YOUR-PREFIX.sugester.pl/app/deals/1234.json?api_token=YOUR_API_TOKEN

Delete a deal

curl -X DELETE  http://YOUR-PREFIX.sugester.pl/app/deals/12345.json?api_token=YOUR_API_TOKEN

Add a contact

curl http://YOUR_PREFIX.sugester.pl/app/contacts.json\
    -H 'Accept: application/json' \
    -H 'Content-Type: application/json' \
    -d '
{
"api_token": "YOUR_API_TOKEN",
"contact": {
   "name":"contact 1 from API",
   "description": "new contact from API",
   "first_name": "John",
   "last_name": "Doe",
   "responsible_id": 1,
   "email": "[email protected]",
   "phone": "123456789"
 }
}'

Get contact data

curl http://YOUR-PREFIX.sugester.pl/app/contacts/1234.json?api_token=YOUR_API_TOKEN

Update contact data

curl http://YOUR_PREFIX.sugester.pl/app/contacts/1234.json\
    -X PUT \
    -H 'Accept: application/json' \
    -H 'Content-Type: application/json' \
    -d '
{
"api_token": "YOUR_API_TOKEN",
"contact": {
   "description": "new description from API"
 }
}'

Add a contact list

curl https://YOUR_PREFIX.sugester.pl/app/contact_lists.json \
     -H 'Accept: application/json' \
     -H 'Content-Type: application/json' \
     -d '
{
"api_token": "YOUR_API_KEY",
"contact_list": {
    "name": "New contact list"
  }
}'

Get contact list data

curl https://YOUR_PREFIX.sugester.pl/app/contact_lists/10.json?api_token=YOUR_API_TOKEN

Update contact list data

curl https://YOUR_PREFIX.sugester.pl/app/contact_lists/10.json \
     -X PUT \
     -H 'Accept: application/json' \
     -H 'Content-Type: application/json' \
     -d '
{
"api_token": "YOUR_API_TOKEN",
"contact_list": {
    "name": "New contact list updated"
  }
}'

Add a post of type "error"

curl http://your-prefix.sugester.pl/app/posts.json \
     -H 'Accept: application/json' \
     -H 'Content-Type: application/json' \
     -d '
{
"api_token": "API_TOKEN",
"post": {
    "title":"post title2",
    "content": "post content 2",
    "kind": "error"
  }
}'

Add a new account

curl http://YOUR-PREFIX.sugester.pl/app/account.json \
     -H 'Accept: application/json' \
     -H 'Content-Type: application/json' \
     -d '
{
"api_token": "YOUR_API_TOKEN",
"account": {
    "prefix":"sugester2",
    "initial_module": "crm",
    "from_partner": "partner1"
 },
"user": {
    "login": "login1",
    "email": "[email protected]",
    "password": "password1"
 }
}'

Integrations

Add a new client

curl https://YOUR_PREFIX.sugester.pl/app/clients.json \
     -H 'Accept: application/json' \
     -H 'Content-Type: application/json' \
     -d '
{
"api_token": "YOUR_API_TOKEN",
"client": {
    "name": "client 2 from External APP via API",
    "email": "[email protected]",
    "note": "note ext 2",
    "external_ids": {
        "myapp_client_id": "17"
    }
  }
}'

Add a new deal

curl https://YOUR_PREFIX.sugester.pl/app/deals.json \
     -H 'Accept: application/json' \
     -H 'Content-Type: application/json' \
     -d '
{
"api_token": "YOUR_API_TOKEN",
"deal": {
    "name": "deal 2 from External APP via API",
    "description": "desc 2",
    "price": 117,
    "client": {
        "name": "client 2 from External APP via API",
        "email": "[email protected]",
        "external_ids": {
            "myapp_client_id": "17"
        }
    },
    "external_ids": {
        "myapp_invoice_id": "21"
    }
  }
}'

Client fields specification

{
	"id": client id
	"name": client name
	"tax_no": tax number
	"post_code": postal code
	"city": city
	"street": street
	"first_name": first name
	"country": country
	"email": email
	"phone": phone
	"www": website
	"fax": fax
	"created_at": created at
	"updated_at": updated at
	"street_no": street number
	"kind": kind (buyer/seller)
	"bank": bank name
	"bank_account": bank account
	"bank_account_id":
	"shortcut": name shortcut
	"note": note
	"last_name": last name
	"discount": discount
	"payment_to_kind": default invoice payment term
	"use_delivery_address": delivery address active
	"delivery_address": delivery address
	"mobile_phone": mobile phone
	"company": is company
	"register_number": register number
	"description": description
	"project_id": project id
	"contact_id": main contact id
	"appendixes_count": attachments count
	"posts_count": emails/tasks count
	"contacts_count": contacts count
	"last_activity": last activity
	"string1..10": custom fields
	"integer1..10": custom fields
	"decimal1..10": custom fields
	"checkbox1..10": custom fields
	"date1..10": custom fields
	"text1..10": custom fields
	"datetime1..10": custom fields
	"avatar_file_name": avatar
	"avatar_content_type"
	"avatar_file_size"
	"avatar_updated_at"
	"status_id": status id
	"category_id": category id
	"department_id": department id
	"position": position
	"creator_id": creator id
	"updater_id": last updater id
	"responsible_id": responsible person id
	"province": province/state
	"sensitive_data": sensitive data hidden
	"external_id": client external ID
	"token": client token
	"paid_from": paid from
	"paid_to": paid to
	"paid_total": total payments from client
}

Post fields specification (Task/Suggestion/Report/Email)

{
    "id": post id
    "title": title
    "content": content
    "kind": suggestion type (suggestion, error, question, praise, private)
    "user_id": user id
    "points": points count
    "nick": user nick
    "votes_cache": votes count
    "comments_cache": comments count
    "forum_id": forum id
    "category_id": category id
    "created_at": created at
    "updated_at": last modified at
    "ip": IP address
    "agent": browser info
    "response": main response
    "response_user_id": responder id
    "referrer": referrer
    "responsible_id": assigned person id
    "last_action_status": status
    "email": sender email
    "uid": user token
    "spam_kind": spam type
    "answer": answer
    "answered": has answer
    "duplicate_from_id": duplicate id
    "abstract": abstract
    "status_id": status id
    "view_count": view count
    "tags": tags
    "facebook_likes": Facebook likes count
    "min_votes_to_start": votes needed to start
    "use_html": is HTML
    "email_to": email to
    "email_cc": email cc
    "email_bcc": email bcc
    "spam_score": spam score
    "spam_report": spam info
    "closed": is closed (true/false)
    "scheduled_at": scheduled date
    "task_kind": task type (feedback, email, task, help, chat, phone, lead, error, idea)
    "priority": priority
    "title_note": null
    "user_spam_report": spam report
    "client_id": client id
    "project_id": project id
    "help_link": help link key
    "help_content": help content
    "post_id": parent post id
    "www": poster website
    "private": is private (true/false)
    "unread": is unread (true/false)
    "email_recipient": recipient (helpdesk/mail)
    "email_reply_to": reply to (helpdesk/mail)
}