curl --request PATCH \
--url https://api.messaging.phonovation.com/people/2/companies \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"customerStage": "Testing"
}
'import requests
url = "https://api.messaging.phonovation.com/people/2/companies"
payload = { "customerStage": "Testing" }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://api.messaging.phonovation.com/people/2/companies");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "<api-key>");
request.AddJsonBody("{\n \"customerStage\": \"Testing\"\n}", false);
var response = await client.PatchAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.patch("https://api.messaging.phonovation.com/people/2/companies")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"customerStage\": \"Testing\"\n}")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.messaging.phonovation.com/people/2/companies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'customerStage' => 'Testing'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({customerStage: 'Testing'})
};
fetch('https://api.messaging.phonovation.com/people/2/companies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"createdAt": "2017-12-01T19:16:41",
"modifiedAt": "2017-12-01T19:16:41",
"id": 1,
"name": "Phonovation",
"notes": "notes example",
"country": "Croatia",
"region": "Europe",
"accountManager": "Jane Smith",
"customerStage": "Active",
"industry": "IT",
"vatNumber": "003212059",
"customAttributes": {
"Contract Expiry": "2018-06-01"
},
"domains": [
"phonovation.com"
],
"tags": [
"Vip"
],
"origin": "API",
"modifiedFrom": "API"
}Partial company update
Partial company update method is used for updating a part of the company information. Exactly one of the query parameters must be included in the query.
Required scope: Enable one of: people:manage.
curl --request PATCH \
--url https://api.messaging.phonovation.com/people/2/companies \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"customerStage": "Testing"
}
'import requests
url = "https://api.messaging.phonovation.com/people/2/companies"
payload = { "customerStage": "Testing" }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://api.messaging.phonovation.com/people/2/companies");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "<api-key>");
request.AddJsonBody("{\n \"customerStage\": \"Testing\"\n}", false);
var response = await client.PatchAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.patch("https://api.messaging.phonovation.com/people/2/companies")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"customerStage\": \"Testing\"\n}")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.messaging.phonovation.com/people/2/companies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'customerStage' => 'Testing'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({customerStage: 'Testing'})
};
fetch('https://api.messaging.phonovation.com/people/2/companies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"createdAt": "2017-12-01T19:16:41",
"modifiedAt": "2017-12-01T19:16:41",
"id": 1,
"name": "Phonovation",
"notes": "notes example",
"country": "Croatia",
"region": "Europe",
"accountManager": "Jane Smith",
"customerStage": "Active",
"industry": "IT",
"vatNumber": "003212059",
"customAttributes": {
"Contract Expiry": "2018-06-01"
},
"domains": [
"phonovation.com"
],
"tags": [
"Vip"
],
"origin": "API",
"modifiedFrom": "API"
}Authorizations
This is the most secure authorization type and the one with the most flexibility.
API keys can be generated by calling the dedicated API method. Furthermore, API keys can have a limited scope and cover only some API methods. Lastly, they can be revoked at any time. This range of possibilities makes API keys well suited for separating the API access rights across multiple applications or use cases. Finally, the loss of an API key is easily manageable.
You can manage your API keys from GUI, or programmatically with dedicated API.
API key Authorization header example:
Authorization: App 003026bbc133714df1834b8638bb496e-8f4b3d9a-e931-478d-a994-28a725159ab9
Query Parameters
ID of company you want to update.
External ID of company you want to update.
Name of company you want to update.
Domain of company you want to update.
Flag which indicates tag replacement operation.
Flag which indicates domain replacement operation.
Body
Company name.
255Account manager.
255Country.
50List of custom attributes for the company.
Show child attributes
Show child attributes
Customer stage.
255List of domains for the company.
Unique ID for a company from your or another external system, 256 characters max
Industry.
255Notes.
1023Region.
255Segment.
255Company's service information.
Show child attributes
Show child attributes
List of tags for the company.
VAT number.
50Response
successful response
Company name.
255Account manager.
255Country.
50Date and time of creation. Has the following format: yyyy-MM-dd'T'HH:mm:ss.
List of custom attributes for the company.
Show child attributes
Show child attributes
Customer stage.
255List of domains for the company.
Unique ID for a company from your or another external system, 256 characters max
Unique id of the entity.
Industry.
255Date and time of last modification. Has the following format: yyyy-MM-dd'T'HH:mm:ss.
The information which describes the source of the last modification of record.
API, PORTAL, WEB_SDK, INTEGRATION, PUSH, FACEBOOK, LINE, TELEGRAM, SALESFORCE, DYNAMICS, ZAPIER, FORMS, COMPUTED, ANSWERS, CONVERSATIONS Notes.
1023The information which describes the origin of the record.
API, PORTAL, WEB_SDK, INTEGRATION, PUSH, FACEBOOK, LINE, TELEGRAM, SALESFORCE, DYNAMICS, ZAPIER, FORMS, COMPUTED, ANSWERS, CONVERSATIONS Region.
255Segment.
255Company's service information.
Show child attributes
Show child attributes
List of tags for the company.
VAT number.
50