> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stardex.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create person activity

> Create a new activity (note, meeting, email, etc.) and attach it to a person record. The person can be identified by `person_id`, `email`, `linkedin_url`, or `full_name` — at least one is required.

**Job association**: Pass optional `job_id` to link the activity to a specific search. When `job_id` is provided, the identified person must already be a candidate on that job; otherwise the request returns a 400 error.

**Event time**: Optional `occurred_at` records when the event actually happened (ISO 8601). This is distinct from `created_at`, a system-managed timestamp for when the activity record was written — `created_at` cannot be set by the caller. If `occurred_at` is omitted, it defaults to `created_at`.

**Attribution**: session and OAuth callers are always recorded as themselves. Pass `team_member_id` only when authenticating with an API key.

**Supported activity types**: `secondary_note` (general note), `meeting_note`, `meeting_transcript`, `email`, `interview_note`, `linkedin_message`, `text_message`, `candidate_summary`, `linkedin_message_response`, `call_note`.



## OpenAPI

````yaml /api-reference/openapi-v1.json post /v1/person-activities
openapi: 3.1.0
info:
  title: Stardex API (v1)
  version: 1.0.0
  description: >-
    Stardex ATS API — manage candidates, jobs, companies, and recruiting
    workflows.
servers:
  - url: https://api.stardex.ai
    description: Production API server
security:
  - bearerAuth: []
tags:
  - name: Persons
    description: Manage person records — contacts, work history, and custom fields.
  - name: Jobs
    description: Manage job postings — pipeline stages, team members, and custom fields.
  - name: Candidates
    description: Manage candidate records and pipeline stage transitions.
  - name: Companies
    description: Browse and retrieve company records.
  - name: Lists
    description: Create, search, and retrieve saved person and company lists.
  - name: Person Activities
    description: Create and manage activity records (notes, emails, meetings) for persons.
  - name: Team Members
    description: List team members for use in search filters and assignments.
  - name: Custom Fields
    description: Retrieve custom field definitions and tag options for search filters.
paths:
  /v1/person-activities:
    post:
      tags:
        - Person Activities
      summary: Create person activity
      description: >-
        Create a new activity (note, meeting, email, etc.) and attach it to a
        person record. The person can be identified by `person_id`, `email`,
        `linkedin_url`, or `full_name` — at least one is required.


        **Job association**: Pass optional `job_id` to link the activity to a
        specific search. When `job_id` is provided, the identified person must
        already be a candidate on that job; otherwise the request returns a 400
        error.


        **Event time**: Optional `occurred_at` records when the event actually
        happened (ISO 8601). This is distinct from `created_at`, a
        system-managed timestamp for when the activity record was written —
        `created_at` cannot be set by the caller. If `occurred_at` is omitted,
        it defaults to `created_at`.


        **Attribution**: session and OAuth callers are always recorded as
        themselves. Pass `team_member_id` only when authenticating with an API
        key.


        **Supported activity types**: `secondary_note` (general note),
        `meeting_note`, `meeting_transcript`, `email`, `interview_note`,
        `linkedin_message`, `text_message`, `candidate_summary`,
        `linkedin_message_response`, `call_note`.
      operationId: createPersonActivity
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddPersonActivityRequest'
      responses:
        '201':
          description: Activity created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddPersonActivityResponse'
              example:
                success: true
                data:
                  id: 901e2345-e67f-89g0-h123-456789012345
                  person_id: 123e4567-e89b-12d3-a456-426614174000
                  activity_type: meeting_note
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                    description: Always false for error responses.
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: >-
                          Machine-readable error code (e.g. "VALIDATION_ERROR",
                          "NOT_FOUND").
                      message:
                        type: string
                        description: Human-readable error description.
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                    description: Always false for error responses.
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: >-
                          Machine-readable error code (e.g. "VALIDATION_ERROR",
                          "NOT_FOUND").
                      message:
                        type: string
                        description: Human-readable error description.
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                    description: Always false for error responses.
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: >-
                          Machine-readable error code (e.g. "VALIDATION_ERROR",
                          "NOT_FOUND").
                      message:
                        type: string
                        description: Human-readable error description.
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
components:
  schemas:
    AddPersonActivityRequest:
      type: object
      properties:
        linkedin_url:
          type: string
          format: uri
          description: LinkedIn profile URL to identify the person.
        email:
          type: string
          format: email
          description: Email address to identify the person.
        full_name:
          type: string
          description: >-
            Full name to identify the person. Least precise — prefer
            linkedin_url, email, or person_id.
        person_id:
          type: string
          format: uuid
          description: >-
            Person UUID (most precise). Get from POST /v1/persons/search or GET
            /v1/persons/{id}.
        activity_type:
          type: string
          minLength: 1
          description: >-
            Activity type key. Standard values: secondary_note (general note),
            meeting_note, meeting_transcript, email, interview_note,
            linkedin_message, text_message, candidate_summary,
            linkedin_message_response, call_note. Teams can also define custom
            activity types from Settings → Activity Types; discover the full
            list (including custom types) with GET /v1/person-activities/types.
        activity_content:
          type: string
          description: Activity body text. Stored as both HTML and plain text.
        team_member_id:
          type: string
          format: uuid
          description: >-
            Team member UUID to record as the activity creator. Ignored for
            session and OAuth callers (the authenticated member is always
            recorded). Required for API-key auth, which has no implicit member
            context.
        job_id:
          type: string
          format: uuid
          description: >-
            Optional job UUID to associate this activity with a specific search.
            When provided, the identified person must already have a candidate
            record on that job — otherwise the request returns a 400 error.
            Resolve job IDs with POST /v1/jobs/search.
        occurred_at:
          type: string
          format: date-time
          description: >-
            ISO 8601 timestamp for when the event actually occurred (e.g.
            "2024-01-10T14:00:00Z"). This is distinct from `created_at`, which
            is a system-managed timestamp for when the activity record was
            written and cannot be set by the caller. Use `occurred_at` to
            backdate or record the real event time (for example, a meeting that
            happened last week). If omitted, it defaults to `created_at`.
      required:
        - activity_type
        - activity_content
    AddPersonActivityResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        data:
          $ref: '#/components/schemas/AddPersonActivityResponseData'
      required:
        - success
        - data
    AddPersonActivityResponseData:
      type: object
      properties:
        id:
          type: string
          description: >-
            Created activity UUID. Use in GET /v1/person-activities/{id} to
            retrieve.
        person_id:
          type: string
          description: Person UUID the activity was attached to.
        activity_type:
          type: string
          description: Activity type that was created.
      required:
        - id
        - person_id
        - activity_type
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Authenticate with a Bearer token: API key, OAuth token, or session
        token.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.