Skip to main content
POST
/
api
/
adm
/
companyProjects
Create Company Project
curl --request POST \
  --url https://localhost:44371/api/adm/companyProjects \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{}'
{
  "success": true,
  "code": 200,
  "errorMessage": null,
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}

Description

Creates a new project within a company with specified name, configuration, and payment processor settings. Projects represent logical divisions (applications, departments, or business units) that process transactions independently.

Input

  • Body: model (CompanyProjectCreateCommandRequest, required) — Project details including:
    • companyId (guid, required) — Parent company identifier.
    • name (string, required) — Project name (unique within company).
    • description (string, optional) — Project description.
    • returnUrl (string, optional) — Payment success redirect URL.
    • cancelUrl (string, optional) — Payment cancellation redirect URL.
    • isActive (bool, optional) — Active status (default: true).

Output

Returns a CompanyProjectCreateCommandResponse containing the ID of the newly created project.

Example Request

POST /api/admin/companyProjects
Content-Type: application/json
Authorization: Bearer {token}

{
  "companyId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "name": "E-Commerce Application",
  "description": "Main online store payment processing",
  "returnUrl": "https://example.com/payment/return",
  "cancelUrl": "https://example.com/payment/cancel",
  "isActive": true
}

Example Response

{
  "success": true,
  "code": 200,
  "errorMessage": null,
  "id": "7bc94a21-8833-4d2f-a5e1-9f4b2d8c1e7a"
}

Errors

  • 400 Bad Request — Missing required fields, validation errors, or duplicate project name within company.
  • 404 Not Found — Parent company does not exist.

Notes

  • After creating a project, use ProjectPaymentProcessorController to configure payment processors.
  • Use CompanyProjectUserController to assign users to the newly created project.
  • Project names must be unique within a company but can be duplicated across different companies.
  • New projects require payment processor configuration before they can process transactions.

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json

The project creation request containing name, company ID, merchant info, and configuration.

Base structure for command requests that modify data. Represents the payload used to create or update a company project.

projectName
string
required

Project Name

Maximum string length: 50
id
string<guid> | null

The optional identifier of the project when updating via the create endpoint.

companyId
string<guid>

The identifier of the company that owns the project.

phone
string | null

The public phone number for the project.

Maximum string length: 25
softDescriptor
string | null

The soft descriptor configured for the project.

comments
string | null

The comments associated with the project.

companyUsersToAdd
string<guid>[] | null

The collection of company user identifiers that should be added to the project.

Response

Always returned. Check the success property in the response body to determine if the operation succeeded.

Standard response structure containing operation status and error information. Standard command response indicating the result of a data modification. Create response containing the identifier of the newly created entity. Represents the response returned after creating a project.

success
boolean

True if the operation completed successfully; false if an error occurred.

Example:

true

code
enum<string>

Result code indicating the outcome of the operation.

Available options:
Unknown,
Success,
BadRequest,
Unauthorized,
NotFound,
Error
Example:

200

errorMessage
string | null

Human-readable error message when an error occurs.

Example:

null

id
string<guid>

Unique identifier of the newly created entity.

Example:

"3fa85f64-5717-4562-b3fc-2c963f66afa6"