Create company
curl -X POST "/api/v1/companies" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN (API key (ixk_...))" \
-d '{
"name": "John Doe",
"domains": [
"example_string"
],
"custom_fields": {}
}'
import requests
import json
url = "/api/v1/companies"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN (API key (ixk_...))"
}
data = {
"name": "John Doe",
"domains": [
"example_string"
],
"custom_fields": {}
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("/api/v1/companies", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN (API key (ixk_...))"
},
body: JSON.stringify({
"name": "John Doe",
"domains": [
"example_string"
],
"custom_fields": {}
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"name": "John Doe",
"domains": [
"example_string"
],
"custom_fields": {}
}`)
req, err := http.NewRequest("POST", "/api/v1/companies", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN (API key (ixk_...))")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('/api/v1/companies')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN (API key (ixk_...))'
request.body = '{
"name": "John Doe",
"domains": [
"example_string"
],
"custom_fields": {}
}'
response = http.request(request)
puts response.body
{
"data": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "John Doe",
"domains": [
"example_string"
],
"created_at": "2024-12-25T10:00:00Z",
"updated_at": "2024-12-25T10:00:00Z",
"contacts": [
{}
],
"custom_fields": {}
}
}
{
"error": "Bad Request",
"message": "The request contains invalid parameters or malformed data",
"code": 400,
"details": [
{
"field": "email",
"message": "Invalid email format"
}
]
}
{
"error": "Conflict",
"message": "The request conflicts with the current state of the resource",
"code": 409,
"details": "Resource already exists"
}
POST
/companies
POST
Bearer Token (API key (ixk_...))
Bearer Tokenstring
RequiredAPI key from Settings → API. Pass as Authorization: Bearer <key>
API key from Settings → API. Pass as Authorization: Bearer <key>
Content-Typestring
RequiredThe media type of the request body
Options: application/json
Request Preview
Response
Response will appear here after sending the request
Authentication
header
Authorizationstring
RequiredBearer token (API key (ixk_...)). API key from Settings → API. Pass as Authorization: Bearer <key>
Responses
dataobject
GET / POST 201 / PATCH 200 company body (subset + custom_fields).
idstring
namestring
domainsstring[]
created_atstring
Present on GET only
updated_atstring
Present on GET only
contactsobject[]
Present on GET only
custom_fieldsstring
Validation error
Duplicate name
Was this page helpful?
Last updated 3 weeks ago
Built with Documentation.AI