# Create a Note activity

POST https://api.close.com/api/v1/activity/note/
Content-Type: application/json

To include an attachment, you must first upload the file to Close using the [Files API](/resources/files/). Then, add an object to the `attachments` array with the following fields: `url`, `filename` and `content_type`. The `url` should be the URL provided in the `download.url` field of the response from the [Files API](/resources/files/). It must begin `https://app.close.com/go/file/`.

A note can be pinned or unpinned by setting the `pinned` field to `true` or `false` when creating or updating a note.

Reference: https://developer.close.com/api/resources/activities/notes/create

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Close API
  version: 1.0.0
paths:
  /activity/note/:
    post:
      operationId: create
      summary: Create a Note activity
      description: >-
        To include an attachment, you must first upload the file to Close using
        the [Files API](/resources/files/). Then, add an object to the
        `attachments` array with the following fields: `url`, `filename` and
        `content_type`. The `url` should be the URL provided in the
        `download.url` field of the response from the [Files
        API](/resources/files/). It must begin `https://app.close.com/go/file/`.


        A note can be pinned or unpinned by setting the `pinned` field to `true`
        or `false` when creating or updating a note.
      tags:
        - subpackage_activitiesNotes
      parameters:
        - name: Authorization
          in: header
          description: Basic authentication
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActivityBase'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                description: Any type
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                description: Any type
        '404':
          description: Not found
          content:
            application/json:
              schema:
                description: Any type
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateNoteActivity'
servers:
  - url: https://api.close.com/api/v1
components:
  schemas:
    CreateNoteActivityAttachmentsItems:
      type: object
      properties:
        content_type:
          type:
            - string
            - 'null'
        filename:
          type: string
        url:
          type: string
          format: uri
      required:
        - filename
        - url
      title: CreateNoteActivityAttachmentsItems
    CreateNoteActivity:
      type: object
      properties:
        activity_at:
          type:
            - string
            - 'null'
          format: date-time
        attachments:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/CreateNoteActivityAttachmentsItems'
        contact_id:
          type:
            - string
            - 'null'
        created_by_id:
          type:
            - string
            - 'null'
        date_created:
          type:
            - string
            - 'null'
          format: date-time
        lead_id:
          type: string
        note:
          type:
            - string
            - 'null'
        note_html:
          type:
            - string
            - 'null'
        organization_id:
          type:
            - string
            - 'null'
        pinned:
          type:
            - boolean
            - 'null'
        title:
          type:
            - string
            - 'null'
        user_id:
          type:
            - string
            - 'null'
      required:
        - lead_id
      title: CreateNoteActivity
    ActivityBase:
      type: object
      properties:
        _type:
          type: string
        activity_at:
          type:
            - string
            - 'null'
          format: date-time
        contact_id:
          type:
            - string
            - 'null'
        created_by:
          type:
            - string
            - 'null'
        created_by_name:
          type:
            - string
            - 'null'
        date_created:
          type: string
          format: date-time
        date_updated:
          type: string
          format: date-time
        id:
          type: string
        lead_id:
          type:
            - string
            - 'null'
        organization_id:
          type: string
        updated_by:
          type:
            - string
            - 'null'
        updated_by_name:
          type:
            - string
            - 'null'
        user_id:
          type:
            - string
            - 'null'
        user_name:
          type:
            - string
            - 'null'
        users:
          type: array
          items:
            type: string
      required:
        - _type
        - activity_at
        - contact_id
        - created_by
        - date_created
        - date_updated
        - id
        - lead_id
        - organization_id
        - updated_by
        - user_id
        - users
      title: ActivityBase
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: basic
    OAuth2:
      type: http
      scheme: bearer

```