How to Create a New Company and Contact via API

 

Create a company and contact in the ProProfs Help Desk using the API. You can create both a company and a contact by providing specific properties in the API request.

 

API Endpoint URL

 

To call the REST API, use the following endpoint URL. Ensure that you use the POST method, and format your request in JSON.

 

POST https://www.proprofsdesk.com/app/api/v1/company_contact/create/

 

Important:

  • The endpoint URL is case-sensitive and requires a trailing forward slash (/).
  • If the email domain does not exist in the Help Desk, both the company and contact will be created. However, if the email domain already exists in your Help Desk account, only the new contact will be created and associated with the existing company.

 

Sample Code | JSON

 

Accept: application/json
Content-Type: application/json
{
         "account_email" : "john@proprofs.com",
          "token" : "*****7edf67d0a*****aca630b0*****",
          "name" : "John Smith",
          "email" : "john@acme.com",
          "company_name" : "Proprofs",
          "portal" : "PT240136-49"
}

 

Request Parameters

 

Parameter

Required

Type

Description

account_email

Yes

string

The ProProfs account email used to register your Help Desk account.

token

Yes

String

Your unique ProProfs API key, available on the "My Account" page of the Help Desk.

name

Yes

string

The name of the contact being created.

email

Yes

string

The email address of the contact being created.

company_name

Yes

string

The name of the company the contact belongs to.

portal

No

string

The ID of the portal to associate with the company and contact (if applicable).

 

Response Format

 

JSON

 

Example Response [Success]

 

Accept: application/json
Content-Type: application/json
{
"status":"success",
"description":"Successfully created company contact"
}


 

Response Field

Description

status

Indicates the request was successful.

description

Successfully created company contact.

 

Example Response [Failed]

 

Accept : application/json
Content-Type : application/json
{
"status" : "error",
"description" : "Unable to authenticate request using account email and token"
}

 

Response Field

Description

status

Indicates that an error occurred during the request.

description

Unable to authenticate request using account email and token.

 

That's all about creating a company and contact via API in ProProfs Hekp Desk. If you encounter any issues or have any questions, feel free to contact our support team

 

 

Was this helpful?
© 2005 - 2024 ProProfs
-
add chat to your website