Skip to main content
MarkdownAI setup

Use the API

Call the flayr v2 API with an API key: one curl example, and the generic HTTP step for automation tools such as n8n, Zapier and Make. For scripts and tools that connect without MCP or an AI agent.

Included in: Pro, Premium, Business, Agency, Marketing Firm, EnterpriseIn the app: Developers
Open Use the API in flayr
Prefer to watch?No videos yet. The steps below still work, and you can record the first one.

Every request sends your API key in the Authorization header.

  1. 1

    Create an API key

    Open Developers, then API Keys. The steps are in Connect your AI agent. Read + Write is enough for this tutorial.

  2. 2

    Call ping

    Run this in a terminal, with your key in place of flayr_sk_YOUR_KEY.

    Check the key

    curl -s https://flayr.social/api/v2/ping -H "Authorization: Bearer flayr_sk_YOUR_KEY"

    A working key answers

    {"ok":true,"authenticated":true,"userId":"<your user id>","tier":"<your plan>","brandId":null,"brandName":null,"ts":<time>}
Read the full guide

Check your key, create a draft with one request, then do the same from an automation tool.

One request creates a draft in flayr. Nothing is posted.

  1. 1

    Send the request

    It creates a draft with the text you send.

    Create a draft

    curl -s -X POST https://flayr.social/api/v2/content -H "Authorization: Bearer flayr_sk_YOUR_KEY" -H "Content-Type: application/json" -d '{"text":"Hello from my automation"}'
  2. 2

    Check the answer

    A working request answers HTTP 201 with the id of the draft. The draft is saved in flayr. Nothing was posted.

    The answer (HTTP 201)

    {"id":"<draft id>","status":"draft","brandId":"<your brand id>"}

Automation tools call the same API through their generic HTTP or webhook step.

  1. 1

    Add the HTTP step

    In n8n it is the HTTP Request node. In Zapier it is Webhooks by Zapier. In Make it is HTTP, Make a request. Any tool with a generic HTTP step works the same way.

  2. 2

    Add your key as a header

    Use the name and the value below, with your key in place of flayr_sk_YOUR_KEY.

    Header name

    Authorization

    Header value

    Bearer flayr_sk_YOUR_KEY
  3. 3

    Check it with a GET

    Set the method to GET, paste the URL and run the step. A working key answers "authenticated": true.

    URL

    https://flayr.social/api/v2/ping
  4. 4

    Create a draft with a POST

    Set the method to POST and the body type to JSON, then paste the URL and the body. Run the step. The answer shows "status": "draft". Nothing is posted.

    URL

    https://flayr.social/api/v2/content

    JSON body

    {"text":"Hello from my automation"}
  5. 5

    Field names for your tool

    The exact field names for n8n, Zapier and Make are in the agent reference.

Where to look up every endpoint, and how flayr can call your tool.

  1. 1

    Open the API reference

    Every endpoint of the v2 API is in the public reference.

  2. 2

    Let flayr call your tool

    To hear about events as they happen, add a webhook in Developers, under Webhooks.

Videos

Official
Not recorded yet · steps still work

Written guide

  1. 1
    Create an API key

    Open Developers, then API Keys. The steps are in Connect your AI agent. Read + Write is enough for this tutorial.

  2. 2
    Call ping

    Run this in a terminal, with your key in place of flayr_sk_YOUR_KEY.

Official recording

One walkthrough from the flayr team per section, the first card in every row. Until it is recorded, the written steps still work.

Community perspectives

How members really use it, with their own steps. Approved videos earn 100 Embers.

Submit a video