curl --request POST \
--url https://api.messaging.phonovation.com/people/2/companies \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"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"
]
}
'import requests
url = "https://api.messaging.phonovation.com/people/2/companies"
payload = {
"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"]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(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 \"name\": \"Phonovation\",\n \"notes\": \"notes example\",\n \"country\": \"Croatia\",\n \"region\": \"Europe\",\n \"accountManager\": \"Jane Smith\",\n \"customerStage\": \"Active\",\n \"industry\": \"IT\",\n \"vatNumber\": \"003212059\",\n \"customAttributes\": {\n \"Contract Expiry\": \"2018-06-01\"\n },\n \"domains\": [\n \"phonovation.com\"\n ],\n \"tags\": [\n \"Vip\"\n ]\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.post("https://api.messaging.phonovation.com/people/2/companies")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Phonovation\",\n \"notes\": \"notes example\",\n \"country\": \"Croatia\",\n \"region\": \"Europe\",\n \"accountManager\": \"Jane Smith\",\n \"customerStage\": \"Active\",\n \"industry\": \"IT\",\n \"vatNumber\": \"003212059\",\n \"customAttributes\": {\n \"Contract Expiry\": \"2018-06-01\"\n },\n \"domains\": [\n \"phonovation.com\"\n ],\n \"tags\": [\n \"Vip\"\n ]\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 => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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'
]
]),
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: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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']
})
};
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"
}{
"requestError": {
"serviceException": {
"messageId": "BAD_REQUEST",
"text": "Bad request"
}
}
}{
"requestError": {
"serviceException": {
"messageId": "UNAUTHORIZED",
"text": "Unauthorized"
}
}
}{
"requestError": {
"serviceException": {
"messageId": "FORBIDDEN",
"text": "Forbidden"
}
}
}{
"requestError": {
"serviceException": {
"messageId": "TOO_MANY_REQUESTS",
"text": "Too many requests"
}
}
}{
"requestError": {
"serviceException": {
"messageId": "GENERAL_ERROR",
"text": "Something went wrong. Please contact support."
}
}
}{
"requestError": {
"serviceException": {
"messageId": "<string>",
"text": "<string>"
}
}
}{
"requestError": {
"serviceException": {
"messageId": "<string>",
"text": "<string>"
}
}
}Create a new company
Use this method to create a new company.
Required scope: Enable one of: people:manage.
curl --request POST \
--url https://api.messaging.phonovation.com/people/2/companies \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"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"
]
}
'import requests
url = "https://api.messaging.phonovation.com/people/2/companies"
payload = {
"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"]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(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 \"name\": \"Phonovation\",\n \"notes\": \"notes example\",\n \"country\": \"Croatia\",\n \"region\": \"Europe\",\n \"accountManager\": \"Jane Smith\",\n \"customerStage\": \"Active\",\n \"industry\": \"IT\",\n \"vatNumber\": \"003212059\",\n \"customAttributes\": {\n \"Contract Expiry\": \"2018-06-01\"\n },\n \"domains\": [\n \"phonovation.com\"\n ],\n \"tags\": [\n \"Vip\"\n ]\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.post("https://api.messaging.phonovation.com/people/2/companies")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Phonovation\",\n \"notes\": \"notes example\",\n \"country\": \"Croatia\",\n \"region\": \"Europe\",\n \"accountManager\": \"Jane Smith\",\n \"customerStage\": \"Active\",\n \"industry\": \"IT\",\n \"vatNumber\": \"003212059\",\n \"customAttributes\": {\n \"Contract Expiry\": \"2018-06-01\"\n },\n \"domains\": [\n \"phonovation.com\"\n ],\n \"tags\": [\n \"Vip\"\n ]\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 => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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'
]
]),
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: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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']
})
};
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"
}{
"requestError": {
"serviceException": {
"messageId": "BAD_REQUEST",
"text": "Bad request"
}
}
}{
"requestError": {
"serviceException": {
"messageId": "UNAUTHORIZED",
"text": "Unauthorized"
}
}
}{
"requestError": {
"serviceException": {
"messageId": "FORBIDDEN",
"text": "Forbidden"
}
}
}{
"requestError": {
"serviceException": {
"messageId": "TOO_MANY_REQUESTS",
"text": "Too many requests"
}
}
}{
"requestError": {
"serviceException": {
"messageId": "GENERAL_ERROR",
"text": "Something went wrong. Please contact support."
}
}
}{
"requestError": {
"serviceException": {
"messageId": "<string>",
"text": "<string>"
}
}
}{
"requestError": {
"serviceException": {
"messageId": "<string>",
"text": "<string>"
}
}
}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
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