> ## 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 company activity (note)

> Log a new activity (note, call note, meeting note, email, etc.) on a company record. The activity_type must be a key registered for the team — discover valid keys with `GET /v1/company-activities/types`.



## OpenAPI

````yaml /api-reference/openapi-v1.json post /v1/company-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/company-activities:
    post:
      tags:
        - Company Activities
      summary: Create company activity (note)
      description: >-
        Log a new activity (note, call note, meeting note, email, etc.) on a
        company record. The activity_type must be a key registered for the team
        — discover valid keys with `GET /v1/company-activities/types`.
      operationId: createCompanyActivity
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddCompanyActivityRequest'
      responses:
        '201':
          description: Company activity created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddCompanyActivityResponse'
              example:
                success: true
                data:
                  id: 901e2345-e67f-89ab-cdef-456789012345
                  organization_company_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:
    AddCompanyActivityRequest:
      type: object
      properties:
        organization_company_id:
          type: string
          format: uuid
          description: >-
            Company UUID to attach the activity to. Get from POST
            /v1/companies/search or GET /v1/companies/{id}.
        activity_type:
          type: string
          minLength: 1
          description: >-
            Activity type key registered for the team. Must match an entry from
            GET /v1/company-activities/types (e.g. `secondary_note`,
            `call_note`, `meeting_note`, `email`, plus any custom types defined
            under Settings → Activity Types).
        activity_content:
          type: string
          description: >-
            Activity body. Plain text or HTML — HTML is auto-detected and stored
            alongside the plain-text mirror.
      required:
        - organization_company_id
        - activity_type
        - activity_content
    AddCompanyActivityResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        data:
          $ref: '#/components/schemas/AddCompanyActivityResponseData'
      required:
        - success
        - data
    AddCompanyActivityResponseData:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Created company activity UUID.
        organization_company_id:
          type: string
          format: uuid
          description: Company UUID the activity was attached to.
        activity_type:
          type: string
          description: Activity type that was created.
      required:
        - id
        - organization_company_id
        - activity_type
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Authenticate with a Bearer token: API key, OAuth token, or session
        token.

````