Recurring

Embed
Preview of the card
<a href="https://indrava.forumulate.com/docs/ref-recurring"><img src="https://indrava.forumulate.com/docs/_api/public/orgs/e421ace4-3e78-4ed8-9818-7b4899cf3aa0/spaces/2bcc7f09-4489-40af-85d8-9fdd3f3da314/pages/b0726adf-0291-4d6f-80b7-bd1851f72a84/social-card.svg?v=3e7ae33eec8b" alt="Recurring" width="600" height="315"></a>
GET http://localhost:4000/api/v1/posts/series

List recurring series

A series makes its next post when the one before is due.

Code samples

cURL
curl -X GET "http://localhost:4000/api/v1/posts/series" \
  -H "Authorization: Bearer $API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 OK
Example
[
  {
    "id": "string",
    "organizationId": "string",
    "authorId": "string",
    "rule": {},
    "template": {},
    "timezone": "string",
    "startAt": "2024-01-01T00:00:00Z",
    "lastOccurrenceAt": "2024-01-01T00:00:00Z",
    "endedAt": "2024-01-01T00:00:00Z",
    "createdAt": "2024-01-01T00:00:00Z"
  }
]
Schema
id
string
required
organizationId
string
required
authorId
string
required
rule
required
template
required
timezone
string
required
startAt
string
required
lastOccurrenceAt
string
required
endedAt
string
required
createdAt
string
required
POST http://localhost:4000/api/v1/posts/series

Start a recurring series

rule says how often, startAt is the first occurrence. Needs posts:publish as well: what this sets up can publish without a person looking.

Request body

application/json
parts
object[]
required
Show child parameters
text
string
required
mediaIds
string[]
= []
delaySeconds
integer
targets
object[]
required
Show child parameters
channelId
string
required
parts
object[]
Show child parameters
text
string
required
mediaIds
string[]
= []
delaySeconds
integer
settings
object
= {}
rule
object
required
Show child parameters
freq
string
required
daily | weekly | monthly | interval
weekdays
integer[]
monthDay
integer
interval
integer
until
string
count
integer
tagIds
string[]
= []
startAt
string
required
{
  "parts": [
    {
      "text": "string",
      "mediaIds": [],
      "delaySeconds": 0
    }
  ],
  "targets": [
    {
      "channelId": "string",
      "parts": [
        {
          "text": "string",
          "mediaIds": [],
          "delaySeconds": 0
        }
      ],
      "settings": {}
    }
  ],
  "rule": {
    "freq": "daily",
    "weekdays": [
      0
    ],
    "monthDay": 0,
    "interval": 0,
    "until": "string",
    "count": 0
  },
  "tagIds": [],
  "startAt": "2024-01-01T00:00:00Z"
}

Code samples

cURL
curl -X POST "http://localhost:4000/api/v1/posts/series" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"parts":[{"text":"string","mediaIds":[],"delaySeconds":0}],"targets":[{"channelId":"string","parts":[{"text":"string","mediaIds":[],"delaySeconds":0}],"settings":{}}],"rule":{"freq":"daily","weekdays":[0],"monthDay":0,"interval":0,"until":"string","count":0},"tagIds":[],"startAt":"2024-01-01T00:00:00Z"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 OK
Example
{}
Option 1
{}
Option 2
{}
PUT http://localhost:4000/api/v1/posts/series/{id}

Change a series' rule and content

scope: "all" changes the series in place; "following" ends it and starts a new one from the pending occurrence. One occurrence alone is POST /posts on that post. Needs posts:publish as well: what this sets up can publish without a person looking.

Parameters

id
string
path
required

Request body

application/json
parts
object[]
required
Show child parameters
text
string
required
mediaIds
string[]
= []
delaySeconds
integer
targets
object[]
required
Show child parameters
channelId
string
required
parts
object[]
Show child parameters
text
string
required
mediaIds
string[]
= []
delaySeconds
integer
settings
object
= {}
rule
object
required
Show child parameters
freq
string
required
daily | weekly | monthly | interval
weekdays
integer[]
monthDay
integer
interval
integer
until
string
count
integer
tagIds
string[]
= []
startAt
string
scope
string
required
following | all
{
  "parts": [
    {
      "text": "string",
      "mediaIds": [],
      "delaySeconds": 0
    }
  ],
  "targets": [
    {
      "channelId": "string",
      "parts": [
        {
          "text": "string",
          "mediaIds": [],
          "delaySeconds": 0
        }
      ],
      "settings": {}
    }
  ],
  "rule": {
    "freq": "daily",
    "weekdays": [
      0
    ],
    "monthDay": 0,
    "interval": 0,
    "until": "string",
    "count": 0
  },
  "tagIds": [],
  "startAt": "2024-01-01T00:00:00Z",
  "scope": "following"
}

Code samples

cURL
curl -X PUT "http://localhost:4000/api/v1/posts/series/{id}" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"parts":[{"text":"string","mediaIds":[],"delaySeconds":0}],"targets":[{"channelId":"string","parts":[{"text":"string","mediaIds":[],"delaySeconds":0}],"settings":{}}],"rule":{"freq":"daily","weekdays":[0],"monthDay":0,"interval":0,"until":"string","count":0},"tagIds":[],"startAt":"2024-01-01T00:00:00Z","scope":"following"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 OK
Example
{}
Option 1
{}
Option 2
{}
DELETE http://localhost:4000/api/v1/posts/series/{id}

Skip the next occurrence, end a series, or delete it

scope: this skips the pending occurrence, following ends the series, all also deletes it. Published occurrences stay as posts.

Parameters

id
string
path
required

Request body

application/json
scope
string
required
this | following | all
{
  "scope": "this"
}

Code samples

cURL
curl -X DELETE "http://localhost:4000/api/v1/posts/series/{id}" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"scope":"this"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 OK
Example
{}
Option 1
{}
Option 2
{}
Updated