Youtargets.com API

Introduction


The Youtargets API is implemented as a PHP page that accepts GET or POST requests and returns JSON or XML.

API clients must hit the URL http://app.youtargets.com/api2.php

All API requests must have a key argument indicating the user, except cmd=login.

General rules

  1. You can use GET or POST. You can also encapsulate your request parameters into an JSON object and POST this object to the API. If you are submitting files however, you must use a enctype="multipart/form-data" POST.
  2. All API requests will have a cmd argument indicating what you want to do, like cmd=login.
  3. All API requests must have a key argument indicating the user, except cmd=login. The token can be used indefinitely.
  4. The response can be either in JSON or XML and it contains an outer response element at the root. By default the API returns JSON, if you need XML returned add an xml=1 parameter to your request.
  5. If the first child node is <error>, something went wrong.
  6. If the key is not supplied, or if the key does not correspond to a logged-on user, you'll get error code 800:
    {"response":{"error":{"nr":800,"text":"Invalid API key"}}}

Introduction

Account

Users

Groups

Contacts

Companies

Websites

Emails

Phones

IMs

Addresses

Deals

Cases

Tags

Tasks

Notes

Custom Fields


LISTING

VIEWING

CREATING

MODIFYING

DELETING


Reference Data

API Wrapper (php)