Create contact
POST/:organization_id/contacts
Creates a new contact for an organization
Request
Path Parameters
organization_id integerrequired
Organization ID
- application/json
Bodyrequired
full_namestringrequired
Full name of the contact
emailstring
Email address of the contact
descriptionstring
Additional details about the contact
contact_phones_attributes object[]
Responses
- 201
- 401
- 403
- 422
Contact created successfully
- application/json
- Schema
- Example (auto)
Schema
idintegerrequired
Unique identifier for the contact
organization_idintegerrequired
ID of the organization this contact belongs to
full_namestringrequired
Full name of the contact
emailstringnullable
Email address of the contact
descriptionstringnullable
Additional details about the contact
contact_phones object[]
created_atdate-time
Creation timestamp
updated_atdate-time
Last update timestamp
{
"id": 0,
"organization_id": 0,
"full_name": "string",
"email": "string",
"description": "string",
"contact_phones": [
{
"id": 0,
"contact_id": 0,
"organization_id": 0,
"number": "string",
"phone_type": "string",
"created_at": "2024-07-29T15:51:28.071Z",
"updated_at": "2024-07-29T15:51:28.071Z"
}
],
"created_at": "2024-07-29T15:51:28.071Z",
"updated_at": "2024-07-29T15:51:28.071Z"
}
Unauthorized
Forbidden
Unprocessable Entity - Invalid input
Authorization: http
name: basicAuthtype: httpscheme: basicdescription: Basic authentication using API key ID and API key
- python
- nodejs
- ruby
- curl
- go
- php
- java
- powershell
- javascript
- rust
- HTTP.CLIENT
- REQUESTS
import http.client
import json
conn = http.client.HTTPSConnection("cloud-staging.cloverhound.com")
payload = ''
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Basic PHVzZXJuYW1lPjo8cGFzc3dvcmQ+'
}
conn.request("POST", "/:organization_id/contacts", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))