Creates allocations.

POST /psa/allocations

Group: PSA › Allocations · Operation ID: createAllocations

Every allocation in the request is created in one transaction, and a failure writes nothing. The response returns the created ids in the order the allocations were sent. memberId identifies the timetracking member assignment the hours are booked against and resolves the project, the person and the permission check. Read a record with GET psa/allocations/:id for its stored state.

Open in the interactive reference

Parameters

Name In Type Required Description
Api-Version header "v1" yes The API version this request targets, named by its public identifier. Required on every request; omitting it, or naming a version this company does not have, is answered with 400. This document describes version v1.
Idempotency-Key header string no An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with 400 IDEMPOTENCY_NOT_SUPPORTED rather than silently ignored.

Request body

Required, application/json: createAllocationsInput.

Field Type Required Description
allocations array of object yes The allocations to create.
allocations[].memberId number yes The id of the timetracking member assignment the daily hours are booked against. It resolves the project, the person and the permission check. It is a numeric package-layer key, not the UUID that GET psa/team-members/:id takes.
allocations[].projectActivityId number yes The id of the project activity the allocation is booked against. It is a numeric package-layer key, not the UUID that GET psa/activities/:id takes.
allocations[].startDate string (date) yes The first day of the allocation period, inclusive. Use format YYYY-MM-DD.
allocations[].endDate string (date) yes The last day of the allocation period, inclusive. Use format YYYY-MM-DD.
allocations[].totalHours string (decimal) yes The planned hours, interpreted according to method. For 'totalHours' and 'hoursPerDay', this is the total for the whole period, spread evenly over the working days in range. For 'hoursPerWeek', it is the period total, divided across the weeks and then the working days. For 'hoursPerMonth', it is a per-month rate, with a working month approximated as 21 days. Days that compute to zero hours produce no daily entry.
allocations[].method string, one of "totalHours", "hoursPerDay", "hoursPerWeek", "hoursPerMonth" yes The distribution method for the planned hours.
allocations[].notes string no Free-form notes stored on the allocation.
allocations[].workingDays array of string, one of "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" no The days of the week the allocation applies to.
allocations[].psaProjectId number yes The id of the PSA project the allocation belongs to. It must be the project the member belongs to. It is a numeric package-layer key, not the UUID that GET psa/projects/:id takes.

Example:

{
  "allocations": [
    {
      "memberId": 4021,
      "projectActivityId": 91,
      "startDate": "2026-09-01",
      "endDate": "2026-09-12",
      "totalHours": "40.00",
      "method": "totalHours",
      "psaProjectId": 32341
    },
    {
      "memberId": 4022,
      "projectActivityId": 91,
      "startDate": "2026-10-01",
      "endDate": "2026-12-31",
      "totalHours": "160.00",
      "method": "hoursPerWeek",
      "psaProjectId": 32341,
      "notes": "Phase 2 delivery capacity.",
      "workingDays": [
        "Monday",
        "Tuesday",
        "Wednesday",
        "Thursday"
      ]
    }
  ]
}

Response

200 Success

Under data (createAllocationsOutput):

Field Type Required Description
created array of object yes The created allocations, in the order the request sent them. Read a record with GET psa/allocations/:id for its stored state.
created[].id string yes The unique identifier for the created allocation.

Response headers

Errors

Code Status
IDEMPOTENCY_KEY_CONFLICT 409
IDEMPOTENCY_PAYLOAD_MISMATCH 422

Statuses