---
openapi: 3.0.3
info:
  title: Ranktracker REST API
  version: 1.0.0
  description: |-
    The Ranktracker REST API is the public, API-key–authenticated interface to
    your rank-tracking data: domains, competitors, keywords, SERP results, and
    tags. Responses follow the JSON:API envelope (`data.attributes`, camelCase
    keys). Authenticate by sending your API key in the `Authorization` header.
    Create and manage API keys from your Ranktracker account settings.
servers:
- url: https://api.ranktracker.com
  description: Production
security:
- ApiKeyAuth: []
tags:
- name: Domains
  description: Domains you track, plus ranking history and share of voice.
- name: Competitors
  description: Competitor domains tracked against each domain.
- name: Keywords
  description: Track keywords and read their rankings and history.
- name: SERP
  description: Latest search results and cached SERP HTML for a keyword.
- name: Keyword Tags
  description: Tag, untag, and bulk-tag keywords.
- name: Tags
  description: Manage the tags used to organise your keywords.
- name: Account
  description: Read your plan usage and quota.
paths:
  "/v1/account/usage":
    get:
      operationId: getV1AccountUsage
      summary: Plan usage & quota
      tags:
      - Account
      responses:
        '200':
          description: rounds fractional keyword credits to whole numbers (matching
            GraphQL)
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      type:
                        type: string
                      attributes:
                        type: object
                        properties:
                          apiEnabled:
                            type: boolean
                          keywords:
                            type: object
                            properties:
                              usage:
                                type: integer
                              limit:
                                type: integer
                              remaining:
                                type: integer
                            required:
                            - usage
                            - limit
                            - remaining
                          dataRows:
                            type: object
                            properties:
                              usage:
                                type: integer
                              limit:
                                type: integer
                              remaining:
                                type: integer
                            required:
                            - usage
                            - limit
                            - remaining
                          onDemand:
                            type: object
                            properties:
                              usage:
                                type: integer
                              limit:
                                type: integer
                              remaining:
                                type: integer
                            required:
                            - usage
                            - limit
                            - remaining
                          serpAnalyser:
                            type: object
                            properties:
                              usage:
                                type: integer
                              limit:
                                type: integer
                              remaining:
                                type: integer
                            required:
                            - usage
                            - limit
                            - remaining
                        required:
                        - apiEnabled
                        - keywords
                        - dataRows
                        - onDemand
                        - serpAnalyser
                    required:
                    - id
                    - type
                    - attributes
                required:
                - data
  "/v1/domains":
    get:
      operationId: getV1Domains
      summary: List
      tags:
      - Domains
      responses:
        '200':
          description: paginates with per_page and sets pagination headers
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        type:
                          type: string
                        attributes:
                          type: object
                          properties:
                            domain:
                              type: string
                            scheme:
                              type: string
                            host:
                              type: string
                            matchType:
                              type: string
                            projectName:
                              type: string
                            gmbName:
                              type: string
                            colour:
                              type: string
                            backlinkMonitor:
                              type: boolean
                            ranktracker:
                              type: boolean
                            websiteAudit:
                              type: boolean
                            keywordMonitor:
                              type: boolean
                            competitors:
                              type: array
                              items: {}
                            history:
                              type: array
                              items: {}
                            tags:
                              type: array
                              items: {}
                            updatedAt:
                              type: string
                            createdAt:
                              type: string
                          required:
                          - domain
                          - scheme
                          - host
                          - matchType
                          - projectName
                          - gmbName
                          - colour
                          - backlinkMonitor
                          - ranktracker
                          - websiteAudit
                          - keywordMonitor
                          - competitors
                          - history
                          - tags
                          - updatedAt
                          - createdAt
                      required:
                      - id
                      - type
                      - attributes
                required:
                - data
        '403':
          description: returns 403 Forbidden
          content:
            text/html:
              schema:
                type: string
      parameters:
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
    post:
      operationId: postV1Domains
      summary: Create
      tags:
      - Domains
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                domain:
                  type: object
                  properties:
                    host:
                      type: string
                    scheme:
                      type: string
                    match_type:
                      type: string
                    project_name:
                      type: string
                    gmb_name:
                      type: string
                    colour:
                      type: string
                  required:
                  - host
                  - scheme
                  - match_type
                  - project_name
                  - gmb_name
                  - colour
              required:
              - domain
      responses:
        '201':
          description: creates a domain and returns 201
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      type:
                        type: string
                      attributes:
                        type: object
                        properties:
                          domain:
                            type: string
                          scheme:
                            type: string
                          host:
                            type: string
                          matchType:
                            type: string
                          projectName:
                            type: string
                          gmbName:
                            type: string
                          colour:
                            type: string
                          backlinkMonitor:
                            type: boolean
                          ranktracker:
                            type: boolean
                          websiteAudit:
                            type: boolean
                          keywordMonitor:
                            type: boolean
                          competitors:
                            type: array
                            items: {}
                          history:
                            type: array
                            items: {}
                          tags:
                            type: array
                            items: {}
                          updatedAt:
                            type: string
                          createdAt:
                            type: string
                        required:
                        - domain
                        - scheme
                        - host
                        - matchType
                        - projectName
                        - gmbName
                        - colour
                        - backlinkMonitor
                        - ranktracker
                        - websiteAudit
                        - keywordMonitor
                        - competitors
                        - history
                        - tags
                        - updatedAt
                        - createdAt
                    required:
                    - id
                    - type
                    - attributes
                required:
                - data
        '422':
          description: returns 422 for invalid attributes
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                        status:
                          type: integer
                        detail:
                          type: string
                      required:
                      - code
                      - status
                      - detail
                required:
                - errors
  "/v1/domains/{domain_uuid}/competitors":
    get:
      operationId: getV1DomainsDomainUuidCompetitors
      summary: List
      tags:
      - Competitors
      parameters:
      - name: domain_uuid
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: returns only tracked, non-deleted competitors for the domain
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        type:
                          type: string
                        attributes:
                          type: object
                          properties:
                            competitor:
                              type: string
                            scheme:
                              type: string
                            host:
                              type: string
                            matchType:
                              type: string
                            keywordMonitor:
                              type: boolean
                            tracked:
                              type: boolean
                            updatedAt:
                              type: string
                            createdAt:
                              type: string
                          required:
                          - competitor
                          - scheme
                          - host
                          - matchType
                          - keywordMonitor
                          - tracked
                          - updatedAt
                          - createdAt
                      required:
                      - id
                      - type
                      - attributes
                required:
                - data
        '403':
          description: returns 403 Forbidden
          content:
            text/html:
              schema:
                type: string
        '404':
          description: returns 404
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                        status:
                          type: integer
                        detail:
                          type: string
                      required:
                      - code
                      - status
                      - detail
                required:
                - errors
    post:
      operationId: postV1DomainsDomainUuidCompetitors
      summary: Create
      tags:
      - Competitors
      parameters:
      - name: domain_uuid
        in: path
        required: true
        schema:
          type: string
      responses:
        '201':
          description: creates a tracked competitor scoped to the domain and returns
            201
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      type:
                        type: string
                      attributes:
                        type: object
                        properties:
                          competitor:
                            type: string
                          scheme:
                            type: string
                          host:
                            type: string
                          matchType:
                            type: string
                          keywordMonitor:
                            type: boolean
                          tracked:
                            type: boolean
                          updatedAt:
                            type: string
                          createdAt:
                            type: string
                        required:
                        - competitor
                        - scheme
                        - host
                        - matchType
                        - keywordMonitor
                        - tracked
                        - updatedAt
                        - createdAt
                    required:
                    - id
                    - type
                    - attributes
                required:
                - data
        '403':
          description: returns 403 Forbidden
          content:
            text/html:
              schema:
                type: string
        '404':
          description: returns 404
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                        status:
                          type: integer
                        detail:
                          type: string
                      required:
                      - code
                      - status
                      - detail
                required:
                - errors
        '422':
          description: returns 422 for invalid attributes
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                        status:
                          type: integer
                        detail:
                          type: string
                      required:
                      - code
                      - status
                      - detail
                required:
                - errors
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                competitor:
                  type: object
                  properties:
                    host:
                      type: string
                    scheme:
                      type: string
                    match_type:
                      type: string
                  required:
                  - host
                  - scheme
                  - match_type
              required:
              - competitor
  "/v1/domains/{domain_uuid}/competitors/{uuid}":
    delete:
      operationId: deleteV1DomainsDomainUuidCompetitorsUuid
      summary: Delete
      tags:
      - Competitors
      parameters:
      - name: domain_uuid
        in: path
        required: true
        schema:
          type: string
      - name: uuid
        in: path
        required: true
        schema:
          type: string
      responses:
        '204':
          description: soft-deletes the competitor and returns 204
    get:
      operationId: getV1DomainsDomainUuidCompetitorsUuid
      summary: Retrieve
      tags:
      - Competitors
      parameters:
      - name: domain_uuid
        in: path
        required: true
        schema:
          type: string
      - name: uuid
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: returns the competitor
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      type:
                        type: string
                      attributes:
                        type: object
                        properties:
                          competitor:
                            type: string
                          scheme:
                            type: string
                          host:
                            type: string
                          matchType:
                            type: string
                          keywordMonitor:
                            type: boolean
                          tracked:
                            type: boolean
                          updatedAt:
                            type: string
                          createdAt:
                            type: string
                        required:
                        - competitor
                        - scheme
                        - host
                        - matchType
                        - keywordMonitor
                        - tracked
                        - updatedAt
                        - createdAt
                    required:
                    - id
                    - type
                    - attributes
                required:
                - data
        '404':
          description: returns 404
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                        status:
                          type: integer
                        detail:
                          type: string
                      required:
                      - code
                      - status
                      - detail
                required:
                - errors
    patch:
      operationId: patchV1DomainsDomainUuidCompetitorsUuid
      summary: Update
      tags:
      - Competitors
      parameters:
      - name: domain_uuid
        in: path
        required: true
        schema:
          type: string
      - name: uuid
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                competitor:
                  type: object
                  properties:
                    host:
                      type: string
                    scheme:
                      type: string
                    match_type:
                      type: string
                    tracked:
                      type: boolean
              required:
              - competitor
      responses:
        '200':
          description: can stop tracking
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      type:
                        type: string
                      attributes:
                        type: object
                        properties:
                          competitor:
                            type: string
                          scheme:
                            type: string
                          host:
                            type: string
                          matchType:
                            type: string
                          keywordMonitor:
                            type: boolean
                          tracked:
                            type: boolean
                          updatedAt:
                            type: string
                          createdAt:
                            type: string
                        required:
                        - competitor
                        - scheme
                        - host
                        - matchType
                        - keywordMonitor
                        - tracked
                        - updatedAt
                        - createdAt
                    required:
                    - id
                    - type
                    - attributes
                required:
                - data
  "/v1/domains/{domain_uuid}/keywords":
    get:
      operationId: getV1DomainsDomainUuidKeywords
      summary: List
      tags:
      - Keywords
      parameters:
      - name: domain_uuid
        in: path
        required: true
        schema:
          type: string
      - name: page
        in: query
        required: false
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
      - name: results_organic_url
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: caps per_page at the maximum
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        type:
                          type: string
                        attributes:
                          type: object
                          properties:
                            word:
                              type: string
                            searchEngine:
                              type: object
                              properties:
                                uuid:
                                  type: string
                                name:
                                  type: string
                              required:
                              - uuid
                              - name
                            device:
                              type: object
                              properties:
                                uuid:
                                  type: string
                                name:
                                  type: string
                              required:
                              - uuid
                              - name
                            location:
                              type: object
                              properties:
                                uuid:
                                  type: string
                                code:
                                  type: string
                                name:
                                  type: string
                                country_iso_code:
                                  type: string
                                variant:
                                  type: string
                                  nullable: true
                              required:
                              - uuid
                              - code
                              - name
                              - country_iso_code
                              - variant
                            language:
                              type: object
                              properties:
                                uuid:
                                  type: string
                                code:
                                  type: string
                                name:
                                  type: string
                              required:
                              - uuid
                              - code
                              - name
                            results:
                              type: object
                              properties:
                                summary:
                                  type: object
                                  properties:
                                    search_volume:
                                      type: number
                                      nullable: true
                                    traffic:
                                      type: integer
                                    cost_per_click:
                                      type: number
                                      nullable: true
                                    competition:
                                      type: number
                                      nullable: true
                                    difficulty:
                                      type: number
                                      nullable: true
                                  required:
                                  - search_volume
                                  - traffic
                                  - cost_per_click
                                  - competition
                                  - difficulty
                                history:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      uuid:
                                        type: string
                                      status:
                                        type: string
                                      created_at:
                                        type: string
                                      organic_url:
                                        type: string
                                      organic_start_position:
                                        type: integer
                                      organic_start_position_at:
                                        type: number
                                        nullable: true
                                      organic_best_position:
                                        type: integer
                                      organic_best_position_at:
                                        type: number
                                        nullable: true
                                      organic_current_position:
                                        type: integer
                                      organic_day_change:
                                        type: integer
                                      organic_week_change:
                                        type: integer
                                      organic_month_change:
                                        type: integer
                                      organic_life_change:
                                        type: integer
                                      organic_visibility:
                                        type: integer
                                      organic_page_number:
                                        type: integer
                                      absolute_url:
                                        type: string
                                      absolute_start_position:
                                        type: integer
                                      absolute_start_position_at:
                                        type: number
                                        nullable: true
                                      absolute_best_position:
                                        type: integer
                                      absolute_best_position_at:
                                        type: number
                                        nullable: true
                                      absolute_current_position:
                                        type: integer
                                      absolute_day_change:
                                        type: integer
                                      absolute_week_change:
                                        type: integer
                                      absolute_month_change:
                                        type: integer
                                      absolute_life_change:
                                        type: integer
                                      absolute_visibility:
                                        type: integer
                                      absolute_page_number:
                                        type: integer
                                      local_pack_url:
                                        type: string
                                        nullable: true
                                      local_pack_start_position:
                                        type: number
                                        nullable: true
                                      local_pack_start_position_at:
                                        type: number
                                        nullable: true
                                      local_pack_best_position:
                                        type: number
                                        nullable: true
                                      local_pack_best_position_at:
                                        type: number
                                        nullable: true
                                      local_pack_current_position:
                                        type: number
                                        nullable: true
                                      local_pack_day_change:
                                        type: number
                                        nullable: true
                                      local_pack_week_change:
                                        type: number
                                        nullable: true
                                      local_pack_month_change:
                                        type: number
                                        nullable: true
                                      local_pack_life_change:
                                        type: number
                                        nullable: true
                                      local_pack_visibility:
                                        type: number
                                        nullable: true
                                      local_pack_page_number:
                                        type: number
                                        nullable: true
                                      traffic:
                                        type: integer
                                      search_volume:
                                        type: number
                                        nullable: true
                                      cost_per_click:
                                        type: number
                                        nullable: true
                                      competition:
                                        type: number
                                        nullable: true
                                      difficulty:
                                        type: number
                                        nullable: true
                                      is_image:
                                        type: boolean
                                      is_image_available:
                                        type: boolean
                                      is_video:
                                        type: boolean
                                      is_video_available:
                                        type: boolean
                                      is_featured_snippet:
                                        type: boolean
                                      is_featured_snippet_available:
                                        type: boolean
                                      is_malicious:
                                        type: boolean
                                      is_malicious_available:
                                        type: boolean
                                      is_web_story:
                                        type: boolean
                                      is_web_story_available:
                                        type: boolean
                                      is_cannibalized:
                                        type: boolean
                                      first_seen:
                                        type: number
                                        nullable: true
                                      last_seen:
                                        type: number
                                        nullable: true
                                    required:
                                    - uuid
                                    - status
                                    - created_at
                                    - organic_url
                                    - organic_start_position
                                    - organic_start_position_at
                                    - organic_best_position
                                    - organic_best_position_at
                                    - organic_current_position
                                    - organic_day_change
                                    - organic_week_change
                                    - organic_month_change
                                    - organic_life_change
                                    - organic_visibility
                                    - organic_page_number
                                    - absolute_url
                                    - absolute_start_position
                                    - absolute_start_position_at
                                    - absolute_best_position
                                    - absolute_best_position_at
                                    - absolute_current_position
                                    - absolute_day_change
                                    - absolute_week_change
                                    - absolute_month_change
                                    - absolute_life_change
                                    - absolute_visibility
                                    - absolute_page_number
                                    - local_pack_url
                                    - local_pack_start_position
                                    - local_pack_start_position_at
                                    - local_pack_best_position
                                    - local_pack_best_position_at
                                    - local_pack_current_position
                                    - local_pack_day_change
                                    - local_pack_week_change
                                    - local_pack_month_change
                                    - local_pack_life_change
                                    - local_pack_visibility
                                    - local_pack_page_number
                                    - traffic
                                    - search_volume
                                    - cost_per_click
                                    - competition
                                    - difficulty
                                    - is_image
                                    - is_image_available
                                    - is_video
                                    - is_video_available
                                    - is_featured_snippet
                                    - is_featured_snippet_available
                                    - is_malicious
                                    - is_malicious_available
                                    - is_web_story
                                    - is_web_story_available
                                    - is_cannibalized
                                    - first_seen
                                    - last_seen
                              required:
                              - summary
                              - history
                            competitorResults:
                              type: array
                              items: {}
                            tags:
                              type: array
                              items: {}
                            updatedAt:
                              type: string
                          required:
                          - word
                          - searchEngine
                          - device
                          - location
                          - language
                          - results
                          - competitorResults
                          - tags
                          - updatedAt
                      required:
                      - id
                      - type
                      - attributes
                required:
                - data
        '403':
          description: returns 403 Forbidden
          content:
            text/html:
              schema:
                type: string
        '404':
          description: returns 404 (account-scoped lookup hides foreign domains)
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                        status:
                          type: integer
                        detail:
                          type: string
                      required:
                      - code
                      - status
                      - detail
                required:
                - errors
    post:
      operationId: postV1DomainsDomainUuidKeywords
      summary: Create
      tags:
      - Keywords
      parameters:
      - name: domain_uuid
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                frequency:
                  type: string
                words:
                  type: array
                  items:
                    type: string
                search_engines:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                      location:
                        type: string
                      language:
                        type: string
                      device:
                        type: string
                    required:
                    - name
                    - location
                    - language
                    - device
              required:
              - frequency
              - words
              - search_engines
      responses:
        '201':
          description: links the new keywords to the domain as tracked
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        type:
                          type: string
                        attributes:
                          type: object
                          properties:
                            word:
                              type: string
                            searchEngine:
                              type: object
                              properties:
                                uuid:
                                  type: string
                                name:
                                  type: string
                              required:
                              - uuid
                              - name
                            device:
                              type: object
                              properties:
                                uuid:
                                  type: string
                                name:
                                  type: string
                              required:
                              - uuid
                              - name
                            location:
                              type: object
                              properties:
                                uuid:
                                  type: string
                                code:
                                  type: string
                                name:
                                  type: string
                                country_iso_code:
                                  type: string
                                variant:
                                  type: string
                                  nullable: true
                              required:
                              - uuid
                              - code
                              - name
                              - country_iso_code
                              - variant
                            language:
                              type: object
                              properties:
                                uuid:
                                  type: string
                                code:
                                  type: string
                                name:
                                  type: string
                              required:
                              - uuid
                              - code
                              - name
                            results:
                              type: object
                              properties:
                                summary:
                                  type: object
                                  properties:
                                    search_volume:
                                      type: number
                                      nullable: true
                                    traffic:
                                      type: number
                                      nullable: true
                                    cost_per_click:
                                      type: number
                                      nullable: true
                                    competition:
                                      type: number
                                      nullable: true
                                    difficulty:
                                      type: number
                                      nullable: true
                                  required:
                                  - search_volume
                                  - traffic
                                  - cost_per_click
                                  - competition
                                  - difficulty
                                history:
                                  type: array
                                  items: {}
                              required:
                              - summary
                              - history
                            competitorResults:
                              type: array
                              items: {}
                            tags:
                              type: array
                              items: {}
                            updatedAt:
                              type: string
                          required:
                          - word
                          - searchEngine
                          - device
                          - location
                          - language
                          - results
                          - competitorResults
                          - tags
                          - updatedAt
                      required:
                      - id
                      - type
                      - attributes
                required:
                - data
        '402':
          description: returns 402 and links nothing to the domain
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                        status:
                          type: integer
                        detail:
                          type: string
                      required:
                      - code
                      - status
                      - detail
                required:
                - errors
        '403':
          description: returns 403 Forbidden
          content:
            text/html:
              schema:
                type: string
        '404':
          description: returns 404
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                        status:
                          type: integer
                        detail:
                          type: string
                      required:
                      - code
                      - status
                      - detail
                required:
                - errors
        '422':
          description: returns 422
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                        status:
                          type: integer
                        detail:
                          type: string
                      required:
                      - code
                      - status
                      - detail
                required:
                - errors
  "/v1/domains/{domain_uuid}/keywords/taggings":
    delete:
      operationId: deleteV1DomainsDomainUuidKeywordsTaggings
      summary: bulk_destroy
      tags:
      - Keyword Tags
      parameters:
      - name: domain_uuid
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: deletes taggings for multiple keywords and returns 200 with
            deleted_count
          content:
            application/json:
              schema:
                type: object
                properties:
                  deleted_count:
                    type: integer
                required:
                - deleted_count
        '403':
          description: returns 403 Forbidden
          content:
            text/html:
              schema:
                type: string
    post:
      operationId: postV1DomainsDomainUuidKeywordsTaggings
      summary: Bulk-tag keywords
      tags:
      - Keyword Tags
      parameters:
      - name: domain_uuid
        in: path
        required: true
        schema:
          type: string
      responses:
        '201':
          description: creates only one tagging per keyword for duplicate UUIDs
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        type:
                          type: string
                        attributes:
                          type: object
                          properties:
                            domainUuid:
                              type: string
                            keywordUuid:
                              type: string
                            tagUuid:
                              type: string
                            createdAt:
                              type: string
                            updatedAt:
                              type: string
                          required:
                          - domainUuid
                          - keywordUuid
                          - tagUuid
                          - createdAt
                          - updatedAt
                      required:
                      - id
                      - type
                      - attributes
                required:
                - data
        '403':
          description: returns 403 Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                        status:
                          type: integer
                        detail:
                          type: string
                      required:
                      - code
                      - status
                      - detail
                required:
                - errors
            text/html:
              schema:
                type: string
        '404':
          description: returns 404 when the tag does not exist
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                        status:
                          type: integer
                        detail:
                          type: string
                      required:
                      - code
                      - status
                      - detail
                required:
                - errors
        '422':
          description: returns 422 when keyword_uuids is empty
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                        status:
                          type: integer
                        detail:
                          type: string
                      required:
                      - code
                      - status
                      - detail
                required:
                - errors
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                tag_uuid:
                  type: string
                keyword_uuids:
                  type: array
                  items:
                    type: string
              required:
              - tag_uuid
              - keyword_uuids
  "/v1/domains/{domain_uuid}/keywords/{keyword_uuid}/serp":
    get:
      operationId: getV1DomainsDomainUuidKeywordsKeywordUuidSerp
      summary: Retrieve
      tags:
      - SERP
      parameters:
      - name: domain_uuid
        in: path
        required: true
        schema:
          type: string
      - name: keyword_uuid
        in: path
        required: true
        schema:
          type: string
      - name: range
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: returns the SERP for a maps keyword
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      type:
                        type: string
                      attributes:
                        type: object
                        properties:
                          serp:
                            type: array
                            items:
                              type: object
                              properties:
                                faq:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                    items:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                          links:
                                            type: array
                                            items:
                                              type: object
                                              properties:
                                                url:
                                                  type: string
                                                type:
                                                  type: string
                                                title:
                                                  type: string
                                              required:
                                              - url
                                              - type
                                              - title
                                            nullable: true
                                          title:
                                            type: string
                                          description:
                                            type: string
                                        required:
                                        - type
                                        - links
                                        - title
                                        - description
                                  required:
                                  - type
                                  - items
                                  nullable: true
                                url:
                                  type: string
                                type:
                                  type: string
                                links:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      url:
                                        type: string
                                      type:
                                        type: string
                                      title:
                                        type: string
                                      description:
                                        type: string
                                        nullable: true
                                    required:
                                    - url
                                    - type
                                    - title
                                    - description
                                  nullable: true
                                title:
                                  type: string
                                xpath:
                                  type: string
                                domain:
                                  type: string
                                rating:
                                  type: object
                                  properties:
                                    value:
                                      oneOf:
                                      - type: integer
                                      - type: number
                                        format: float
                                    rating_max:
                                      type: integer
                                    rating_type:
                                      type: string
                                    votes_count:
                                      type: integer
                                      nullable: true
                                  required:
                                  - value
                                  - rating_max
                                  - rating_type
                                  - votes_count
                                  nullable: true
                                is_image:
                                  type: boolean
                                is_video:
                                  type: boolean
                                position:
                                  type: string
                                cache_url:
                                  type: string
                                  nullable: true
                                breadcrumb:
                                  type: string
                                rank_group:
                                  type: integer
                                amp_version:
                                  type: boolean
                                description:
                                  type: string
                                highlighted:
                                  type: array
                                  items:
                                    type: string
                                  nullable: true
                                pre_snippet:
                                  type: string
                                  nullable: true
                                is_malicious:
                                  type: boolean
                                rank_absolute:
                                  type: integer
                                extended_snippet:
                                  type: number
                                  nullable: true
                                is_featured_snippet:
                                  type: boolean
                              required:
                              - faq
                              - url
                              - type
                              - links
                              - title
                              - xpath
                              - domain
                              - rating
                              - is_image
                              - is_video
                              - position
                              - cache_url
                              - breadcrumb
                              - rank_group
                              - amp_version
                              - description
                              - highlighted
                              - pre_snippet
                              - is_malicious
                              - rank_absolute
                              - extended_snippet
                              - is_featured_snippet
                          serpFeatures:
                            type: object
                            properties:
                              paid:
                                type: integer
                              organic:
                                type: integer
                              video:
                                type: integer
                              local_pack:
                                type: integer
                              people_also_ask:
                                type: integer
                              twitter:
                                type: integer
                              related_searches:
                                type: integer
                            required:
                            - paid
                            - organic
                            - video
                            - local_pack
                            - people_also_ask
                            - twitter
                            - related_searches
                          checkUrl:
                            type: string
                        required:
                        - serp
                        - serpFeatures
                        - checkUrl
                    required:
                    - id
                    - type
                    - attributes
                required:
                - data
        '403':
          description: returns 403 Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                        status:
                          type: integer
                        detail:
                          type: string
                      required:
                      - code
                      - status
                      - detail
                required:
                - errors
            text/html:
              schema:
                type: string
        '404':
          description: returns 404
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                        status:
                          type: integer
                        detail:
                          type: string
                      required:
                      - code
                      - status
                      - detail
                required:
                - errors
        '422':
          description: returns 422 with a "SERP not ready" error
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        code:
                          type: string
                        status:
                          type: integer
                        detail:
                          type: string
                      required:
                      - id
                      - code
                      - status
                      - detail
                required:
                - errors
  "/v1/domains/{domain_uuid}/keywords/{keyword_uuid}/serp-html":
    get:
      operationId: getV1DomainsDomainUuidKeywordsKeywordUuidSerpHtml
      security: []
      summary: Retrieve
      tags:
      - SERP
      parameters:
      - name: domain_uuid
        in: path
        required: true
        schema:
          type: string
      - name: keyword_uuid
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: still returns 200 (nil position handled gracefully)
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      type:
                        type: string
                      attributes:
                        type: object
                        properties:
                          word:
                            type: string
                          location:
                            type: string
                          language:
                            type: string
                          device:
                            type: string
                          position:
                            type: number
                            nullable: true
                          searchEngine:
                            type: string
                          xpath:
                            type: string
                          domain:
                            type: string
                            nullable: true
                          pageNumber:
                            type: integer
                          pageCount:
                            type: integer
                          date:
                            type: string
                          availableDates:
                            type: array
                            items:
                              type: string
                          html:
                            type: string
                        required:
                        - word
                        - location
                        - language
                        - device
                        - position
                        - searchEngine
                        - xpath
                        - domain
                        - pageNumber
                        - pageCount
                        - date
                        - availableDates
                        - html
                    required:
                    - id
                    - type
                    - attributes
                required:
                - data
        '404':
          description: returns 404
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                        status:
                          type: integer
                        detail:
                          type: string
                      required:
                      - code
                      - status
                      - detail
                required:
                - errors
        '422':
          description: returns 422 with a "SERP HTML not available" error
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        code:
                          type: string
                        status:
                          type: integer
                        detail:
                          type: string
                      required:
                      - id
                      - code
                      - status
                      - detail
                required:
                - errors
  "/v1/domains/{domain_uuid}/keywords/{keyword_uuid}/tags/{tag_uuid}":
    delete:
      operationId: deleteV1DomainsDomainUuidKeywordsKeywordUuidTagsTagUuid
      summary: Delete
      tags:
      - Keyword Tags
      parameters:
      - name: domain_uuid
        in: path
        required: true
        schema:
          type: string
      - name: keyword_uuid
        in: path
        required: true
        schema:
          type: string
      - name: tag_uuid
        in: path
        required: true
        schema:
          type: string
      responses:
        '204':
          description: deletes the tagging and returns 204
        '403':
          description: returns 403 Forbidden
          content:
            text/html:
              schema:
                type: string
        '404':
          description: returns 404 when the tagging does not exist
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                        status:
                          type: integer
                        detail:
                          type: string
                      required:
                      - code
                      - status
                      - detail
                required:
                - errors
    post:
      operationId: postV1DomainsDomainUuidKeywordsKeywordUuidTagsTagUuid
      summary: Create
      tags:
      - Keyword Tags
      parameters:
      - name: domain_uuid
        in: path
        required: true
        schema:
          type: string
      - name: keyword_uuid
        in: path
        required: true
        schema:
          type: string
      - name: tag_uuid
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: returns the existing tagging with 200 when it already exists
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      type:
                        type: string
                      attributes:
                        type: object
                        properties:
                          domainUuid:
                            type: string
                          keywordUuid:
                            type: string
                          tagUuid:
                            type: string
                          createdAt:
                            type: string
                          updatedAt:
                            type: string
                        required:
                        - domainUuid
                        - keywordUuid
                        - tagUuid
                        - createdAt
                        - updatedAt
                    required:
                    - id
                    - type
                    - attributes
                required:
                - data
        '201':
          description: creates a tagging and returns 201
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      type:
                        type: string
                      attributes:
                        type: object
                        properties:
                          domainUuid:
                            type: string
                          keywordUuid:
                            type: string
                          tagUuid:
                            type: string
                          createdAt:
                            type: string
                          updatedAt:
                            type: string
                        required:
                        - domainUuid
                        - keywordUuid
                        - tagUuid
                        - createdAt
                        - updatedAt
                    required:
                    - id
                    - type
                    - attributes
                required:
                - data
        '403':
          description: returns 403 Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                        status:
                          type: integer
                        detail:
                          type: string
                      required:
                      - code
                      - status
                      - detail
                required:
                - errors
            text/html:
              schema:
                type: string
        '404':
          description: returns 404 when the keyword does not exist
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                        status:
                          type: integer
                        detail:
                          type: string
                      required:
                      - code
                      - status
                      - detail
                required:
                - errors
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties: {}
  "/v1/domains/{domain_uuid}/keywords/{uuid}":
    delete:
      operationId: deleteV1DomainsDomainUuidKeywordsUuid
      summary: Delete
      tags:
      - Keywords
      parameters:
      - name: domain_uuid
        in: path
        required: true
        schema:
          type: string
      - name: uuid
        in: path
        required: true
        schema:
          type: string
      responses:
        '204':
          description: is idempotent when the keyword is already removed
        '403':
          description: returns 403 Forbidden
          content:
            text/html:
              schema:
                type: string
        '404':
          description: returns 404
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                        status:
                          type: integer
                        detail:
                          type: string
                      required:
                      - code
                      - status
                      - detail
                required:
                - errors
    get:
      operationId: getV1DomainsDomainUuidKeywordsUuid
      summary: Retrieve
      tags:
      - Keywords
      parameters:
      - name: domain_uuid
        in: path
        required: true
        schema:
          type: string
      - name: uuid
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: returns the keyword
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      type:
                        type: string
                      attributes:
                        type: object
                        properties:
                          word:
                            type: string
                          searchEngine:
                            type: object
                            properties:
                              uuid:
                                type: string
                              name:
                                type: string
                            required:
                            - uuid
                            - name
                          device:
                            type: object
                            properties:
                              uuid:
                                type: string
                              name:
                                type: string
                            required:
                            - uuid
                            - name
                          location:
                            type: object
                            properties:
                              uuid:
                                type: string
                              code:
                                type: string
                              name:
                                type: string
                              country_iso_code:
                                type: string
                              variant:
                                type: string
                                nullable: true
                            required:
                            - uuid
                            - code
                            - name
                            - country_iso_code
                            - variant
                          language:
                            type: object
                            properties:
                              uuid:
                                type: string
                              code:
                                type: string
                              name:
                                type: string
                            required:
                            - uuid
                            - code
                            - name
                          results:
                            type: object
                            properties:
                              summary:
                                type: object
                                properties:
                                  search_volume:
                                    type: number
                                    nullable: true
                                  traffic:
                                    type: number
                                    nullable: true
                                  cost_per_click:
                                    type: number
                                    nullable: true
                                  competition:
                                    type: number
                                    nullable: true
                                  difficulty:
                                    type: number
                                    nullable: true
                                required:
                                - search_volume
                                - traffic
                                - cost_per_click
                                - competition
                                - difficulty
                              history:
                                type: array
                                items: {}
                            required:
                            - summary
                            - history
                          competitorResults:
                            type: array
                            items: {}
                          tags:
                            type: array
                            items: {}
                          updatedAt:
                            type: string
                        required:
                        - word
                        - searchEngine
                        - device
                        - location
                        - language
                        - results
                        - competitorResults
                        - tags
                        - updatedAt
                    required:
                    - id
                    - type
                    - attributes
                required:
                - data
        '403':
          description: returns 403 Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                        status:
                          type: integer
                        detail:
                          type: string
                      required:
                      - code
                      - status
                      - detail
                required:
                - errors
        '404':
          description: returns 404 when the keyword does not exist
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                        status:
                          type: integer
                        detail:
                          type: string
                      required:
                      - code
                      - status
                      - detail
                required:
                - errors
    patch:
      operationId: patchV1DomainsDomainUuidKeywordsUuid
      summary: Update
      tags:
      - Keywords
      parameters:
      - name: domain_uuid
        in: path
        required: true
        schema:
          type: string
      - name: uuid
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                tracked:
                  type: boolean
              required:
              - tracked
      responses:
        '200':
          description: stops tracking when tracked is false and returns 200
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      type:
                        type: string
                      attributes:
                        type: object
                        properties:
                          word:
                            type: string
                          searchEngine:
                            type: object
                            properties:
                              uuid:
                                type: string
                              name:
                                type: string
                            required:
                            - uuid
                            - name
                          device:
                            type: object
                            properties:
                              uuid:
                                type: string
                              name:
                                type: string
                            required:
                            - uuid
                            - name
                          location:
                            type: object
                            properties:
                              uuid:
                                type: string
                              code:
                                type: string
                              name:
                                type: string
                              country_iso_code:
                                type: string
                              variant:
                                type: string
                                nullable: true
                            required:
                            - uuid
                            - code
                            - name
                            - country_iso_code
                            - variant
                          language:
                            type: object
                            properties:
                              uuid:
                                type: string
                              code:
                                type: string
                              name:
                                type: string
                            required:
                            - uuid
                            - code
                            - name
                          results:
                            type: object
                            properties:
                              summary:
                                type: object
                                properties:
                                  search_volume:
                                    type: number
                                    nullable: true
                                  traffic:
                                    type: number
                                    nullable: true
                                  cost_per_click:
                                    type: number
                                    nullable: true
                                  competition:
                                    type: number
                                    nullable: true
                                  difficulty:
                                    type: number
                                    nullable: true
                                required:
                                - search_volume
                                - traffic
                                - cost_per_click
                                - competition
                                - difficulty
                              history:
                                type: array
                                items: {}
                            required:
                            - summary
                            - history
                          competitorResults:
                            type: array
                            items: {}
                          tags:
                            type: array
                            items: {}
                          updatedAt:
                            type: string
                        required:
                        - word
                        - searchEngine
                        - device
                        - location
                        - language
                        - results
                        - competitorResults
                        - tags
                        - updatedAt
                    required:
                    - id
                    - type
                    - attributes
                required:
                - data
        '403':
          description: returns 403 Forbidden
          content:
            text/html:
              schema:
                type: string
        '404':
          description: returns 404
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                        status:
                          type: integer
                        detail:
                          type: string
                      required:
                      - code
                      - status
                      - detail
                required:
                - errors
  "/v1/domains/{uuid}":
    delete:
      operationId: deleteV1DomainsUuid
      summary: Delete
      tags:
      - Domains
      parameters:
      - name: uuid
        in: path
        required: true
        schema:
          type: string
      responses:
        '204':
          description: soft-deletes the domain and returns 204
    get:
      operationId: getV1DomainsUuid
      summary: Retrieve
      tags:
      - Domains
      parameters:
      - name: uuid
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: returns a single domain
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      type:
                        type: string
                      attributes:
                        type: object
                        properties:
                          domain:
                            type: string
                          scheme:
                            type: string
                          host:
                            type: string
                          matchType:
                            type: string
                          projectName:
                            type: string
                          gmbName:
                            type: string
                          colour:
                            type: string
                          backlinkMonitor:
                            type: boolean
                          ranktracker:
                            type: boolean
                          websiteAudit:
                            type: boolean
                          keywordMonitor:
                            type: boolean
                          competitors:
                            type: array
                            items: {}
                          history:
                            type: array
                            items: {}
                          tags:
                            type: array
                            items: {}
                          updatedAt:
                            type: string
                          createdAt:
                            type: string
                        required:
                        - domain
                        - scheme
                        - host
                        - matchType
                        - projectName
                        - gmbName
                        - colour
                        - backlinkMonitor
                        - ranktracker
                        - websiteAudit
                        - keywordMonitor
                        - competitors
                        - history
                        - tags
                        - updatedAt
                        - createdAt
                    required:
                    - id
                    - type
                    - attributes
                required:
                - data
        '404':
          description: returns 404 for a domain in another account
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                        status:
                          type: integer
                        detail:
                          type: string
                      required:
                      - code
                      - status
                      - detail
                required:
                - errors
    patch:
      operationId: patchV1DomainsUuid
      summary: Update
      tags:
      - Domains
      parameters:
      - name: uuid
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                domain:
                  type: object
                  properties:
                    project_name:
                      type: string
                  required:
                  - project_name
              required:
              - domain
      responses:
        '200':
          description: updates editable attributes and returns 200
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      type:
                        type: string
                      attributes:
                        type: object
                        properties:
                          domain:
                            type: string
                          scheme:
                            type: string
                          host:
                            type: string
                          matchType:
                            type: string
                          projectName:
                            type: string
                          gmbName:
                            type: string
                          colour:
                            type: string
                          backlinkMonitor:
                            type: boolean
                          ranktracker:
                            type: boolean
                          websiteAudit:
                            type: boolean
                          keywordMonitor:
                            type: boolean
                          competitors:
                            type: array
                            items: {}
                          history:
                            type: array
                            items: {}
                          tags:
                            type: array
                            items: {}
                          updatedAt:
                            type: string
                          createdAt:
                            type: string
                        required:
                        - domain
                        - scheme
                        - host
                        - matchType
                        - projectName
                        - gmbName
                        - colour
                        - backlinkMonitor
                        - ranktracker
                        - websiteAudit
                        - keywordMonitor
                        - competitors
                        - history
                        - tags
                        - updatedAt
                        - createdAt
                    required:
                    - id
                    - type
                    - attributes
                required:
                - data
  "/v1/domains/{uuid}/history":
    get:
      operationId: getV1DomainsUuidHistory
      summary: Ranking & visibility history
      tags:
      - Domains
      parameters:
      - name: end_date
        in: query
        required: false
        schema:
          type: string
      - name: start_date
        in: query
        required: false
        schema:
          type: string
      - name: uuid
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: returns the pre-computed history series
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        uuid:
                          type: string
                        domainId:
                          type: integer
                        deviceId:
                          type: integer
                        date:
                          type: string
                        createdAt:
                          type: string
                        updatedAt:
                          type: string
                        keywordCount:
                          type: integer
                        trackedKeywords:
                          type: integer
                        untrackedKeywords:
                          type: integer
                        filtered:
                          type: boolean
                        cached:
                          type: boolean
                        visibility:
                          type: number
                          format: float
                        googleVisibility:
                          type: integer
                        googlelocalVisibility:
                          type: integer
                        googlemapsVisibility:
                          type: integer
                        yahooVisibility:
                          type: integer
                        bingVisibility:
                          type: integer
                        yandexVisibility:
                          type: integer
                        youtubeVisibility:
                          type: integer
                        naverwebdocsVisibility:
                          type: integer
                        naverlocalVisibility:
                          type: integer
                        baiduVisibility:
                          type: integer
                        googlenewsVisibility:
                          type: integer
                        googleimagesVisibility:
                          type: integer
                        googleadvertiserVisibility:
                          type: integer
                        daumsiteVisibility:
                          type: integer
                        daumwebVisibility:
                          type: integer
                        organicAveragePosition:
                          type: number
                          format: float
                        organicAverageRank:
                          type: number
                          format: float
                        absoluteAveragePosition:
                          type: number
                          format: float
                        absoluteAverageRank:
                          type: number
                          format: float
                        localPackAveragePosition:
                          type: number
                          format: float
                        localPackAverageRank:
                          type: number
                          format: float
                        organicAveragePositionAll:
                          type: number
                          format: float
                        absoluteAveragePositionAll:
                          type: number
                          format: float
                        localPackAveragePositionAll:
                          type: number
                          format: float
                        traffic:
                          type: integer
                        searchVolume:
                          type: integer
                        savings:
                          type: integer
                        domainAuthority:
                          type: number
                          format: float
                        pageAuthority:
                          type: number
                          format: float
                        mozRank:
                          type: number
                          format: float
                        mozTrust:
                          type: number
                          format: float
                        citationFlow:
                          type: integer
                        trustFlow:
                          type: integer
                        backlinks:
                          type: integer
                        referringDomains:
                          type: integer
                        referringIps:
                          type: integer
                        fbShares:
                          type: integer
                        organicKeywords:
                          type: integer
                        pages:
                          type: integer
                        ownedSerpFeatures:
                          type: integer
                        availableSerpFeatures:
                          type: integer
                        nonTrackedSerpFeatures:
                          type: integer
                        ownedSerpFeaturesPercentage:
                          type: number
                          format: float
                        nonTrackedSerpFeaturesPercentage:
                          type: number
                          format: float
                        organicOne:
                          type: integer
                        organicTwo:
                          type: integer
                        organicThreeFive:
                          type: integer
                        organicSixTen:
                          type: integer
                        organicElevenTwenty:
                          type: integer
                        organicTwentyOneThirty:
                          type: integer
                        organicThirtyOneFourty:
                          type: integer
                        organicFourtyOneFifty:
                          type: integer
                        organicFiftyOneOneHundred:
                          type: integer
                        organicFiftyOneSeventyFive:
                          type: integer
                        organicSeventySixOneHundred:
                          type: integer
                        organicUnranked:
                          type: integer
                        organicUp:
                          type: integer
                        organicDown:
                          type: integer
                        organicNoMovement:
                          type: integer
                        absoluteOne:
                          type: integer
                        absoluteTwo:
                          type: integer
                        absoluteThreeFive:
                          type: integer
                        absoluteSixTen:
                          type: integer
                        absoluteElevenTwenty:
                          type: integer
                        absoluteTwentyOneThirty:
                          type: integer
                        absoluteThirtyOneFourty:
                          type: integer
                        absoluteFourtyOneFifty:
                          type: integer
                        absoluteFiftyOneOneHundred:
                          type: integer
                        absoluteFiftyOneSeventyFive:
                          type: integer
                        absoluteSeventySixOneHundred:
                          type: integer
                        absoluteUnranked:
                          type: integer
                        absoluteUp:
                          type: integer
                        absoluteDown:
                          type: integer
                        absoluteNoMovement:
                          type: integer
                        localPackOne:
                          type: integer
                        localPackTwo:
                          type: integer
                        localPackThree:
                          type: integer
                        localPackUnranked:
                          type: integer
                        localPackUp:
                          type: integer
                        localPackDown:
                          type: integer
                        localPackNoMovement:
                          type: integer
                      required:
                      - uuid
                      - domainId
                      - deviceId
                      - date
                      - createdAt
                      - updatedAt
                      - keywordCount
                      - trackedKeywords
                      - untrackedKeywords
                      - filtered
                      - cached
                      - visibility
                      - googleVisibility
                      - googlelocalVisibility
                      - googlemapsVisibility
                      - yahooVisibility
                      - bingVisibility
                      - yandexVisibility
                      - youtubeVisibility
                      - naverwebdocsVisibility
                      - naverlocalVisibility
                      - baiduVisibility
                      - googlenewsVisibility
                      - googleimagesVisibility
                      - googleadvertiserVisibility
                      - daumsiteVisibility
                      - daumwebVisibility
                      - organicAveragePosition
                      - organicAverageRank
                      - absoluteAveragePosition
                      - absoluteAverageRank
                      - localPackAveragePosition
                      - localPackAverageRank
                      - organicAveragePositionAll
                      - absoluteAveragePositionAll
                      - localPackAveragePositionAll
                      - traffic
                      - searchVolume
                      - savings
                      - domainAuthority
                      - pageAuthority
                      - mozRank
                      - mozTrust
                      - citationFlow
                      - trustFlow
                      - backlinks
                      - referringDomains
                      - referringIps
                      - fbShares
                      - organicKeywords
                      - pages
                      - ownedSerpFeatures
                      - availableSerpFeatures
                      - nonTrackedSerpFeatures
                      - ownedSerpFeaturesPercentage
                      - nonTrackedSerpFeaturesPercentage
                      - organicOne
                      - organicTwo
                      - organicThreeFive
                      - organicSixTen
                      - organicElevenTwenty
                      - organicTwentyOneThirty
                      - organicThirtyOneFourty
                      - organicFourtyOneFifty
                      - organicFiftyOneOneHundred
                      - organicFiftyOneSeventyFive
                      - organicSeventySixOneHundred
                      - organicUnranked
                      - organicUp
                      - organicDown
                      - organicNoMovement
                      - absoluteOne
                      - absoluteTwo
                      - absoluteThreeFive
                      - absoluteSixTen
                      - absoluteElevenTwenty
                      - absoluteTwentyOneThirty
                      - absoluteThirtyOneFourty
                      - absoluteFourtyOneFifty
                      - absoluteFiftyOneOneHundred
                      - absoluteFiftyOneSeventyFive
                      - absoluteSeventySixOneHundred
                      - absoluteUnranked
                      - absoluteUp
                      - absoluteDown
                      - absoluteNoMovement
                      - localPackOne
                      - localPackTwo
                      - localPackThree
                      - localPackUnranked
                      - localPackUp
                      - localPackDown
                      - localPackNoMovement
                required:
                - data
  "/v1/domains/{uuid}/share-of-voice":
    get:
      operationId: getV1DomainsUuidShareOfVoice
      summary: Share of voice
      tags:
      - Domains
      parameters:
      - name: end_date
        in: query
        required: false
        schema:
          type: string
      - name: start_date
        in: query
        required: false
        schema:
          type: string
      - name: uuid
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: returns the share-of-voice envelope
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      overall:
                        type: object
                        properties:
                          visibility:
                            type: integer
                          change:
                            type: integer
                        required:
                        - visibility
                        - change
                      chart:
                        type: object
                        properties:
                          dates:
                            type: array
                            items:
                              type: string
                          results:
                            type: object
                            properties:
                              www.example.com:
                                type: array
                                items:
                                  type: integer
                            required:
                            - www.example.com
                        required:
                        - dates
                        - results
                      searchEngines:
                        type: array
                        items: {}
                    required:
                    - overall
                    - chart
                    - searchEngines
                required:
                - data
  "/v1/tags":
    get:
      operationId: getV1Tags
      summary: List
      tags:
      - Tags
      responses:
        '200':
          description: returns only active tags for the account, ordered by name
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        type:
                          type: string
                        attributes:
                          type: object
                          properties:
                            name:
                              type: string
                            colour:
                              type: string
                            keywordCount:
                              type: integer
                            createdAt:
                              type: string
                            updatedAt:
                              type: string
                          required:
                          - name
                          - colour
                          - keywordCount
                          - createdAt
                          - updatedAt
                      required:
                      - id
                      - type
                      - attributes
                required:
                - data
        '403':
          description: returns 403 Forbidden
          content:
            text/html:
              schema:
                type: string
      parameters:
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
    post:
      operationId: postV1Tags
      summary: Create
      tags:
      - Tags
      responses:
        '201':
          description: creates a tag and returns 201
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      type:
                        type: string
                      attributes:
                        type: object
                        properties:
                          name:
                            type: string
                          colour:
                            type: string
                          keywordCount:
                            type: integer
                          createdAt:
                            type: string
                          updatedAt:
                            type: string
                        required:
                        - name
                        - colour
                        - keywordCount
                        - createdAt
                        - updatedAt
                    required:
                    - id
                    - type
                    - attributes
                required:
                - data
        '400':
          description: returns 400 when the tag params are missing entirely
          content:
            text/plain:
              schema:
                type: string
        '422':
          description: returns 422 for a blank name
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                        status:
                          type: integer
                        source:
                          type: object
                          properties:
                            pointer:
                              type: string
                          required:
                          - pointer
                        detail:
                          type: string
                      required:
                      - code
                      - status
                      - source
                      - detail
                required:
                - errors
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                tag:
                  type: object
                  properties:
                    name:
                      type: string
                    colour:
                      type: string
                  required:
                  - name
                  - colour
              required:
              - tag
  "/v1/tags/{uuid}":
    delete:
      operationId: deleteV1TagsUuid
      summary: Delete
      tags:
      - Tags
      parameters:
      - name: uuid
        in: path
        required: true
        schema:
          type: string
      responses:
        '204':
          description: soft-deletes the tag and returns 204
        '404':
          description: returns 404 for a tag in another account
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                        status:
                          type: integer
                        detail:
                          type: string
                      required:
                      - code
                      - status
                      - detail
                required:
                - errors
    get:
      operationId: getV1TagsUuid
      summary: Retrieve
      tags:
      - Tags
      parameters:
      - name: uuid
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: returns a single tag
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      type:
                        type: string
                      attributes:
                        type: object
                        properties:
                          name:
                            type: string
                          colour:
                            type: string
                          keywordCount:
                            type: integer
                          createdAt:
                            type: string
                          updatedAt:
                            type: string
                        required:
                        - name
                        - colour
                        - keywordCount
                        - createdAt
                        - updatedAt
                    required:
                    - id
                    - type
                    - attributes
                required:
                - data
        '404':
          description: returns 404 when the tag does not exist
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                        status:
                          type: integer
                        detail:
                          type: string
                      required:
                      - code
                      - status
                      - detail
                required:
                - errors
    patch:
      operationId: patchV1TagsUuid
      summary: Update
      tags:
      - Tags
      parameters:
      - name: uuid
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                tag:
                  type: object
                  properties:
                    name:
                      type: string
                  required:
                  - name
              required:
              - tag
      responses:
        '200':
          description: updates the tag and returns 200
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      type:
                        type: string
                      attributes:
                        type: object
                        properties:
                          name:
                            type: string
                          colour:
                            type: string
                          keywordCount:
                            type: integer
                          createdAt:
                            type: string
                          updatedAt:
                            type: string
                        required:
                        - name
                        - colour
                        - keywordCount
                        - createdAt
                        - updatedAt
                    required:
                    - id
                    - type
                    - attributes
                required:
                - data
        '422':
          description: returns 422 for invalid attributes
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                        status:
                          type: integer
                        source:
                          type: object
                          properties:
                            pointer:
                              type: string
                          required:
                          - pointer
                        detail:
                          type: string
                      required:
                      - code
                      - status
                      - source
                      - detail
                required:
                - errors
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: 'Your API key, sent verbatim in the `Authorization` header (e.g.
        `Authorization: tkn_usr_…`). No `Bearer` prefix.'
