Skip to main content
POST/companies/

Create company

You can create a company.

Attributes

Optional unless marked required

custom_idstring
The unique identifier for the company which is provided by the client.
addressstring
A company’s address.
citystring
A company city of residence.
countrystring
A company country of residence.
created_atstring
Set by User. A value sent here is ignored.
descriptionstring
A description of a company.
emailstring(email)
A company’s email address.
namestringrequired
A company name.
phone_numberslist of strings
A list of phone numbers.
postal_codestring
A postal code according to the address of your company..
regionstring
A company region of residence.
sizeinteger
An approximate size of your company.
tagsstring
A list of tags associated with a company
updated_atstring
Set by User. A value sent here is ignored.
assigned_tointeger
ID of the agent the company is assigned to.

Request​

curl -X POST "https://<your_app_subdomain>.user.com/api/public/companies/" \
-H "Authorization: Token <your_64_char_api_key>" \
-H "Accept: */*; version=2" \
-H "Content-Type: application/json" \
-d '{
"name": "Acme Inc",
"custom_id": "acme-inc",
"description": "Online store selling outdoor gear.",
"size": 10
}'

Response examples​

{
"id": 34,
"name": "Acme Inc",
"description": "Online store selling outdoor gear.",
"email": null,
"country": null,
"region": null,
"city": null,
"address": null,
"postal_code": null,
"size": 10,
"created_at": "2026-11-09T13:40:25.713466Z",
"updated_at": "2026-11-09T13:40:25.713494Z",
"tags": [],
"employees": [],
"phone_numbers": null,
"custom_id": "acme-inc",
"assigned_to": null
}

A 400 names every field that was rejected, each with its messages. The ones you're most likely to see:

FieldMessageWhen
custom_idThis field must be unique.Another company already has that custom_id.
sizeA valid integer is required.The value isn't a whole number.
assigned_toInvalid pk "123" - object does not exist.No agent has that ID.
emailEnter a valid email address.The value isn't an email address.
phone_numbersExpected a list of items but got type "str".A single string instead of a list.

The API doesn't enforce name: a body without it creates a company with "name": null. Always send it.

Response fields​

Fields returned in the 201 Created response body.

idinteger
A unique identifier for the company which is given by User automatically.
namestringnullable
A company name.
descriptionstring
A description of a company.
emailstring(email)nullable
A company’s email address.
countrystringnullable
A company country of residence.
regionstringnullable
A company region of residence.
citystringnullable
A company city of residence.
addressstringnullable
A company’s address.
postal_codestringnullable
A postal code according to the address of your company..
sizeintegernullable
An approximate size of your company.
created_atstring (date-time)
A creation date of a company.
updated_atstring (date-time)
A date of last company update.
tagsarray
A list of tags associated with a company
employeesarray
IDs of the contacts who belong to the company.
phone_numbersstring(list)nullable
A list of phone numbers.
custom_idstring
The unique identifier for the company which is provided by the client.
assigned_tointegernullable
ID of the agent group the company is assigned to.
note

Errors that can come from any endpoint (401, 429, 500, 502, 504) are described in HTTP response codes.