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

# Create for a post

> Add engagements (likes, comments, reposts) to a post. Engagements will be executed automatically when the post is published.

**Tagging on LinkedIn:**
To mention someone in a comment or repost, use the format `@[Display Name](urn)`. See [LinkedIn Mentions](/api/linkedin-mentions) for details on how to look up URNs.

**LinkedIn reaction types:**
For Like engagements on LinkedIn, you can specify a reaction type (Like, Celebrate, Love, Insightful, Support, Funny). Defaults to Like if not specified. Must not be provided for Comment or Repost.

**Validation rules:**
- `copy` is required for Comment, optional for Repost, must not be provided for Like
- `delaySeconds` is required for Comment and Repost (any integer from 0 to 86400 — up to 24 hours), must not be provided for Like
- `reactionType` is only for Like engagements on LinkedIn (defaults to Like if omitted)
- Only one Like engagement per profile is allowed



## OpenAPI

````yaml /api/openapi.json post /posts/{postId}/engagements
openapi: 3.1.0
info:
  title: Ordinal API
  version: 1.0.0
  description: API to create and manage Ordinal workspaces, posts, profiles, and analytics
servers:
  - url: https://app.tryordinal.com/api/v1
    description: Production server
security:
  - bearerAuth: []
tags:
  - name: Analytics
    description: Social media analytics data
  - name: Approvals
    description: Post approval workflows
  - name: Comments
    description: >-
      Post comments for team collaboration. Supports @mentions using the format
      @[Display Name](userId).
  - name: Engagements
    description: Auto-engagements for posts (likes, comments, reposts)
  - name: Invites
    description: Workspace invitations for adding new users
  - name: Labels
    description: Labels for organizing posts
  - name: Instagram
    description: Instagram utilities for location search and tagging
  - name: LinkedIn
    description: LinkedIn utilities for profile lookups, tagging, and mentions
  - name: Posts
    description: Create and manage posts
  - name: Profiles
    description: List connected social profiles
  - name: Slack Boosts
    description: >-
      List connected Slack channels (webhooks), then create and manage slack
      boosts so teams get notified in Slack when posts publish. Requires Slack
      connected with marketing boost channels.
  - name: Subscribers
    description: Post subscribers for notifications
  - name: File Uploads
    description: >-
      Upload files from URLs for use in posts. Supports images (JPEG, PNG, GIF,
      WebP) up to 10 MB and videos (MP4, MOV) up to 350 MB.
  - name: Ideas
    description: >-
      Create and manage content ideas. Ideas are draft posts without scheduled
      dates that can be converted to calendar posts.
  - name: Inline Comments
    description: >-
      Text-anchored comments on specific post content. Read-only API for
      retrieving inline comments across channels.
  - name: Users
    description: Workspace users
  - name: Webhooks
    description: >-
      Create, list, get, update, and delete webhooks to receive real-time event
      notifications
  - name: Workspaces
    description: Workspace information
paths:
  /posts/{postId}/engagements:
    post:
      tags:
        - Engagements
      summary: Create for a post
      description: >-
        Add engagements (likes, comments, reposts) to a post. Engagements will
        be executed automatically when the post is published.


        **Tagging on LinkedIn:**

        To mention someone in a comment or repost, use the format `@[Display
        Name](urn)`. See [LinkedIn Mentions](/api/linkedin-mentions) for details
        on how to look up URNs.


        **LinkedIn reaction types:**

        For Like engagements on LinkedIn, you can specify a reaction type (Like,
        Celebrate, Love, Insightful, Support, Funny). Defaults to Like if not
        specified. Must not be provided for Comment or Repost.


        **Validation rules:**

        - `copy` is required for Comment, optional for Repost, must not be
        provided for Like

        - `delaySeconds` is required for Comment and Repost (any integer from 0
        to 86400 — up to 24 hours), must not be provided for Like

        - `reactionType` is only for Like engagements on LinkedIn (defaults to
        Like if omitted)

        - Only one Like engagement per profile is allowed
      operationId: engagements-create
      parameters:
        - name: postId
          in: path
          required: true
          description: Post ID (UUID)
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateEngagementsInput'
            example:
              channel: LinkedIn
              engagements:
                - type: Like
                  profileId: 550e8400-e29b-41d4-a716-446655440001
                  reactionType: Celebrate
                - type: Comment
                  profileId: 550e8400-e29b-41d4-a716-446655440002
                  copy: Great insights! Check out our guide for more details.
                  delaySeconds: 300
                - type: Repost
                  profileId: 550e8400-e29b-41d4-a716-446655440003
                  delaySeconds: 3600
      responses:
        '200':
          description: Engagements created
          content:
            application/json:
              schema:
                type: object
                properties:
                  engagements:
                    type: array
                    items:
                      $ref: '#/components/schemas/Engagement'
              example:
                engagements:
                  - id: 550e8400-e29b-41d4-a716-446655440800
                    type: Like
                    profileId: 550e8400-e29b-41d4-a716-446655440001
                    copy: null
                    delaySeconds: 0
                    reactionType: Celebrate
                  - id: 550e8400-e29b-41d4-a716-446655440801
                    type: Comment
                    profileId: 550e8400-e29b-41d4-a716-446655440002
                    copy: Great insights! Check out our guide for more details.
                    delaySeconds: 300
                  - id: 550e8400-e29b-41d4-a716-446655440802
                    type: Repost
                    profileId: 550e8400-e29b-41d4-a716-446655440003
                    copy: null
                    delaySeconds: 3600
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    CreateEngagementsInput:
      type: object
      required:
        - channel
        - engagements
      properties:
        channel:
          $ref: '#/components/schemas/EngagementChannel'
        engagements:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/EngagementInput'
    Engagement:
      type: object
      properties:
        id:
          type: string
          format: uuid
        channel:
          $ref: '#/components/schemas/EngagementChannel'
        type:
          $ref: '#/components/schemas/EngagementType'
        profileId:
          type: string
          format: uuid
          description: The profile ID that will perform the engagement
        copy:
          type: string
          nullable: true
          description: >-
            The text content for Comment or Repost engagements. Required for
            Comment, optional for Repost, must not be provided for Like.
        delaySeconds:
          type: integer
          minimum: 0
          maximum: 86400
          description: >-
            Delay in seconds after the post publishes. For Comment and Repost,
            this is the delay until the engagement fires (0 means immediate).
            Always 0 for Like.
        reactionType:
          $ref: '#/components/schemas/LinkedInReactionType'
          nullable: true
          description: >-
            LinkedIn reaction type for Like engagements. Only present when type
            is Like and channel is LinkedIn.
    EngagementChannel:
      type: string
      enum:
        - LinkedIn
        - Twitter
    EngagementInput:
      type: object
      required:
        - type
        - profileId
      properties:
        type:
          $ref: '#/components/schemas/EngagementType'
        profileId:
          type: string
          format: uuid
          description: The profile ID that will perform the engagement
        copy:
          type: string
          minLength: 1
          description: >-
            The text content. Required for Comment, optional for Repost, must
            not be provided for Like.
        delaySeconds:
          type: integer
          minimum: 0
          maximum: 86400
          description: >-
            Delay in seconds after the post publishes. Accepts any integer from
            0 to 86400 (24 hours). Required for Comment and Repost, must not be
            provided for Like.
        reactionType:
          $ref: '#/components/schemas/LinkedInReactionType'
          description: >-
            LinkedIn reaction type for Like engagements. Only applicable when
            type is Like and channel is LinkedIn. Defaults to Like if not
            specified. Must not be provided for Comment or Repost.
    EngagementType:
      type: string
      enum:
        - Like
        - Comment
        - Repost
    LinkedInReactionType:
      type: string
      enum:
        - Like
        - Celebrate
        - Love
        - Insightful
        - Support
        - Funny
      description: >-
        LinkedIn reaction type for Like engagements. Only applicable when type
        is Like and channel is LinkedIn. Defaults to Like if not specified.
    ValidationError:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
        data:
          type: object
          properties:
            errors:
              type: object
              additionalProperties:
                type: array
                items:
                  type: string
    Error:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
  responses:
    BadRequest:
      description: Bad Request - Invalid input parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationError'
          example:
            code: BAD_REQUEST
            message: Bad Request
            data:
              errors:
                publishAt:
                  - Invalid date format
                status:
                  - Invalid enum value
    Unauthorized:
      description: Unauthorized - Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: UNAUTHORIZED
            message: Invalid or unauthorized API key
    Forbidden:
      description: Forbidden - Insufficient permissions
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: FORBIDDEN
            message: Engagement profiles cannot be used for analytics
    NotFound:
      description: Not Found - Resource does not exist
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: NOT_FOUND
            message: Post not found or does not belong to this workspace
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key authentication. Generate an API key from your workspace
        settings.

````