Skip to main content

How to post with n8n using Ocoya's API

Use n8n and Ocoya's API to create a new post.

Joe Sutcliffe avatar
Written by Joe Sutcliffe
Updated over a week ago

Use n8n’s “HTTP Request” node to send POST requests directly to the Ocoya API to create posts.

  • Create a new workflow and add a trigger (e.g., Schedule, Webhook)

  • Add an HTTP Request node and set Method to POST

  • Use this URL:
    https://app.ocoya.com/api/_public/v1/post?workspaceId=YOUR_WORKSPACE_ID

  • Find your Workspace ID in Ocoya:
    Workspace settings → General → API workspace id

  • Replace YOUR_WORKSPACE_ID in the URL with your actual ID

  • Set Authentication to Header Auth

  • Add header X-API-Key with your Ocoya API key
    (Create under Workspace settings → Developers → API → Create new token)

  • Set Body Content Type to JSON

  • Add body fields:

    • caption (post text)

    • Optionally add: mediaUrls, socialProfileIds, scheduledAt

  • Test the node; check if the post appears in Ocoya (likely as a draft)

  • Activate the workflow to post automatically when the trigger runs

Your n8n workflow is now active! Whenever your trigger event occurs, n8n will send the data directly to Ocoya’s API and create a post based on your setup.

Did this answer your question?