Teamgate

Suggest Edits

Getting Started with Teamgate API

 

This documentation will help you to get started with RESTful Teamgate API. Out API receives and parses CORS (Cross-Origin Resource Sharing) requests and returns results in JSON format. Every request must have application key (APP_KEY) and users AUTH_TOKEN.

Suggest Edits

Application Key

 

Application key is a unique sequence of symbols, assigned to your app by request. You should set APP_KEY in every API request. By this key we determine whether your application has rights to send requests to our API. APP_KEY should be added to every request's header as „X-App-Key” parameter.

Settings -> Additional Features -> External Apps -> New API Key Request

Settings -> Additional Features -> External Apps -> New API Key Request

Suggest Edits

Authorization Token

 

Unique authorization token is being generated to every user in Teamgate. You can find it in your profile or by using API method „authorization” (see http://developers.teamgate.com/). This token is used to determine user in our system and should be set in every request's header as „X-Auth-Token” parameter.

My Profile -> Integrations -> AUTH_TOKEN

My Profile -> Integrations -> AUTH_TOKEN

Suggest Edits

Users Permissions

 

Every request should have APP_KEY as header parameter „X-App-Key” and user's AUTH_TOKEN as header parameter „X-Auth-Token”. By these parameters Teamgate API checks permissions whether user can call specified API method. Users permissions are set using roles tree in your account settings (Settings → Users Management → User Roles).

Suggest Edits

Making API Request

 

Teamgate API uses simple URL rules. Every request should have APP_KEY and AUTH_TOKEN. API URL for all requests is https://api.teamgate.com/. Simply add to url controller, action and parameters required by action (e.g. controller: sales, action getSalesUdfList – https://api.teamgate.com/sales/getSalesUdfList). All requests should be sent by POST, GET, PUT or DELETE methods. Also, don't forget to add APP_KEY and AUTH_TOKEN as header parameters. APP_KEY is passed with header parameter „X-App-Key“, AUTH_TOKEN is passed with header parameter „X-Auth-Token“. Result is returned in JSON format, for example {"success":true,"data":{the_data}}. Success would have true or false values.

Suggest Edits

API Request Limits

 

Request limiting of the API is primarily considered on a per-account — or more accurately described, per Application Key in your account. By default rate limit is 1000 requests by Application Key per 15 minutes. If you want to increase the limit of API requests, please write to us at support@teamgate.com.

HTTP Headers and Response Codes

If you hit the rate limit on a given endpoint, this is the body of the HTTP 193 message that you will see:

{
    "success": false,
    "error": "API key request limit reached: 1000",
    "code": 193
}

Teamgate API uses HTTP and some custom response codes to indicate the success or failure of an API request.

The codes consist of 3 numbers. The first number generally denotes the type of error.

19x codes means that something went wrong with authentication, 2xx codes generally indicate success, 4xx codes indicate a problem with the request that was sent, incorrect query parameter/syntax etc, 5xx codes means that something went wrong on the blog's server, and 7xx codes indicate internal application errors.

Error responses

Errors are returned in JSON, with a top-level error keys code and message.

Each error currently has a message and an error Type.

This error response format is likely to get an overhaul in the near future.

Examples:

{
    "success": false,
    "error": "API key request limit reached: 1000",
    "code": 193
}
{
  "success": false,
  "error": "Url invalid",
  "code": 750
}

HTTP success/error codes used:

Code Message
190 APP_KEY_NOT_FOUND
191 APP_KEY_INVALID
192 APP_NOT_ACTIVE
193 API key request limit reached: xxxx
194 URL_INVALID
196 ACCOUNT_EXPIRED
197 USER_TOKEN_INVALID
198 USERNAME_OR_PASSWORD_INVALID
199 GATEWAY_ERROR
200 OK. Response for successful HTTP requests.
201 Created. The request has been fulfilled, resulting in the creation of a new resource.
400 Bad Request. The server cannot or will not process the request due to an apparent client error.
403 Forbidden. The request was a valid request, but the server is refusing to respond to it. The user might be logged in but does not have the necessary permissions for the resource.
404 Not Found. The requested resource could not be found but may be available in the future. Subsequent requests by the client are permissible.
405 Method Not Allowed. A request method is not supported for the requested resource.
500 Internal Server Error. A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.
700 REQUEST_TYPE
701 APP_KEY
702 API_KEY
703 USERNAME_OR_PASSWORD
704 USER_NOT_ACTIVE
705 APP_NOT_ACTIVE
706 QUERY_LIMIT
707 ACCESS_TOKEN
708 DB
709 NO_APP_DATA
710 NO_API_USERS_DATA
711 WRONG_DATA
712 NO_PERMISSIONS
713 NOT_SECURE_CONNECTION
714 WRONG_IP
715 NO_APP_KEY
716 DB_NAME_INVALID
717 USER_NOT_FOUND
720 DATA_LIMIT
750 ACTION_ERROR
760 DB_QUERY_ERROR
 
Attribute Description
id
Integer
readonly
Unique key of the Comment.
value
String
Value of the Comment.
created
Object
readonly
User, date and time Commnet was created. Information is read only, because automatically generated by the server. Read more information about Created object here.
Suggest Edits

Comment

Retrieve a Single Comment

 
gethttps://api.teamgate.com/v4/comments/:id
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$commentId = 2;
$result = $teamgate->comments->get($commentId);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
id
Integer
required

Unique key of the Comment.

Example: ?id=2

Suggest Edits

Comment Update

 
puthttps://api.teamgate.com/v4/comments/:id
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$commentId = 1;
$data = array(
    'value' => '2nd my comment'
);

$result = $teamgate->comments->update($commentId, $data);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
value
String
Example: "value": "2nd My Comment"
Suggest Edits

Comment Delete

 
deletehttps://api.teamgate.com/v4/comments/:id
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$commentId = 1;
$result = $teamgate->comments->delete($commentId);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
id
Integer
required

Unique key of the Comment.

Example: ?id=1

Suggest Edits

COMPANIES

 

Properties

Supported companies properties:

Attribute Description
id
Integer
readonly
Unique key of the Company.
name
String
Name of the Company. Maximum length is 255 characters.
picture
String
The company's picture. For the comapny picture is using Picture object. Read more information about Picture object here.
customerStatus
Object
The deal's buyer. For the buyer deal is using Contact object. Read more information about Contact object here.
prospectStatus
Object
The deal’s stage. Read more information about deals Stage object here.
owner
Object
For the owner is using User object. Read more information about User object here.
starred
Boolean
Indicator of whether or not the deal is important and marked by star.
source
Object
The deal’s source. Source are assigned from a common sources list. Read more information about Source object here.
industry
Object
The company industry. Industry are assigned from a common industry list. Read more information about Industry object here.
created
Object
readonly
User, date and time Company record was created. information is read only, because automatically generated by the server. Read more information about Created object here.
updated
Object
readonly
User, date and time Company record was updated. information is read only, because automatically generated by the server. Read more information about Updated object here.
isDeleted
Boolean
Indicator the company is deleted or not.
person
Object
The company primary person. For the company primary person is using Person object. Read more information about company Person object here.
emails
Array
An array of email objects for the company. Read more information about Email object here.
phones
Array
An array of phone objects for the company. Read more information about Phone object here.
urls
Array
An array of url objects for the company. Read more information about Url object here.
addresses
Array
An array of address objects for the company. Read more information about Address object here.
customFields
Array
An array of custom Fields for the company. Read more information about customFields object here.
 
gethttps://api.teamgate.com/v4/companies/:id
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$companyId = 1;
$result = $teamgate->companies->get($companyId);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
id
Integer
required

Unique key of the Company.

Example: ?id=1

Suggest Edits

Company Create

 
posthttps://api.teamgate.com/v4/companies
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$data = array(
    'name' => 'First Company by API',
    'customFields' => array{
        '1' => 'Value for fields with Id 1', // input with type: text, date, number, currency,url
        '2' => 5, //input with type: select
        '3' => [6, 7] //input with type: multi-select
    }  
);

$result = $teamgate->companies->create($data);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
name
String
Required
Required field.
Example: "name": "Example Ltd"
personId
Integer
Example: "personId": "2"
jobTitle
String
The field will be set only if personId is not empty.
Example: "jobTitle": "CEO"
customerStatus
Integer
Possible values:
  • 0 - Non Customer
  • 1 - Past Customer
  • 2 - Customer

Example: "customerStatus": "2"
prospectStatus
Integer
Possible values:
  • 0 - Non Prospect
  • 1 - Lost Prospect
  • 2 - Prospect

Example: "prospectStatus": "0"
starred
Boolean
Indicator the company is starred or not.

Possible values:
  • yes or no,
  • true or false,
  • 1 or 0.

Example: "starred": "yes"
ownerId
Integer
Example: "ownerId": "1"
ownerUsername
String
Example: "ownerUsername": "john@example.com"
sourceId
Integer
Example: "sourceId": "123"
source
String
If the source does not exist it will be created.
Example: "source": "www.bing.com"
sourceDescription
String
Will be set only if will be created new source.
Example: "sourceDescription": "Bing is a web search engine owned and operated by Microsoft."
industryId
Integer
Example: "industryId": "234"
industry
String
If the industry does not exist it will be created.
Example: "industry": "Computer software"
industryDescription
String
Will be set only if will be created new industry.
Example: "industryDescription": "Computer software (often called just software) is a set of instructions and associated documentation"
tags
String | Array
Example:
  • "tags": "B2B"
  • "tags": "[B2B, B2C]"
emails
String
Example:
  • "email": "john@example.net"
  • "emails": "{'value':'john@example.net','type':'work'}"
  • "emails": "[{'value':'john@example.net','type':'work'},{'value':'john.brown@example.net','type':'home'}]"
phones
String
Example:
  • "phone": "+44 123 456 7890"
  • "phones": "{'value':'+44 123 456 7890','type':'mobile'}"
  • "phones": "[{'value':'+44 123 456 7890','type':'mobile'},{'value':'+44 123 456 7800','type':'fax'}]"
urls
String
Example:
  • "url": "http://example.com"
  • "urls": "{'value':'http://example.com','type':'website'}"
  • "urls": "[{'value':'http://example.com','type':'website'},{'value':'https://facebook.com/example','type':'facebook'}]"
addresses
String
Example:
  • "address": "{'city':'Chicago','countryIso':'USA'}"
  • "addresses": "[{'city':'Chicago','countryIso':'USA'},{'longitude':'51.5109393','latitude':'0.030166'}]"
code
String
Unique code of the Company.
Example: "code": "1234567890"
vatCode
String
VAT identification number of the Company.
Example: "vatCode": "UK1234567890123"
customFields
String
Example for string value (fieldId : value):
  • "customFields": "[{'1':'Test value for field with Id 1'},{'2':'Value for field with Id 2'}]"
Example for select (fieldID : valueId):
  • "customFields": "{'3':'5'}"
Example for multi-select (fieldID : [valueId, valueId]):
  • "customFields": "[{'3':'5'},{'4':['8','9']}]"
Suggest Edits

Upload a Company Avatar

 
puthttps://api.teamgate.com/v4/companies/:id/avatar/
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$companyId = 3;
$avatar = array(
    'size' => 630,//bytes
    'content' => 'iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAATlBMVEVVu8r////3/f5fxdNYwtDd9Pae3OTn9vlwy9jJ7PF90Ny65evu+fqz5OrA6e7Q7/Or4emQ1+GC0t13ztri9fem3+fY8PRmx9WI1N6Y2uP+KiDXAAAB40lEQVRYw+2W63KkIBBGu5sebwPiXef9X3QRcYnoxkFrU5VUzg+tkukz2J8K8MtXUaiE79S3hJjfEShEpGtTaHSeATxngQDoBxWpyQhRCiewEynjBC80FKvgYU7p27ViNIfkuqAi0mYGg1KPSwJB5sc1LEQKskmYAxqSOYYiVtAjUrYK2NToOAFLm5UT1POpjRPMN587gUvhRwgepZZ3BDwPwA0BcDvCHYFIkao7gsp+UL53jHsB8z2BkjK5I1BoaK4LXjijLgsasoL6qmCUtl5/0oMBimWO/YGAO1vfbWPIVCXAYodz+yeU017A2tbLLFw910sjYUANuRfIEq27gA32arpMqgkNUpMXOBLYCXxbXrgjFFRHi6hfOZ9nghx21JuZ5b7sSPDg4z2EgaYly84V9dnU7QRSwBGuuy6KJcbarpKBgFo4hJfhdNEX9LdVQyCo4R+I1I4PaxRrS7utoPp8L+aj6Ete2+sFJ5u1mvYhN7QRPPhsafdR+G56QRDAntL3eZPn8llPTUYn8LBNWrvq5T2WE5zC6cdnTaGnBNG+u7Vcm53gB5q3N7cuiuC97mDLeRRltfkuTFF785DYzb7GkIGjBJwH9Zohkp7QQxXEI9T6DEs1wjXaRD1VUjD88t/5A/qiFY07FC9DAAAAAElFTkSuQmCC'  
);

$company = $teamgate->companies->get($companyId);
$result = $company->avatar->update($avatar);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
size
Integer
Example: "size": 8
contect
String
Example: "contect": "dGVhbWdhdGU="
Suggest Edits

Company Delete

 
deletehttps://api.teamgate.com/v4/companies/:id
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$companyId = 1;
$result = $teamgate->companies->delete($companyId);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
id
Integer
required
Unique key of the Company.

Example: ?id=1
Suggest Edits

Companies List

 
gethttps://api.teamgate.com/v4/companies
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$result = $teamgate->companies->get();

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
name
String
Name of the Company. You can search by full name or by fragment of name. Maximum length is 255 characters.
Example for strict search: ?name=Example%20Ltd
And search by text fragment: ?name[like]=Example
createdTime
DateTime
Date and time of the creation in RFC3339 format. For the strictly search use the string. For date range use array and parameters lt and gt, or lte, or gte.
convertedTime
DateTime
Date and time of the convertion from lead in RFC3339 format. For the strictly search use the string. For date range use array and parameters lt and gt, or lte, or gte.
createdUserId
Integer
Unique identifier of the user who created the company.
Example: ?createdUserId=6
updatedUserId
Integer
Unique identifier of the user who updated the company.
Example: ?updatedUserId=6
ownerId
Integer
Unique identifier of the user who is company owner.
Example: ?ownerId=6
isDeleted
Boolean
Indicator the company is deleted or not.

Possible values:
  • yes or no,
  • true or false,
  • 1 or 0.

Example: ?isDeleted=no
starred
Boolean
Indicator the company is starred or not.

Possible values:
  • yes or no,
  • true or false,
  • 1 or 0.

Example: ?starred=yes
customerStatus
Integer
Customer status of the company.
Example: ?customerStatus=1
prosperctStatus
Integer
Prospect status of the company.
Example: ?prosperctStatus=2
source
String
Source of the company.
Example: ?source=google.com
sourceId
Integer
Unique identifier of the source.
Example: ?sourceId=123
industry
String
Industry of the company.
Example: ?industry=Banking
industryId
Integer
Unique identifier of the industry.
Example: ?industryId=234
updatedTime
DateTime
Date and time of the update in RFC3339 format. For the strictly search use the string. For date range use array and parameters lt and gt, or lte, or gte
phone
String
Phone number of the company. The minimum number of characters for the search is 3. The search is performed by the last characters.
Example: ?phone=556664
email
String
Email address of the company. The minimum number of characters for the search is 3.
Example: ?email=@gmail.com
code
String
Unique code of the Company.
Example: ?code=1234567890
vatCode
String
VAT identification number of the Company.
Example: ?vatCode=UK1234567890123
order
String
A field to sort by. You can sort by multiple fields. You can specify the sort order to descending, append desc or to ascending, append asc.

Possible values:
  • name
  • createdTime
  • updatedTime
  • convertedTime

Example: ?order=createdTime:desc
limit
Integer
Response items count. Example: ?limit=10
offset
Integer
Returned result first value number. Example: ?offset=0
Suggest Edits

Company Tags

 
gethttps://api.teamgate.com/v4/companies/:id/tags
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$companyId = 1;

$company = $teamgate->companies->get($companyId);
$result = $company->tags->get();

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

With a sub-resource of company "tags" is used the same parameters as with resource "Tags".
Suggest Edits

Company People

 
gethttps://api.teamgate.com/v4/companies/:id/people
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$companyId = 1;
$companyPeopleParams = array(
	'isDeleted' => 'no',
	'order' => array(
		'createdTime' => 'desc'  
  )
);

$company = $teamgate->companies->get($companyId);
$result = $company->people->get($companyPeopleParams);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

With a sub-resource of company "deals" is used the same parameters as with resource "deals".
Suggest Edits

Company Deals

 
gethttps://api.teamgate.com/v4/companies/:id/deals
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$companyId = 1;
$companyDealsParams = array(
	'isDeleted' => 'no',
	'order' => array(
		'createdTime' => 'desc'  
  )
);

$company = $teamgate->companies->get($companyId);
$result = $company->deals->get($companyDealsParams);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

With a sub-resource of company "deals" is used the same parameters as with resource "deals".
Suggest Edits

Company Events

 
gethttps://api.teamgate.com/v4/companies/:id/events
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$companyId = 1;
$companyEventsParams = array(
	'isDeleted' => 'no',
	'order' => array(
		'start' => 'desc'  
  )
);

$company = $teamgate->companies->get($companyId);
$result = $company->events->get($companyEventsParams);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

With a sub-resource of company "events" is used the same parameters as with resource "events".
Suggest Edits

Get a Company Files

 
gethttps://api.teamgate.com/v4/companies/:id/files
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$companyId = 1;
$company = $teamgate->companies->get($companyId);
$result = $company->files->get();

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Suggest Edits

Company Customer Statuses

 
gethttps://api.teamgate.com/v4/companies/:id/customerStatuses
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$companyId = 1;

$company = $teamgate->companies->get($companyId);
$result = $company->customerStatuses->get();

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 
Suggest Edits

Company Prospect Statuses

 
gethttps://api.teamgate.com/v4/companies/:id/prospectStatuses
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$companyId = 1;

$company = $teamgate->companies->get($companyId);
$result = $company->prospectStatuses->get();

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 
Suggest Edits

Company Industries

 
gethttps://api.teamgate.com/v4/companies/:id/industries
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$companyId = 1;

$company = $teamgate->companies->get($companyId);
$result = $company->industries->get();

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

With a sub-resource of company "industries" is used the same parameters as with resource "industries".
Suggest Edits

Company Sources

 
gethttps://api.teamgate.com/v4/companies/:id/sources
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$companyId = 1;

$company = $teamgate->companies->get($companyId);
$result = $company->sources->get();

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

With a sub-resource of company "sources" is used the same parameters as with resource "sources".
Suggest Edits

Companies Custom Fields

 
gethttps://api.teamgate.com/v4/companies/:id/customFields
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$compnyId = 1;

$company = $teamgate->companies->get($compnyId);
$result = $company->customFields->get();

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

With a sub-resource of company "customFields" is used the same parameters as with resource "customFields".
Suggest Edits

Get a Company Custom Field

Returns a set of company custom field value.

 
gethttps://api.teamgate.com/v4/companies/:id/customFields/:fieldId
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$companyId = 1;
$fieldId = 5;

$company = $teamgate->companies->get($companyId);
$result = $company->customFields->get($fieldId);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

With a sub-resource of company "customFields" is used the same parameters as with resource "customFields".
Suggest Edits

Company Update

 
puthttps://api.teamgate.com/v4/companies/:id
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$companyId = 1;
$data = array(
    'name' => 'Second Company by API',
    'customFields' => array{
        '1' => 'Value for fields with Id 1', // input with type: text, date, number, currency,url
        '2' => 5, //input with type: select
        '3' => [6, 7] //input with type: multi-select
    }   
);

$result = $teamgate->companies->update($companyId, $data);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
name
String
Example: "name": "Example Ltd"
customerStatusId
Integer
Possible values:
  • 0 - Non Customer
  • 1 - Past Customer
  • 2 - Customer

Example: "customerStatusId": "2"
prospectStatusId
Integer
Possible values:
  • 0 - Non Prospect
  • 1 - Lost Prospect
  • 2 - Prospect

Example: "prospectStatusId": "0"
starred
Integer
Indicator the person is starred or not.

Possible values:
  • yes or no,
  • true or false,
  • 1 or 0.

Example: "starred": "yes"
ownerId
Integer
Example: "ownerId": "2"
ownerUsername
String
Example: "ownerUsername": "john@example.com"
sourceId
Integer
Example: "sourceId": "123"
source
String
If the source does not exist it will be created.
Example: "source": "www.bing.com"
sourceDescription
String
Will be set only if will be created new source.
Example: "sourceDescription": "Bing is a web search engine owned and operated by Microsoft."
industryId
Integer
Example: "industryId": "234"
industry
String
If the industry does not exist it will be created.
Example: "industry": "Computer software"
industryDescription
String
Will be set only if will be created new industry.
Example: "industryDescription": "Computer software (often called just software) is a set of instructions and associated documentation"
tags
String | Array
Example:
  • "tags": "B2B"
  • "tags": "[B2B, B2C]"
code
String
Unique code of the Company.
Example: "code": "1234567890"
vatCode
String
VAT identification number of the Company.
Example: "vatCode": "UK1234567890123"
customFields
String
Example for string value (fieldId : value):
  • "customFields": "[{'1':'Test value for field with Id 1'},{'2':'Value for field with Id 2'}]"
Example for select (fieldID : valueId):
  • "customFields": "{'3':'5'}"
Example for multi-select (fieldID : [valueId, valueId]):
  • "customFields": "[{'3':'5'},{'4':['8','9']}]"
Suggest Edits

Company Tags Rewrite

Rewrite company tags

 
puthttps://api.teamgate.com/v4/companies/:id/tags
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$companyId = 3;
$tags = array(
    'value' => ['B2B', 'B2C']
);

$company = $teamgate->companies->get($companyId);
$result = $company->tags->update($tags);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
value
String | Array
Example:
  • "value": "B2B"
  • "value": "[B2B, B2C]"
Suggest Edits

Company Tags Update

Update company tags

 
patchhttps://api.teamgate.com/v4/companies/:id/tags
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$companyId = 3;
$tags = array(
    'value' => ['B2B', 'B2C']
);

$company = $teamgate->companies->get($companyId);
$result = $company->tags->update($tags);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
value
String | Array
Example:
  • "value": "B2B"
  • "value": "[B2B, B2C]"
Suggest Edits

Company Tag Delete

 
deletehttps://api.teamgate.com/v4/companies/:id/tags/:tagId
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$companyId = 1;
$tagId = 5;
$company = $teamgate->companies->get($companyId);
$result = $company->tags->delete($tagId);

echo "<pre>";
print_r($result);

A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
id
Integer
required

Unique key of the Tag of Company.

Example: ?id=1

Suggest Edits

Detach All Tags from Company

 
deletehttps://api.teamgate.com/v4/companies/:id/tags
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$companyId = 1;
$company = $teamgate->companies->get($companyId);
$result = $company->tags->delete();

echo "<pre>";
print_r($result);

A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
id
Integer
required

Unique key of the Tag of Person.

Example: ?id=1

Suggest Edits

Replace a Company Files

Rewrite company files

 
puthttps://api.teamgate.com/v4/companies/:id/files
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$companyId = 3;
$files = array(
    'value' => [1, 2, 5, 6, 7, 12]
);

$company = $teamgate->companies->get($companyId);
$result = $company->files->update($files);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
value
Array
Example:
  • "value": "[1, 3, 7, 12]"
Suggest Edits

Attach a Files to Company

 
patchhttps://api.teamgate.com/v4/companies/:id/files
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$companyId = 3;
$files = array(
    'value' => [1, 3, 7, 8, 12]
);

$company = $teamgate->companies->get($companyId);
$result = $company->files->patch($files);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
value
Array
Example:
  • "value": "[1, 3, 7, 8, 12]"
Suggest Edits

Detach File from Company

 
deletehttps://api.teamgate.com/v4/companies/:id/files/:fileId
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$companyId = 1;
$fileId = 5;
$company = $teamgate->companies->get($companyId);
$result = $company->files->delete($fileId);

echo "<pre>";
print_r($result);

A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
id
Integer
required

Unique key of the File of Company.

Example: ?id=1

Suggest Edits

Detach All Files from Company

 
deletehttps://api.teamgate.com/v4/companies/:id/files
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$companyId = 1;
$company = $teamgate->companies->get($companyId);
$result = $company->files->delete();

echo "<pre>";
print_r($result);

A binary file was returned

You couldn't be authenticated

Try the API to see results
 
Suggest Edits

CUSTOM FIELDS

 

Properties

Supported custom fields properties:

Attribute Description
id
Integer
readonly
Unique key of the Custom Field.
name
String
Name of the Custom Field.
module
String
Assigned module for Custom Field. This field must have one of the following values:
  • leads
  • people
  • companies
  • deals
isActive
Boolean
Indicator the field is active or not.
isFilter
Boolean
Indicator the field is marked as filtered or not.
isList
Boolean
Indicator the field is shown in the list or not.
type
String
Value type assigned for field.
items
Array
...
value
Mixed
...
Suggest Edits

Custom Field

Retrieve a Single User

 
gethttps://api.teamgate.com/v4/customFields/:id
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$customFieldId = 2;
$result = $teamgate->customFields->get($customFieldId);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
id
Integer
required

Unique key of the Custom Field.

Example: ?id=2

Suggest Edits

Custom Fields List

Retrieve All Custom Fields

 
gethttps://api.teamgate.com/v4/customFields
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$result = $teamgate->customFields->get();

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

{
	"success": true,
	"data":[
    {
      "id": 2,
      "name": "Michael",
      "surname": "Jonson",
      "username": "michael.jonson@example.net",
      "picture":{
      	"small": "https://ws-us1.teamgate.com/images/example/users_photos/2/small.jpg",
       	"medium": "https://ws-us1.teamgate.com/images/example/users_photos/2/middle.jpg",
       	"large": "https://ws-us1.teamgate.com/images/example/users_photos/2/big.jpg"
        },
      "email": "michael.jonson@example.net",
      "position": "Administrator",
      "language": {
        "code": "en",
        "name":	"english"
      },
      "locale": "en_gb",
      "timeZone": "Europe/Helsinki",
      "created": {
        "time": "2015-10-28T09:00:00+03:00"
      },
      "role": "Admin",
      "isActive": "yes",
      "lastLogin": {
      	"time": "2016-10-10T08:23:45+03:00"
      }
		},
			{
          "id": 3,
          "name": "John",
          "surname": "Brown",
          "username": "john.brown@example.net",
          "picture":{
            "small": "https://ws-us1.teamgate.com/images/example/users_photos/3/small.jpg",
            "medium": "https://ws-us1.teamgate.com/images/example/users_photos/3/middle.jpg",
            "large": "https://ws-us1.teamgate.com/images/example/users_photos/3/big.jpg"
            },
          "email": "john.brown@example.net",
          "position": "CEO",
          "language": {
            "code": "en",
            "name":	"english"
          },
          "locale": "en_gb",
          "timeZone": "Europe/Helsinki",
          "created": {
            "time": "2015-10-28T11:30:00+03:00"
          },
          "role": "Admin",
          "isActive": "yes",
          "lastLogin": {
            "time": "2016-10-10T08:45:59+03:00"
          }
      ]
}
 

Parameters

Attribute Description
name
String
Name of the Custom Field. You can search by full name or by fragment of name.
Example for strict search: ?name=Bussness%20Type
And search by text fragment: ?name[like]=Bussness
isActive
Boolean
Indicator the Custom Field is active or not.

Possible values:
  • yes or no,
  • true or false,
  • 1 or 0.

Example: ?isActive=yes
isFilter
Boolean
Indicator the Custom Field is active or not.

Possible values:
  • yes or no,
  • true or false,
  • 1 or 0.

Example: ?isFilter=true
type
Boolean
Type of the Custom Field.

Possible values:
  • text - Field that you can enter yourself.
  • single_option - One option to select a value.
  • multi_option - More then one option to select a value.
  • number - Number that you can enter yourself.
  • monetary - Field that you can enter some value in currency.
  • date - Appearing data picker to set important dates.
  • long_text - Long text type field is for records of up to 6000 symbols.
  • url - URL link.

Example: ?type=multi_option

Properties

Supported deals properties:

Attribute Description
id
Integer
readonly
Unique key of the Deal.
name
String
Name of the Deal. Maximum length is 255 characters.
price
Object
The deal’s price. Read more information about deals Price object here.
buyer
Object
The deal's buyer. For the buyer deal is using Contact object. Read more information about Contact object here.
stage
Object
The deal’s stage. Read more information about deals Stage object here.
status
Object
The deal’s status. Read more information about deals Status object here.
starred
Boolean
Indicator of whether or not the deal is important and marked by star.
source
Object
The deal’s source. Source are assigned from a common sources list. Read more information about Source object here.
created
Object
readonly
User, date and time Deal record was created. information is read only, because automatically generated by the server. Read more information about Created object here.
owner
Object
For the owner is using User object. Read more information about User object here.
isDeleted
Boolean
Indicator the deal is deleted or not.
estimatedClosureDate
DateTime
Date up to which is scheduled to close deal. Must be an RFC3339 timestamp with mandatory time zone offset, e.g., 2016-10-01T10:00:00+03:00, 2016-10-01T10:00:00Z. Milliseconds may be provided but will be ignored.
customFields
Array
An array of custom Fields for the deal. Read more information about customFields object here.
gethttps://api.teamgate.com/v4/deals/:id
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$dealId = 1;
$result = $teamgate->deals->get($dealId);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

{
    "success": true,
    "data": [
        {
            "id": 1,
            "title": "Test Deal #1",
            "price": {
                "price": 1234.50,
                "currency": "USD",
                "rate": 0.83968,
                "basePrice": 1036.59,
              	"baseCurrency": "EUR"
            },
            "buyer": {
                "id": 123,
                "name": "Comapny Name Ltd",
                "email": "title@name.net",
                "phone": "01234-567890"
            },
            "stage": {
                "id": 27,
                "name": "Qualification",
                "pipeline": "Account Management Sales"
            },
            "status": {
                "name": "won",
                "date": "1428440400",
                "changed": "1459358952"
            },
            "source": {
                "id": 33,
                "name": "google.com"
            },
          	"tags": ["1st tag", "2nd tag", 75, "4th tag"],
            "createdDate": "2016-10-15T09:18:05+03:00",
          	"estimatedClosureDate": "2016-10-30T09:18:05+03:00",
          	"closureDate": "2016-10-28T12:34:56+03:00",
            "favorite": 1,
            "isDeleted": 0,
            "creator": {
                "id": 12,
                "name": "Jimmy Parker",
              	"username": "jimmy.parker@company.net"
            },
            "responsible": {
                "id": 12,
                "name": "Jimmy Parker",
              	"username": "jimmy.parker@company.net"
            }
        }
    ]
}
 

Parameters

Attribute Description
id
Integer
required

Unique key of the Deal.

Example: ?id=1

Suggest Edits

Deal Create

 
posthttps://api.teamgate.com/v4/deals
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$data = array(
    'name' => 'My 1st Deal by API',
    'priceValue' => '2275.50',
    'priceCurrency' => 'USD',
    'favorite' => 1,
    'respossibleId' => 12,
    'stageId' => 27,
    'buyerId' => 36,
    'statusName' => 'active',
    'sourceId' => 200,
  	'tags' => ['B2B', 'B2C'],
    'customFields' => array{
        '1' => 'Value for fields with Id 1', // input with type: text, date, number, currency,url
        '2' => 5, //input with type: select
        '3' => [6, 7] //input with type: multi-select
    }  
);

$result = $teamgate->deals->create($data);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
name
String
Example: "name": "1st My Deal"
buyerId
Integer
Required
Example: "buyerId": "5"
stageId
Integer
Example: "stageId": "5"
status
String
Possible values:
  • active - the deal is open
  • won - the deal is won
  • lost - the deal is lost
  • postponed - the deal is postponed


Example: "status": "lost"
priceValue
Float
Example: "priceValue": "1725.50"
priceCurrency
String
Example: "priceCurrency": "USD"
starred
String
Indicator the deal is starred or not.

Possible values:
  • yes or no,
  • true or false,
  • 1 or 0.

Example: "starred": "yes"
ownerId
Integer
Example: "ownerId": "1"
ownerUsername
String
Example: "ownerUsername": "john@example.com"
sourceId
Integer
Example: "sourceId": "123"
source
String
If the source does not exist it will be created.
Example: "source": "www.bing.com"
sourceDescription
String
Will be set only if will be created new source.
Example: "sourceDescription": "Bing is a web search engine owned and operated by Microsoft."
tags
String | Array
Example:
  • "tags": "B2B"
  • "tags": "[B2B, B2C]"
estimatedClosureDate
Date
Example: "estimatedClosureDate": "2017-03-05T11:45:59+02:00"
customFields
String
Example for string value (fieldId : value):
  • "customFields": "[{'1':'Test value for field with Id 1'},{'2':'Value for field with Id 2'}]"
Example for select (fieldID : valueId):
  • "customFields": "{'3':'5'}"
Example for multi-select (fieldID : [valueId, valueId]):
  • "customFields": "[{'3':'5'},{'4':['8','9']}]"
Suggest Edits

Deal Update

 
puthttps://api.teamgate.com/v4/deals/:id
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$dealId = 1;
$data = array(
    'name' => 'My 2nd Deal by API',
    'customFields' => array{
        '1' => 'Value for fields with Id 1', // input with type: text, date, number, currency,url
        '2' => 5, //input with type: select
        '3' => [6, 7] //input with type: multi-select
    }   
);

$result = $teamgate->deals->update($dealId, $data);

echo "<pre>";
print_r($result);

A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
name
String
Example: "name": "2nd My Deal"
buyerId
Integer
Required
Example: "buyerId": "5"
stageId
Integer
Example: "stageId": "5"
status
String
Possible values:
  • active - the deal is open
  • won - the deal is won
  • lost - the deal is lost
  • postponed - the deal is postponed


Example: "status": "postponed"
priceValue
Float
Example: "priceValue": "1725.50"
priceCurrency
String
Example: "priceCurrency": "USD"
starred
String
Indicator the deal is starred or not.

Possible values:
  • yes or no,
  • true or false,
  • 1 or 0.

Example: "starred": "yes"
ownerId
Integer
Example: "ownerId": "1"
ownerUsername
String
Example: "ownerUsername": "john@example.com"
sourceId
Integer
Example: "sourceId": "123"
source
String
If the source does not exist it will be created.
Example: "source": "www.bing.com"
sourceDescription
String
Will be set only if will be created new source.
Example: "sourceDescription": "Bing is a web search engine owned and operated by Microsoft."
tags
String | Array
Example:
  • "tags": "B2B"
  • "tags": "[B2B, B2C]"
estimatedClosureDate
Date
Example: "estimatedClosureDate": "2017-03-05T11:45:59+02:00"
customFields
String
Example for string value (fieldId : value):
  • "customFields": "[{'1':'Test value for field with Id 1'},{'2':'Value for field with Id 2'}]"
Example for select (fieldID : valueId):
  • "customFields": "{'3':'5'}"
Example for multi-select (fieldID : [valueId, valueId]):
  • "customFields": "[{'3':'5'},{'4':['8','9']}]"
Suggest Edits

Deal Delete

 
deletehttps://api.teamgate.com/v4/deals/:id
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$dealId = 1;
$result = $teamgate->deals->delete($dealId);

echo "<pre>";
print_r($result);

A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
id
Integer
required

Unique key of the Deal.

Example: ?id=1

Suggest Edits

Deals List

 
gethttps://api.teamgate.com/v4/deals/
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$result = $teamgate->deals->get();

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

{
    "success": true,
    "data": [
        {
            "id": 10,
            "title": "Test Deal #1",
            "price": {
                "price": 1234.50,
                "currency": "USD",
                "rate": 0.83968,
                "basePrice": 1036.59,
              	"baseCurrency": "EUR"
            },
            "buyer": {
                "id": 123,
                "name": "Comapny Name Ltd.",
                "email": "company@name.net",
                "phone": "01234-567890"
            },
            "stage": {
                "id": 27,
                "name": "Qualification",
                "pipeline": "Account Management Sales"
            },
            "status": {
                "name": "won",
                "date": "1428440400",
                "changed": "1459358952"
            },
            "source": {
                "id": 33,
                "name": "google.com"
            },
          	"tags": ["1st tag", "2nd tag", 75, "4th tag"],
            "createdDate": "2016-10-15T09:18:05+03:00",
          	"estimatedClosureDate": "2016-10-30T09:18:05+03:00",
          	"closureDate": "2016-10-28T12:34:56+03:00",
            "favorite": 1,
            "isDeleted": 0,
            "creator": {
                "id": 12,
                "name": "Jimmy Parker",
              	"username": "jimmy.parker@company.net"
            },
            "responsible": {
                "id": 12,
                "name": "Jimmy Parker",
              	"username": "jimmy.parker@company.net"
            },
              	{
                  "id": 14,
                  "name": "James Parker",
                  "username": "james.parker@company.net"
            		}
            ]
        }
    ]
}
 

Parameters

Attribute Description
name
String
Name of the Deal. You can search by full name or by fragment of name. Maximum length is 255 characters.
Example for strict search: ?name=Deal%20No:%205
And search by text fragment: ?name[like]=Deal
estimatedClosureDate
DateTime
Planning date and time of the deal closure in RFC3339 format. For the strictly search use the string. For date range use array and parameters lt and gt, or lte, or gte.
createdTime
DateTime
Date and time of the creation in RFC3339 format. For the strictly search use the string. For date range use array and parameters lt and gt, or lte, or gte.
createdUserId
Integer
Unique identifier of the user who created the company.
Example: ?createdUserId=6
updatedTime
DateTime
Date and time of the update in RFC3339 format. For the strictly search use the string. For date range use array and parameters lt and gt, or lte, or gte
updatedUserId
Integer
Unique identifier of the user who updated the company.
Example: ?updatedUserId=6
ownerId
Integer
Unique identifier of the user who is company owner.
Example: ?ownerId=6
status
Integer
...
Example: ?status=won
statusDate
DateTime
...
Example: ?statusDate=2016-10-01T10:00:00+03:00
statusChangedTime
DateTime
...
Example: ?statusChangedTime=2016-10-01T10:00:00+03:00
stageId
Integer
...
Example: ?stageId=3
priceValue
Number
...
Example: ?priceValue=1500
priceCurrency
String
...
Example: ?priceCurrency=EUR
priceBaseValue
Number
...
Example: ?priceBaseValue=1500
isDeleted
Boolean
Indicator the company is deleted or not.

Possible values:
  • yes or no,
  • true or false,
  • 1 or 0.

Example: ?isDeleted=no
starred
Boolean
Indicator the company is starred or not.

Possible values:
  • yes or no,
  • true or false,
  • 1 or 0.

Example: ?starred=yes
source
String
Source of the company.
Example: ?source=google.com
sourceId
Integer
Unique identifier of the source.
Example: ?sourceId=123
order
String
A field to sort by. You can sort by multiple fields. You can specify the sort order to descending, append desc or to ascending, append asc.

Possible values:
  • id
  • name
  • createdTime
  • updatedTime
  • estimatedClosureDate

Example: ?order=createdTime:desc
limit
Integer
Response items count. Example: ?limit=10
offset
Integer
Returned result first value number. Example: ?offset=0

How I can get list of all my active deals?

Jeigu norite gauti didelį duomenų masyvą, rekomenduojame nauduoti parametrus offset ir limit, šie parametrau padės ištaukti pilną sąrašą iš duomenų bazės mažomis porcijomis neapkraunant serverio. Paramentras offset nurodo nuo kurio įrašo ištraukinėti duomenis, o parametras limit nurodo kiek įrašu ištaukinėti. Pagal nutilėjimą offset = 0, o limit = 25.

<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
  'apiKey' => '_YOUR_ACCOUNT_API_KEY_',
  'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_'
]);

$result = array();
$response = array();
$data = array(
        'offset' => 0,
        'limit' => 100,
        'isDeleted' => 0
    );
do {
    $response = $teamgate->deals->get($data);
    $result = array_merge($result, $response->data);
    $data['offset'] += $data['limit'];
} while (!empty($response->data));

echo "<pre>";
print_r($result);
Suggest Edits

Deal Tags

 
gethttps://api.teamgate.com/v4/deals/:id/tags
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$dealId = 1;

$deal = $teamgate->deals->get($dealId);
$result = $deal->tags->get();

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

With a sub-resource of deal "tags" is used the same parameters as with resource "Tags".
Suggest Edits

Deal Companies

 
gethttps://api.teamgate.com/v4/deals/:id/companies
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$dealId = 1;
$dealComapniesParams = array(
	'isDeleted' => 'no',
	'order' => array(
		'name' => 'asc'  
  )
);

$deal = $teamgate->deals->get($dealId);
$result = $deal->companies->get($dealComapniesParams);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

With a sub-resource of deal "companies" is used the same parameters as with resource "companies".
Suggest Edits

Deal People

 
gethttps://api.teamgate.com/v4/deals/:id/people
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$dealId = 1;
$dealPeopleParams = array(
	'isDeleted' => 'no',
	'order' => array(
		'name' => 'asc'  
  )
);

$deal = $teamgate->deals->get($dealId);
$result = $deal->people->get($dealPeopleParams);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

With a sub-resource of deal "people" is used the same parameters as with resource "people".
Suggest Edits

Deal Events

 
gethttps://api.teamgate.com/v4/deals/:id/events
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$dealId = 1;
$dealEventsParams = array(
	'isDeleted' => 'no',
	'order' => array(
		'start' => 'desc'  
  )
);

$deal = $teamgate->deals->get($dealId);
$result = $deal->events->get($dealEventsParams);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

With a sub-resource of deal "events" is used the same parameters as with resource "events".
Suggest Edits

Get a Deal Files

 
gethttps://api.teamgate.com/v4/deals/:id/files
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$dealId = 1;
$deal = $teamgate->deals->get($dealId);
$result = $deal->files->get();

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Suggest Edits

Deal Sources

 
gethttps://api.teamgate.com/v4/deals/:id/sources
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$dealId = 1;

$deal = $teamgate->deals->get($dealId);
$result = $deal->sources->get();

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

With a sub-resource of deal "sources" is used the same parameters as with resource "sources".
Suggest Edits

Deals Custom Fields

 
gethttps://api.teamgate.com/v4/deals/:id/customFields
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$dealId = 1;

$deal = $teamgate->deals->get($dealId);
$result = $deal->customFields->get();

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

With a sub-resource of deal "customFields" is used the same parameters as with resource "customFields".
Suggest Edits

Get a Deal Custom Field

Returns a set of deal custom field value.

 
gethttps://api.teamgate.com/v4/deals/:id/customFields/:fieldId
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$dealId = 1;
$fieldId = 5;

$deal = $teamgate->deals->get($dealId);
$result = $deal->customFields->get($fieldId);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

With a sub-resource of deal "customFields" is used the same parameters as with resource "customFields".
Suggest Edits

Deal Stages

 
gethttps://api.teamgate.com/v4/deals/:id/stages
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$dealId = 1;

$deal = $teamgate->deals->get($dealId);
$dealStages = $deal->stages->get();

echo "<pre>";
print_r($dealStages);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Suggest Edits

Deal Tags Rewrite

Rewrite deal tags

 
puthttps://api.teamgate.com/v4/deals/:id/tags
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$dealId = 3;
$tags = array(
    'value' => ['B2B', 'B2C']
);

$deal = $teamgate->deals->get($dealId);
$result = $deal->tags->update($tags);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
value
String | Array
Example:
  • "value": "B2B"
  • "value": "[B2B, B2C]"
Suggest Edits

Deal Tags Update

Update deal tags

 
patchhttps://api.teamgate.com/v4/deals/:id/tags
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$dealId = 3;
$tags = array(
    'value' => ['B2B', 'B2C']
);

$deal = $teamgate->deals->get($dealId);
$result = $deal->tags->update($tags);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
value
String | Array
Example:
  • "value": "B2B"
  • "value": "[B2B, B2C]"
Suggest Edits

Deal Tag Delete

 
deletehttps://api.teamgate.com/v4/deals/:id/tags/:tagId
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$dealId = 1;
$tagId = 5;
$deal = $teamgate->deals->get($dealId);
$result = $deal->tags->delete($tagId);

echo "<pre>";
print_r($result);

A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
id
Integer
required

Unique key of the Tag of Deal.

Example: ?id=1

Suggest Edits

Detach All Tags from Deal

 
deletehttps://api.teamgate.com/v4/deals/:id/tags
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$dealId = 1;
$deal = $teamgate->deals->get($dealId);
$result = $deal->tags->delete();

echo "<pre>";
print_r($result);

A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
id
Integer
required

Unique key of the Tag of Deal.

Example: ?id=1

Suggest Edits

Replace a Deal Files

Rewrite deal files

 
puthttps://api.teamgate.com/v4/deals/:id/files
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$dealId = 3;
$files = array(
    'value' => [1, 2, 5, 6, 7, 12]
);

$deal = $teamgate->deals->get($dealId);
$result = $deal->files->update($files);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
value
Array
Example:
  • "value": "[1, 3, 7, 12]"
Suggest Edits

Attach a Files to Deal

 
patchhttps://api.teamgate.com/v4/deals/:id/files
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$dealId = 3;
$files = array(
    'value' => [1, 3, 7, 8, 12]
);

$deal = $teamgate->deals->get($dealId);
$result = $deal->files->patch($files);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
value
Array
Example:
  • "value": "[1, 3, 7, 8, 12]"
Suggest Edits

Detach File from Deal

 
deletehttps://api.teamgate.com/v4/deals/:id/files/:fileId
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$dealId = 1;
$fileId = 5;
$deal = $teamgate->deals->get($dealId);
$result = $deal->files->delete($fileId);

echo "<pre>";
print_r($result);

A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
id
Integer
required

Unique key of the File of Deal.

Example: ?id=1

Suggest Edits

Detach All Files from Deal

 
deletehttps://api.teamgate.com/v4/deals/:id/files
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$dealId = 1;
$deal = $teamgate->deals->get($dealId);
$result = $deal->files->delete();

echo "<pre>";
print_r($result);

A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Properties

Supported events properties:

Attribute Description
id
Integer
readonly
Unique key of the Event.
name
String
Name of the Event. Maximum length is 255 characters.
owner
Object
For the owner is using User object. Read more information about User object here.
type
String
Type of the Event. This field must have one of the following values:
  • appointment
  • note
  • call
  • task
description
Text
The event’s description.
start
DateTime
The event start date. Must be an RFC3339 timestamp with mandatory time zone offset, e.g., 2016-10-01T10:00:00+03:00, 2016-10-01T10:00:00Z. Milliseconds may be provided but will be ignored.
end
DateTime
The event end date. Must be an RFC3339 timestamp with mandatory time zone offset, e.g., 2016-10-01T10:00:00+03:00, 2016-10-01T10:00:00Z. Milliseconds may be provided but will be ignored.
allDay
Boolean
The indicator or event lasts all day.
starred
Boolean
Indicator of whether or not the deal is important and marked by star.
place
String
The event’s place.
isSecret
Boolean
Indicator the event is private or not.
completed
Object
readonly
Date and time Event record was completed. Information is read only, because automatically generated by the server. Read more information about Completed object here.
created
Object
readonly
User, date and time Event record was created. Information is read only, because automatically generated by the server. Read more information about Created object here.
updated
Object
readonly
User, date and time Event record was updated. Information is read only, because automatically generated by the server. Read more information about Updated object here.
gethttps://api.teamgate.com/v4/events/:id
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 1;
$eventsList = $teamgate->events->get($eventId);

echo "<pre>";
print_r($eventsList);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
id
Integer
required

Unique key of the Event.

Example: ?id=1

Suggest Edits

Event Create

 
posthttps://api.teamgate.com/v4/events
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventData = array(
    'name' => 'My 1st Deal by API',
    'type' => 'appointment',
    'time' => '2016-11-07T10:30:00+01:00',
    'end' => '2016-11-07T12:00:00+01:00',
  	'place' => 'London',
  	'description' => 'Very important meeting with partner'
);

$result = $teamgate->events->create($eventData);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
name
String
Example: "name": "Meeting in London"
type
String
Default type value is task.

Possible values:
  • task - event as task
  • call - event as call
  • appointment - event as appointment
  • note - event as note
  • custom type name or Id - event custom type


Example: "type": "appointment"
status
String
This attribute is used only for the calls and tasks. Appointments and notes do not have this attribute.

Possible values for calls:
  • incomplete - active call
  • successful - successfully completed call
  • unsuccessful - unsuccessfully completed call

Possible values for tasks:
  • incomplete - active task
  • completed - completed task


Example: "status": "incomplete"
place
String
This attribute is used only for the appointments.

Example: "place": "London"
isSecret
Boolean
This attribute is used only for the appointments. Indicator the appointment is private or not.

Possible values:
  • yes or no,
  • true or false,
  • 1 or 0.

Example: "isSecret": "no"
ownerId
Integer
Example: "ownerId": "1"
ownerUsername
String
Example: "ownerUsername": "john@example.net"
resources
String
Examples:
  • "resources": "1"
  • "resources": "['1','2']"
description
String
This attribute is used only for the appointments.

Example: "description": "Very important appointment with partner"
value
String
This attribute is used only for the notes.

Example: "value": "Very important appointment with partner"
start
Date
Example: "start": "2017-03-05T11:45:59+02:00"
end
Date
Example: "end": "2017-03-05T11:45:59+02:00"
allDay
Boolean
Indicate whether the event lasts all day. This attribute is used only for the appointments.

Possible values:
  • yes or no,
  • true or false,
  • 1 or 0.

Example: "allDay": "no"
Suggest Edits

Event Update

 
puthttps://api.teamgate.com/v4/events/:id
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 1;
$data = array(
    'start' => '2016-12-01T10:00:00+01:00',
  	'end' => '2016-12-01T11:30:00+01:00'
);

$result = $teamgate->events->update($eventId, $data);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
name
String
Example: "name": "Meeting in New York"
status
String
This attribute is used only for the calls and tasks. Appointments and notes do not have this attribute.

Possible values for calls:
  • incomplete - active call
  • successful - successfully completed call
  • unsuccessful - unsuccessfully completed call

Possible values for tasks:
  • incomplete - active task
  • completed - completed task


Example: "status": "incomplete"
place
String
This attribute is used only for the appointments.

Example: "place": "New York"
isSecret
Boolean
This attribute is used only for the appointments. Indicator the appointment is private or not.

Possible values:
  • yes or no,
  • true or false,
  • 1 or 0.

Example: "isSecret": "no"
ownerId
Integer
Example: "ownerId": "1"
ownerUsername
String
Example: "ownerUsername": "john@example.net"
resources
String
Examples:
  • "resources": "1"
  • "resources": "['1','2']"
description
String
This attribute is used only for the appointments and notes.

Example: "description": "Very important appointment with partner"
start
Date
Example: "start": "2017-03-05T11:45:59+02:00"
end
Date
Example: "end": "2017-03-05T11:45:59+02:00"
allDay
Boolean
Indicate whether the event lasts all day.

Possible values:
  • yes or no,
  • true or false,
  • 1 or 0.

Example: "allDay": "no"
Suggest Edits

Event Delete

 
deletehttps://api.teamgate.com/v4/events/:id
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 1;
$result = $teamgate->events->delete($eventId);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
id
Integer
required

Unique key of the Event.

Example: ?id=1

Suggest Edits

Event Attendees

 
gethttps://api.teamgate.com/v4/events/:id/attendees
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 1;
$eventsAttendeesParams = array(
	'isSecret' => 'no',
	'order' => array(
		'start' => 'desc'  
  )
);

$event = $teamgate->events->get($eventId);
$result = $event->attendees->get($eventsAttendeesParams);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 
Suggest Edits

Event Resources

 
gethttps://api.teamgate.com/v4/events/:id/resources
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 1;
$eventsResourcesParams = array(
	'order' => array(
		'start' => 'desc'  
  )
);

$event = $teamgate->events->get($eventId);
$result = $event->resources->get($eventsResourcesParams);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 
Suggest Edits

Event Comments

 
gethttps://api.teamgate.com/v4/events/:id/comments
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 1;
$eventsCommentsParams = array(
	'order' => array(
		'createdTime' => 'desc'  
  )
);

$event = $teamgate->events->get($eventId);
$result = $event->comments->get($eventsCommentsParams);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
value
String
Value of the Comment. You can search by full value or by fragment of value.
Example for strict search: ?name=My%20first%20comment
And search by text fragment: ?name[like]=first
createdUserId
Integer
Unique identifier of the user who created the comment.
Example: ?createdUserId=3
createdTime
DateTime
Date and time of the creation in RFC3339 format. For the strictly search use the string. For date range use array and parameters lt and gt, or lte, or gte.
order
String
A field to sort by. You can sort by multiple fields. You can specify the sort order to descending, append desc or to ascending, append asc.

Possible values:
  • value
  • createdUserId
  • createdTime

Example: ?order=createdTime:desc
limit
Integer
Response items count. Example: ?limit=3
offset
Integer
Returned result first value number. Example: ?offset=0
Suggest Edits

Event Leads

 
gethttps://api.teamgate.com/v4/events/:id/leads
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 1;
$eventsLeadsParams = array(
	'isDeleted' => 'no',
	'order' => array(
		'name' => 'desc'  
  )
);

$event = $teamgate->events->get($eventId);
$result = $event->leads->get($eventsLeadsParams);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 
Suggest Edits

Event People

 
gethttps://api.teamgate.com/v4/events/:id/people
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 1;
$eventsPeopleParams = array(
	'isDeleted' => 'no',
	'order' => array(
		'name' => 'desc'  
  )
);

$event = $teamgate->events->get($eventId);
$result = $event->people->get($eventsPeopleParams);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 
Suggest Edits

Event Companies

 
gethttps://api.teamgate.com/v4/events/:id/companies
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 1;
$eventsCompaniesParams = array(
	'isDeleted' => 'no',
	'order' => array(
		'name' => 'desc'  
  )
);

$event = $teamgate->events->get($eventId);
$result = $event->companies->get($eventsCompaniesParams);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 
Suggest Edits

Event Deals

 
gethttps://api.teamgate.com/v4/events/:id/deals
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 1;
$eventsDealsParams = array(
	'isDeleted' => 'no',
	'order' => array(
		'name' => 'desc'  
  )
);

$event = $teamgate->events->get($eventId);
$result = $event->deals->get($eventsDealsParams);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 
Suggest Edits

Get a Event Files

 
gethttps://api.teamgate.com/v4/events/:id/files
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 1;
$event = $teamgate->events->get($eventId);
$result = $event->files->get();

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Suggest Edits

Replace a Event Files

Rewrite event files

 
puthttps://api.teamgate.com/v4/events/:id/files
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 3;
$files = array(
    'value' => [1, 2, 5, 6, 7, 12]
);

$event = $teamgate->events->get($eventId);
$result = $event->files->update($files);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
value
Array
Example:
  • "value": "[1, 3, 7, 12]"
Suggest Edits

Attach a Files to Event

 
patchhttps://api.teamgate.com/v4/events/:id/files
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 3;
$files = array(
    'value' => [1, 3, 7, 8, 12]
);

$event = $teamgate->events->get($eventId);
$result = $event->files->patch($files);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
value
Array
Example:
  • "value": "[1, 3, 7, 8, 12]"
Suggest Edits

Detach File from Event

 
deletehttps://api.teamgate.com/v4/events/:id/files/:fileId
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 1;
$fileId = 5;
$event = $teamgate->events->get($eventId);
$result = $event->files->delete($fileId);

echo "<pre>";
print_r($result);

A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
id
Integer
required

Unique key of the File of Event.

Example: ?id=1

Suggest Edits

Detach All Files from Event

 
deletehttps://api.teamgate.com/v4/events/:id/files
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 1;
$event = $teamgate->events->get($eventId);
$result = $event->files->delete();

echo "<pre>";
print_r($result);

A binary file was returned

You couldn't be authenticated

Try the API to see results
 
Suggest Edits

Event Comment Create

 
posthttps://api.teamgate.com/v4/events/:id/comments
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventData = array(
    'value' => 'My 1st comment for Event'
);

$result = $teamgate->events->comments->create($eventData);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
value
String
Example: "value": "My first comment"
Suggest Edits

Attach a Leads to Event

 
patchhttps://api.teamgate.com/v4/events/:id/leads
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 3;
$leads = array(
    'id' => [1, 3, 7, 8, 12]
);

$event = $teamgate->events->get($eventId);
$result = $event->leads->patch($leads);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
value
Array
Example:
  • "value": "[1, 3, 7, 8, 12]"
Suggest Edits

Attach a People to Event

 
patchhttps://api.teamgate.com/v4/events/:id/people
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 3;
$people = array(
    'id' => [1, 3, 7, 8, 12]
);

$event = $teamgate->events->get($eventId);
$result = $event->people->patch($people);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
value
Array
Example:
  • "value": "[1, 3, 7, 8, 12]"
Suggest Edits

Attach a Companies to Event

 
patchhttps://api.teamgate.com/v4/events/:id/companies
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 3;
$companies = array(
    'id' => [1, 3, 7, 8, 12]
);

$event = $teamgate->events->get($eventId);
$result = $event->companies->patch($companies);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
value
Array
Example:
  • "value": "[1, 3, 7, 8, 12]"
Suggest Edits

Attach a Deals to Event

 
patchhttps://api.teamgate.com/v4/events/:id/deals
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 3;
$deals = array(
    'id' => [1, 3, 7, 8, 12]
);

$event = $teamgate->events->get($eventId);
$result = $event->deals->patch($deals);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
value
Array
Example:
  • "value": "[1, 3, 7, 8, 12]"
Suggest Edits

Event Resources Update

 
patchhttps://api.teamgate.com/v4/events/:id/resources
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 3;
$eventData = array(
    'resources' => '1'
);

$event = $teamgate->events->get($eventId);
$result = $event->resources->patch($eventData);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
resources
Integer | Array
Example: "resources": "1"
attendees
Integer | Array
Example: "attendees": "[1, 2]"
Suggest Edits

Attach a Attendees to Event

 
patchhttps://api.teamgate.com/v4/events/:id/attendees
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 3;
$attendees = array(
    'value' => [1, 3, 7, 8, 12]
);

$event = $teamgate->events->get($eventId);
$result = $event->attendees->patch($attendees);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
value
Array
Example:
  • "value": "[1, 3, 7, 8, 12]"
Suggest Edits

Replace a Event Leads

Rewrite event files

 
puthttps://api.teamgate.com/v4/events/:id/leads
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 3;
$leads = array(
    'value' => [1, 2, 5, 6, 7, 12]
);

$event = $teamgate->events->get($eventId);
$result = $event->leads->update($leads);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
value
Array
Example:
  • "value": "[1, 3, 7, 12]"
Suggest Edits

Replace a Event People

Rewrite event people

 
puthttps://api.teamgate.com/v4/events/:id/people
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 3;
$people = array(
    'value' => [1, 2, 5, 6, 7, 12]
);

$event = $teamgate->events->get($eventId);
$result = $event->people->update($people);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
value
Array
Example:
  • "value": "[1, 3, 7, 12]"
Suggest Edits

Replace a Event Companies

Rewrite event companies

 
puthttps://api.teamgate.com/v4/events/:id/companies
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 3;
$companies = array(
    'value' => [1, 2, 5, 6, 7, 12]
);

$event = $teamgate->events->get($eventId);
$result = $event->companies->update($companies);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
value
Array
Example:
  • "value": "[1, 3, 7, 12]"
Suggest Edits

Replace a Event Deals

Rewrite event deals

 
puthttps://api.teamgate.com/v4/events/:id/deals
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 3;
$deals = array(
    'value' => [1, 2, 5, 6, 7, 12]
);

$event = $teamgate->events->get($eventId);
$result = $event->deals->update($deals);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
value
Array
Example:
  • "value": "[1, 3, 7, 12]"
Suggest Edits

Event Resources Rewrite

 
puthttps://api.teamgate.com/v4/events/:id/resources
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 3;
$eventData = array(
    'resources' => '1'
);

$event = $teamgate->events->get($eventId);
$result = $event->resources->put($eventData);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
resources
Integer | Array
Example: "resources": "1"
attendees
Integer | Array
Example: "attendees": "[1, 2]"
Suggest Edits

Event Attendees Rewrite

 
puthttps://api.teamgate.com/v4/events/:id/attendees
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 3;
$eventData = array(
    'attendees' => '1'
);

$event = $teamgate->events->get($eventId);
$result = $event->attendees->put($eventData);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
resources
Integer | Array
Example: "resources": "1"
attendees
Integer | Array
Example: "attendees": "[1, 2]"
Suggest Edits

Unassign Lead from Event

 
deletehttps://api.teamgate.com/v4/events/:id/leads/:leadId
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 3;
$leadsId = 1;

$event = $teamgate->events->get($eventId);
$result = $event->leads->delete($leadsId);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
resources
Integer | Array
Example: "resources": "1"
attendees
Integer | Array
Example: "attendees": "[1, 2]"
Suggest Edits

Unassign Person from Event

 
deletehttps://api.teamgate.com/v4/events/:id/people/:personId
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 3;
$peopleId = 1;

$event = $teamgate->events->get($eventId);
$result = $event->people->delete($personId);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
resources
Integer | Array
Example: "resources": "1"
attendees
Integer | Array
Example: "attendees": "[1, 2]"
Suggest Edits

Unassign Company from Event

 
deletehttps://api.teamgate.com/v4/events/:id/companies/:companyId
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 3;
$companyId = 1;

$event = $teamgate->events->get($eventId);
$result = $event->companies->delete($companyId);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
resources
Integer | Array
Example: "resources": "1"
attendees
Integer | Array
Example: "attendees": "[1, 2]"
Suggest Edits

Unassign Deal from Event

 
deletehttps://api.teamgate.com/v4/events/:id/deals/:dealId
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 3;
$dealId = 1;

$event = $teamgate->events->get($eventId);
$result = $event->deals->delete($dealId);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
resources
Integer | Array
Example: "resources": "1"
attendees
Integer | Array
Example: "attendees": "[1, 2]"
Suggest Edits

Event Resource Unassign

 
deletehttps://api.teamgate.com/v4/events/:id/resources/:resourceId
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 3;
$resourceId = 1;

$event = $teamgate->events->get($eventId);
$result = $event->resources->delete($resourceId);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
resources
Integer | Array
Example: "resources": "1"
attendees
Integer | Array
Example: "attendees": "[1, 2]"
Suggest Edits

Unassign Attendee from Event

 
deletehttps://api.teamgate.com/v4/events/:id/attendees/:attendeeId
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 3;
$attendeeId = 1;

$event = $teamgate->events->get($eventId);
$result = $event->attendees->delete($attendeeId);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
resources
Integer | Array
Example: "resources": "1"
attendees
Integer | Array
Example: "attendees": "[1, 2]"
Suggest Edits

Unassign All Leads from Event

 
deletehttps://api.teamgate.com/v4/events/:id/leads
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 3;

$event = $teamgate->events->get($eventId);
$result = $event->leads->delete();

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
resources
Integer | Array
Example: "resources": "1"
attendees
Integer | Array
Example: "attendees": "[1, 2]"
Suggest Edits

Unassign All People from Event

 
deletehttps://api.teamgate.com/v4/events/:id/people
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 3;

$event = $teamgate->events->get($eventId);
$result = $event->people->delete();

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
resources
Integer | Array
Example: "resources": "1"
attendees
Integer | Array
Example: "attendees": "[1, 2]"
Suggest Edits

Unassign All Companies from Event

 
deletehttps://api.teamgate.com/v4/events/:id/companies
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 3;

$event = $teamgate->events->get($eventId);
$result = $event->companies->delete();

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
resources
Integer | Array
Example: "resources": "1"
attendees
Integer | Array
Example: "attendees": "[1, 2]"
Suggest Edits

Unassign All Deals from Event

 
deletehttps://api.teamgate.com/v4/events/:id/deals
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 3;

$event = $teamgate->events->get($eventId);
$result = $event->deals->delete();

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
resources
Integer | Array
Example: "resources": "1"
attendees
Integer | Array
Example: "attendees": "[1, 2]"
Suggest Edits

Unassign All Resources from Event

 
deletehttps://api.teamgate.com/v4/events/:id/resources
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 3;

$event = $teamgate->events->get($eventId);
$result = $event->resources->delete();

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
resources
Integer | Array
Example: "resources": "1"
attendees
Integer | Array
Example: "attendees": "[1, 2]"
Suggest Edits

Unassign All Attendees from Event

 
deletehttps://api.teamgate.com/v4/events/:id/attendees
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$eventId = 3;

$event = $teamgate->events->get($eventId);
$result = $event->attendees->delete();

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
resources
Integer | Array
Example: "resources": "1"
attendees
Integer | Array
Example: "attendees": "[1, 2]"

Properties

Supported files properties:

Attribute Description
id
Integer
readonly
Unique key of the File.
fullName
String
Full name of the File consisting of the name and extension. Maximum length is 255 characters.
name
String
Name of the File. Maximum length is 255 characters.
extension
String
Extension of the File.
size
Integer
Size of the file in bytes.
mimeType
String
Mime type of the File. Example of values:
  • application/pdf
  • application/zip
  • application/xml
  • audio/mpeg
  • text/html
  • image/png
  • etc.
description
Text
The file’s description.
created
Object
readonly
User, date and time File record was uploaded. Information is read only, because automatically generated by the server. Read more information about Created object here.
tags
Array
An array of Tags for the File. Read more information about tags here.
download
Object
The file download url. Read more information about file Download object here.
gethttps://api.teamgate.com/v4/files/:id
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$fileId = 1;
$fileData = $teamgate->files->get($fileId);

echo "<pre>";
print_r($fileData);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
id
Integer
required

Unique key of the File.

Example: ?id=1

Suggest Edits

Upload File

 
posthttps://api.teamgate.com/v4/files
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$fileData = array(
    'name' => 'commercialOffer.txt',
    'type' => 'text/plain', ///mimeType
    'size' => '8',//bytes
    'description' => 'my 1st upload',
  	'content' => 'dGVhbWdhdGU=', //base64
  	'tags' => ['offer'],
);

$result = $teamgate->files->create($fileData);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

{
  "success": true,
  "data": {
    "id": 16,
    "fullName": "commercialOffer.txt",
    "name": "commercialOffer",
    "extension": "txt",
    "size": 8,
    "mimeType": "text/plain",
    "description": "my 1st upload",
    "created": {
      "time": "2017-06-12T16:34:11+03:00",
      "user": {
        "id": 2,
        "name": "TeamgateAPI",
        "surname": "Tester",
        "username": "APItest@teamgate.com",
        "picture": {
          "small": "https://ws-us1.teamgate.com/images/teamgateapi/users_photos/2/small.jpg",
          "medium": "https://ws-us1.teamgate.com/images/teamgateapi/users_photos/2/middle.jpg",
          "large": "https://ws-us1.teamgate.com/images/teamgateapi/users_photos/2/big.jpg"
        }
      }
    },
    "tags": [
      "offer"
    ],
    "download": {
      "url": "https://teamgateapi.teamgate.com/?r=teamgateapi/externalFiles/get&id=16&hash=632ea340777f3090ba425349eda5c79594273f0c",
      "time": "2017-06-12T17:34:13+03:00"
    }
  }
}
 

Parameters

Attribute Description
name
String
Example: "name": "commercialOffer.txt"
type
String
Possible values:
  • text/plain - .txt
  • application/pdf - .pdf
  • application/vnd.ms-excel - .xls
  • video/mp4 - .mp4
  • and etc.


Example: "type": "text/plain"
size
Integer
File size in bytes.

Example: "size": "457"
description
String
Example: "description": "It is my 1st uploaded file"
content
String
Insert here your decoded file in base64 format.

Example: "content": "dGVhbWdhdGU="
url
String
If the content does not exist you can use url.

Example: "url": "https://www.teamgate.com/wp-content/themes/Teamgate/inc/images/logo-color.svg"
tags
String | Array
Example: "tags": "[B2B, B2C]"
Suggest Edits

Update File

 
puthttps://api.teamgate.com/v4/files/:id
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$fileId = 1;
$fileData = array(
    'name' => 'commercialOfferNEW',
    'description' => 'my 2st upload',
  	'tags' => ['2nd offer'],
);

$result = $teamgate->files->create($fileId, $fileData);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Attribute Description
name
String
Example: "name": "commercialOffer"
description
String
Example: "description": "It is my 1st uploaded file"
tags
String | Array
Example: "tags": ["B2B", "B2C"]
Suggest Edits

Delete File

 
deletehttps://api.teamgate.com/v4/files/:id
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$fileId = 1;
$result = $teamgate->files->delete($fileId);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
id
Integer
required

Unique key of the File.

Example: ?id=1

Suggest Edits

Get File Download URL

 
gethttps://api.teamgate.com/v4/files/:id/downloadUrl
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$fileId = 1;
$file = $teamgate->files->get($fileId);
$result = $file->downloadUrl->get();

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
id
Integer
required

Unique key of the File.

Example: ?id=1

Suggest Edits

Files List

 
gethttps://api.teamgate.com/v4/files
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$filesList = $teamgate->files->get();

echo "<pre>";
print_r($filesList);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
fullName
String
Full name of the File consisting of the name and extension. You can search by full name or by fragment of name. Maximum length is 255 characters.
Example for strict search: ?fullName=myFileName.xdoc
And search by text fragment: ?fullName[like]=myFile
name
String
Name of the File. You can search by full name or by fragment of name. Maximum length is 255 characters.
Example for strict search: ?name=myFileName
And search by text fragment: ?name[like]=myFile
extension
String
Extension of File. You can search by full extension name or by fragment of extension name. Maximum length is 255 characters.
Example for strict search: ?extension=xdoc
And search by text fragment: ?extension[like]=doc
size
Integer
Size of the file in byte. For the strictly search use the string. For size range use array and parameters lt and gt, or lte, or gte.
description
String
Description of the file.

Example: ?description=My%20personal%20file
order
String
A field to sort by. You can sort by multiple fields. You can specify the sort order to descending, append desc or to ascending, append asc.

Possible values:
  • fullName
  • name
  • extension
  • size
  • createdUserId
  • createdTime

Example: ?order[createdTime]=desc
createdTime
DateTime
Date and time of the creation in RFC3339 format. For the strictly search use the string. For date range use array and parameters lt and gt, or lte, or gte.
createdUserId
Integer
Unique identifier of the user who created the event.
Example: ?createdUserId=6
limit
Integer
Response items count. Example: ?limit=10
offset
Integer
Returned result first value number. Example: ?offset=0
Suggest Edits

File Tags Rewrite

 
puthttps://api.teamgate.com/v4/files/:id/tags
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$fileId = 1;
$data = array(
    'value' => ['new','offer']
    )
);

$file = $teamgate->files->get($fileId);
$result = $file->tags->update($data);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
value
array
Example: "value": ["offer","document"]
Suggest Edits

File Tags Update

 
patchhttps://api.teamgate.com/v4/files/:id/tags
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$fileId = 1;
$data = array(
    'value' => ['new','offer']
    )
);

$file = $teamgate->files->get($fileId);
$result = $file->tags->patch($data);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
value
array
Example: "value": ["new","important"]
Suggest Edits

Detach Tag from File

 
deletehttps://api.teamgate.com/v4/files/:id/tags/:tagId
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$fileId = 1;
$tagId = 2;
$file = $teamgate->files->get($fileId);
$result = $file->files->delete($tagId);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
id
Integer
required

Unique key of the File.

Example: ?id=1

Suggest Edits

Detach All Tags from File

 
deletehttps://api.teamgate.com/v4/files/:id/tags/
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$fileId = 1;
$file = $teamgate->files->get($fileId);
$result = $file->files->delete();

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
id
Integer
required

Unique key of the File.

Example: ?id=1

Properties

Supported properties from Leads, People, Companies and Deals properties list.

Properties

Supported properties from Leads, People, Companies and Deals properties list.

Suggest Edits

Get a Group

Returns the data of specific user.

 
gethttps://api.teamgate.com/v4/groups/:id
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$groupId = 2;
$result = $teamgate->groups->get($groupId);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

{
    "success": true,
    "data": {
        "id": 1,
        "name": "My 1st Team",
        "isActive": "yes"
    }
}      }
    }
}
 

Parameters

Attribute Description
id
Integer
required

Unique key of the Group.

Example: ?id=2

Suggest Edits

Add a Group

 
posthttps://api.teamgate.com/v4/groups
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$groupData = array(
    'name' => 'My 1st Group'
);

$result = $teamgate->groups->create($groupData);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
name
String
Example: "name": "My 1st Group"
Suggest Edits

Update a Group

 
puthttps://api.teamgate.com/v4/groups/:id
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$groupId = 1;
$groupData = array(
    'name' => 'My 2st Group'
);

$result = $teamgate->groups->update($groupId, $groupData);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
name
String
Example: "name": "My 2st Group"
Suggest Edits

Delete a Group

 
deletehttps://api.teamgate.com/v4/groups/:id
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$groupId = 1;

$result = $teamgate->groups->delete($groupId);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
name
String
Example: "name": "My 2st Group"
Suggest Edits

Get a list of Groups

Returns the data of specific user.

 
gethttps://api.teamgate.com/v4/groups
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$result = $teamgate->groups->get();

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

{
    "success": true,
  	"count": 1,
    "data": {
        "id": 1,
        "name": "My 1st Team",
        "isActive": "yes"
    }
}      }
    }
}
 

Parameters

Suggest Edits

Get a users list of group

Returns the data of specific user.

 
gethttps://api.teamgate.com/v4/groups/:id/users
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$groupId = 1;

$group = $teamgate->groups->get($groupId);
$result = $group->users->get();


echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

{
    "success": true,
  	"count": 1,
    "data": {
        "id": 1,
        "name": "My 1st Team",
        "isActive": "yes"
    }
}      }
    }
}
 

Parameters

Suggest Edits

Update a users list of group

Returns the data of specific user.

 
puthttps://api.teamgate.com/v4/groups/:id/users
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$groupId = 1;
$users = array(
    'value' => [2, 3]
);

$group = $teamgate->groups->get($groupId);
$result = $group->users->update($users);


echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Suggest Edits

Add a users to group

Returns the data of specific user.

 
patchhttps://api.teamgate.com/v4/groups/:id/users
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$groupId = 1;
$users = array(
    'value' => [2, 3]
);

$group = $teamgate->groups->get($groupId);
$result = $group->users->patch($users);


echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Suggest Edits

Detach user from group

 
deletehttps://api.teamgate.com/v4/groups/:id/users/:userId
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$groupId = 1;
$userId = 3;
$lgroup = $teamgate->groups->get($groupId);
$result = $lead->users->delete($userId);

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Suggest Edits

Detach all users from group

 
deletehttps://api.teamgate.com/v4/groups/:id/users
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$groupId = 1;
$lgroup = $teamgate->groups->get($groupId);
$result = $lead->users->delete();

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Suggest Edits

INDUSTRIES

 

Properties

Supported industries properties

Attribute Description
id
Integer
readonly
Unique key of the Industry.
name
String
Name of the Industry.
description
String
Description of the Industry.
Suggest Edits

Industries List

Retrieve All Industries

 
gethttps://api.teamgate.com/v4/industries
<?php
require __DIR__ . '/vendor/autoload.php';

$teamgate = new \Teamgate\API([
    'apiKey' => '_YOUR_ACCOUNT_API_KEY_', // located at account settings -> additional features -> external apps
    'authToken' => '_YOUR_PERSONAL_AUTH_TOKEN_' // located at user settings -> preferences
]);

$result = $teamgate->industries->get();

echo "<pre>";
print_r($result);
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Parameters

Attribute Description
name
String
Name of the Industry. You can search by full name or by fragment of name.
Example for strict search: ?name=Software
And search by text fragment: ?name[like]=soft
description
String
Description of the Industry. You can search by full description or by fragment of surame.
Example for strict search: ?description=ITtools
And search by text fragment: ?name[like]=tools
order
String
A field to sort by. You can sort by multiple fields. You can specify the sort order to descending, append desc or to ascending, append asc.

Possible values:
  • name
  • description

Example: ?order=name:desc
limit
Integer
Response items count. Example: ?limit=3
offset
Integer
Returned result first value number. Example: ?offset=0

Properties

Supported leads properties:

Attribute Description
id
Integer
readonly
Unique key of the Lead.
name
String
Name of the Lead. Maximum length is 255 characters.
company
Object
The leads primary company. For the lead company is using Company object. Read more information about leads Company object here.
picture
String
The leads picture. For the lead picture is using Picture object. Read more information about leads Picture object here.
status
Object
The lead status. Read more information about leads Status object here.
owner
Object
For the owner is using User object. Read more information about User object here.
starred
Boolean
Indicator of whether or not the deal is important and marked by star.
source
Object
The deal’s source. Source are assigned from a common sources list. Read more information about Source object here.
industry
Object
The lead industry. Industry are assigned from a common industry list. Read more information about Industry object here.
created
Object
readonly
User, date and time Lead record was created. information is read only, because automatically generated by the server. Read more information about Created object here.
updated
Object
readonly
User, date and time Lead record was updated. information is read only, because automatically generated by the server. Read more information about Updated object here.
isDeleted
Boolean
Indicator the lead is deleted or not.