openapi: 3.0.0
servers:
  - url: https://quotes.rest
  - url: http://quotes.rest
info:
  contact:
    name: They Said So
    url: https://theysaidso.com/api
    x-twitter: theysaidso
  description: " They Said So Quotes API offers a complete feature rich REST API access to its quotes platform.  This is the documentation for the world famous [quotes API](https://theysaidso.com/api).  If you are a subscriber and you are trying this from a console you can use Bearer token with your api key as the token. You can test and play with the API right here on this web page. Please note recently we closed downs public access without api key to prevent abuse. The public routes are still available to use free of charge but requires a api token. You can get one for free at our website. For using the private end points and subscribing to the API please visit [https://theysaidso.com/api](https://theysaidso.com/api)."
  termsOfService: https://theysaidso.com/terms#api
  title: They Said So Quotes API
  version: "5.1"
  x-apisguru-categories:
    - open_data
  x-logo:
    url: https://twitter.com/theysaidso/profile_image?size=original
  x-origin:
    - format: openapi
      url: http://quotes.rest/yaml/theysaidso.quotes.openapi.yaml?v1.1
      version: "3.0"
  x-providerName: quotes.rest
tags:
  - description: Access quote of the day service. Use this to get the quote of the day in various categories. This is a free API that is available to public. You must credit They Said So if you are using the free version.
    externalDocs:
      description: Find out more
      url: https://theysaidso.com/api/quote#qod
    name: Quote of the day
  - description: Define and host your own quote of the day service. You can set filter conditions based on tags, authors, your own quote collection etc. and our platform  will do the magic for you.
    externalDocs:
      description: Find out more
      url: https://theysaidso.com/api/quote#qod
    name: Private QOD
  - description: Access random quote service. Use this to get random quotes , quotes filtered by authors or tags etc. You need an API key to access this service.
    name: Quote
  - description: Create and manage your own Quotes. You need an API key to access this service.
    name: Private Quotes
  - description: Create beatiful quote images or get one of the premade images. You need an API key to access this service.
    externalDocs:
      description: Find out more about image
      url: https://theysaidso.com/api/quote#image
    name: Quote Images
  - description: Access Qshow - quote collection service. Create curated quotes collection. You can group quotes by any way you want and access them as a single unit. You need an API key to access this service.
    name: Qshow
paths:
  /qod:
    get:
      description: |
        Gets `Quote of the Day` (QOD). Optional `category` param determines the category of returned quote of the day
      parameters:
        - description: QOD Category (Used in public QOD only)
          in: query
          name: category
          required: false
          schema:
            format: string
            type: string
        - description: Language of the QOD. The language must be supported in our QOD system.
          in: query
          name: language
          required: false
          schema:
            default: en
            format: string
            type: string
        - description: QOD defition id (Used in private QOD only)
          in: query
          name: id
          required: false
          schema:
            format: string
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "success": {
                            "total": 1
                        },
                        "contents": {
                            "quotes": [
                                {
                                    "quote": "Do not worry if you have built your castles in the air. They are where they should be. Now put the foundations under them.",
                                    "length": "122",
                                    "author": "Henry David Thoreau",
                                    "tags": [
                                        "dreams",
                                        "inspire",
                                        "worry"
                                    ],
                                    "category": "inspire",
                                    "date": "2016-11-21",
                                    "title": "Inspiring Quote of the day",
                                    "background": "https://theysaidso.com/img/bgs/man_on_the_mountain.jpg",
                                    "id": "mYpH8syTM8rf8KFORoAJmQeF"
                                }
                            ]
                        }
                    }
              schema:
                $ref: "#/components/schemas/QODResponse"
            application/xml:
              examples:
                response:
                  value: |-
                    <?xml version="1.0"?> <response>
                      <success>
                        <total>1</total>
                      </success>
                      <contents>
                        <quotes>
                          <quote>Sometimes you climb out of bed in the morning and you think, I'm not going to make it, but you laugh inside &#x2014; remembering all the times you've felt that way.</quote>
                          <length>164</length>
                          <author>Charles Bukowski</author>
                          <tags>depression</tags>
                          <tags>inspire</tags>
                          <tags>tso-life</tags>
                          <category>inspire</category>
                          <date>2016-11-23</date>
                          <title>Inspiring Quote of the day</title>
                          <background>https://theysaidso.com/img/bgs/man_on_the_mountain.jpg</background>
                          <id>k7rTMtmveYHUN2ImwxNhhAeF</id>
                        </quotes>
                      </contents>
                    </response>
          description: 200  response
        "400":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "error": {
                        "code": 400,
                        "message": "Bad Request: QOD category not supported for this category and language combination"
                      }
                    }     
          description: 400  response
      security:
        - BearerAuth: []
      tags:
        - Quote of the day
        - Private QOD
    patch:
      description: |
        Update an existing private `Quote of the Day` definition.
      parameters:
        - description: How many days after the quotes can repeat? If you are setting this up from your private collection make sure you have more quotes that meet the filter conditions than the days you specify here.
          in: query
          name: repeat_after
          required: false
          schema:
            default: 30
            format: integer
            type: integer
        - description: Comma seperated author names. Quotes will be chosen from one of these authors.
          in: query
          name: authors
          required: false
          schema:
            format: array
            type: string
        - description: Title of the Quote of the day category
          in: query
          name: title
          required: true
          schema:
            format: string
            type: string
        - description: Should apply the filters to the private collection. Default is public quotes in the platform.
          in: query
          name: private
          required: false
          schema:
            default: false
            format: boolean
            type: boolean
        - description: Quotes language.
          in: query
          name: language
          required: false
          schema:
            default: en
            format: string
            type: string
        - description: Consider only quotes marked as "sfw" (Safe for work).
          in: query
          name: sfw
          required: false
          schema:
            default: false
            format: boolean
            type: boolean
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "success": {
                            "total": 1
                        },
                        "contents": {
                            "msg": "QOD Category created successfully",
                            "id": "mYpH8syTM8rf8KFORoAJmQeF"
                        }
                    }
              schema:
                $ref: "#/components/schemas/QuoteResponse"
            application/xml:
              examples:
                response:
                  value: |-
                    <?xml version="1.0"?> <response>
                      <success>
                        <total>1</total>
                      </success>
                      <contents>
                        <msg>QOD Category created successfully</msg>
                        <id>k7rTMtmveYHUN2ImwxNhhAeF</id>
                      </contents>
                    </response>
          description: 200  response
        "400":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "error": {
                        "code": 400,
                        "message": "Bad Request: please check your filter considtions"
                      }
                    }     
          description: 400  response
        "403":
          description: 403  No access response
      security:
        - BearerAuth: []
      tags:
        - Private QOD
    put:
      description: |
        Create a private `Quote of the Day` service. 
      parameters:
        - description: How many days after the quotes can repeat? If you are setting this up from your private collection make sure you have more quotes that meet the filter conditions than the days you specify here.
          in: query
          name: repeat_after
          required: false
          schema:
            default: 30
            format: integer
            type: integer
        - description: Comma seperated author names. Quotes will be chosen from one of these authors.
          in: query
          name: authors
          required: false
          schema:
            format: array
            type: string
        - description: Title of the Quote of the day category
          in: query
          name: title
          required: true
          schema:
            format: string
            type: string
        - description: Should apply the filters to the private collection. Default is public quotes in the platform.
          in: query
          name: private
          required: false
          schema:
            default: false
            format: boolean
            type: boolean
        - description: Quotes language.
          in: query
          name: language
          required: false
          schema:
            default: en
            format: string
            type: string
        - description: Consider only quotes marked as "sfw" (Safe for work).
          in: query
          name: sfw
          required: false
          schema:
            default: false
            format: boolean
            type: boolean
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "success": {
                            "total": 1
                        },
                        "contents": {
                            "msg": "QOD Category updated successfully",
                            "id": "mYpH8syTM8rf8KFORoAJmQeF"
                        }
                    }
              schema:
                $ref: "#/components/schemas/SuccessResponse"
            application/xml:
              examples:
                response:
                  value: |-
                    <?xml version="1.0"?> <response>
                      <success>
                        <total>1</total>
                      </success>
                      <contents>
                        <msg>QOD Category updated successfully</msg>
                        <id>k7rTMtmveYHUN2ImwxNhhAeF</id>
                      </contents>
                    </response>
          description: 200  response
        "400":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "error": {
                        "code": 400,
                        "message": "Bad Request: please check your filter considtions"
                      }
                    }     
          description: 400  response
        "403":
          description: 403  No access response
      security:
        - BearerAuth: []
      tags:
        - Private QOD
  /qod/categories:
    get:
      description: |
        Gets a list of `Quote of the Day` Categories.
      parameters:
        - description: Language of the QOD category. The language must be supported in our QOD system.
          in: query
          name: language
          required: false
          schema:
            default: en
            format: string
            type: string
        - description: Return detailed information of the categories. Note the data format changes between the two values of this switch.
          in: query
          name: detailed
          required: false
          schema:
            default: false
            format: boolean
            type: boolean
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "success": {
                            "total": 8
                        },
                        "contents": {
                            "categories": {
                                "inspire": "Inspiring Quote of the day",
                                "management": "Management Quote of the day",
                                "sports": "Sports Quote of the day",
                                "life": "Quote of the day about life",
                                "funny": "Funny Quote of the day",
                                "love": "Quote of the day about Love",
                                "art": "Art quote of the day ",
                                "students": "Quote of the day for students"
                            },
                            "copyright": "2013-15 http://theysaidso.com"
                        }
                    }   
          description: 200  response
        "400":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "error": {
                        "code": 400,
                        "message": "No QOD categories defined for this language."
                      }
                    }                            
          description: 400  response
      security:
        - BearerAuth: []
      tags:
        - Quote of the day
  /qod/languages:
    get:
      description: |
        Gets a list of supported languages for `Quote of the Day`. 
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 2
                      },
                      "contents": {
                        "languages": [
                          "en",
                          "fr",
                          "ta"
                        ]
                      },
                      "baseurl": "https://theysaidso.com",
                      "copyright": "2019-22 https://theysaidso.com"
                    }
          description: 200  response
      security:
        - BearerAuth: []
      tags:
        - Quote of the day
  /qshow:
    delete:
      description: |
        Delete a qshow.
      parameters:
        - description: Qshow ID
          in: query
          name: id
          required: true
          schema:
            format: string
            type: string
      responses:
        "200":
          content:
            application/xml:
              examples:
                response:
                  value: "{}"
          description: 200  response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }
          description: 401  response
        "404":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 404,
                            "message": "Not Found: Qshow not found"
                        }
                    }                      
          description: 404  response
      security:
        - BearerAuth: []
      tags:
        - Qshow
    get:
      description: |
        Gets a details about a qshow.
      parameters:
        - description: Qshow ID
          in: query
          name: id
          required: true
          schema:
            format: string
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "success": {
                            "total": 1
                        },
                        "contents": {
                            "qshow": {
                                "title": "A tribute to Steve Jobs!",
                                "description": "A collection of great quotes from the master inventor Steve Jobs!",
                                "background": "https://theysaidso.com",
                                "language": "en",
                                "id": "CodzN7F_vU_URoHrPSUvDgeF"
                            }
                        },
                        "copyright": {
                            "year": "2016-18",
                            "url": "http://theysaidso.com"
                        }
                    }
            application/xml:
              examples:
                response:
                  value: |-
                    <?xml version="1.0"?> <response>
                      <success>
                        <total>1</total>
                      </success>
                      <contents>
                        <qshow>
                          <title>A tribute to Steve Jobs!</title>
                          <description>A collection of great quotes from the master inventor Steve Jobs!</description>
                          <background>https://theysaidso.com</background>
                          <language>en</language>
                          <id>CodzN7F_vU_URoHrPSUvDgeF</id>
                        </qshow>
                      </contents>
                      <copyright>
                        <year>2016-18</year>
                        <url>http://theysaidso.com</url>
                      </copyright>
                    </response>
          description: 200  response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }
          description: 401  response
        "404":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 404,
                            "message": "Not Found: Qshow not found"
                        }
                    }                 
          description: 404  response
      security:
        - BearerAuth: []
      tags:
        - Qshow
    patch:
      description: Update an existing qshow.
      parameters:
        - description: Qshow ID
          in: query
          name: id
          required: true
          schema:
            format: string
            type: string
        - description: Qshow title
          in: query
          name: title
          required: false
          schema:
            format: string
            type: string
        - description: Qshow description
          in: query
          name: description
          required: false
          schema:
            format: string
            type: string
        - description: Tags for the qshow
          explode: true
          in: query
          name: tags
          required: false
          schema:
            items:
              type: string
            type: array
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 1
                      },
                      "content": {
                        "quote": {
                          "id": "CodzN7F_vU_URoHrPSUvDgeF"
                        }
                      }
                    }
          description: 200  response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }
          description: 401  response
        "404":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 404,
                            "message": "Not Found: Qshow not found"
                        }
                    }                    
          description: 404  response
      security:
        - BearerAuth: []
      tags:
        - Qshow
    put:
      description: Create and add a new qshow to your private collection.
      parameters:
        - description: Qshow title
          in: query
          name: title
          required: true
          schema:
            format: string
            type: string
        - description: Qshow description
          in: query
          name: description
          required: false
          schema:
            format: string
            type: string
        - description: Tags for the qshow
          explode: true
          in: query
          name: tags
          required: false
          schema:
            items:
              type: string
            type: array
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 1
                      },
                      "content": {
                        "quote": {
                          "id": "CodzN7F_vU_URoHrPSUvDgeF"
                        }
                      }
                    }
          description: 200  response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }              
          description: 401  response
      security:
        - BearerAuth: []
      tags:
        - Qshow
  /qshow/list:
    get:
      description: Get the list of Qshows in They Said So platform.
      parameters:
        - description: Response is paged. This parameter controls where response starts the listing at
          in: query
          name: start
          required: false
          schema:
            default: 0
            format: int32
            type: integer
        - description: Should include public qshows or not in the list
          in: query
          name: public
          required: false
          schema:
            default: false
            format: boolean
            type: boolean
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "success": {
                            "total": "39",
                            "start": 0,
                            "limit": 5
                        },
                        "contents": {
                            "qshows": [
                                {
                                    "title": "A tribute to Steve Jobs!",
                                    "description": "A collection of great quotes from the master inventor Steve Jobs!",
                                    "background": "/img/bgs/stevejobs.jpg",
                                    "language": "en",
                                    "id": "CodzN7F_vU_URoHrPSUvDgeF"
                                },
                                {
                                    "title": "Celebrating Life!",
                                    "description": "Eat, Sleep, Live your life!",
                                    "background": "/img/slide-01.jpg",
                                    "language": "en",
                                    "id": "opDfpWwAD6lrfxdW_GBoVAeF"
                                },
                                {
                                    "title": "Books ",
                                    "description": "Reading is the greatest pleasure for many! Here's to the bookies!",
                                    "background": "/img/bgs/book.jpg",
                                    "language": "en",
                                    "id": "WMeCgo5WpiLk_qlbdAVyQweF"
                                },
                                {
                                    "title": "Kids",
                                    "description": "",
                                    "background": "",
                                    "language": "en",
                                    "id": "sx9reMTiaGzXdt7lbVWntQeF"
                                },
                                {
                                    "title": "Great quotes to live by",
                                    "description": "Here are some powerful words of wisdom that inspire, educate and motivate a person to take action. ",
                                    "background": "/img/slide-03.jpg",
                                    "language": "en",
                                    "id": "k_kwBr7BKzxz3vLTQ6TWMQeF"
                                }
                            ]
                        },
                        "copyright": {
                            "year": "2016-18",
                            "url": "http://theysaidso.com"
                        }
                    }
          description: 200  response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    } 
          description: 401  response
      security:
        - BearerAuth: []
      tags:
        - Qshow
  /qshow/quotes:
    get:
      description: Get the quotes in a given Qshow.
      parameters:
        - description: Qshow ID
          in: query
          name: id
          required: true
          schema:
            format: string
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "success": {
                            "total": 1
                        },
                        "contents": {
                            "qshow": {
                                "title": "A tribute to Steve Jobs!",
                                "description": "A collection of great quotes from the master inventor Steve Jobs!",
                                "background": "https://theysaidso.com/img/bgs/stevejobs.jpg",
                                "language": "en",
                                "id": "CodzN7F_vU_URoHrPSUvDgeF"
                            },
                            "quotes": [
                                {
                                    "quote": "A lot of people in our industry haven't had very diverse experiences. So they don't have enough dots to connect, and they end up with very linear solutions without a broad perspective on the problem. The broader one's understanding of the human experience, the better design we will have.",
                                    "length": "288",
                                    "author": "Steve Jobs",
                                    "tags": [
                                        "design",
                                        "diversity",
                                        "experience",
                                        "linear-thinking"
                                    ],
                                    "id": "6HW5Uopw8VFLRKZEqGKDXQeF"
                                },
                                {
                                    "quote": "Stay hungry. Stay foolish.",
                                    "length": "26",
                                    "author": "Steve Jobs",
                                    "tags": [
                                        "inspirational"
                                    ],
                                    "id": "K__p_L1iMZtWulJ1SH4CogeF"
                                },
                                {
                                    "quote": "Your time is limited, so don't waste it living someone else's life.",
                                    "length": "67",
                                    "author": "Steve Jobs",
                                    "tags": [
                                        "life-and-living",
                                        "tso-life"
                                    ],
                                    "id": "mFjh_dNB_exJMHbyzRFIvQeF"
                                },
                                {
                                    "quote": "If you haven't found it yet, keep looking. Don't settle. As with all matters of the heart, you'll know when you find it. And, like any great relationship, it just gets better and better as the years roll on.",
                                    "length": "207",
                                    "author": "Steve Jobs",
                                    "tags": [
                                        "careers",
                                        "ideas",
                                        "ingenuity",
                                        "match",
                                        "passion"
                                    ],
                                    "id": "l3Cww1Bx7cYGlIpB_wZuOAeF"
                                },
                                {
                                    "quote": "Details matter, it's worth waiting to get it right.",
                                    "length": "51",
                                    "author": "Steve Jobs",
                                    "tags": [
                                        "apple",
                                        "ileadership",
                                        "jobs",
                                        "mac",
                                        "macintosh",
                                        "steve"
                                    ],
                                    "id": "A8gqJ6u2x3ZdUDU5VlnIxgeF"
                                },
                                {
                                    "quote": "Be a yardstick of quality. Some people aren't used to an environment where excellence is expected.",
                                    "length": "98",
                                    "author": "Steve Jobs",
                                    "tags": [
                                        "environment",
                                        "excellence",
                                        "people",
                                        "quality"
                                    ],
                                    "id": "rlqbJLNmDMPT_qkCpDBjEgeF"
                                },
                                {
                                    "quote": "If you live each day as it was your last, someday you'll most certainly be right",
                                    "length": "80",
                                    "author": "Steve Jobs",
                                    "tags": [
                                        "death",
                                        "rip",
                                        "steve",
                                        "tso-life"
                                    ],
                                    "id": "sBse0_uUemQD2l_qdL9BJgeF"
                                },
                                {
                                    "quote": "Death is the destination we all share, no one has ever escaped it. And that is as it should be because death is very likely the single best invention of life.",
                                    "length": "158",
                                    "author": "Steve Jobs",
                                    "tags": [
                                        "death",
                                        "destination",
                                        "invention",
                                        "life-and-death",
                                        "tso-life"
                                    ],
                                    "id": "LvjYLbdYzBOAqPPKfohvmQeF"
                                },
                                {
                                    "quote": "Why join the navy if you can be a pirate?",
                                    "length": "41",
                                    "author": "Steve Jobs",
                                    "tags": [
                                        "career"
                                    ],
                                    "id": "S6xVf_Nluid5r_0iO73ArQeF"
                                },
                                {
                                    "quote": "One more thing...",
                                    "length": "17",
                                    "author": "Steve Jobs",
                                    "tags": [
                                        "inspiration"
                                    ],
                                    "id": "X2QetehlwForyBZ5Nbp2YQeF"
                                }
                            ]
                        },
                        "copyright": {
                            "year": "2016-18",
                            "url": "http://theysaidso.com"
                        }
                    }
          description: 200  response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }
          description: 401  response
        "404":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 404,
                            "message": "Not Found: Qshow not found"
                        }
                    }                      
          description: 404  response
      security:
        - BearerAuth: []
      tags:
        - Qshow
  /qshow/quotes/add:
    post:
      description: Add a quote to a given Qshow.
      parameters:
        - description: Qshow ID
          in: query
          name: id
          required: true
          schema:
            format: string
            type: string
        - description: Quote ID to add the qshow collection
          in: query
          name: quoteid
          required: true
          schema:
            format: string
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 1
                      },
                      "content": {
                        "Quote added"
                      }
                    }
          description: 200  response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }
          description: 401  response
        "404":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 404,
                            "message": "Not Found: Qshow not found"
                        }
                    }                      
          description: 404  response
      security:
        - BearerAuth: []
      tags:
        - Qshow
  /qshow/quotes/remove:
    post:
      description: Remove a quote to a given Qshow.
      parameters:
        - description: Qshow ID
          in: query
          name: id
          required: true
          schema:
            format: string
            type: string
        - description: Quote ID to remove from the qshow collection
          in: query
          name: quoteid
          required: true
          schema:
            format: string
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 1
                      },
                      "content": {
                        "Quote removed from Qshow"
                      }
                    }
          description: 200  response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }
          description: 401  response
        "404":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 404,
                            "message": "Not Found: Qshow not found"
                        }
                    }                      
          description: 404  response
      security:
        - BearerAuth: []
      tags:
        - Qshow
  /quote:
    delete:
      description: |
        Delete a quote. The user needs to be the owner of the quote to be able to delete it.
      parameters:
        - description: Quote ID
          in: query
          name: id
          required: true
          schema:
            format: string
            type: string
      responses:
        "200":
          content:
            application/xml:
              examples:
                response:
                  value: "{}"
          description: 200  response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }
          description: 401  response
        "404":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 404,
                            "message": "Not Found: Quote not found"
                        }
                    }                      
          description: 404  response
      security:
        - BearerAuth: []
      tags:
        - Private Quotes
    get:
      description: Gets a `Quote` with a given `id`.
      parameters:
        - description: Quote ID
          in: query
          name: id
          required: false
          schema:
            format: string
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 1
                      },
                      "contents": {
                        "quote": "The day soldiers stop bringing you their problems is the day you have stopped leading them. They have either lost confidence that you can help them or concluded that you do not care. Either case is a failure of leadership.",
                        "author": "Colin Powell",
                        "id": "XLa1AmylKv1XF_dXcyhvdweF",
                        "language": "en",
                        "sfw": "sfw",
                        "permalink": "https://theysaidso.com/quote/colin-powell-the-day-soldiers-stop-bringing-you-their-problems-is-the-day-you-ha",
                        "requested_category": "inspire",
                        "categories": [
                          "confidence",
                          "leadership",
                          "management",
                          "tod"
                        ]
                      }
                    }
              schema:
                $ref: "#/components/schemas/QuoteResponse"
            application/xml:
              examples:
                response:
                  value: |-
                    <?xml version="1.0"?> <response>
                      <success>
                        <total>1</total>
                      </success>
                      <contents>
                        <quotes>
                          <quote>Sometimes you climb out of bed in the morning and you think, I'm not going to make it, but you laugh inside &#x2014; remembering all the times you've felt that way.</quote>
                          <length>164</length>
                          <author>Charles Bukowski</author>
                          <tags>depression</tags>
                          <tags>inspire</tags>
                          <tags>tso-life</tags>
                          <category>inspire</category>
                          <date>2016-11-23</date>
                          <title>Inspiring Quote of the day</title>
                          <background>https://theysaidso.com/img/bgs/man_on_the_mountain.jpg</background>
                          <id>k7rTMtmveYHUN2ImwxNhhAeF</id>
                        </quotes>
                      </contents>
                    </response>        
          description: 200  response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }
          description: 401  response
      security:
        - BearerAuth: []
      tags:
        - Quote
        - Private Quotes
    patch:
      description: Update a quote
      parameters:
        - description: Quote ID
          in: query
          name: id
          required: true
          schema:
            format: string
            type: string
        - description: Quote
          in: query
          name: quote
          required: false
          schema:
            format: string
            type: string
        - description: Quote Author
          in: query
          name: author
          required: false
          schema:
            format: string
            type: string
        - description: Language. If not supplied an auto detection mechanism will be used to detect a language.
          in: query
          name: language
          required: false
          schema:
            default: en
            format: string
            type: string
        - description: Comma Separated tags
          in: query
          name: tags
          required: false
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 1
                      },
                      "content": {
                        "quote": {
                          "id": "0tztT1wYHRzdTf7jIccAzweF"
                        }
                      }
                    }
          description: 200  response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }              
          description: 401  response
      security:
        - BearerAuth: []
      tags:
        - Private Quotes
    post:
      description: Add a new quote to your private collection. Same as 'PUT' but added since some clients don't handle PUT well.
      parameters:
        - description: Quote
          in: query
          name: quote
          required: true
          schema:
            format: string
            type: string
        - description: Quote Author
          in: query
          name: author
          required: false
          schema:
            format: string
            type: string
        - description: Comma Separated tags
          in: query
          name: tags
          required: false
          schema:
            format: string
            type: string
        - description: Language. If not supplied an auto detection mechanism will be used to detect a language.
          in: query
          name: language
          required: false
          schema:
            default: en
            format: string
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 1
                      },
                      "content": {
                        "quote": {
                          "id": "0tztT1wYHRzdTf7jIccAzweF"
                        }
                      }
                    }
          description: 200  response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }              
          description: 401  response
      security:
        - BearerAuth: []
      tags:
        - Private Quotes
    put:
      description: Add a new quote to your private collection.
      parameters:
        - description: Quote
          in: query
          name: quote
          required: true
          schema:
            format: string
            type: string
        - description: Quote Author
          in: query
          name: author
          required: false
          schema:
            format: string
            type: string
        - description: Comma Separated tags
          in: query
          name: tags
          required: false
          schema:
            format: string
            type: string
        - description: Language. If not supplied an auto detection mechanism will be used to detect a language.
          in: query
          name: language
          required: false
          schema:
            default: en
            format: string
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 1
                      },
                      "content": {
                        "quote": {
                          "id": "0tztT1wYHRzdTf7jIccAzweF"
                        }
                      }
                    }
          description: 200  response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }              
          description: 401  response
      security:
        - BearerAuth: []
      tags:
        - Private Quotes
  /quote/authors/popular:
    get:
      description: |
        Gets a list of popular author names in the system. 
      parameters:
        - description: Language. A same author may have quotes in two or more different languages. So for example 'Mahatma Gandhi' may be returned for language "en"(English), and "மஹாத்மா காந்தி" may be returned when the language is "ta" (Tamil).
          in: query
          name: language
          required: false
          schema:
            default: en
            format: string
            type: string
        - description: Should return detailed author information such as `birthday`, `death date`, `occupation`, `description` etc. Only available at certain subscription levels.
          in: query
          name: detailed
          required: false
          schema:
            default: false
            format: boolean
            type: boolean
        - description: Response is paged. This parameter controls where response starts the listing at
          in: query
          name: start
          required: false
          schema:
            default: 0
            format: int32
            type: integer
        - description: Response is paged. This parameter controls how many is returned in the result. The maximum depends on the subscription level.
          in: query
          name: limit
          required: false
          schema:
            default: 5
            format: int32
            type: integer
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": "2646",
                        "range": {
                          "start": 0,
                          "end": 5
                        }
                      },
                      "contents": {
                        "authors": [
                          {
                            "name": "Robert Louis Stevenson",
                            "slug": "robert-louis-stevenson",
                            "occupation": "Author",
                            "born": "1850-11-13 00:00:00",
                            "dead": "1894-12-03 00:00:00",
                            "description": null,
                            "id": "_kobR6QdDXDw_HCo2J_n0AeF"
                          },
                          {
                            "name": "Steve Jobs",
                            "slug": "steve-jobs",
                            "occupation": "Business",
                            "born": "1955-02-24 00:00:00",
                            "dead": "2011-10-05 00:00:00",
                            "description": "",
                            "id": "WKCl3utqIPYnCXiZubNNKAeF"
                          },
                          {
                            "name": "Steve Maraboli",
                            "slug": "steve-maraboli",
                            "occupation": null,
                            "born": null,
                            "dead": null,
                            "description": null,
                            "id": "GfOeOBX2Gwp1emdunDiXDweF"
                          },
                          {
                            "name": "Steven Wright",
                            "slug": "steven-wright",
                            "occupation": "Comic",
                            "born": "1955-12-06 00:00:00",
                            "dead": null,
                            "description": null,
                            "id": "j144PP_Pew72rXVrRKAmgAeF"
                          },
                          {
                            "name": "Wallace Stevens",
                            "slug": "wallace-stevens",
                            "occupation": "Poet",
                            "born": "1879-10-02 00:00:00",
                            "dead": "1955-08-02 00:00:00",
                            "description": null,
                            "id": "IF8HZp3hHsP_BzepN65atQeF"
                          }
                        ],
                        "matched_query": "steve"
                      },
                      "baseurl": "https://theysaidso.com",
                      "copyright": "2019-22 https://theysaidso.com"
                    }
          description: 200  response
        "400":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "error": {
                        "code": 400,
                        "message": "Bad Request: Author details retrieval options are not supported for this user (please upgrade your subscription)"
                      }
                    }
          description: 400  response
      security:
        - BearerAuth: []
      tags:
        - Quote
  /quote/authors/search:
    get:
      description: |
        Gets a list of author names in the system. 
      parameters:
        - description: Text string to search for in author names
          in: query
          name: query
          required: false
          schema:
            format: string
            type: string
        - description: Language. A same author may have quotes in two or more different languages. So for example 'Mahatma Gandhi' may be returned for language "en"(English), and "மஹாத்மா காந்தி" may be returned when the language is "ta" (Tamil).
          in: query
          name: language
          required: false
          schema:
            default: en
            format: string
            type: string
        - description: Should return detailed author information such as `birthday`, `death date`, `occupation`, `description` etc. Only available at certain subscription levels.
          in: query
          name: detailed
          required: false
          schema:
            default: false
            format: boolean
            type: boolean
        - description: Response is paged. This parameter controls where response starts the listing at
          in: query
          name: start
          required: false
          schema:
            default: 0
            format: int32
            type: integer
        - description: Response is paged. This parameter controls how many is returned in the result. The maximum depends on the subscription level.
          in: query
          name: limit
          required: false
          schema:
            default: 1
            format: int32
            type: integer
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": "2646",
                        "range": {
                          "start": 0,
                          "end": 5
                        }
                      },
                      "contents": {
                        "authors": [
                          {
                            "name": "Robert Louis Stevenson",
                            "slug": "robert-louis-stevenson",
                            "occupation": "Author",
                            "born": "1850-11-13 00:00:00",
                            "dead": "1894-12-03 00:00:00",
                            "description": null,
                            "id": "_kobR6QdDXDw_HCo2J_n0AeF"
                          },
                          {
                            "name": "Steve Jobs",
                            "slug": "steve-jobs",
                            "occupation": "Business",
                            "born": "1955-02-24 00:00:00",
                            "dead": "2011-10-05 00:00:00",
                            "description": "",
                            "id": "WKCl3utqIPYnCXiZubNNKAeF"
                          },
                          {
                            "name": "Steve Maraboli",
                            "slug": "steve-maraboli",
                            "occupation": null,
                            "born": null,
                            "dead": null,
                            "description": null,
                            "id": "GfOeOBX2Gwp1emdunDiXDweF"
                          },
                          {
                            "name": "Steven Wright",
                            "slug": "steven-wright",
                            "occupation": "Comic",
                            "born": "1955-12-06 00:00:00",
                            "dead": null,
                            "description": null,
                            "id": "j144PP_Pew72rXVrRKAmgAeF"
                          },
                          {
                            "name": "Wallace Stevens",
                            "slug": "wallace-stevens",
                            "occupation": "Poet",
                            "born": "1879-10-02 00:00:00",
                            "dead": "1955-08-02 00:00:00",
                            "description": null,
                            "id": "IF8HZp3hHsP_BzepN65atQeF"
                          }
                        ],
                        "matched_query": "steve"
                      },
                      "baseurl": "https://theysaidso.com",
                      "copyright": "2019-22 https://theysaidso.com"
                    }
          description: 200  response
        "400":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "error": {
                        "code": 400,
                        "message": "Bad Request: Author details retrieval options are not supported for this user (please upgrade your subscription)"
                      }
                    }
          description: 400  response
      security:
        - BearerAuth: []
      tags:
        - Quote
  /quote/bookmark/toggle:
    get:
      description: Toggle the user bookmark of the given Quote as a user of the API Key.
      parameters:
        - description: Quote ID
          in: query
          name: quote_id
          required: true
          schema:
            format: string
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 1
                      },
                      "contents": {
                        "mesg": "Bookmarked the quote",
                        "hasBookmarkedBefore": false
                      }
                    }
          description: 200  response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }
          description: 401  response
        "404":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 404,
                            "message": "Not Found: Quote not found"
                        }
                    }                    
          description: 404  response
      security:
        - BearerAuth: []
      tags:
        - Quote
  /quote/categories/popular:
    get:
      description: |
        Gets a list of popular `Quote` Categories.
      parameters:
        - description: Response is paged. This parameter controls where response starts the listing at
          in: query
          name: start
          required: false
          schema:
            default: 0
            format: int32
            type: integer
        - description: Response is paged. This parameter controls how many is returned in the result. The maximum depends on the subscription level.
          in: query
          name: limit
          required: false
          schema:
            default: 5
            format: int32
            type: integer
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 18,
                        "range": {
                          "start": 0,
                          "end": 5
                        }
                      },
                      "contents": {
                        "categories": [
                          {
                            "name": "inspirational",
                            "title": "Inspirational Quotes"
                          },
                          {
                            "name": "work",
                            "title": null
                          },
                          {
                            "name": "women",
                            "title": null
                          },
                          {
                            "name": "people",
                            "title": null
                          },
                          {
                            "name": "death",
                            "title": null
                          }
                        ]
                      },
                      "baseurl": "https://theysaidso.com",
                      "copyright": "2019-22 https://theysaidso.com"
                    }               
          description: 200  response
      security:
        - BearerAuth: []
      tags:
        - Quote
  /quote/categories/search:
    get:
      description: |
        Gets a list of `Quote` Categories matching the query string.
      parameters:
        - description: Text string to search for in the categories
          in: query
          name: query
          required: false
          schema:
            default: 0
            format: string
            type: string
        - description: Response is paged. This parameter controls where response starts the listing at
          in: query
          name: start
          required: false
          schema:
            default: 0
            format: int32
            type: integer
        - description: Response is paged. This parameter controls how many is returned in the result. The maximum depends on the subscription level.
          in: query
          name: limit
          required: false
          schema:
            default: 2
            format: int32
            type: integer
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 34,
                        "range": {
                          "start": 0,
                          "end": 5
                        }
                      },
                      "contents": {
                        "categories": [
                          {
                            "name": "inspire",
                            "title": null
                          },
                          {
                            "name": "inspired",
                            "title": null
                          },
                          {
                            "name": "words-to-inspire-you",
                            "title": null
                          },
                          {
                            "name": "self-inspired",
                            "title": null
                          },
                          {
                            "name": "inspire-the-world",
                            "title": null
                          }
                        ]
                      },
                      "baseurl": "https://theysaidso.com",
                      "copyright": "2019-22 https://theysaidso.com"
                    }
          description: 200  response
      security:
        - BearerAuth: []
      tags:
        - Quote
  /quote/image:
    delete:
      description: |
        Delete a quote image. The user needs to be the owner of the quote image to be able to delete it.
      parameters:
        - description: Quote Image ID
          in: query
          name: id
          required: true
          schema:
            format: string
            type: string
      responses:
        "200":
          content:
            application/xml:
              examples:
                response:
                  value: "{}"
          description: 200  response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }
          description: 401  response
        "404":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 404,
                            "message": "Not Found: Quote not found"
                        }
                    }                      
          description: 404  response
      security:
        - BearerAuth: []
      tags:
        - Quote Images
    get:
      description: |
        Gets a Quote image for a given id. Response can be an image file as a binary or a base64 encoded contents wrapped in json. `TODO`
      parameters:
        - description: Quote Image id
          in: query
          name: id
          required: true
          schema:
            format: string
            type: string
        - description: Should the response be a direct file download of the image or a base64 encoded image file wrapped in json?
          in: query
          name: binary
          required: false
          schema:
            default: true
            format: boolean
            type: boolean
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 1
                      },
                      "contents": {
                        "qimage": {
                          "id": "75c3EoOmPVolqfB4KeUhXgeF",
                          "quote_id": "5e0QH_0k5srOUN1Wdu9AgweF",
                          "permalink": "https://theysaidso.com/i/75c3EoOmPVolqfB4KeUhXgeF",
                          "download_uri": "https://theysaidso.com/i/image/75c3EoOmPVolqfB4KeUhXgeF"
                        }
                      },
                      "copyright": "2019-22 https://theysaidso.com"
                    }
          description: 200  response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    } 
          description: 401  response
        "404":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 404,
                            "message": "Not Found: Quote image not found"
                        }
                    }                       
          description: 404  response
      security:
        - BearerAuth: []
      tags:
        - Quote Images
    put:
      description: |
        Create a new quote image for a given quote. Choose background colors/images , choose different font styles and generate a beautiful quote image. Did you just had a feeling of being a god or what?!
      parameters:
        - description: Quote id
          in: query
          name: quote_id
          required: true
          schema:
            format: string
            type: string
        - description: Background Image id ( Will override bgcolor if supplied)
          in: query
          name: bgimage_id
          required: false
          schema:
            default: theysaidso_default_background_image
            format: string
            type: string
        - description: Background Color(if background image id is not supplied)
          in: query
          name: bg_color
          required: false
          schema:
            format: string
            type: string
        - description: Font id
          in: query
          name: font_id
          required: false
          schema:
            default: theysaidso_default_font
            format: string
            type: string
        - description: Text Color
          in: query
          name: text_color
          required: false
          schema:
            format: string
            type: string
        - description: Text/font size
          in: query
          name: text_size
          required: false
          schema:
            format: string
            type: string
        - description: Horizontal text Alignment Value
          in: query
          name: halign
          required: false
          schema:
            default: center
            format: string
            type: string
        - description: Vertical text Alignment Value
          in: query
          name: valign
          required: false
          schema:
            default: center
            format: string
            type: string
        - description: Image Width(By default this takes the width of the background image)
          in: query
          name: width
          required: false
          schema:
            format: integer
            type: integer
        - description: Image Height(By default this takes the height of the background image)
          in: query
          name: height
          required: false
          schema:
            format: integer
            type: integer
        - description: Disable They Said So branding (Only available in certain subscription levels. Ignored in other levels)
          in: query
          name: branding
          required: false
          schema:
            default: false
            format: boolean
            type: boolean
        - description: Should include a transparent layer between the text and the background image? This helps when the background image is bright and obscures the text.
          in: query
          name: include_transparent_layer
          required: false
          schema:
            default: true
            format: boolean
            type: boolean
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 1
                      },
                      "contents": {
                          "id": "75c3EoOmPVolqfB4KeUhXgeF",
                      },
                      "copyright": "2019-22 https://theysaidso.com"
                    }
          description: 200  response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    } 
          description: 401  response
        "404":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 404,
                            "message": "Not Found: Quote image not found"
                        }
                    }                         
          description: 404  response
      security:
        - BearerAuth: []
      tags:
        - Quote Images
  /quote/image/background:
    delete:
      description: |
        Delete a background image file. The user needs to be the owner of the background image to be able to delete it.
      parameters:
        - description: Font ID
          in: query
          name: id
          required: true
          schema:
            format: string
            type: string
      responses:
        "200":
          content:
            application/xml:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 1
                      },
                      "content": "Resource Deleted"
                    }
          description: 200  response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }
          description: 401  response
        "404":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 404,
                            "message": "Not Found: Resource not found"
                        }
                    }                                          
          description: 404  response
      security:
        - BearerAuth: []
      tags:
        - Quote Images
    post:
      description: Add an image for use later as a quote background image.
      requestBody:
        content:
          multipart/form-data:
            schema:
              properties:
                image:
                  description: Image file to add to your collection (png/jpg/gif are supported)
                  format: binary
                  type: string
                tags:
                  description: Optional comma separated tags
                  format: string
                  type: string
              required:
                - image
              type: object
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 1
                      },
                      "content": {
                         "id" : "afBLte5678bnzxc_iRbcg"
                      }
                    }
          description: 200  response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }
          description: 401  response
      security:
        - BearerAuth: []
      tags:
        - Quote Images
  /quote/image/background/list:
    get:
      description: |
        Lists background images in your private collection. 
      parameters:
        - description: Response is paged. This parameter determines where the response should start.
          in: query
          name: start
          required: false
          schema:
            format: integer
            type: integer
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 1
                      },
                      "contents": {
                        "qimage": {
                          "id": "75c3EoOmPVolqfB4KeUhXgeF",
                          "quote_id": "5e0QH_0k5srOUN1Wdu9AgweF",
                          "permalink": "https://theysaidso.com/i/75c3EoOmPVolqfB4KeUhXgeF",
                          "download_uri": "https://theysaidso.com/i/image/75c3EoOmPVolqfB4KeUhXgeF"
                        }
                      },
                      "copyright": "2019-22 https://theysaidso.com"
                    }
          description: 200  response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }     
          description: 401  response
        "404":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 404,
                            "message": "Not Found: Quote image matching the query criteria not found"
                        }
                    }
          description: 404  response
      security:
        - BearerAuth: []
      tags:
        - Quote Images
  /quote/image/background/search:
    get:
      description: |
        Searches for a background image with a given tag. 
      parameters:
        - description: Tag string
          in: query
          name: query
          required: false
          schema:
            format: string
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 1
                      },
                      "contents": {
                        "qimage": {
                          "id": "75c3EoOmPVolqfB4KeUhXgeF",
                          "quote_id": "5e0QH_0k5srOUN1Wdu9AgweF",
                          "permalink": "https://theysaidso.com/i/75c3EoOmPVolqfB4KeUhXgeF",
                          "download_uri": "https://theysaidso.com/i/image/75c3EoOmPVolqfB4KeUhXgeF"
                        }
                      },
                      "copyright": "2019-22 https://theysaidso.com"
                    }
          description: 200  response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }     
          description: 401  response
        "404":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 404,
                            "message": "Not Found: Quote image matching the query criteria not found"
                        }
                    }
          description: 404  response
      security:
        - BearerAuth: []
      tags:
        - Quote Images
  /quote/image/background/tags/add:
    post:
      description: Add a tag to a given Image.
      parameters:
        - description: Image ID
          in: query
          name: id
          required: true
          schema:
            format: string
            type: string
        - description: Comma Separated tags
          in: query
          name: tags
          required: true
          schema:
            format: string
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                    }
          description: 200  response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }
          description: 401  response
        "404":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 404,
                            "message": "Not Found: Image not found"
                        }
                    }                      
          description: 404  response
      security:
        - BearerAuth: []
      tags:
        - Quote Images
  /quote/image/background/tags/remove:
    post:
      description: Remove a tag from a given Image.
      parameters:
        - description: Image ID
          in: query
          name: id
          required: true
          schema:
            format: string
            type: string
        - description: Comma Separated tags
          in: query
          name: tags
          required: true
          schema:
            format: string
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                    }
          description: 200  response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }
          description: 401  response
        "404":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 404,
                            "message": "Not Found: Image not found"
                        }
                    }
          description: 404  response
      security:
        - BearerAuth: []
      tags:
        - Quote Images
  /quote/image/font:
    delete:
      description: |
        Delete a font file. The user needs to be the owner of the font to be able to delete it.
      parameters:
        - description: Font ID
          in: query
          name: id
          required: true
          schema:
            format: string
            type: string
      responses:
        "200":
          content:
            application/xml:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 1
                      },
                      "content": "Resource Deleted"
                    }
          description: 200  response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }
          description: 401  response
        "404":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 404,
                            "message": "Not Found: Resource not found"
                        }
                    }                                          
          description: 404  response
      security:
        - BearerAuth: []
      tags:
        - Quote Images
    post:
      description: Add a font file for use later in creating a quote image. This is essentially a `PUT` but not many clients handle PUT with binary stream i.e. a file, gracefully.
      requestBody:
        content:
          multipart/form-data:
            schema:
              properties:
                font:
                  description: Font file to add to your collection (ttf/otf are supported)
                  format: binary
                  type: string
                tags:
                  description: Optional comma separated tags
                  format: string
                  type: string
              required:
                - font
              type: object
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 1
                      },
                      "content": {
                         "id" : "afBLte5678bnzxc_iRbcg"
                      }
                    }
          description: 200  response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }
          description: 401  response
      security:
        - BearerAuth: []
      tags:
        - Quote Images
  /quote/image/font/list:
    get:
      description: |
        Lists background images in your private collection. 
      parameters:
        - description: Response is paged. This parameter determines where the response should start.
          in: query
          name: start
          required: false
          schema:
            format: integer
            type: integer
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 1
                      },
                      "contents": {
                        "qimage": {
                          "id": "75c3EoOmPVolqfB4KeUhXgeF",
                          "quote_id": "5e0QH_0k5srOUN1Wdu9AgweF",
                          "permalink": "https://theysaidso.com/i/75c3EoOmPVolqfB4KeUhXgeF",
                          "download_uri": "https://theysaidso.com/i/image/75c3EoOmPVolqfB4KeUhXgeF"
                        }
                      },
                      "copyright": "2019-22 https://theysaidso.com"
                    }
          description: 200  response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }     
          description: 401  response
        "404":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 404,
                            "message": "Not Found: Quote image matching the query criteria not found"
                        }
                    }
          description: 404  response
      security:
        - BearerAuth: []
      tags:
        - Quote Images
  /quote/image/font/search:
    get:
      description: |
        Searches for a font with a given tag. 
      parameters:
        - description: Tag string
          in: query
          name: query
          required: false
          schema:
            format: string
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 1
                      },
                      "contents": {
                        "qimage": {
                          "id": "75c3EoOmPVolqfB4KeUhXgeF",
                          "quote_id": "5e0QH_0k5srOUN1Wdu9AgweF",
                          "permalink": "https://theysaidso.com/i/75c3EoOmPVolqfB4KeUhXgeF",
                          "download_uri": "https://theysaidso.com/i/image/75c3EoOmPVolqfB4KeUhXgeF"
                        }
                      },
                      "copyright": "2019-22 https://theysaidso.com"
                    }
          description: 200  response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }     
          description: 401  response
        "404":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 404,
                            "message": "Not Found: Quote image matching the query criteria not found"
                        }
                    }
          description: 404  response
      security:
        - BearerAuth: []
      tags:
        - Quote Images
  /quote/image/font/tags/add:
    post:
      description: Add a tag to a given font.
      parameters:
        - description: Font ID
          in: query
          name: id
          required: true
          schema:
            format: string
            type: string
        - description: Comma Separated tags
          in: query
          name: tags
          required: true
          schema:
            format: string
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                    }
          description: 200  response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }
          description: 401  response
        "404":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 404,
                            "message": "Not Found: font not found"
                        }
                    }                      
          description: 404  response
      security:
        - BearerAuth: []
      tags:
        - Quote Images
  /quote/image/font/tags/remove:
    post:
      description: Remove a tag from a given Font.
      parameters:
        - description: Font ID
          in: query
          name: id
          required: true
          schema:
            format: string
            type: string
        - description: Comma Separated tags
          in: query
          name: tags
          required: true
          schema:
            format: string
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                    }
          description: 200  response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }
          description: 401  response
        "404":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 404,
                            "message": "Not Found: Font not found"
                        }
                    }
          description: 404  response
      security:
        - BearerAuth: []
      tags:
        - Quote Images
  /quote/image/search:
    get:
      description: |
        Gets a Random Quote image. Optional `category` param determines the category of quote used in the image. Optional `author` param gets the quote image of a given author. 
      parameters:
        - description: Quote Category
          in: query
          name: category
          required: false
          schema:
            format: string
            type: string
        - description: Quote Author
          in: query
          name: author
          required: false
          schema:
            format: string
            type: string
        - description: Should search private collection. Default searches public image collection.
          in: query
          name: private
          required: false
          schema:
            default: false
            format: boolean
            type: boolean
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 1
                      },
                      "contents": {
                        "qimage": {
                          "id": "75c3EoOmPVolqfB4KeUhXgeF",
                          "quote_id": "5e0QH_0k5srOUN1Wdu9AgweF",
                          "permalink": "https://theysaidso.com/i/75c3EoOmPVolqfB4KeUhXgeF",
                          "download_uri": "https://theysaidso.com/i/image/75c3EoOmPVolqfB4KeUhXgeF"
                        }
                      },
                      "copyright": "2019-22 https://theysaidso.com"
                    }
          description: 200  response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }     
          description: 401  response
        "404":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 404,
                            "message": "Not Found: Quote image matching the query criteria not found"
                        }
                    }
          description: 404  response
      security:
        - BearerAuth: []
      tags:
        - Quote Images
  /quote/like/toggle:
    get:
      description: Toggle the user like of the given Quote as a user of the API Key.
      parameters:
        - description: Quote ID
          in: query
          name: quote_id
          required: true
          schema:
            format: string
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 1
                      },
                      "contents": {
                        "mesg": "Liked the quote",
                        "hasLikedBefore": false
                      }
                    }
          description: 200  response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }
          description: 401  response
        "404":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 404,
                            "message": "Not Found: Quote not found"
                        }
                    }
          description: 404  response
      security:
        - BearerAuth: []
      tags:
        - Quote
  /quote/list:
    get:
      description: Get the list of quotes in your private collection.
      parameters:
        - description: Response is paged. This parameter controls where response starts the listing at
          in: query
          name: start
          required: false
          schema:
            default: 0
            format: int32
            type: integer
        - description: Response is paged. This parameter controls how many is returned in the result.
          in: query
          name: limit
          required: false
          schema:
            default: 10
            format: int32
            type: integer
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "success": {
                            "total": "263",
                            "range": {
                                "start": 0,
                                "end": 5
                            }
                        },
                        "contents": {
                            "quotes": [
                                {
                                    "quote": "I think you should defend to the death their right to march, and then go down and meet them with baseball bats.",
                                    "length": "111",
                                    "author": "Woody Allen",
                                    "tags": [],
                                    "id": "GkeLUydBfiAH0Tcs2w_gwAeF"
                                },
                                {
                                    "quote": "We have come to dedicate a portion of that field, as a final resting place for those who here gave their lives that that nation might live. It is altogether fitting and proper that we should do this. ... The world will little note nor long remember what we say here, but it can never forget what they did here.",
                                    "length": "310",
                                    "author": "Abraham Lincoln",
                                    "tags": [],
                                    "id": "u6fD9eRFA2NFMHuEoeujaAeF"
                                },
                                {
                                    "quote": "Eighty percent of success is showing up.",
                                    "length": "40",
                                    "author": "Woody Allen",
                                    "tags": [
                                        "success",
                                        "tso-top-100"
                                    ],
                                    "id": "nLvp0vLfofW06PILxmERHgeF"
                                },
                                {
                                    "quote": "Great ambition is the passion of a great character.  Those endowed with it may perform very good or very bad acts.  All depends on the principals which direct them.",
                                    "length": "164",
                                    "author": "Napoleon Bonaparte",
                                    "tags": [
                                        "ambition",
                                        "inspire",
                                        "passion"
                                    ],
                                    "id": "X8juAoTtvxSEdgA0sGbYeQeF"
                                },
                                {
                                    "quote": "I have had dreams, and I have had nightmares. I overcame the nightmares because of my dreams.",
                                    "length": "93",
                                    "author": "Dr. Jonas Salk",
                                    "tags": [
                                        "dream",
                                        "nightmare"
                                    ],
                                    "id": "m_6Fj8QcXlVsQiiW7SAMLAeF"
                                }
                            ]
                        }
                    }
          description: 200  response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    } 
          description: 401  response
      security:
        - BearerAuth: []
      tags:
        - Private Quotes
  /quote/random:
    get:
      description: Gets a `Random Quote`. When you are in a hurry this is what you call to get a random famous quote.
      parameters:
        - description: Language of the Quote. The language must be supported in our system.
          in: query
          name: language
          required: false
          schema:
            default: en
            format: string
            type: string
        - description: No of quotes to return. The max limit depends on the subscription level.
          in: query
          name: limit
          required: false
          schema:
            default: 1
            format: integer
            type: integer
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "success": {
                            "total": 1
                        },
                        "contents": {
                            "quotes": [
                                {
                                    "quote": "The day soldiers stop bringing you their problems is the day you have stopped leading them. They have either lost confidence that you can help them or concluded that you do not care. Either case is a failure of leadership.",
                                    "length": "222",
                                    "author": "Colin Powell",
                                    "tags": [
                                        "confidence",
                                        "leadership",
                                        "management"
                                    ],
                                    "category": "management",
                                    "id": "XLa1AmylKv1XF_dXcyhvdweF"
                                }
                            ]
                        }
                    }
              schema:
                $ref: "#/components/schemas/QuoteResponse"
            application/xml:
              examples:
                response:
                  value: |-
                    <?xml version="1.0"?> <response>
                      <success>
                        <total>1</total>
                      </success>
                      <contents>
                        <quotes>
                          <quote>Sometimes you climb out of bed in the morning and you think, I'm not going to make it, but you laugh inside &#x2014; remembering all the times you've felt that way.</quote>
                          <length>164</length>
                          <author>Charles Bukowski</author>
                          <tags>depression</tags>
                          <tags>inspire</tags>
                          <tags>tso-life</tags>
                          <category>inspire</category>
                          <date>2016-11-23</date>
                          <title>Inspiring Quote of the day</title>
                          <background>https://theysaidso.com/img/bgs/man_on_the_mountain.jpg</background>
                          <id>k7rTMtmveYHUN2ImwxNhhAeF</id>
                        </quotes>
                      </contents>
                    </response>      
          description: 200  response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }
          description: 401  response
      security:
        - BearerAuth: []
      tags:
        - Quote
  /quote/search:
    get:
      description: "Search for a `Quote` in They Said So platform. Optional `category` , `author`, `minlength`, `maxlength` params determines the filters applied while searching for the quote. "
      parameters:
        - description: Quote Category
          in: query
          name: category
          required: false
          schema:
            format: string
            type: string
        - description: Quote Author
          in: query
          name: author
          required: false
          schema:
            format: string
            type: string
        - description: Quote minimum Length
          in: query
          name: minlength
          required: false
          schema:
            default: 100
            format: int32
            type: integer
        - description: Quote maximum Length
          in: query
          name: maxlength
          required: false
          schema:
            default: 300
            format: int32
            type: integer
        - description: keyword to search for in the quote
          in: query
          name: query
          required: false
          schema:
            format: string
            type: string
        - description: Should search private collection? Default searches public collection.
          in: query
          name: private
          required: false
          schema:
            default: false
            format: boolean
            type: boolean
        - description: Language of the Quote. The language must be supported in our system.
          in: query
          name: language
          required: false
          schema:
            default: en
            format: string
            type: string
        - description: No of quotes to return. The max limit depends on the subscription level.
          in: query
          name: limit
          required: false
          schema:
            default: 1
            format: integer
            type: integer
        - description: Should search only SFW (Safe For Work) quotes?
          in: query
          name: sfw
          required: false
          schema:
            default: false
            format: boolean
            type: boolean
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "success": {
                            "total": 1
                        },
                        "contents": {
                            "quotes": [
                                {
                                    "quote": "The day soldiers stop bringing you their problems is the day you have stopped leading them. They have either lost confidence that you can help them or concluded that you do not care. Either case is a failure of leadership.",
                                    "length": "222",
                                    "author": "Colin Powell",
                                    "tags": [
                                        "confidence",
                                        "leadership",
                                        "management"
                                    ],
                                    "category": "management",
                                    "id": "XLa1AmylKv1XF_dXcyhvdweF"
                                }
                            ]
                        }
                    }
              schema:
                $ref: "#/components/schemas/QuoteResponse"
            application/xml:
              examples:
                response:
                  value: |-
                    <?xml version="1.0"?> <response>
                      <success>
                        <total>1</total>
                      </success>
                      <contents>
                        <quotes>
                          <quote>Sometimes you climb out of bed in the morning and you think, I'm not going to make it, but you laugh inside &#x2014; remembering all the times you've felt that way.</quote>
                          <length>164</length>
                          <author>Charles Bukowski</author>
                          <tags>depression</tags>
                          <tags>inspire</tags>
                          <tags>tso-life</tags>
                          <category>inspire</category>
                          <date>2016-11-23</date>
                          <title>Inspiring Quote of the day</title>
                          <background>https://theysaidso.com/img/bgs/man_on_the_mountain.jpg</background>
                          <id>k7rTMtmveYHUN2ImwxNhhAeF</id>
                        </quotes>
                      </contents>
                    </response>   
          description: 200  response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }
          description: 401  response
        "404":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 404,
                            "message": "No Quote found matching the search filters. Try with different search filters."
                        }
                    }
          description: 404  response
      security:
        - BearerAuth: []
      tags:
        - Quote
  /quote/tags/add:
    post:
      description: Add a tag to a given Quote.
      parameters:
        - description: Quote ID
          in: query
          name: id
          required: true
          schema:
            format: string
            type: string
        - description: Comma Separated tags
          in: query
          name: tags
          required: true
          schema:
            format: string
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 1
                      },
                      "contents": {
                        "message": "Tags added"
                      }
                    }
          description: 200  response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }
          description: 401  response
        "404":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 404,
                            "message": "Not Found: Quote not found"
                        }
                    }                      
          description: 404  response
      security:
        - BearerAuth: []
      tags:
        - Private Quotes
  /quote/tags/remove:
    post:
      description: Remove a tag from a given quote.
      parameters:
        - description: Quote ID
          in: query
          name: id
          required: true
          schema:
            format: string
            type: string
        - description: Comma Separated tags
          in: query
          name: tags
          required: true
          schema:
            format: string
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "success": {
                            "total": 1
                        },
                        "contents": {
                            "message": "Tags removed."
                        }
                    }
          description: 200  response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }
          description: 401  response
        "404":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 404,
                            "message": "Not Found: Quote not found"
                        }
                    }
          description: 404  response
      security:
        - BearerAuth: []
      tags:
        - Private Quotes
components:
  schemas:
    NewQuote:
      properties:
        author:
          description: Author name of quote.
          type: string
        quote:
          description: The Quote.
          type: string
        tags:
          description: Array of tags/categories.
          items:
            type: string
          type: array
      required:
        - quote
    QOD:
      allOf:
        - $ref: "#/components/schemas/Quote"
        - properties:
            date:
              description: Date this quote of the day belongs to
              type: string
            title:
              description: Title of the QOD category
              type: string
          required:
            - date
    QODResponse:
      properties:
        contents:
          properties:
            quotes:
              description: List of quotes
              items:
                $ref: "#/components/schemas/QOD"
              type: array
        success:
          description: Metadata about this successful call
          type: string
    Quote:
      allOf:
        - $ref: "#/components/schemas/NewQuote"
        - properties:
            id:
              description: Unique identifier representing a specific quote in theysaidso.com.
              type: string
            image:
              description: Image URL that can be used for background to display this quote.
              type: string
            length:
              description: Length of the quote string.
              format: int32
              type: integer
          required:
            - id
    QuoteResponse:
      properties:
        contents:
          properties:
            quotes:
              description: List of quotes
              items:
                $ref: "#/components/schemas/Quote"
              type: array
        success:
          description: Metadata about this successful call
          type: string
    SuccessResponse:
      properties:
        contents:
          description: Contents relevant to this successful call
          items: {}
          type: array
        success:
          description: Metadata about this successful call
          type: string
  securitySchemes:
    BearerAuth:
      bearerFormat: bearer token
      scheme: bearer
      type: http
