post
https://api.ol-hub.com/backend/api/v1/contracts
The create contract API sends a POST request to add a contract to a project.
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
Prerequisites
- The caller must provide a contract name and a project id.
Authorization
- API key (via the
X-API-KEYheader).
Parameters
Request Body
| Field name | Description | Format |
|---|---|---|
| name | The name of the contract | String |
| description | The description of the contract | String |
| projectId | The ID of the project | UUID |
Response Body
| Field name | Description | Format |
|---|---|---|
| id | The ID of the created contract | UUID |
| name | The name of the contract | String |
| modifiedAt | Timestamp when the contract was updated | DateTime |
| modifiedBy | The user who last modified the contract | String |
| projectId | The ID of the project | UUID |
| createdAt | Timestamp when the contract was created | DateTime |
Examples
{
"name": "project-contract",
"description": "example project contract",
"projectId": "00000000-0000-0000-0000-000000000111"
}{
"id": "00000000-0000-0000-0000-000000001111",
"name": "project-contract",
"modifiedAt": "2026-01-01T00:00:00.000000000Z",
"modifiedBy": "John Doe",
"projectId": "00000000-0000-0000-0000-000000000111",
"createdAt": "2026-01-01T00:00:00.000000000Z"
}
