Create Project Assignment
POST
/api/projects/{project_id}/assignments
const url = 'https://example.com/api/projects/example/assignments';const options = {method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/projects/example/assignments \ --header 'Content-Type: application/json' \ --data '{}'Create assignments for target files in a project.
Expected assignment_data format (stage_index and role are REQUIRED): { “assignments”: [ { “user_id”: “019a…”, # User UUID (UUIDv7) “file_uuid”: “019b…”, # File UUID (UUIDv7) “target_uuid”: “019c…”, # Target UUID (UUIDv7) “estimated_hours”: 5.0, “deadline”: 1234567890.0, “notes”: “Optional notes”, “stage_index”: 0, “role”: “translator” # one of app.contracts.role.Role values } ] }
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”project_id
required
Project Id
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
Assignment Data
object
key
additional properties
any
Examplegenerated
{}Responses
Section titled “Responses”Successful Response
Media typeapplication/json
Examplegenerated
exampleValidation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}