Skip to main content
POST
https://api.usenotra.com
/
v1
/
posts
/
generate
Queue async post generation
curl --request POST \
  --url https://api.usenotra.com/v1/posts/generate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "contentType": "blog_post",
  "lookbackWindow": "last_7_days",
  "brandVoiceId": "voice_123",
  "brandIdentityId": "voice_123",
  "repositoryIds": [
    "repo_1",
    "repo_2"
  ],
  "linearIntegrationIds": [
    "linear_integration_1"
  ],
  "integrations": {
    "github": [
      "integration_1",
      "integration_2"
    ],
    "linear": [
      "linear_integration_1"
    ]
  },
  "github": {
    "repositories": [
      {
        "owner": "usenotra",
        "repo": "notra"
      }
    ]
  },
  "dataPoints": {
    "includePullRequests": true,
    "includeCommits": true,
    "includeReleases": true,
    "includeLinearData": false
  },
  "selectedItems": {
    "commitShas": [
      "<string>"
    ],
    "pullRequestNumbers": [
      {
        "repositoryId": "<string>",
        "number": 123
      }
    ],
    "releaseTagNames": [
      "<string>"
    ],
    "linearIssueIds": [
      {
        "integrationId": "<string>",
        "issueId": "<string>"
      }
    ]
  }
}
'
{
  "organization": {
    "id": "<string>",
    "slug": "<string>",
    "name": "<string>",
    "logo": "<string>"
  },
  "job": {
    "id": "<string>",
    "organizationId": "<string>",
    "status": "queued",
    "contentType": "changelog",
    "lookbackWindow": "current_day",
    "repositoryIds": [
      "<string>"
    ],
    "brandVoiceId": "<string>",
    "workflowRunId": "<string>",
    "postId": "<string>",
    "error": "<string>",
    "source": "api",
    "createdAt": "<string>",
    "updatedAt": "<string>",
    "completedAt": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Send your API key in the Authorization header as Bearer API_KEY.

Body

application/json
contentType
enum<string>
required
Available options:
changelog,
blog_post,
linkedin_post,
twitter_post
Example:

"blog_post"

lookbackWindow
enum<string>
default:last_7_days
Available options:
current_day,
yesterday,
last_7_days,
last_14_days,
last_30_days
Example:

"last_7_days"

brandVoiceId
string
Minimum string length: 1
Example:

"voice_123"

brandIdentityId
string | null
Minimum string length: 1
Example:

"voice_123"

repositoryIds
string[]

Deprecated. Use integrations.github with GitHub integration IDs instead.

Minimum string length: 1
Example:
["repo_1", "repo_2"]
linearIntegrationIds
string[]

Deprecated. Use integrations.linear with Linear integration IDs instead.

Minimum string length: 1
Example:
["linear_integration_1"]
integrations
object
github
object
Example:
{
  "repositories": [{ "owner": "usenotra", "repo": "notra" }]
}
dataPoints
object
selectedItems
object

Response

Post generation queued successfully

organization
object
required
job
object
required