Documentation

API documentation

Sources

Sources define what Posts should be pulled into a particular Feed. A Source is made up of a source_type (e.g. Instagram Tag) and a value (called tag) that's used to query the source type.


Methods
List Sources
Create Source
Update Source
Delete Source


List Sources

This endpoint lists all sources.

GET /sources

Request

GET /v1/sources

Response

[
  {
    "id": "d7de2fb2-a272-4c75-9e0a-ac9e89aee2b3",
    "feed_id": "660b923a-a6e7-4540-bd03-7e08fd006e0d",
    "source_type": 4,
    "tag": "curator_io",
    "status": 1,
    "initialised": 1,
    "error_count": 0,
    "feed": {
      "id": "660b923a-a6e7-4540-bd03-7e08fd006e0d",
      "moderation": "post",
      "name": "Default",
      "colour_body_bg": "#efefef",
      "colour_body_text": "#707070",
      "colour_header_bg": "#efefef",
      "colour_header_text": "#2B2B2B",
      "public_key": "adfdad0b-88ea-4660-8fc5-6ab02741"
    }
  }
]

Params

ParamDescriptionRequired
feed_idShow sources for a particular FeedNo

Create Source

This end point creates a Source for a Feed.

When a source is created the platform will request the latest 20 posts from the source.

The example below creates a source that pulls in Instagram posts with the hashtag #myawesometag.

POST /sources

Request

POST /v1/sources

{
    "feed_id": "660b923a-a6e7-4540-bd03-7e08fd006e0d",
    "source_type": 2,
    "tag": "myawesometag"
}

Response

{
  "id": "b37d3706-7fbd-4af9-a989-e8d20a50e04e",
  "source_type": 2,
  "tag": "myawesometag",
  "status": 1,
  "feed_id": "660b923a-a6e7-4540-bd03-7e08fd006e0d"
}

Params

Param_typeDescriptionRequired
feed_idFeed to assign source toYes
source_typeSource Type to to pull posts from. See Source Type IDYes
tagValue to query sourceYes

Update Source

Updates a Source.

Note: Once created a Sources feed_id and source_type can not be modified.

PUT /sources/SOURCE_ID

Request

PUT /v1/sources/SOURCE_ID

{
    "tag": "curator_io"
}

Response

{
  "id": "1301a1f9-4982-4101-8a2f-2bd4d98db41a",
  "feed_id": "660b923a-a6e7-4540-bd03-7e08fd006e0d",
  "source_type": 4,
  "tag": "curator_io",
  "status": 1,
  "initialised": 1,
  "error_count": 0
}

Params

ParamDescriptionRequired
SOURCE_IDId of Source to updateYes
tagValue to use when querying sourceYes

Delete Source

Delete a source.

Note: Deleting a source will delete all the associated posts.

DELETE /sources/SOURCE_ID

Request

DELETE /v1/sources/SOURCE_ID

Response

{
  "success": true,
  "message": "Source deleted"
}

Params

ParamDescriptionRequired
SOURCE_IDId of Source to deleteYes