POST /v1/companies
Create a new company
Creates a new company for the authenticated user. Checks subscription limits for maximum companies allowed.
Request
POST /v1/companies
Parameters
[]
Response
{
"201": {
"description": "Company created successfully",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"data": {
"type": "object",
"properties": {
"company": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"user_id": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"type": "string"
},
"tax_number": {
"type": [
"string",
"null"
]
},
"tax_office": {
"type": [
"string",
"null"
]
},
"address": {
"type": [
"string",
"null"
]
},
"city": {
"type": [
"string",
"null"
]
},
"phone": {
"type": [
"string",
"null"
]
},
"email": {
"type": [
"string",
"null"
]
},
"status": {
"type": "string"
},
"metadata": {},
"created_at": {
"type": "string"
},
"updated_at": {
"type": "string"
}
},
"required": [
"id",
"user_id",
"name",
"type",
"tax_number",
"tax_office",
"address",
"city",
"phone",
"email",
"status",
"created_at",
"updated_at"
]
}
},
"required": [
"company"
]
}
},
"required": [
"success",
"data"
]
}
}
}
},
"403": {
"description": "Company limit exceeded for current subscription"
}
}
View in Interactive API Reference