Introduction

200 Words a Day empowers people with writing and technology.

We value openness. We have many makers and developers in the fellowship that can create wonderful things, so it makes sense to welcome and encourage any community development.

This section is meant to provide developer tools to allow anyone to build over 200WaD's engine and create endless feature possibilities.

API

Private Key

A private key is necessary to authenticate you through the API.

You can find your private key in your Settings page in the "Your API Key" section.

URL

Root URL of the API: https://200wordsaday.com/api

Users

  • Read your profile's data

    GET /me
    Request parameters

    api_key: your private API key

    Response

    Array

    Example
    curl https://200wordsaday.com/api/me?api_key=<your api key>

Texts

  • Read your texts

    GET /texts
    Request parameters

    api_key: your private API key

    status(optional): status of the texts "draft"/"published"/"all" (default: all)

    Response

    Array of Text objects

    Example
    curl https://200wordsaday.com/api/texts?api_key=<your api key>
  • Create a text

    POST /texts
    Request parameters

    api_key: your private API key

    title: title of the text

    content(optional): content of the text (default: null)

    access_rights(optional): access mode of the text "public"/"protected"/"private" (default: public)

    status(optional): status of the text "draft"/"published" (default: draft)

    categories(optional): array of hashtags (default: null)

    canonical_url(optional): source url of the text (default: null)

    Response

    The created Text object

    Example
    curl -X POST https://200wordsaday.com/api/texts?api_key=<your api key> -d 'title=test&categories[]=%23ok&categories[]=%23test'
    Notes

    You can only publish one post per hour.

  • Update a text

    PUT /texts/{uuid}
    Request parameters

    api_key: your private API key

    title: title of the text

    content(optional): content of the text (default: null)

    access_rights(optional): access mode of the text "public"/"protected"/"private" (default: public)

    status(optional): status of the text "draft"/"published" (default: draft)

    categories(optional): array of hashtags (default: null)

    canonical_url(optional): source url of the text (default: null)

    Response

    The updated Text object

    Example
    curl -X PUT https://200wordsaday.com/api/texts/<the text's uuid>?api_key=<your api key> -d 'title=test&categories[]=%23ok&categories[]=%23test'
    Notes

    You can only publish one post per hour.

  • Delete a text

    DELETE /texts/{uuid}
    Request parameters

    api_key: your private API key

    Response

    String "OK"

    Example
    curl -X DELETE https://200wordsaday.com/api/texts/<the text's uuid>?api_key=<your api key>
    Notes

    If it has already been published, your streak might get affected.

Embed

Insert this code in your website's HTML to display your latest posts:

<iframe src="https://200wordsaday.com/e/@<your username>" width=500 height=1000></iframe>

RSS

🚧 WiP