Create activities

Operation ID: createActivities

Group: PSA › Activities

Open in the interactive reference

POST /psa/activities

Retry-safe: A write that accepts Idempotency-Key: repeating a request with the same key replays the stored answer instead of executing twice.

Creates one or more activities (project tasks) on one PSA project. Every entry is checked before anything is written, and every problem found is returned, each with the index of its entry. If any entry fails, nothing is created.

Only the entries you send are validated; other activities of the project are not re-checked.

References are the uuids the GET endpoints return: milestones and fixed fees of the same project (GET psa/milestones, psa/fixed-fees), members of its team (memberId on GET psa/team-member-positions), and an existing activity as parent. Use the returned ids as activity ids, for example on GET psa/activities/:id.

Parameters

Name In Type Required Description
Api-Version header string · 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: createActivitiesInput.

Field Type Required Description
projectId string yes The PSA project the activities belong to. See id on GET psa/projects/:id. Creating activities needs edit permission on this project. Example: "2d9e4f71-0b38-4c6a-a5d2-71e8c3f90b46".
activities array<object> yes The activities to create. Either all are created, or none are. Example: [{"name":"Discovery workshop","billingType":"Milestone","category":"ClientBillable","milestoneId":"5e81c2d4-9a37-4b06-8f12-3c7d0a94e1b8","startDate":"2026-09-01","endDate":"2026-09-02","members":[{"memberId":"0f6a3c95-2e71-4d8b-9c40-b5d81e27a6f3","hoursBudget":"16.00"}]},{"name":"Implementation","billingType":"Hours","category":"ClientBillable","hoursBudget":"120.00"}].
activities[].name string yes The display name. Must not be blank (NAME_REQUIRED).
activities[].description string no A free-form description.
activities[].billingType string yes How the activity is billed. 'Milestone' needs milestoneId and 'FixedFee' needs fixedFeeId; 'Hours' takes neither. Internal and non-billable projects do not allow 'FixedFee'. One of: "Hours", "Milestone", "FixedFee".
activities[].category string no The activity category. On a billable project it is always set from the billing type, as in the Tasks tab, and any value sent is ignored: 'FixedFee' is 'ClientBillable'; 'Milestone' is 'ClientBillable' for a billable milestone and 'NonBillable' otherwise. For 'Hours' on a billable project send 'ClientBillable' or 'NonBillable' (default 'ClientBillable'). Internal and non-billable projects allow 'Valuable' or 'NonValuable' (default 'Valuable'), and only 'Valuable' when the project does not distinguish valuable work. One of: "ClientBillable", "NonBillable", "NonValuable", "Valuable".
activities[].hoursBudget decimal | null no The budgeted hours, a non-negative count of hours. When members carry hoursBudget, the activity budget is their total; a value sent here must then equal that total (BUDGET_MISMATCH).
activities[].milestoneId string | null no The milestone to bill against, a milestone of the same project. See id on GET psa/milestones/:id. Only with billingType 'Milestone'.
activities[].fixedFeeId string | null no The fixed fee to bill against, a fixed fee of the same project. See id on GET psa/fixed-fees/:id. Only with billingType 'FixedFee'. The activity's dates must lie within the fee's period.
activities[].startDate date | null no The start date. Format YYYY-MM-DD. Send both dates or neither; the start must not be after the end.
activities[].endDate date | null no The end date. Format YYYY-MM-DD.
activities[].activityStatusId string | null no The progress status, an active activity status. Omit it to use the active status marked Initial, if there is one; send null for no status.
activities[].parentActivityId string | null no An existing activity of the same project to make this a sub-task of. Sub-tasks nest at most two levels below a top-level activity.
activities[].members array<object> no The members to assign. Each must be a current member of the project team, listed once. On a 'ClientBillable' activity billed by 'Hours', every member must hold a billable position.
activities[].members[].memberId string yes The member's position assignment. See memberId on GET psa/team-member-positions.
activities[].members[].hoursBudget decimal | null no The hours budgeted for this member, a non-negative count of hours.
{
  "projectId": "2d9e4f71-0b38-4c6a-a5d2-71e8c3f90b46",
  "activities": [
    {
      "name": "Discovery workshop",
      "billingType": "Milestone",
      "category": "ClientBillable",
      "milestoneId": "5e81c2d4-9a37-4b06-8f12-3c7d0a94e1b8",
      "startDate": "2026-09-01",
      "endDate": "2026-09-02",
      "members": [
        {
          "memberId": "0f6a3c95-2e71-4d8b-9c40-b5d81e27a6f3",
          "hoursBudget": "16.00"
        }
      ]
    },
    {
      "name": "Implementation",
      "billingType": "Hours",
      "category": "ClientBillable",
      "hoursBudget": "120.00"
    }
  ]
}

Response

200 Success

Under data (createActivitiesOutput):

Field Type Required Description
created array<object> yes The created activities, in the order the request sent them. Example: [{"id":"c4a91b07-6e52-4d38-9a1f-83b7de20c5f6"},{"id":"e2b7d9c1-4a63-4f08-b2d5-1c9e7a30f486"}].
created[].id string yes The unique identifier of the created activity.
{
  "data": {
    "created": [
      {
        "id": "c4a91b07-6e52-4d38-9a1f-83b7de20c5f6"
      },
      {
        "id": "e2b7d9c1-4a63-4f08-b2d5-1c9e7a30f486"
      }
    ]
  },
  "diagnostics": [
    {
      "code": "DATES_OUTSIDE_PROJECT",
      "message": "<message>",
      "severity": "error",
      "path": [
        "<path>"
      ],
      "details": {
        "index": 0
      }
    }
  ]
}

Response headers

Errors

Code Status
PROJECT_NOT_FOUND 400
NAME_REQUIRED 400
INVALID_DATE_RANGE 400
INVALID_HOURS_BUDGET 400
MILESTONE_NOT_FOUND 400
FIXED_FEE_NOT_FOUND 400
MILESTONE_REQUIRED 400
FIXED_FEE_REQUIRED 400
BILLING_REFERENCE_MISMATCH 400
CATEGORY_NOT_ALLOWED 400
NON_VALUABLE_NOT_ALLOWED 400
OUTSIDE_FIXED_FEE_PERIOD 400
STATUS_NOT_FOUND 400
PARENT_NOT_FOUND 400
NESTING_TOO_DEEP 400
MEMBER_NOT_FOUND 400
DUPLICATE_MEMBER 400
NON_BILLABLE_MEMBER 400
BUDGET_MISMATCH 400
IDEMPOTENCY_KEY_CONFLICT 409
IDEMPOTENCY_PAYLOAD_MISMATCH 422

Advisories

Warnings and information a successful response can carry under diagnostics:

Statuses